protected function getData($nowPage, $pageSize)
 {/*{{{*/
     $hospitalList = DAL::get()->find_all_AllHospital4Sc('hospital', $nowPage, $pageSize); 
     $doctorDescription = array();
     foreach($hospitalList as $hospital)
     {
         $doctorList = DAL::get()->find_all_by_hospitalid('doctor', $hospital->id);
         foreach($doctorList as $doctor)
         {
             $tempIntroArray = array();
             $tempIntroArray['key'] = $hospital->commonName.$doctor->name;
             $tempIntroArray['city'] = $hospital->city;
             $tempIntroArray['doctor_name'] = $doctor->name;
             $tempIntroArray['doctor_pic'] = '';
             $tempIntroArray['doctor_link'] = $doctor->getTouchUrl();
             $tempIntroArray['hospital'] = $hospital->name;
             $tempIntroArray['department'] = $doctor->getHospitalFacultyName();
             $tempIntroArray['doctor_title'] = $doctor->grade." ".$doctor->educateGrade;
             $tempIntroArray['good_at'] = trim(XString::truncate($doctor->specialize, 200));
             $doctorIntro = trim(XString::truncate(strip_tags($doctor->intro), 200));
             $tempIntroArray['personal_details'] = $doctorIntro;
             $tempIntroArray['personal_details_link'] = $doctor->getTouchIntroUrl();
             $tempIntroArray['site_name'] = '好大夫在线';
             $doctorDescription[] = array('item' => $tempIntroArray);
             unset($doctor);
         }
         unset($doctorList);
         unset($hospital);
         BeanFinder::get('LocalCache')->removeAll();
     }
     unset($hospitalList);
     BeanFinder::get('LocalCache')->removeAll();
     return $doctorDescription;
 }/*}}}*/
예제 #2
0
    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;
    }/*}}}*/
    private function getRealData(Hospital $hospital, $hospitalName = '')
    {/*{{{*/
        $res = array();
        if ($hospitalName)
        {
            $hsName = $hospitalName;
        }
        else
        {
            $hsName = $hospital->name;
        }

        $hospitals['item']['key'] = $hsName;
        $hospitals['item']['title'] = XString::truncate($hospital->commonName.'科室列表_门诊时间表_专家推荐_好大夫在线',59,'');
        $hospitals['item']['level'] = $hospital->getGradeStr();//
        $hospitals['item']['url'] = $hospital->getUrl();
        $hospitals['item']['address'] = strip_tags($hospital->address);
        $hospitals['item']['address_url'] = $hospital->getReMapUrl();
        $hospitals['item']['description'] = strip_tags($hospital->intro);
        $hospitals['item']['description_url'] = $hospital->getInfoUrl();
        $hospitals['item']['luxian'] = $hospital->addressinfo;
        $hospitals['item']['telephone'] = $hospital->phone;
        $hospitals['item']['online_doctors'] = $hospital->spaceCount;
        $hospitals['item']['online_doctors_url'] = $hospital->getDoctorUrl();
        $hospitals['item']['tel_doctors'] = HospitalClient::getInstance()->getHospitalDirectCallCount($hospital->id);
        $hospitals['item']['tel_doctors_url'] = $hospital->getTelDoctorUrl();
        $hospitals['item']['showurl'] = 'www.haodf.com/';

        $res[] = $hospitals;
        BeanFinder::get('LocalCache')->removeAll(); 
        return $res;

    }/*}}}*/
예제 #4
0
    public function addRemitFromPhone($request, $response)
    {/*{{{*/
        $bankPhoneNo = $request->bankPhoneNo;
        $phoneNo = $request->phoneNo;
        //if($phoneNo != 13439853264 || $phoneNo != 13501126300)
        //{
        //    echo "错误的手机号";
        //    exit;
        //}
        $remitTime = $request->remitTime/1000;
        $remitTime = xdatetime::valueOfTime($remitTime);
        $message = mb_convert_encoding($request->message, "gbk", "utf-8");
        //$message = $request->message;

        $device = $request->device;
        $logger = new Logger('sms_remit', BeanFinder::get('configs')->remitLogPath, Logger::getLevelName(Logger::INFO));
        $logger->addInfo('device:'.$device.' bankPhoneNo:'.$bankPhoneNo.' phoneNo:'.$phoneNo.' message:'.$message);

        $recorder = DAL::get()->find_by_name('user', 'jm130');
        $res = AccountClient::getInstance()->createRemitAuto($recorder, $bankPhoneNo, $phoneNo, $remitTime, $message);

        if ($res['errorcode'] != 0 && false == empty($message)) 
        {
            $msg = $device." errorcode:".$res['errorcode']." message:".$message;
            //给whd & yyp & wk
            SMSClient::getInstance()->sendSMS(array(18612032258, 13691343423, 13720084864), $msg);
        }

        $res = json_encode($res);
        echo $res;
        return parent::DIRECT_OUTPUT;
    }/*}}}*/
