Пример #1
0
 /**
  * 获取二手房计划排队名次
  *
  * @param $planId
  * @param $commId
  * @param $minPrice
  * @param $maxPrice
  * @return int
  */
 public static function getEsfOnQueueNum($planId, $areaCode, $minPrice, $maxPrice)
 {
     $allOnQueueChoice = Model_Plan_EsfAjkPropSpread::getChoicePlanInfoByBlockAndPrice($areaCode, $minPrice, $maxPrice);
     if (empty($allOnQueueChoice)) {
         return 1;
     }
     $index = 1;
     foreach ($allOnQueueChoice as $key => $row) {
         if ($planId == $row->id) {
             $index = $key + 1;
             break;
         }
     }
     return $index;
 }