public function before($context) { $doctorId = Codec::getInstance()->decodeId($context->request->id); $action = $context->action; if($context->controller == 'doctor' && $context->action == 'showreply') { $comment = DoctorCommentClient::getInstance()->getDoctorCommentSubClass($context->request->commentid); $doctorId = $comment->doctor->id; } if($context->controller == 'doctor' && $context->action == 'addcomment') { $doctorId = $context->request->doctor_id; } if($context->controller == 'paper' && $context->action == 'showcmstagtypelist') { $doctorId = $context->request->searchParam; } $redirectActionArray = array( 'showdetail' ,'commentlist' ,'addcomment' ,'showcmstagtypelist' ,'showreply' ); $doctorIds = DAL::get()->find_id_by_hospitalfacultyid('doctor', 0); $isInRedirectActionArray = in_array($action, $redirectActionArray); $isInDoctorList = in_array($doctorId, $doctorIds); if($isInRedirectActionArray && $isInDoctorList) { $context->response->setRedirect('http://www.'.URL_PREFIX.'haodf.com/info/dissociatedoctornotice.php'); } }
public function showDetail($request, $response) { /*{{{*/ $id = $request->id; $doctorComment = DoctorCommentClient::getInstance()->getDoctorCommentSubClass($id); $this->toSee($id, $response); $response->_my_template = '/commentconfirm/edit'; }
public function index($request, $response) {/*{{{*/ $this->forceSpaceModuleCheck('Index', $response); $this->_doHospitalFacultyIndex($request, $response); $response->controller = 'index'; $response->newSpace = $this->_newSpace; $response->_newUser = $this->_newUser; $key = UserClient::getInstance()->getSeed('g'); $response->crumb = Crumb::create(DoctorCommentClient::getInstance()->genCommentCrumbKey(), self::TTL); }/*}}}*/
protected function getData($nowPage,$pageSize) {/*{{{*/ $thankLetterArray = array(); $pageInfo = array(); $pageInfo['pageSize'] = $pageSize; $pageInfo['nowPage'] = $nowPage; $options = array(); $options['hospital'] = $this->hospitalId; $options['commentType'] = DoctorComment::COMMENT_TYPE_THANK_LETTER; $thankLetterList = DoctorCommentClient::getInstance()->getCommentList($options, $pageInfo); foreach($thankLetterList['commentList'] as $thankLetter) { $thankLetterArray[] = array('item' => $this->getRealData($thankLetter)); unset($thankLetter); } BeanFinder::get('LocalCache')->removeAll(); return $thankLetterArray; }/*}}}*/
public function recoverComment($request, $response) { /*{{{*/ $ids = $request->ids; $messageIds = $request->indexs; $doctorCommentId = DoctorCommentClient::getInstance()->recoverDoctorComment(reset($messageIds), $this->inspector); $doctorComment = DoctorCommentClient::getInstance()->getDoctorCommentSubClass($doctorCommentId); InspectClient::getInstance()->process($doctorComment, $doctorComment->getInspectProperties()); if (false == $doctorComment->isNull()) { $response->oldData = array('DoctorComment' => ''); $response->newData = 'recover'; $response->ids = $ids; } //dodo::psq S3LogClient::getInstance()->add($this->inspector, $doctorComment->getLogable()->action(DoctorCommentLog::ACTION_RECOVER_COMMENT)); $response->result = $doctorCommentId; $response->actionDesc = "»Ö¸´Óû§ÆÀÂÛ"; $response->id = implode(",", $ids); }
public function showDetail($request, $response) { $id = $request->id; $id = (int)Codec::getInstance()->decodeId($id); if($id == 0) { exit(); } $page = (int)$request->page; $page = ($page > 0) ? $page : 1; $pageSize = 20; $hospitalFaculty = DAL::get()->find('hospitalfaculty', $id); $option['hospitalFaculty'] = $hospitalFaculty->id; $option['commentType'] = DoctorComment::COMMENT_TYPE_PROCESS; $pageInfo['pageSize'] = 7; $latestCommentList = DoctorCommentClient::getInstance()->getCommentList($option, $pageInfo); $result = DoctorClient::getInstance()->getPageListByHospitalFaculty($id, $page, $pageSize, $options=array()); $doctorList = $result['doctorList']; $pageInfo = $result['pageInfo']; //获得门诊信息 $ids = array(); foreach($doctorList as $doctor) { $ids[] = $doctor->id; } $tables = DoctorClient::getInstance()->getFormatScheduleList($ids); $response->latestCommentList=$latestCommentList['commentList']; $response->doctorList=$doctorList; $response->tables=$tables; $response->hospitalFaculty = $hospitalFaculty; $router = $response->getRouter(); $response->pagelink = PageNav::getNavLink( PageNav::getPageNavTemplate($router->urlfor('hospitalfaculty/showdetail', array('id'=>$hospitalFaculty->getEncodeId()))."?page="), $pageInfo['nowpage'], $pageInfo['pagesize'], $pageInfo['total']); }
<label><input type="radio" id="alsoCheat" name="isCheat" value="1" /> 保留作弊状态</label> </div> <div class="handle"> <a href="javascript:;" class="delete green_btn on" onclick="$('#deleteType').val(<?php echo DoctorComment::DELETETYPE_CHEAT; ?> )" id="item0_next">审核完成,进入下一条</a> </div> <?php } ?> </div> </li> <li> <?php $latest = DoctorCommentClient::getInstance()->getDoctorComment($doctorComment->id, true); ?> <div class="doc_info clearfix"> <span class="info_tit">患者信息</span> <div class="info_con clearfix"> <?php if ($latest->patient->isNull() == false) { ?> <div class="placeholder">用户姓名:<?php echo $latest->patient->name; ?> </div> <div class="placeholder">用户手机号码:<?php echo $latest->patient->user->mobile; ?> <a href="http://<?php
private function genCrumb() {/*{{{*/ return Crumb::create(DoctorCommentClient::getInstance()->genCommentCrumbKey(), self::TTL); }/*}}}*/
public function showConfirmDetail($request, $response) { /*{{{*/ $doctorComment = DoctorCommentClient::getInstance()->getDoctorCommentSubClass($request->doctorCommentId); $telDoctorComment = new TelDoctorComment($doctorComment->id); $response->doctorComment = $doctorComment; $response->telDoctorComment = $telDoctorComment; }
public function ajaxShowCommentGanxie($request, $response) { /*{{{*/ $doctor = $this->space->host->getPrimaryDoctor(); $options = array(); $nowPage = (int) $request->getRequest('nowPage', 1); $thankLetters = DoctorCommentClient::getInstance()->getCureThankLetterList4Doctor($doctor, $nowPage, 6, $options, 2); list($ganxieCommentList, $pageInfo) = array($thankLetters['commentList'], $thankLetters['pageInfo']); $pageLink = PageNav::getNavLink(PageNav::getPageNavTemplateForSpace("/payment/ajaxshowcommentganxie?nowPage=", 2, 5, 1, false), $pageInfo['nowpage'], $pageInfo['pagesize'], $pageInfo['total']); $response->ganxieCommentList = $ganxieCommentList; $response->pageLink = $pageLink; $response->nowPage = $nowPage; }
public function changeToThank($request, $response) { /*{{{*/ $post = DAL::get()->find('DoctorPatientPost', $request->postId); $content = $post->content; $ticket = DAL::get()->find_by_sourceid_and_status('Ticket', $post->id, Ticket::STATUS_WAITING); if (false == $ticket->isNull()) { $auditPost = $ticket->getInspectSource()->inspectable; //审核人员修改post后转换感谢信 if ($auditPost->content != $post->content) { $content = $auditPost->content; } } $user = $post->user; $patient = $post->doctorPatientRef->patient; $doctor = $post->doctorPatientRef->space->host; $params = array(); $params['skill'] = DoctorComment::VOTE_HENMANYI; $params['attitude'] = DoctorComment::VOTE_HENMANYI; $params['content'] = $content; $params['type'] = DoctorComment::COMMENT_TYPE_THANK_LETTER; $params['ip'] = DoctorComment::IP_FLOW; $params['userMobile'] = $user->mobile == '' ? $patient->isNull() == false ? $patient->mobile : '' : $user->mobile; $params['userRealName'] = $patient->isNull() ? $user->realName : $patient->name; $params['tag'] = $request->tag; $params['gid'] = 'HDF.fromnfs' . $user->id; $doctorCommentId = DoctorCommentClient::getInstance()->addComment($doctor->primaryId, $user, $patient->id, $params); DoctorPatientPostClient::getInstance()->deleteDoctorPatientPost($post->id, array('auditor' => $this->curInspector)); if ($request->ticketId) { $response->setRedirect($response->router->urlfor('nfsaudit/nexttask', array('c' => 'nfsaudit', 'a' => 'nexttask', 'ticketId' => $request->ticketId))); } else { $response->setRedirect($response->router->urlfor('nfsaudit/notalk', array('refId' => $post->doctorPatientRef->id))); } }
<li class="data_li"> <div class="fl pr"> <p class="doc_head"> <a target="_blank" href="<?=$space->getUrl()?>"> <img src="<?=$space->host->getHeadImg(58,58)?>" alt="" /> </a> </p> <p class="tc mt5"><a rel="nofollow" href="<?=$space->getAskUrl()?>" target="_blank" class="blue_a1">立即咨询</a></p> <!--mouseover域 start--> <?php $diseaseDoctor = DAL::get()->find_by_fld_diseaseid_and_fld_doctorid('DiseaseDoctor', $diseasePage->getVoteDiseaseId(), $space->host->id); $commentDiseaseGroup = DoctorCommentClient::getInstance()->queryCommentDiseaseGroup($space->host->getPrimaryDoctor()); foreach($commentDiseaseGroup as $groupInfo) { if ($diseasePage->getVoteDiseaseId() == $groupInfo['diseaseid']) { $kanbingjyCnt = $groupInfo['cnt']; } } ?> <div class="doc_hover_con dn clearfix"> <ul> <li class="first"> <p class="pb5"><a target="_blank" href="http://www.<?=URL_PREFIX?>haodf.com/doctor/<?=$space->host->getEncodeId()?>/jibingjingyan/<?=$disease->key?>.htm" class="look_a">患者好评<span class="look_num"><?=$diseaseDoctor->goodVoteCount?></span>票</a></p>
public function index($request, $response) {/*{{{*/ //CMS-904,暂时下线航天总医院的首页 //CMS-907,暂时下线北京731医院的首页,等待通知后恢复 $skipHospitalIds = array(197,2262); if(in_array($this->_hospital->id, $skipHospitalIds)) { //DC-335 //$response->setRedirect('http://www.'.URL_PREFIX.'haodf.com/info/spacefrontnotice.php'); //return; } //BIZARC-2810 丰台区妇幼保健院以及其下科室,个人信息页面屏蔽 $noRecordHospitalIds = array(1867, 189); if(in_array($this->_hospital->id, $noRecordHospitalIds)) { //DC-335 //$response->setRedirect('http://www.'.URL_PREFIX.'haodf.com/info/norecordhospitalnotice.php'); //return; } //显示科室列表 $response->hospitalFacultyList = $this->_hospital->getHospitalFacultyList(HospitalFaculty::IS_SELECT_FACULTY_BY_VOTE_NO); //热门讨论疾病 $response->diseaseHospitalList = HospitalClient::getInstance() ->getHotDiseaseList($this->_hospital->id, self::INDEX_DISEASE_HOSPITAL_NUM); $diseaseDoctorList = array(); if ($response->diseaseHospitalList) { $diseaseDoctorList = DiseaseClient::getInstance() ->getDiseaseDoctorByHospitalGroupByDisease($response->diseaseHospitalList, $this->_hospital->id, self::INDEX_DISEASE_DOCTOR_NUM); } $response->diseaseDoctorList = $diseaseDoctorList; //case doctor $response->spaceList = SpaceClient::getInstance()->getCaseOpenedSpace4Hospital($this->_hospital->id); //判断医院是否有加号入口 $response->isPlus = PlussignChannelClient::getInstance()->isHospitalBookDoctor($this->_hospital->commonName); //此医院开通加号的大夫人数 $response->openBookingCount = HospitalClient::getInstance() ->getDoctorCountByHospitalCommonName($this->_hospital->commonName); //在此医院成功加号的人数 $response->successBookingCount = BookingClient::getInstance()->getSuccessBookingCountByHospital($this->_hospital->id); //此医院可直接电话咨询的人数 $pagesize = 10; //最新咨询 $spaceIds = DAL::get()->find_id_byHospitalId('space', $this->_hospital->id, 30); $response->doctorPatientRefs = FlowClient::getInstance()->getLastDoctorPatientPosts($spaceIds, self::INDEX_CASE_NUM); //取医院所有注册医生id ,取文章,咨询用,z专家观点 $tmpArticle = ArticleClient::getInstance()->getListByHospital($this->_hospital->id, array('level'=>'>=2', 'type'=>'=0'), array('limit'=>self::INDEX_ARTICLE_NUM)); $response->articleList = $tmpArticle['articleList']; //专题 List($zhuanTiCount, $zhuanTis) = $this->getZhuanTiListByHospital($this->_hospital->id); $response->zhuanTis = array_slice($zhuanTis,0,10); $option['commentType'] = DoctorComment::COMMENT_TYPE_THANK_LETTER; $option['hospital'] = $this->_hospital->id; $pageInfo['pageSize'] = self::SIDE_THANKS_NUM; $pageInfo['nowPage'] = 1; $thankLetterList = DoctorCommentClient::getInstance()->getCommentList($option, $pageInfo); $response->thankLetterList =$thankLetterList['commentList']; $response->thankLetterCount = $thankLetterList['pageInfo']['total']; $option['commentType'] = DoctorComment::COMMENT_TYPE_PROCESS; $option['hospital'] = $this->_hospital->id; $pageInfo['pageSize'] = self::SIDE_COMMENT_NUM; $pageInfo['nowPage'] = 1; $commentList = DoctorCommentClient::getInstance()->getCommentList($option, $pageInfo); $response->commentList = $commentList['commentList']; // meta if ($this->_hospital->doctorCount>2) $response->title = "{$this->_hospital->commonName}_科室列表,咨询{$this->_hospital->commonName} {$this->_hospital->spaceCount}位大夫_好大夫在线"; else $response->title = "{$this->_hospital->commonName}_科室列表,门诊时间,专家推荐_好大夫在线"; $response->keywords = "{$this->_hospital->name},{$this->_hospital->commonName},{$this->_hospital->aliases}"; if($this->_hospital->id==2118) { $description = mb_substr(strip_tags($this->_hospital->intro), 0, 70, 'gbk'); } else { $description = "收录{$this->_hospital->commonName}{$this->_hospital->facultyCount} 个科室、{$this->_hospital->doctorCount}位医生的详细介绍、"; $description .= $this->_hospital->isDailyUpdate()? '专家门诊时间于'.$this->_hospital->hospitalAnnounce->utime->toStringByFormat('m月d日更新').'、':''; $description .= ($this->_hospital->commentCount>10)? $this->_hospital->commentCount.'篇实用看病经验、' : ''; $description .= ($this->_hospital->doctorCount>3)? $this->_hospital->doctorCount.'位大夫在线咨询' : ''; $description .= "。地址:{$this->_hospital->address};电话:{$this->_hospital->phone}"; } $response->description = $description; $response->modules = $this->_modules; $response->pageModule = 'index'; $this->getSidePhoneServiceListByHospital($response); //礼物动态 $response->statistics = SpaceClient::getInstance()->getStatistics(); $spaceAllIds = DAL::get()->find_id_byHospitalId('space', $this->_hospital->id); $spaceId = 0; $result = PresentClient::getInstance()->showPresentBanner($spaceId, 12, $request->from, $spaceAllIds); $response->presentOrders = $result['presentOrders']; $response->moreFlowList = FlowClient::getInstance()->getFlowList4SEO($num = 10, $this->_hospital->id); }/*}}}*/
public function showDetail($request, $response) {/*{{{*/ $this->initialize($request, $response); $response->title =($this->doctor->hospitalfaculty->isNull()) ? $this->doctor->name."_好大夫在线" : $this->doctor->name."_".$this->doctor->hospitalfaculty->hospital->commonName.$this->doctor->hospitalfaculty->name."_好大夫在线"; $response->topTitle = $this->doctor->name; $response->thankLetterCount = $this->doctor->getCureThankLetterCount(); $response->processCount = $this->doctor->getCureExpCount(); $diseaseList = DoctorCommentClient::getInstance()->queryCommentDiseaseGroup($this->doctor->getPrimaryDoctor()); $response->VOTE_DISPLAY_LIMIT = self::VOTE_DISPLAY_LIMIT; //好评疾病 $response->goodDiseaseList = DiseaseClient::getInstance()->getDiseaseDoctorList(array($this->doctor->primaryId), 50); //患者投票 $response->diseaseDoctorList = DiseaseClient::getInstance()->getDiseaseDoctorList(array($this->doctor->primaryId)); //文章列表 if ($this->doctorSpaceIsOpened) { $this->loadMoreArticle($request, $response); } //最新回复 $this->getLatestFlow($request, $response); //加号 $bookingCnt = 0; if ($this->doctorSpaceIsOpened) { $res = BookingClient::getInstance()->getFinishOrderList4Space($this->space->id, 1,20); $orders = $res['list']; $bookingCnt = isset($res['pageInfo']['total']) ? $res['pageInfo']['total'] : 0; $response->bookingOrder = array_shift($orders); } $response->bookingCnt = $bookingCnt; //电话咨询订单 $telOrderCnt = 0; if ($this->doctorSpaceIsOpened) { $telOwner = DAL::get()->find_by_relatedObject('telowner', $this->space->user); $res = TelOrderClient::getInstance()->getList(TelOrder::SEARCH_FINISHED_CLOSE, 1, 1, $telOwner->id); $telOrderCnt = $res['pageInfo']['total']; $response->telOrder = array_shift($res['list']); } $response->telOrderCnt = $telOrderCnt; $specialize = $this->doctor->specialize ? $this->doctor->specialize : "暂无医生擅长信息"; $specialize = str_replace("\n", '', $specialize); $specialize = strip_tags(str_replace("\r", '', $specialize)); $response->specialize = $specialize; $shortSpecialize = strlen($specialize) == 84 ? $specialize : XString::truncate($specialize, 84); $shortSpecialize = str_replace("\n", '', $shortSpecialize); $shortSpecialize = strip_tags(str_replace("\r", '', $shortSpecialize)); $response->shortSpecialize = $shortSpecialize; $allScheduleTables = Schedule::buildAllTables(array($this->doctor)); $allScheduleTable = $allScheduleTables[$this->doctor->primaryId]; $shouldShowNoteDifferentMark = false; if (false == $this->space->isNull()) { $shouldShowNoteDifferentMark = $this->space->shouldShowNoteDifferentMark(); } if('' != trim($allScheduleTable['Remark'])) { $shouldShowNoteDifferentMark = true; } $response->shouldShowNoteDifferentMark = $shouldShowNoteDifferentMark; $commentDoctor = $this->doctor->commentDoctor; $response->commentDoctor = $commentDoctor; $diseaseId = 0; $key = md5('haodf2014'.$this->space->id.$diseaseId); $data = $this->space->id.'_'.$diseaseId.'_'.$key; $response->patientSigninKey = $data; }/*}}}*/
private function getDoctorCommentList($doctorIds) {/*{{{*/ $res = array(); $doctorComments = DoctorCommentClient::getInstance()->getDoctorCommentByDoctorIds($doctorIds); if(false == empty($doctorComments)) { foreach($doctorComments as $comment) { $res[$comment->doctorId] = $comment; } } BeanFinder::get('LocalCache')->removeAll(); return $res; }/*}}}*/
public function getDoctorCommentListByUserId($userId, $pageId, $pageSize)//_s {/*{{{*/ //$userId = AuthInfo::getUserIdByRequest($request);//再议 $user = DAL::get()->find('user', $userId); if ($user->isNull()) { $this->setErrorCode(107); return 0; } $this->_initPageInfo($pageId, $pageSize); $res = DoctorCommentClient::getInstance()->getCommentListByUserId($user->id, $pageId, $pageSize); $this->pageInfo = $res['pageInfo']; $commentList = $res['commentList']; $infos = array(); foreach ($commentList as $comment) { if(false == $comment->isNull()) $infos[]['id'] = $comment->id; } $this->content = $infos; }/*}}}*/
private function _doAddVote($userId, $doctor, $params) {/*{{{*/ try { $patient = self::getPatientByUser($userId); $user = DAL::get()->find('user', $userId); $doctorCommentId = DoctorCommentClient::getInstance()->addComment($doctor->primaryId, $user, 0, $params); return $doctorCommentId; } catch(BizException $ex) { throw new BizException('操作失败!请稍后再尝试,谢谢!'); } }/*}}}*/
private function getLetterList($p, $size) { $option['hospitalFaculty'] = $this->hospitalFaculty->id; $option['commentType'] = DoctorComment::COMMENT_TYPE_THANK_LETTER; $pageInfo['pageSize'] = self::LETTERS_NUMBER; $pageInfo['nowPage'] = $p; $res = DoctorCommentClient::getInstance()->getCommentList($option, $pageInfo); $pageInfo = $res['pageInfo']; $pageLink = array(); $lettersCount = 0; if(empty($pageInfo) == false){ $pageLink = PageNav::getNavLink(PageNav::getPageNavTemplate("/faculty/".($this->hospitalFaculty->getEncodeId())."/letter.htm?p="), $pageInfo['nowpage'], $pageInfo['pagesize'], $pageInfo['total']); $lettersCount = $pageInfo['total']; } return array($res['commentList'],$lettersCount, $pageLink); }
public function index($request, $response) {/*{{{*/ if (empty($_SERVER['HTTP_HOST'])) { $provs = 'beijing'; } else { $tmps = explode('.', $_SERVER['HTTP_HOST']); array_pop($tmps); //com array_pop($tmps); //haodf $provs = array_pop($tmps); } $provs = ($provs == 'sh') ? 'shanghai' : $provs; $provs = ($provs == 'gz') ? 'guangdong' : $provs; $areaName = ''; $area = new Area(); $provinceInfo = $area->provInfo(); if (empty($provinceInfo[$provs])){ header("HTTP/1.1 301 Moved Permanently"); header('Location: http://www.haodf.com'); exit; } else { $areaName = $provinceInfo[$provs]['Name']; } //最新回复咨询 $threads = FlowClient::getInstance()->getZixunListOfProvince($areaName, 20); $response->threads = $threads; $provs = explode(',', $provs); $provCount = count($provs); foreach ($provs as $item) { $provinceList[] = @$provinceInfo[$item]['Province']; } //以下一行代码不能动 $provinceList = explode(',', implode(',', $provinceList)); $hospitalList = HospitalClient::getInstance()->getListByProvinceAry($provinceList); $areaList1 = array(); $areaList2 = array(); foreach ($provinceList as $province) { foreach ($hospitalList as $hospital) { if (in_array($hospital->province, $provinceList)) { if ($hospital->province == $province) { if ($hospital->city == $hospital->province && '吉林' != $hospital->province) { if ($provCount > 1 && @count($areaList1[$hospital->province][$hospital->district]) >= COUNT_LIMIT) { continue; } $areaList1[$hospital->province][$hospital->district][] = $hospital; } else { if ($provCount > 1 && @count($areaList1[$hospital->province][$hospital->city]) >= COUNT_LIMIT) { continue; } $areaList1[$hospital->province][$hospital->city][] = $hospital; } } } else { if ($hospital->city == $hospital->province) { if ($provCount > 1 && @count($areaList2[$hospital->province][$hospital->district]) >= COUNT_LIMIT) { continue; } $areaList2[$hospital->province][$hospital->district][] = $hospital; } else { if ($provCount > 1 && @count($areaList2[$hospital->province][$hospital->city]) >= COUNT_LIMIT) { continue; } $areaList2[$hospital->province][$hospital->city][] = $hospital; } } } } $areaList = array_merge($areaList1, $areaList2); unset($areaList1); unset($areaList2); $count = 0; foreach ($areaList as $k => $p) { uasort($areaList[$k], 'ProvinceController::sort_hospital'); $count += 3; foreach ($p as $j => $city) { $count += floor((count($city) + 2) / 3) + 1; usort($areaList[$k][$j], 'ProvinceController::sort_hospital2'); } } $response->areaList = $areaList; $response->announceList = HospitalClient::getInstance()->getAnnounceList4Province($provinceList, 3); $options['commentType'] = DoctorComment::COMMENT_TYPE_PROCESS; $options['prov'] = $provinceList; $pageInfo['pageSize'] = 4; $commentList = DoctorCommentClient::getInstance()->getCommentList($options, $pageInfo); $response->commentList = $commentList['commentList']; $option = array(); $option['province'] = $provinceList; $option['limit'] = 5; $option['postcount'] = 0; //2周内最小回复数 $rightSpaceList = SpaceClient::getInstance()->getCaseOpenedSpaceList($option); $rightSpaceList = $rightSpaceList['spaceList']; $response->rightSpaceList = $rightSpaceList; //两周内回复数 $spacePostCntInfos = $this->getspacePostCntInfo($rightSpaceList); $response->spacePostCntInfos = $spacePostCntInfos; $response->title = $areaName.'站_好大夫在线'; $response->keywords = "{$areaName}好大夫,{$areaName}医院,.{$areaName}医生,{$areaName}看病,{$areaName}就医,{$areaName}医院, {$areaName}好大夫在线,分享{$areaName}看病好经验,推荐{$areaName}心中好大夫"; $response->description = "提供{$areaName}医院最新的门诊信息查询。汇总患者就医经验,帮您选择合适的医院、大夫。 为大夫提供网站服务:更新个人信息,发布专业文章,引导目标患者,跟踪目标患者。"; $response->areaName = $areaName; $response->randomFlows = FlowClient::getInstance()->getFlowList4SEO($num = 20, $provs); }/*}}}*/
public function ajaxShowCommentGanxie($request, $response) { /*{{{*/ $doctorId = $request->doctorId; $doctor = DAL::get()->find('doctor', $doctorId); $options = array(); $nowPage = (int) $request->getRequest('nowPage', 1); $thankLetters = DoctorCommentClient::getInstance()->getCureThankLetterList4Doctor($doctor, $nowPage, 6, $options, 2); list($ganxieCommentList, $pageInfo) = array($thankLetters['commentList'], $thankLetters['pageInfo']); $pageLink = PageNav::getNavLink(PageNav::getPageNavTemplate("/index/ajaxshowcommentganxie?doctorId=" . $doctorId . "&nowPage=", 2, 5, 1, false), $pageInfo['nowpage'], $pageInfo['pagesize'], $pageInfo['total']); $response->ganxieCommentList = $ganxieCommentList; $response->pageLink = $pageLink; $response->nowPage = $nowPage; $response->doctorId = $doctorId; }
public function hospitalExperienceDetail($request, $response) {/*{{{*/ $this->hospitalInit($request, $response); $doctor = $response->doctor; $key = $request->key; $commentId = $request->commentid; $comment = DoctorCommentClient::getInstance()->getDoctorCommentSubClass($commentId); $response->comment = $comment; $response->key = $key; if ($comment->userId > 0 && $doctor->hasSpace()) { $commentExtendInfo = DoctorClient::getInstance()->getUserCommentexpandInfo($comment->userId, $doctor->space->id); } else { $commentExtendInfo = array(); } if ($key != 'all') { $disease = DiseaseClient::getInstance()->getByDiseaseKey($key); $diseaseId = $disease->voteDisease->id; $options['diseaseid'] = $diseaseId; } $options['orderby'] = 'orderbytime'; $options['noNewest'] = 1; $allRes = DoctorCommentClient::getInstance()->getDoctorCommentList4Doctor($doctor->getPrimaryDoctor(), 1, 1000, $options); $commentOrders = array_keys($allRes['commentList']); $diseaseCommentCount = $allRes['pageInfo']['total']; $current = array_search($commentId, $commentOrders); $urlOptions = array(); $urlOptions['diseasekey'] = $response->key; if ($current > 0) { $prev = $current - 1; $prevComment = DoctorCommentClient::getInstance()->getDoctorComment($commentOrders[$prev]); $response->prevCommentUrl = $prevComment->getCommentUrl4BaiduApp($urlOptions); } if ($current < $diseaseCommentCount - 1) { $next = $current + 1; $nextComment = DoctorCommentClient::getInstance()->getDoctorComment($commentOrders[$next]); $response->nextCommentUrl = $nextComment->getCommentUrl4BaiduApp($urlOptions); } $urlOptions['page'] = 'experience'; $response->backUrl = $doctor->getUrl4BaiduApp($urlOptions); }/*}}}*/
public function index($request,$response) { $partnerTpl = trim($request->partnerTpl); $action = trim($request->action); if($partnerTpl == 'yaolan' || $action == 'child') { $this->commonInfo($request,$response); $response->commentList = $this->getWomanComment(); $partnerTpl = 'yaolan'; } else if($partnerTpl == 'pclady' || $action == 'woman') { $this->commonInfo($request,$response); $response->commentList = $this->getChildComment(); $partnerTpl = 'pclady'; } else if($partnerTpl == 'picc') { $this->commonInfo($request,$response); $facultyIds = array('3000000','3001000','3002000','3003000','3004000','3005000','3006000','3007000','3008000','3009000','3010000','3011000','3012000','3013000','3014000','3015000','3016000','3017000','3018000','3019000','30200000','3021000','3022000','3023000','3024000','3025000','3026000','3027000','3028000','3029000','3030000','6000000','6001000','6002000','6003000','6004000','6005000','6006000','6007000','6008000'); $announceList = HospitalClient::getInstance()->getHospitalAnnounces4HezuoIndex(array(),$facultyIds, $limit=10); $options['commentType'] = DoctorComment::COMMENT_TYPE_PROCESS; $options['faculty'] = $facultyIds; $pageInfo['pageSize'] = 7; $commentList = DoctorCommentClient::getInstance()->getCommentList($options, $pageInfo); $response->commentList = $commentList['commentList']; $response->announceList = $announceList; } else { $provInfos = Area::provDefineInfo(); $provKey = $request->pro; $provKey = ($provKey == 'all') ? '' : $provKey; $defaultProvs = self::$DefaultProvs; $prov = array(); if(empty($provKey) == false) { $tmpInfos = $provInfos[$provKey]; if(isset($tmpInfos['Province'])) $prov[] = $tmpInfos['Province']; } else { $defaultKeys = $request->defaultProvs; $defaultProvs = ($defaultKeys != '') ? explode(',', $defaultKeys) : $defaultProvs; foreach($defaultProvs as $defaultProv) { $tmpInfos = $provInfos[$defaultProv]; if(isset($tmpInfos['Province'])) $prov[] = $tmpInfos['Province']; } } $options['commentType'] = DoctorComment::COMMENT_TYPE_PROCESS; $pageInfo['pageSize'] = 10; $commentList = DoctorCommentClient::getInstance()->getCommentList($options, $pageInfo); $commentList = $commentList['commentList']; $announceList = HospitalClient::getInstance()->getHospitalAnnounces4HezuoIndex($prov, $facultyIds=array(), $limit=10); $response->commentList = $commentList ; $response->announceList = $announceList; $this->commonInfo($request,$response); } $response->partnerTpl = $partnerTpl; }
public function index($request,$response) {/*{{{*/ /* bigpipe用来做切换,true表示关闭,以普通模式浏览 */ $response->nobp = ($request->nobp == null) ? false : true; //搜索 $response->searchWords = $this->getHotSearchWords(); List($blueImage, $redImage) = $this->getHomeBigImage(); $response->blueImage = $blueImage; $response->redImage = $redImage; //在线专家 $response->onLineDoctorList = DoctorClient::getInstance()->getOnLineDoctor4HomePage(); //按医院找大夫 $provList = $this->getProvList(); $provKeyList = $this->getProvKey(); $hospitalIds = array(); foreach ($provList as $p => $prov) { foreach ($prov as $h => $hospital) { $hospitalIds[] = $h; } } $response->hospitalList = DAL::get()->find('hospital', $hospitalIds); $response->provList = $provList; $response->provKeyList = $provKeyList; //咨询专家 咨询列表 $response->doctorPatientSets = $this->getFlowList4HomePage(self::THREADCATEGORY_COUNT, self::THREAD_COUNT); $response->statistics = SpaceClient::getInstance()->getStatistics(); //咨询专家 电话咨询列表 $recommendDoctorList = PaymentClient::getInstance()->getRecDoctorList4HomePage(10, 3); $response->recommendDoctorList = $recommendDoctorList; $spaceUserIds = $doctorIds = array(); foreach ($recommendDoctorList as $facultyInfo) { $facultyDoctorInfo = isset($facultyInfo['doctor']) ? $facultyInfo['doctor'] : array(); foreach ($facultyDoctorInfo as $doctor) { $spaceUserIds[] = $doctor->getSpace()->user->id; $doctorIds[] = $doctor->id; } } $productList = $lastOrders = array(); if(!empty($spaceUserIds) && !empty($doctorIds)) { //电话咨询产品 $productList = ProductClient::getInstance()->getProductsBySpaceIds($spaceUserIds, array(ServiceDef::TYPE_TELORDER)); //取最新订单 $lastOrders = PaymentClient::getInstance()->getLatestServiceList($doctorIds); } $response->productList = $productList; $lastOrderGroupBySpace = array(); foreach ($lastOrders as $lastOrder) { if ($lastOrder->getSpace() instanceof Space) { $lastOrderGroupBySpace[$lastOrder->getSpace()->id] = $lastOrder; } } $response->lastOrderGroupBySpace = $lastOrderGroupBySpace; //预约加号 $doctorNumber = PlussignChannelClient::getInstance()->getPlusSignDoctorCount();//全国开通加号医生总数目 $patientNumber = SpaceClient::getInstance()->getPlusSignPatientCount(); $patientOrderList = PatientClient::getInstance()->getPatientOrderList(); $response->doctorNumber = $doctorNumber; $response->patientNumber = $patientNumber; $response->patientOrderList = $patientOrderList; //分享经验 $commentCount = DoctorCommentClient::getInstance()->getCommentCount(); $response->thankListCount = isset($commentCount['letter']) ? $commentCount['letter'] : 0; $response->doctorCommentListCount = isset($commentCount['comment']) ? $commentCount['comment'] : 0; $expList = DAL::get()->find_all_for_top('cureexp', 4); $response->expList = $expList; $thankList = DAL::get()->find_all_for_top('curethankletter', 4); $response->thankList = $thankList; //出诊 停诊信息 $response->hospitalAnnounceList = HospitalClient::getInstance()->getHospitalAnnounceList4HomePage(3); $response->cmslinkList = CmsClient::getInstance()->getCmsLinkList(self::CMS_COUNT); //好大夫动态 $response->latestList = SpaceLogClient::getInstance()->getLatestList(self::LAST_COUNT); $response->images = $this->_images; //礼物动态 $spaceId = 0; $result = PresentClient::getInstance()->showPresentBanner($spaceId, 12, $request->from, array(), false); $response->presentOrders = $result['presentOrders']; //最新专家文章 $limit = self::ARTICLE_COUNT - substr_count(Place::getPlaceContent('haodf_index','wenzhang_url','onlyone'), '<li>'); $articleList = ArticleClient::getInstance()->getArticleList4Index($limit); $response->articleList = $articleList; }/*}}}*/
public function showDetail($request, $response) {/*{{{*/ $id = $request->id; $id = (int)Codec::getInstance()->decodeId($id); if(empty($id)) { throw new BizException('医生信息不存在.'); exit(); } $doctor = DAL::get()->find('doctor', $id); if($doctor == null || $doctor->isNull() || $doctor->hospitalfaculty instanceof NullEntity) { throw new BizException('医生信息不存在.'); exit(); } $this->skipHospitals($doctor->hospitalfaculty->hospital->id, $response); $this->skipDoctors($doctor->id, $response); $response->doctor = $doctor; $scheduleTable = array(); $scheduleTables1 = DoctorClient::getInstance()->getFormatScheduleList($doctor->id); if($doctor->id != $doctor->primaryId) { $scheduleTables = DoctorClient::getInstance()->getFormatScheduleList($doctor->primaryId); $tmpInfos1 = $scheduleTables1[$doctor->id]; $tmpInfos2 = $scheduleTables[$doctor->primaryId]; foreach($tmpInfos1 as $i=>$infos) { if(empty($infos) || false==is_array($infos)) continue; $items = array(); foreach($infos as $j=>$info) { $items[$j] = (false == empty($tmpInfos1[$i][$j])) ? $tmpInfos1[$i][$j] : ""; } $scheduleTable[$i] = $items; } } else { $scheduleTable = $scheduleTables1[$doctor->id]; } $options['doctor'] = $doctor->primaryId; $pageInfo['pageSize'] = 10; $commentList = DoctorCommentClient::getInstance()->getCommentList($options, $pageInfo); $commentList = $commentList['commentList']; $diseaseAry = DiseaseClient::getInstance()->getDiseaseDoctorList(array($doctor->primaryId), 50); $diseaseIds = array(); foreach ($diseaseAry as $diseaseDorctor) { $diseaseIds[$diseaseDorctor->fld_diseaseid]['id'] = $diseaseDorctor->fld_diseaseid; $diseaseIds[$diseaseDorctor->fld_diseaseid]['name'] = $diseaseDorctor->disease->name; $diseaseIds[$diseaseDorctor->fld_diseaseid]['key'] = $diseaseDorctor->disease->key; } $sameDiseaseDoctorList = array(); if(empty($diseaseIds) == false) { $sameDiseaseDoctorList = DoctorClient::getInstance()->getSameProfessionalDoctors($doctor->primaryId, array_keys($diseaseIds), $limit=4); } $articleList = array(); $spaceCaseList = array(); if($doctor->hasSpace() && $doctor->space->isOpened()) { $articleList = ArticleClient::getInstance()->getTitleListBySpace($doctor->space->id, 3); $spaceCaseList = DAL::get()->find_all_lastpost_by_space('doctorpatientref', $doctor->space, 10); } $response->articleList = $articleList; $response->spaceCaseList = $spaceCaseList; $response->hospitalfaculty = $doctor->hospitalfaculty; $response->hospital = $doctor->hospitalfaculty->hospital; $response->faculty = $doctor->hospitalfaculty->faculty; $response->scheduleTable = $scheduleTable ; $response->commentList = $commentList ; $response->diseaseAry = $diseaseAry; $response->diseaseIds = $diseaseIds; $response->VOTE_DISPLAY_LIMIT = 4; $response->sameDiseaseDoctorList = $sameDiseaseDoctorList; if($doctor->space->isNull()) { $spaceAskedThreadsCount = $spaceAskedFlowsCount = $spaceRepliedThreadsCount = $spaceRepliedFlowsCount; } else { $spaceAskedThreadsCount = SpaceClient::getInstance()->getCountOfAskedThreadsCount($doctor->space->id, $this->_newUser->id); $spaceAskedFlowsCount = SpaceClient::getInstance()->getCountOfAskedFlowsCount($doctor->space->id, $this->_newUser->id); $spaceRepliedThreadsCount = SpaceClient::getInstance()->getCountOfRepliedThreadsCount($doctor->space->id, $this->_newUser->id); $spaceRepliedFlowsCount = SpaceClient::getInstance()->getCountOfRepliedFlowsCount($doctor->space->id, $this->_newUser->id); } $response->spaceAskedCount = $spaceAskedThreadsCount + $spaceAskedFlowsCount; $response->spaceRepliedCount = $spaceRepliedThreadsCount + $spaceRepliedFlowsCount; $response->crumb = Crumb::create(DoctorCommentClient::getInstance()->genCommentCrumbKey(), self::TTL); $space = $doctor->space; $response->space = $space; $commonCaseNote = $doctor->getCommonCaseNote4Display(); $response->commonCaseNote = $commonCaseNote; $response->successOrderCount = count(DAL::get()->find_id_finishStatus_and_maybeSuccessCallBackStatus('BookingOrder', $space)); $bookingCondition = $space->getSpaceBusinessRequirement4Booking()->disease; $response->bookingCondition = empty($bookingCondition) ? '不限' : $bookingCondition; $response->token = Captcha::generate('comment', $doctor->id, ContentFactory::TYPE_ARITHMATIC, 4, XIpLocation::getIp(), 3); }/*}}}*/
private function getComments(Hospital $hospital) { $options = array(); $options['hospital'] = $hospital->id; $options['commentType'] = DoctorComment::COMMENT_TYPE_PROCESS; $pageInfo['pageSize'] = 2; $commentList = DoctorCommentClient::getInstance()->getCommentList($options, $pageInfo); $res = array(); foreach ($commentList['commentList'] as $key => $comment) { $res[$key]['comment']['content'] = $comment->content; $res[$key]['comment']['doctorName'] = $comment->doctor->name; $res[$key]['comment']['diseaseName'] = $comment->disease->name?$comment->disease->name:''; $res[$key]['comment']['commentTime'] = $comment->ctime; $res[$key]['comment']['commentUrl'] = $comment->getUrl(); } return $res; }
<?php require_once dirname(__FILE__).'/../init.php'; $request = new Request(); $doctorId = $request->getRequest('doctor_id',0); $doctor = DAL::get()->find('doctor', $doctorId); if ($doctor->isNull()) { echo "<h3>医生没找到!</h3>"; echo "<a href='http://www.haodf.com'>点出返回首页</a>"; exit(); } $doctorCommentList = DoctorCommentClient::getInstance()->getLetterByDoctor($doctor->id, 4); $count = $doctor->getCureThankLetterCount(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>给<?=$doctor->name?>大夫的感谢信</title> <style type="text/css"> <!-- body { font-size: 16px; margin: 0px; padding: 0px; line-height: 24px; font-family: 楷体_GB2312; font-weight: bold;
$diseaseDoctor = DAL::get()->find_by_fld_diseaseid_and_fld_doctorid('DiseaseDoctor', $diseasePage->getVoteDiseaseId(), $doctor->id); ?> <p><a href="http://www.<?=URL_PREFIX?>haodf.com/doctor/<?=$doctor->getEncodeId()?>/jibingjingyan/<?=$disease->key?>.htm" target="_blank">患者好评<span class="text_u"><?=$diseaseDoctor->goodVoteCount?></span>票</a></p> <?php } ?> <?php if (false == $space->isNull()){ $presentCnt = PresentClient::getInstance()->getCntOfPresent($space->id); if (isset($postCount) && $postCount > 0){ ?> <p><a href="http://www.<?=URL_PREFIX?><?=$space->userName?>.haodf.com/zixun/list.htm" target="_blank">近两周回复<span class="text_u"><?=$postCount?></span>问</a></p> <?php } } ?> <?php $commentDiseaseGroup = DoctorCommentClient::getInstance()->queryCommentDiseaseGroup($doctor->getPrimaryDoctor()); $kanbingjyCnt = 0; foreach($commentDiseaseGroup as $groupInfo) { if ($diseasePage->getVoteDiseaseId() == $groupInfo['diseaseid']) { $kanbingjyCnt = $groupInfo['cnt']; break; } } if (0 < $kanbingjyCnt) { ?> <p><a href="http://www.<?=URL_PREFIX?>haodf.com/doctor/<?=$doctor->getEncodeId()?>/jibingjingyan/<?=$disease->key?>.htm" target="_blank">患者看病经验<span class="text_u"><?=$kanbingjyCnt?></span>条</a></p> <?php } ?> </div>
public function ajaxVote($request, $response) { /*{{{*/ header('Content-Type: text/html; charset=GBK'); $response->crumb = Crumb::create(DoctorCommentClient::getInstance()->genCommentCrumbKey(), self::TTL); }
public function getDoctorCommentInfo($postId) {/*{{{*/ $info = array(); $post = DoctorCommentClient::getInstance()->getDoctorCommentSubClass($postId); if($post->isNull()) { $this->setErrorCode(350); return 0; } $info['title'] = '感谢信详情'; $info['content'] = array( array('item'=>'疗效:', 'itemValue'=> $post->getSkillStr()), array('item'=>'态度:', 'itemValue'=> $post->getAttitudeStr()), ); $content = strip_tags($post->content); $info['commentContent'] = $content; $this->content = $info; }/*}}}*/
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']); }