예제 #5
0
    private function getRealData(Hospital $hospital, $hospitalName = '')
    {/*{{{*/
        $res = array();
        $hospitalList = array();
        if ($hospitalName)
        {
            $hsName = $hospitalName;
        }
        else
        {
            $hsName = $hospital->name;
        }

        $res['key'] = $hsName;
        $res['url'] = $hospital->getUrl();
        $res['title'] = XString::truncate($hsName.'科室列表,门诊时间,专家推荐_好大夫在线', 59, '...');
        $res['showUrl'] = 'www.haodf.com';
        $res['pageSize'] = rand(60, 66).'K';
        $res['date'] = date('Y-m-d', time());
        $extContent = ($hospital->spaceCount > 0) ? ",以及".$hospital->spaceCount."位医生提供免费网上咨询":"";
        $res['content'] = "提供医院简介、地址、预约挂号电话、科室门诊时间,包括".$hsName.$hospital->facultyCount."个科室、".$hospital->doctorCount."位医生的相关介绍".$extContent;
        $hospitalList['item'] = $res;
        BeanFinder::get('LocalCache')->removeAll(); 
        return $hospitalList;
    }/*}}}*/
    private function getRealData(Disease $disease, $diseaseContentList=array())
    {/*{{{*/
        $res = array();
        $zhuanTiInfo = ZhuanTiClient::getInstance()->getZhuaTisByDisease($disease->id);
        if (count($zhuanTiInfo)>1)
        {
            $res['name'] = $disease->name;
            $res['url'] = $disease->getUrl();
            $res['date'] = date('Y-m-d', time());

            $content = "";
            if (isset($diseaseContentList[$disease->key]))
            {
                $content = $this->getContent($diseaseContentList[$disease->key]);
            }
            $res['content'] = $content;
            $res['doctorUrl'] = $disease->getDoctorUrl();
            $res['zixunUrl'] = $disease->getZixunUrl();
            $zhuanTi1 = array_shift($zhuanTiInfo);
            $zhuanTi2= array_shift($zhuanTiInfo);
            $res['zhuantiUrl1'] = $zhuanTi1->getUrl();
            $res['zhuantiUrl2'] = $zhuanTi2->getUrl();
            $res['zhuantiTitle1'] = $zhuanTi1->title;
            $res['zhuantiTitle2'] = $zhuanTi2->title;
        }
        BeanFinder::get('LocalCache')->removeAll(); 

        return $res;
    }/*}}}*/
예제 #7
0
    public function __construct($request, $response) 
    {/*{{{*/
        parent::__construct($request, $response);
        UserClient::getInstance()->checkGuest();

        $response->user = $this->user = $this->getCookieUser();
        $response->askSpace = $this->askSpace = AskSessionInfo::getBindSpace();
        $response->touchAppName = BeanFinder::get('configs')->touchAppName;
        $response->touchUrl = BeanFinder::get('configs')->touchUrl;
        $response->touchUrlHome = BeanFinder::get('configs')->touchUrl.'/index.htm';
        $response->touchDomain = BeanFinder::get('configs')->touchDomain;
        $this->touchDomain = BeanFinder::get('configs')->touchDomain;
        $response->imgTimestamp = BeanFinder::get('configs')->imgTimestamp;
        $response->mobileUrl = "http://".URL_PREFIX."m.haodf.com/p";
        $response->wwwUrl = "http://www.".URL_PREFIX."haodf.com/";
        $response->suggestionUrl = BeanFinder::get('configs')->touchUrl."/suggestion/suggestion";
        $response->fromOtherHost =$request->isQueryFromOtherHost();
        $response->backCnt = 1;
        $response->hostUri = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
        if(isset($_SERVER['HTTP_REFERER']))
        {
            $response->backCnt = (strstr($_SERVER['HTTP_REFERER'], self::SELECT_PAGE_PARAM))?2:1;
        }
        $response->_action = $request->action;
        $response->mCanUpload = $this->canUpload();
    }/*}}}*/
