$arFilter = [
'STAGE_ID' => 'C4:WON',
'CLOSEDATE' => \Bitrix\Main\Type\DateTime::createFromTimestamp(strtotime("+1 month"))
];
$arSelect = ['ASSIGNED_BY_ID', 'CLOSEDATE'];
$res = \CCrmDeal::GetList([], $arFilter, $arSelect);
CModule::IncludeModule('crm');
use Bitrix\Crm\DealTable;
$arFilter = [
'STAGE_ID' => 'WON',
'<=CLOSEDATE' => \Bitrix\Main\Type\DateTime::createFromTimestamp(strtotime("-1 month"))
];
$arSelect = ['ID','ASSIGNED_BY_ID', 'CLOSEDATE'];
$arDeals=DealTable::getList([
'order'=>['ID' => 'DESC'],
'filter'=>$arFilter,
'select'=>$arSelect,
'cache' => ['ttl' => 3600],
'limit'=>100
])->fetchAll();
$deals=[];
foreach($arDeals as $deal){
$deals[$deal['ID']]=$deal;
}
print_r($deals);