private function getRealData($nowPage, $pageSize, $province) {/*{{{*/ $options['hospitalGrade'] = Hospital::GRADE_6; $options['orderByDesc'] = 'fld_HospitalCommentCount'; $options['province'] = $province; $hospitalList = HospitalClient::getInstance()->getHospitalByOption($nowPage, $pageSize, $options); $area = 'province'; //对省和市进行标记 $realData[] = $this->buildData($nowPage, $pageSize, $hospitalList, $area); $cities = City::getProvinceCities($province); if(in_array(array_shift($cities), $this->directlyCities)) { return $realData; } foreach($cities as $city) { $area = 'city'; $options['city'] = $city; $hospitalList4City = HospitalClient::getInstance()->getHospitalByOption($nowPage, $pageSize, $options); $realData[] = $this->buildData($nowPage, $pageSize, $hospitalList4City, $area); unset($city); } BeanFinder::get('LocalCache')->removeAll(); return $realData; }/*}}}*/
public static function getProvincesCities(array $provinces) { $cities = array(); foreach ($provinces as $province) { $cities = array_merge($inCities, City::getProvinceCities($province)); } return $cities; }