예제 #8
0
    public function __construct()
    {/*{{{*/
        DAL::get()->setUp('space');
        $this->dbexecuter = BeanFinder::get('dbexecuter');
        $this->dbexecuter->mustUseMaster();

        //流量波动在30%以上视为异常
        $this->threshold = 0.3;

        //在每天的这个时刻检查
        $this->checks = array('08:00', '00:20');

        //检查医生的最后在线时间起始时间,即从这个时间内的数量监控
        $this->fromCheckTime = time()-24*3600;

        //检查医生在规定时间(fromCheckTime)的最小更新数
        $this->checkActivityTimeCount = 1000;

        //检查以下医生的流量
        $this->doctors = array();
        $this->doctors[] = array('id'=> 157236, 'name'=>'潘嘉严');
        $this->doctors[] = array('id'=> 95228, 'name'=>'肖晖');
        $this->doctors[] = array('id'=> 476336, 'name'=>'陈秋');
        $this->doctors[] = array('id'=> 66224, 'name'=>'吴鸣');
    }/*}}}*/
예제 #9
0
 public function dealError($type, $errorItem)
 {
     $path = BeanFinder::get('configs')->dicomErrorLog;
     $logger = new Logger('dicomerror', $path);
     $logger->addError('dicomparse error: ' . $type, array($this->file, $errorItem));
     throw new DicomParseException('dicomparse error');
 }
 protected function getData($nowPage, $pageSize)
 {/*{{{*/
     $hospitalList = DAL::get()->find_all_AllHospital4Sc('hospital', $nowPage, $pageSize); 
     $departmentDescription = array();
     foreach($hospitalList as $hospital)
     {
         $hospitalFacultyList = HospitalClient::getInstance()->getFacultyList($hospital->id);
         foreach($hospitalFacultyList as $hospitalFaculty)
         {
             if($hospitalFaculty->doctorCnt == 0)
                 continue;
             $tempDescription = array();
             $tempDescription['key'] = $hospital->commonName.$hospitalFaculty->name;
             $tempDescription['city'] = $hospital->city;
             $tempDescription['department'] = $hospitalFaculty->name;
             $tempDescription['hospital'] = $hospital->name;
             $tempDescription['doctors'] = $this->get3DoctorInfo($hospitalFaculty);
             $tempDescription['department_link'] = $hospitalFaculty->getTouchUrl();
             $tempDescription['site_name'] = '好大夫在线';
             $departmentDescription[] = array('item' => $tempDescription);
         }
         unset($hospital);
         unset($hospitalFacultyList);
         BeanFinder::get('LocalCache')->removeAll();
     }
     unset($hospitalList);
     BeanFinder::get('LocalCache')->removeAll();
     return $departmentDescription;
 }/*}}}*/
 private function getRelationData(Article $article)
 {/*{{{*/
     $result['link1'] = '';
     $result['title1'] = '';
     $result['link2'] = '';
     $result['title2'] = '';
     $relationKey = $article->getKey();
     $relationData = RelationSearchClient::getInstance()->search($relationKey, array('article' => 3));
     if (isset($relationData['article']) && $relationData['article'])
     {
         $relationArticles = $relationData['article'];
         if (count($relationArticles) > 2)
         {
             $tempArticle = array();
             foreach ($relationArticles as $temp)
             {
                 if($temp->id != $article->id)
                 {
                     $tempArticle[] = $temp;
                 }
                 unset($temp);
             }
             $curlResult = array_slice($tempArticle, 0, 2);
             $result['articletitle1'] = $curlResult[0]->title;
             $result['articletitle2'] = $curlResult[1]->title;
             $result['article1'] = $curlResult[0]->getUrl();
             $result['article2'] = $curlResult[1]->getUrl();
         }
         BeanFinder::get('LocalCache')->removeAll();
     }
     return $result;
 }/*}}}*/
예제 #12
0
 public function __construct()
 {/*{{{*/
     DAL::get()->setUp('message');
     $this->dbexecuter = BeanFinder::get('dbexecuter');
     $this->dbexecuter->mustUseMaster();
     $this->max = 400;
 }/*}}}*/
