本文整理汇总了PHP中Area::provDefineInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP Area::provDefineInfo方法的具体用法?PHP Area::provDefineInfo怎么用?PHP Area::provDefineInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Area
的用法示例。
在下文中一共展示了Area::provDefineInfo方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: commonInfo
public function commonInfo($request, $response)
{
$provInfos = Area::provDefineInfo();
$provKey = $request->pro;
$provKey = ($provKey == 'all') ? '' : $provKey;
$HOSPITAL_COUNT = (empty($provKey)) ? 12 : 100;
$defaultProvs = self::$DefaultProvs;
$dspProv = '';
$hasProv = true;
$prov = array();
if(empty($provKey))
{
$hasProv = false;
$defaultKeys = $request->defaultProvs;
$defaultProvs = ($defaultKeys != '') ? explode(',', $defaultKeys) : $defaultProvs;
$provKey = $defaultProvs;
foreach($provKey as $tempProv)
{
$tmpInfos = $provInfos[$tempProv];
$pro = $tmpInfos['Province'];
$prov[] = $pro;
}
}
else
{
$tmpInfos = $provInfos[$provKey];
$pro = $tmpInfos['Province'];
$dspProv =$pro;
$prov = array($pro);
}
$hospitalList = HospitalClient::getInstance()->getListByProvinceAry($prov, $limit=1000);
$proHosptialList=array();
foreach($hospitalList as $hospital)
{
if(in_array($hospital->province, $prov))
{
$city = $hospital->city;
if($hospital->province == $hospital->city)
{
$city = $hospital->district;
}
if(isset($proHosptialList[$hospital->province][$city]))
{
$proHosptialList[$hospital->province][$city]['hospital'][] = $hospital;
if($proHosptialList[$hospital->province][$city]['count'] > $HOSPITAL_COUNT){ continue; }
$proHosptialList[$hospital->province][$city]['count']++;
}
else
{
$proHosptialList[$hospital->province][$city] = array('count'=>1,'hospital'=>array($hospital));
}
}
}
$dspProHosptialList = array();
if($hasProv == false)
{
foreach($defaultProvs as $defaultProv)
{
$tmpInfos = $provInfos[$defaultProv];
$pro = $tmpInfos['Province'];
$dspProHosptialList[$pro] = $proHosptialList[$pro];
}
}
else
{
$dspProHosptialList = $proHosptialList;
}
$response->proHosptialList = $dspProHosptialList;
$response->dspProv = $dspProv;
}
示例2: showDetail
public function showDetail($request, $response)
{/*{{{*/
$key = $request->key;
$searchProv = $request->prov;
$page = (int)$request->page;
$page = ($page > 0) ? $page : 1;
$pageSize = 20;
$disease = DiseaseClient::getInstance()->getByDiseaseKey($key);
if (empty($disease) || $disease->isNull())
{
throw new BizException('疾病不存在');
}
$pid = $disease->id ;
$response->disease = $disease;
if($disease->parentKey != '')
{
$parentDisease = DiseaseClient::getInstance()->getByDiseaseKey($disease->parentKey);
$pid = $parentDisease->id ;
}
$provInfos = Area::provDefineInfo();
$options = array();
if(empty($searchProv) == false)
{
$tmpProvInfo = $provInfos["$searchProv"];
$options['provAry'] = explode(',', $tmpProvInfo['Province']);
$options['province'] = explode(',', $tmpProvInfo['Province']);
}
// $result = DiseaseDoctorClient::getInstance()->getPageListByDisease($pid, $page, $pageSize, $options);
$result = DiseaseClient::getInstance()->getDieaseDoctor4Disease($pid, $page, $pageSize, $options);
$response->result = $result ;
$pageInfo = $result['pageInfo'];
$limit = 10;
if(empty($searchProv) == false)
{
$limit = 1000;
}
$tempHospitalList = DiseaseClient::getInstance()->getTopDiseaseHospitalListByDisease($pid, $limit, $options);
$topHospitalList = array();
foreach($tempHospitalList as $temHospital)
{
if($temHospital->id != 2118)
{
$topHospitalList[] = $temHospital;
}
}
$response->topHospitalList = $topHospitalList;
//省市与合计列表
$tmpInfos = HospitalClient::getInstance()->getAreaStatByDisease($pid, array());
$statInfos = array();
foreach($tmpInfos as $tmpInfo)
{
$statInfos[$tmpInfo['province']] = $tmpInfo['cnt'];
}
$dspStatInfos = array();
foreach($provInfos as $provInfo)
{
$name = $provInfo['Name'];
$province = $provInfo['Province'];
$dspStatInfos["$name"] = 0;
if($name != $province)
{
$tmpStr = $provInfo['Province'];
$tmpNames = explode(',', $tmpStr);
foreach($tmpNames as $tmpName)
{
if(isset($statInfos["$tmpName"]))
$dspStatInfos["$name"] += $statInfos["$tmpName"];
}
}
else
{
if(isset($statInfos["$name"]))
$dspStatInfos["$name"] = $statInfos["$name"];
}
}
$response->provInfos = $provInfos ;
$response->dspStatInfos = $dspStatInfos ;
$response->statInfos = $statInfos;
$tmpCommentList = DAL::get()->find_all_latestCommentByDisease('DoctorComment', $disease->id, $limit=5, $options);
$commentList = array();
foreach($tmpCommentList as $key=>$comment)
{
if($comment->doctor->hospitalfaculty->hospital->id != 2118)
{
$commentList[] = $comment;
}
}
$response->commentList = $commentList ;
$diseaseContentInfos = DiseaseClient::getInstance()->getContentInfosByKey($disease->key);
$response->diseaseContentInfos = $diseaseContentInfos ;
$response->searchProv = $searchProv ;
$router = $response->getRouter();
$response->pagelink = PageNav::getNavLink(
PageNav::getPageNavTemplate($router->urlfor('disease/showdetail', array('key'=>$disease->key, 'prov'=>$searchProv))."&page="),
$pageInfo['nowpage'], $pageInfo['pagesize'], $pageInfo['total']);
//.........这里部分代码省略.........
示例3: getDiseaseOption
<script type="text/javascript">
function getDiseaseOption (facultyName) {
$.post( "payment.php?oa=admin/booking_order,ajax_getdisease", {faculty_name:facultyName},
function(data) {
$("#combobox").html(data);
$("#combobox").attr("value",'0');
}
);
}
</script>
<!-- start -->
<div style="margin-left:20px; padding-bottom:10px">
<form name="searchForm" id="searchForm" action="" method="post" >
<select name="searchProvince" id="searchProvince">
<option value="">按地区</option>
<?php foreach (Area::provDefineInfo() as $prov => $info) { ?>
<option value="<?=$info['Name']?>" ><?=$info['Name']?></option>
<?php } ?>
</select>
<select name="searchFaculty" id="searchFaculty" >
<option value="" >全部</option>
<?php foreach ($facultyList as $facultyId => $facultyName) { ?>
<option value="<?=$facultyName?>" ><?=$facultyName?></option>
<?php } ?>
</select>
<select name="searchDisease" id="combobox">
<option value="">按疾病</option>
<?php foreach ($diseaseList as $disease) { ?>
<option value="<?=$disease?>" ><?=$disease?></option>
<?php } ?>
示例4: showDetail
public function showDetail($request, $response)
{
$encodeId = $request->id;
$id = (int)Codec::getInstance()->decodeId($encodeId);
if($id == 0)
{
exit();
}
$searchProv = $request->prov;
$page = (int)$request->page;
$page = ($page > 0) ? $page : 1;
$pageSize = 20;
$provInfo = Area::provDefineInfo();
$provReverseInfo = Area::provReverseDefineInfo();
$options = array();
if(empty($searchProv) == false)
{
$tmpProvInfo = $provInfo["$searchProv"];
$options['provAry'] = explode(',', $tmpProvInfo['Province']);
}
$facultyList = array();
$options['commentType'] = DoctorComment::COMMENT_TYPE_PROCESS;
$options['faculty'] = $id;
$pageInfo['pageSize'] = 15;
$commentList = DoctorCommentClient::getInstance()->getCommentList($options, $pageInfo);
$result = DoctorClient::getInstance()->getPageListByFaculty($id, $page, $pageSize, $options);
$doctorList = array();
$pageInfo = array();
$pageInfo = $result['pageInfo'];
if(empty($result) == false)
{
$doctorList = $result['doctorList'];
}
$facultyList = HospitalFacultyClient::getInstance()->getListByFacultyId($id);
$LIMIT_COUNT = (empty($searchProv)) ? 4 : 20;
$provFaculty=array();
$facultyInfo='';
foreach($facultyList as $hospitalFaculty)
{
if($hospitalFaculty->goodVoteCount==0 || $hospitalFaculty->hospital->id == 2118 ){continue;}
$facultyInfo = $hospitalFaculty->faculty;
$pro = $hospitalFaculty->hospital->province;
$hospitalName = $hospitalFaculty->hospital->name;
if (false == ($hospitalFaculty->hospital instanceof Hospital))
{
continue;
}
$name = $provReverseInfo[$pro]['Name'];
if(empty($searchProv) == false)
{
if($name != $provInfo["$searchProv"]['Name'])
{
continue;
}
}
if(isset($provFaculty[$name]))
{
$provFaculty[$name]['faculty'][] = $hospitalFaculty;
if($provFaculty[$name]['count']>=$LIMIT_COUNT) { continue; }
$provFaculty[$name]['count']++;
}
else
{
$provFaculty[$name] = array('count'=>1, 'faculty'=>array($hospitalFaculty));
}
}
//еепР
$dspProvFacultys = array();
foreach($provInfo as $prov)
{
if(isset($provFaculty[$prov['Name']]))
$dspProvFacultys[$prov['Name']] = $provFaculty[$prov['Name']];
}
$response->facultyInfo = $facultyInfo;
$response->facultyList = $dspProvFacultys;
$response->provInfo = $provInfo;
$response->commentList = $commentList['commentList'];
$response->doctorList = $doctorList;
$response->searchProv = $searchProv;
$router = $response->getRouter();
$response->pagelink = PageNav::getNavLink(
PageNav::getPageNavTemplate($router->urlfor('faculty/showdetail', array('id'=>$encodeId, 'prov'=>$searchProv))."&page="),
$pageInfo['nowpage'], $pageInfo['pagesize'], $pageInfo['total']);
}