Exemplo n.º 1
0
 /**
  * 获取经纪人有效的竞价计划
  *
  * @param int $brokerId
  * @param int $cityId
  * @param array $propIds
  * @param bool $isChoiceCity
  * @return array
  */
 public static function getBrokerBidPlanList($brokerId, $cityId, &$propIds, $isChoiceCity)
 {
     $choicePlanList = Bll_Plan_Bid_AjkPlan::getBrokerValidPlanList($brokerId, $cityId, $isChoiceCity);
     if (empty($choicePlanList)) {
         return array();
     }
     if (!is_array($propIds)) {
         $propIds = array();
     }
     $result = array();
     foreach ($choicePlanList as $choicePlan) {
         $propIds[] = $choicePlan['propId'];
         $result[$choicePlan['propId']] = $choicePlan;
     }
     return $result;
 }
Exemplo n.º 2
0
 /**
  * 获取经纪人有效的竞价计划
  *
  * @param int $brokerId
  * @param int $cityId
  * @param array $propIds
  * @param bool $isChoiceCity
  * @return array
  */
 public static function getBrokerBidPlanList($brokerId, $cityId, &$propIds, $isChoiceCity)
 {
     $bidPlanList = Bll_Plan_Bid_AjkPlan::getBrokerValidPlanList($brokerId, $cityId, $isChoiceCity);
     if (empty($bidPlanList)) {
         return array();
     }
     if (!is_array($propIds)) {
         $propIds = array();
     }
     $spreadingPlanList = array();
     $stoppedPlanList = array();
     $waitingPlanList = array();
     foreach ($bidPlanList as $bidPlan) {
         $propIds[] = $bidPlan['propId'];
         if (1 == $bidPlan['status']) {
             // $bidPlan['rank'] = Bll_Plan_Bid_AjkPlan::getHouseBidRank($bidPlan['propId'], $bidPlan['commId'], $bidPlan['smallprice'], $bidPlan['bigprice'], $bidPlan['commsHpratioA'], 3);
             $spreadingPlanList[] = $bidPlan;
         } elseif (11 == $bidPlan['status']) {
             $waitingPlanList[] = $bidPlan;
         } else {
             $stoppedPlanList[] = $bidPlan;
         }
     }
     $result = array();
     $bidPlanList = array_merge($spreadingPlanList, $waitingPlanList, $stoppedPlanList);
     foreach ($bidPlanList as $bidPlan) {
         $result[$bidPlan['propId']] = $bidPlan;
     }
     return $result;
 }