예제 #13
0
    protected function getDataForDiseaseDoctors($diseaseDoctors)
    {/*{{{*/
        $res = array();
        if (empty($diseaseDoctors)) return $res;
        foreach ($diseaseDoctors as $diseaseDoctor)
        {
            BeanFinder::get('LocalCache')->removeAll(); 
            $hospital = $diseaseDoctor->doctor->hospitalfaculty->hospital;
            if($hospital->isNull() || $hospital->isTestHospital()) 
            {
                continue;
            }
            
            $diseaseDoctorInfo = $this->wrapDiseaseDocInfo($diseaseDoctor, $diseaseDoctor->disease);

            $res[] = array(
                'item' => $diseaseDoctorInfo,
            );
            unset($diseaseDoctorInfo);
            
            // 二级疾病
            $childredDiseases = DAL::get()->find_all_childrenDiseases('Disease', $diseaseDoctor->disease->id);   // TODO
            foreach ($childredDiseases as $childDisease)
            {
                $childrenDiseaseDocInfo = $this->wrapDiseaseDocInfo($diseaseDoctor, $childDisease);
                $res[] = array(
                    'item' => $childrenDiseaseDocInfo,
                );
                unset($childrenDiseaseDocInfo);
            }
        }
        return $res;
    }/*}}}*/
 private function getRealData(Hospital $hospital)
 {/*{{{*/
     $hospitalList = array();
     $isPlus = PlussignChannelClient::getInstance()->isHospitalBookDoctor($hospital->commonName);
     $res['url'] = $hospital->getUrl();
     $res['name'] = $hospital->commonName;
     $res['address'] = ($hospital->address)?$hospital->address:"暂无";
     $res['phone'] = ($hospital->address)?$hospital->phone:"暂无";
     $res['pageSize'] = rand(60, 66).'K';
     $res['date'] = date('Y-m-d', time());
     $res['mapUrl'] = $hospital->getReMapUrl();
     $res['scheduleUrl'] = $hospital->getScheduleUrl();
     
     if($isPlus)
     {
         $res['extTitle'] = "预约加号";
         $res['extUrl'] = 'http://jiahao.haodf.com/jiahao/search.htm?district='.urlencode($hospital->city).'&hospitalName='.urlencode($hospital->commonName);
     }
     else
     {
         $res['extTitle'] = "大夫文章";
         $res['extUrl'] = $hospital->getArticleUrl(); 
     }
     $res['doctorUrl'] = $hospital->getDoctorUrl();
     $res['infoUrl'] = $hospital->getInfoUrl();
     $hospitalList['item'] = $res + $this->getAlias($hospital);
     BeanFinder::get('LocalCache')->removeAll();
     return $hospitalList;
 }/*}}}*/
예제 #15
0
    protected function getData($nowPage, $pageSize)
    {/*{{{*/
        $options['filterKeys'] = array('huoluan','ruchongbing','zhiwushenjingjibing','mafeng','poshangfeng','yaozheshang','dongwuxingpifubing','wulixingpifubing',
                'baisekangzhen','tijian','nueji','shuyi','feidian','tianhua','bairike','xinghongre','jiyan','duoqiguangongnengbuquan','jiaoganshenjingyingyangbuliang',
                'baihou','biyingjiebing','bibunaomonaopengchu','chuanranxingdanhexibaozengduozheng','dongmailiuxinggunangzhong','dianji','ganjiqiuyoubing','hegugusuiyan',
                'houguanjieyan','yingyoueryindaoyan','jisuixueguanjibing','jingbuchuangshang','jingdongmaitiliu','yasuigaihua','yihejianxiganran','pifujiehebing',
                'qinliugan','sheyanshenjingtong','shenyouzheng','sihuansuya','xiaoerreyezonghezheng','xiaoerhoujingluan','xiaoerkouyan','xinshengerchanshangxingjibing',
                'xinzangsunshang','yanni','yanjianyanzheng','yizhiquefazheng','zhongshu','chixuxingzhiwuzhuangtai','wangyin','xiongmojianpiliu','xiongkuochukouzonghezheng',
                'jingnangyan','dixueya','zhichangxinliwenti','shixuexibaozonghezheng','tengtong'); 
        $diseaseList = DiseaseClient::getInstance()->getAllDiseaseList($nowPage, $pageSize, $options);

        $diseases = array();
        foreach ($diseaseList['list'] as $disease)
        {
            $diseaseNames = $this->getAllNames($disease);
            if (count($diseaseNames)>1)
            {
                foreach ($diseaseNames as $key => $diseaseName)
                {
                    $diseases[] = $this->getRealData($disease, $diseaseName);
                    unset($diseaseName);
                }
            }
            else
            {
                $diseases[] = $this->getRealData($disease);
            }
        }
        BeanFinder::get('LocalCache')->removeAll(); 
        return $diseases;
    }/*}}}*/
