private static function dealBuildingAreaChange($cityId, $oldBlockId, $newBlockId, $houseType, $houseLogType, $actionType) { $useBusinessCycleConfigOption = array(Model_House_JpHouseIdx::ENUM_HOUSE_TYPE_OFFICE_RENT => 'clues_search_condition_office_rent_list_switch', Model_House_JpHouseIdx::ENUM_HOUSE_TYPE_OFFICE_SALE => 'clues_search_condition_office_sale_list_switch'); $useBusinessCycleConfig = APF::get_instance()->get_config($useBusinessCycleConfigOption[$houseType], 'jpmulticity'); $useBusinessCycle = isset($useBusinessCycleConfig[$cityId]) && $useBusinessCycleConfig[$cityId]; if ($useBusinessCycle) { $oldBusinessCycleId = Model_Jinpu_NewBusinessBlockMap::getNewBusinessCycleByOldBlockId($oldBlockId); $choicePlanList = Model_Plan_Jp::getValidChoicePlanByBlockIdAndNewBlockId($oldBlockId, $oldBusinessCycleId, $houseType); } else { $choicePlanList = Model_Plan_Jp::getValidChoicePlanByBlockIdAndNewBlockId($oldBlockId, 0, $houseType); } $rtn = array(); foreach ($choicePlanList as $choicePlan) { $houseLog = array(); $houseLog['houseId'] = $choicePlan['houseId']; $houseLog['planId'] = $choicePlan['id']; $houseLog['brokerId'] = $choicePlan['ajkBrokerId']; $houseLog['cityId'] = $choicePlan['cityId']; $houseLog['type'] = $houseLogType; $houseLog['changeType'] = $actionType; $houseLog['remark'] = sprintf('房源所在物业、写字楼板块发生变更[%d -> %d]', $oldBlockId, $newBlockId); $houseLog['addDate'] = date('Y-m-d H:i:s'); $houseLog['operatorId'] = 0; $houseLog['siteType'] = 3; if (!Model_Log_HouseLogNew::create($houseLog, date('Ymd'))->save()) { $rtn[] = sprintf('板块变更房源[%d]日志写入失败', $choicePlan['houseId']); continue; } $rtn[] = sprintf('板块变更房源[%d]日志写入成功', $choicePlan['houseId']); } return $rtn; }