当前位置: 首页>>代码示例>>PHP>>正文


PHP Area::getAllProvinceNameList方法代码示例

本文整理汇总了PHP中Area::getAllProvinceNameList方法的典型用法代码示例。如果您正苦于以下问题:PHP Area::getAllProvinceNameList方法的具体用法?PHP Area::getAllProvinceNameList怎么用?PHP Area::getAllProvinceNameList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Area的用法示例。


在下文中一共展示了Area::getAllProvinceNameList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getAreaHospitalData

    private function getAreaHospitalData($nowPage, $pageSize) 
    {/*{{{*/
        $res = array();
        $cityRes = $proviceRes = array();
        $provinceList = Area::getAllProvinceNameList();
        $cityList = Area::getCities();
        foreach($provinceList as $province)
        {
            echo date('Y-m-d H:i:s')."计算".$province."的数据。。。。\n";
            foreach($cityList[$province] as $city)
            {
                if($province != $city)
                {
                    $cityParams = array('province'=>$province, 'city'=>$city);
                    //通过市级查询
                    $itemCity = $this->buildAreaData($cityParams, $nowPage, $pageSize);
                    if(false == empty($itemCity))
                    {
                        $cityRes[] = $itemCity;
                    }
                    unset($itemCity);
                }
                BeanFinder::get('LocalCache')->removeAll(); 
            }

            //通过省级查询
            $provinceParams = array('province'=>$province);
            $itemProvice = $this->buildAreaData($provinceParams, $nowPage, $pageSize);
            if(false == empty($itemProvice))
            {
                $proviceRes[] = $itemProvice;
            }
            unset($itemProvice);
            BeanFinder::get('LocalCache')->removeAll(); 
        }
        $data = array_merge($cityRes, $proviceRes);
        return $this->formatData($data);
    }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:38,代码来源:hospitalbyarea.php

示例2: dealSearchOptions

 private function dealSearchOptions($request, $response)
 {
     /*{{{*/
     $response->isMatchPrecisely = $request->getRequest('isMatchPrecisely', 0);
     $response->filters = $request->getRequest('filters', array());
     $response->hospitalName = $request->getRequest('hospitalName', '');
     $response->facultyName = $request->getRequest('facultyName', '');
     $response->doctorName = $request->getRequest('doctorName', '');
     $response->diseaseName = $request->getRequest('diseaseName', '');
     $response->userName = $request->getRequest('userName', '');
     $response->serviceDef = $request->getRequest('serviceDef', ServiceDef::TYPE_TELORDER);
     $response->doctorType = $request->getRequest('doctorType', '');
     $response->groups = $request->getRequest('groups', 0);
     $response->groupCategories = $request->getRequest('groupCategories', 0);
     $response->childCategories = $request->getRequest('childCategories', 0);
     $response->provinces = $request->getRequest('provinces', array());
     $response->canBind = $request->getRequest('canBind', 0);
     $response->provNameList = Area::getAllProvinceNameList();
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:19,代码来源:doctormanagercontroller.php

示例3: getData

    protected function getData($nowPage, $pageSize)
    {/*{{{*/
        $facultyIds = FacultyClient::getInstance()->getFacultyListByOption($nowPage, $pageSize);
        $faculties = DAL::get()->find('Faculty', $facultyIds['ids']);
        $provinces = Area::getAllProvinceNameList();
        $provinces[] = "全国";
        $res = array();
        foreach ($faculties as $faculty)
        {
            $info['key'] = $faculty->name;
            $offices = $doctorInfos = array();
            foreach ($provinces as $province)
            {
                if (Area::isZXS($province))
                {
                    $cities = array($province);
                }
                elseif($province == "全国")
                {
                   $cities = array("全国"); 
                }
                else
                {
                    $cities = Area::getProvinceCities($province);
                    $cities[] = $province;
                }

                foreach ($cities as $city)
                {
                    $options = array();
                    $options['facultyId'] = $faculty->id;
                    $options['orderBy']['rank'] = true;
                    $options['isVirtual'] = 0;
                    $options['hospitalIsActivated'] = 1;
                    if ($city != "全国")
                    {
                        if (Area::isProvince($city) || Area::isZXS($city))
                        {
                            $options['province'] = $city;
                            $areaUrl = "http://haoping.haodf.com/keshi/".$faculty->getEncodeId()."/keshi/".Area::getProvKeyByName($city).".htm";
                        }
                        else
                        {
                            $options['city'] = $city;
                            $str = Area::retrieveCityEnglishName($province, Area::getProvKeyByName($province), $city);
                            $areaUrl = "http://haoping.haodf.com/keshi/".$faculty->getEncodeId()."/keshi/".Area::getProvKeyByName($province).".htm?city=".$str;
                        }
                    }
                    else
                    {
                        $areaUrl = "http://haoping.haodf.com/keshi/".$faculty->getEncodeId()."/keshi/all.htm";
                    }

                    $hospitalfaculties = HospitalFacultyClient::getInstance()->getHospitalFacultyByOption(1, 30, $options);
                    if (false == empty($hospitalfaculties)) 
                    {
                        $office['area'] = $city;
                        $office['areaurl'] = $areaUrl;
                        foreach ($hospitalfaculties as $hospitalfaculty) 
                        {
                            if ($hospitalfaculty->doctorCount < 1)
                            {
                                continue;
                            }
                            $officeInfo['office']['officename'] = $hospitalfaculty->hospital->name.$hospitalfaculty->name;
                            $officeInfo['office']['city'] = $hospitalfaculty->hospital->city;
                            $officeInfo['office']['officeurl'] = $hospitalfaculty->getUrl();
                            $officeInfo['office']['aptitude'] = $hospitalfaculty->hospital->getGradeStr();
                            $officeInfo['office']['gooddoctornum'] = $hospitalfaculty->doctorCount;
                            $officeInfo['office']['votenum'] = $hospitalfaculty->rank;
                            $office[] = $officeInfo;
                            $officeInfo = array();
                        }

                        $offices[] = array('offices' =>$office);
                        $office = array();
                    }

                    $page = $params = array();
                    $page['nowPage'] = 1;
                    $page['pageSize'] = 30;
                    $doctorList = DoctorClient::getInstance()->getDoctorBetweenFaculty($faculty->id, $faculty->id+1, $options, $page);
                    if (false == empty($doctorList['list'])) 
                    {
                        $doctors['area'] = $city;
                        $pre = "all";
                        if ($city != "全国")
                        {
                            $pre = Area::getProvKeyByName($province);
                        }
                        $doctors['areaurl'] = "http://haoping.haodf.com/keshi/".$faculty->getEncodeId()."/daifu/".$pre.".htm";
                        $doctorInfo = array();
                        foreach ($doctorList['list'] as $doctor)
                        {
                            if (74154 != $doctor->id && $doctor->hospitalfaculty->hospital->isActivated && $doctor->hospitalfaculty->hospital->name != "未收录医院")
                            {
                                $doctors['doctor']['doctorname'] = $doctor->name;    
                                $doctors['doctor']['doctorurl'] = $doctor->getUrl();
                                $doctors['doctor']['doctorgrade'] = $doctor->grade ? $doctor->grade : " ";
                                $doctors['doctor']['doctorjob'] = $doctor->educateGrade ? $doctor->educateGrade : " ";
//.........这里部分代码省略.........
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:101,代码来源:officedoctor4baidu.php


注:本文中的Area::getAllProvinceNameList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。