예제 #16
0
 private function skips($type, $skipId, $response)
 {/*{{{*/
     $ids = isset(BeanFinder::get('configs')->{$type})?BeanFinder::get('configs')->{$type}:array();
     if (false == empty($ids) && in_array($skipId, $ids))
     {
         $response->setRedirect('http://www.'.URL_PREFIX.'haodf.com/info/spacefrontnotice.php');
     }
 }/*}}}*/
예제 #17
0
 private function addSearchLog($kw)
 {/*{{{*/
     if(false == empty($kw))
     {
         $ip = RequestDelegate::getIp();
         BeanFinder::get('logger')->addInfo('ip '.$ip.' searchword '.$kw);
     }
 }/*}}}*/
예제 #18
0
 private function filterArticle($article)
 {/*{{{*/
    $kvSet = array(
    'title' => $article->title,
    'content' => $article->content
    );
    return BeanFinder::get('ContentFilter')->check('intention', $kvSet);
 }/*}}}*/
  private function prepareData($nowPage, $pageSize)
 {/*{{{*/
     $option['goodVoteCount'] = 10;
     $option['filterHospitalIds'] = BeanFinder::get('configs')->excludeHospitalIds;
     $option['filterKeys'] = BeanFinder::get('configs')->excludeDiseaseKeys;
     $hospitalList = HospitalClient::getInstance()->getDiseaseAreaHospitalGroupByOption($nowPage, $pageSize , $option);
     BeanFinder::get('LocalCache')->removeAll(); 
     return $this->getDisHospital($hospitalList);
 }/*}}}*/
예제 #20
0
 /**
  * voipCallOut 
  * @brief voip呼入呼出接听页面 
  * @author kxy 
  * @version branches/v2.17.3
  * @date 2013-11-19
  */
 public function voipCallOut($request, $response)
 {
     /*{{{*/
     $configs = WebVoipClient::getInstance()->getCloopenApiConfig();
     $voipAccounts = WebVoipClient::getInstance()->queryAllVoipAccounts();
     $response->appId = $configs['voipappId'];
     $response->voipAccounts = $voipAccounts;
     $response->curVoipAccount = DAL::get()->find_by_userid('VoipAccount', $this->curOperatorUser->id);
     $response->voip_cloopen_js = BeanFinder::get('configs')->voip_cloopen_js;
 }
예제 #21
0
 /**
  * sendSMS 
  * 给运维发送短信
  * 
  * @param mixed $content 
  * @static
  * @access public
  * @return void
  */
 public static function sendSMS($content)
 {
     /*{{{*/
     if (BeanFinder::get('configs')->isDevEnv()) {
         $mobiles = array();
     } else {
         $mobiles = HdfPhoneNumber::$opsPhoneNumbers;
     }
     SMSClient::getInstance()->sendSMSForOPS($mobiles, $content);
 }
예제 #22
0
    public function __construct()
    {/*{{{*/
        DAL::get()->setUp('inspect');
        $this->dbexecuter = BeanFinder::get('dbexecuter');
        $this->dbexecuter->mustUseMaster();
        $this->maxBindTime = 50;//分钟

        $this->ignoreFrom = '00:00';
        $this->ignoreTo = '08:00';
    }/*}}}*/
예제 #23
0
 public function __construct()
 {/*{{{*/
     $this->processor = new XSLTProcessor;
     $this->xsl = new DOMDocument;
     $this->xml = new DOMDocument;
     $configs = BeanFinder::get('configs');
     $this->xslPath = $configs->wrapperPath;
     $this->dataPath = $configs->standardPath; 
     $this->resPath = $configs->resPath; 
     $this->echo = true;
 }/*}}}*/
예제 #24
0
    protected function getData($nowPage, $pageSize)
    {/*{{{*/
        $diseaseList = DiseaseClient::getInstance()->getAllDiseaseList($nowPage, $pageSize, array());
        if($nowPage <= $this->totalTimes && empty($diseaseList['list']))
        {
            throw new OpenPlatFormException("该次数据库取数据为空");
        }
        $diseases = array();
        foreach ($diseaseList['list'] as $disease)
        {
            $tmpArr = array();
            $zhuanTiList = $this->getZhuanTi($disease);

            $tmpArr['item']['related'] = "";
            if ($disease->related)
            {
                $i = 0;
                foreach ($disease->getRelatedDiseaseList() as $diseaseRelatedInfo)
                {
                    $dot = ($i == 0) ? "" : ",";
                    $tmpArr['item']['related'] .= $dot.$diseaseRelatedInfo['diseaseName'];
                    $i++;
                }
            }
            $tmpArr['item']['name'] = $disease->name;
            $tmpArr['item']['url'] = $disease->getUrl();
            $tmpArr['item']['yiyuan'] = $disease->getHospitalUrl(); 
            $tmpArr['item']['daifu'] = $disease->getDoctorUrl();
            $tmpArr['item']['zixun'] = $disease->getZixunUrl();
            if (false == empty($zhuanTiList))
            {
                $tmpArr['item']['zhuanti'] = $disease->getZhuantiUrl();
            }
            $tmpArr['item']['jieshao'] = $disease->getIntroUrl();
            $labelInfos  = DiseaseClient::getInstance()->getDiseaseLableByDiseaseAndLable($disease);
            foreach($labelInfos as $labelInfo)
            {
                $labelDesc['label']['labelName'] = LableDefine::getLableTitle($labelInfo['lableId']);
                $labelDesc['label']['labelUrl'] = 'http://www.haodf.com/lablelist/'.$disease->id.'/'.$labelInfo['lableId'].'.htm';

                if (false == in_array($labelDesc, $tmpArr['item']))
                {
                    $tmpArr['item'][] = $labelDesc;
                }
            }

            $diseases[] = $tmpArr;
            BeanFinder::get('LocalCache')->removeAll(); 
        }

        return $diseases;
    }/*}}}*/
예제 #25
0
 public function __construct($request, $response) 
 {
     parent::__construct($request, $response);
     $configs = BeanFinder::get('configs');
     $response->imgUrl = $configs->imgUrl;
     $userId = UserClient::getInstance()->getCheckedSeed('id');
     if ($userId)
         $this->_newUser = DAL::get()->find('user',$userId);
     else
         $this->_newUser = new NullEntity();
      
     $response->newUser = $this->_newUser;
 }
 protected function getData($nowPage,$pageSize)
 {/*{{{*/
     $facultyInfoArray = array();
     $facultyInfo = HospitalFacultyClient::getInstance()->getHospitalFacultyByOption($nowPage, $pageSize, array('hospitalId' => $this->hospitalId));
     foreach($facultyInfo as $key => $faculty)
     {
         $facultyInfoArray[] = array('item' => $this->getRealData($faculty));
         unset($faculty);
     }
     unset($facultyInfo);
     BeanFinder::get('LocalCache')->removeAll(); 
     return $facultyInfoArray;
 }/*}}}*/
예제 #27
0
 public function callback($request,$response)
 {
     if (md5($request->msg_id . $request->task_id . $request->fault_time . BeanFinder::get('configs')->jiankongbaoToken)
         == $request->token)
     {
         $content = XString::convertEncoding($request->content, 'gbk', 'utf-8');
         SMSClient::getInstance()->sendSMS(HdfPhoneNumber::$opsPhoneNumbers, $content.' by jkb');
         echo 'OK';
         return parent::DIRECT_OUTPUT;
     }
     echo 'INVALID';
     return parent::DIRECT_OUTPUT;
 }
예제 #28
0
 private function initDir()
 {/*{{{*/
     $className = get_class($this);
     $configs = BeanFinder::get('configs');
     $dir = $configs->standardPath.strtolower($className)."/"; 
     if (false == is_dir($dir))
     {
         $oldumask=umask(0);
         mkdir($dir, 0755);
         umask($oldumask);
     }
     $this->workPath = $dir;
 }/*}}}*/
예제 #29
0
 private function checkedSMSReport()
 {/*{{{*/
     $smslogs = SMSClient::getInstance()->getSMSLogsByMobiles4Monitor(BeanFinder::get('alertMobiles'));
     if(empty($smslogs) == false)
     {
         foreach($smslogs as $smslog)
         {
             if($smslog->reportCode == 'DELIVRD')
             {
                 return true;
             }
         }
     }
     return false;
 }/*}}}*/
 protected function getData($nowPage,$pageSize)
 {/*{{{*/
     $options = array();
     $spaceList = DoctorClient::getInstance()->getPageListByHospital($this->hospitalId, $nowPage, $pageSize, $options); 
     $spaceNoteArray = array();
     foreach($spaceList['doctorList'] as $doctor)
     {
         if ($doctor->hasSpace() && (false == empty($doctor->space->note1)|| false == empty($doctor->space->note2)))
         {
             $spaceNoteArray[] = array('item' => $this->getRealData($doctor));
             unset($doctor);
         }
     }
     BeanFinder::get('LocalCache')->removeAll(); 
     return $spaceNoteArray;
 }/*}}}*/