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


PHP DBC::requireNotNull方法代码示例

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


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

示例1: uploadByWeixin

 public function uploadByWeixin($request, $response)
 {
     $patientId = $request->patientId;
     $spaceId = $request->spaceId;
     $sourceType = $request->sourceType;
     $patient = DAL::get()->find('patient', $patientId);
     $weixUser = DAL::get()->find_by_userid('WeixUser', $patient->user->id);
     DBC::requireNotNull($weixUser, "绑定的微信用户还没有生成,请稍等...");
     if($sourceType == 'PatientSignin')
     {
         $patientSignin = DAL::get()->find_by_spaceid_and_patientid('PatientSignin', $spaceId, $patientId);
         $weixDealingEvent = DAL::get()->find_by_weixuserid_and_sourceid("WeixDealingEvent", $weixUser->id, $patientSignin->id);
         if($weixDealingEvent->isNull())
         {
             WeixClient::getInstance()->createWeixDealingEvent($weixUser, $patientSignin);
         }
         $str = "请在微信中拍照上传门诊病历,完成对".$patientSignin->space->name."的报到";
         WeixApi::kefuTextMsg($weixUser, $str, WeixUser::WEIXINTYPE_PATIENT);
     }
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:20,代码来源:weixincontroller.php

示例2: aliPayAccess

 public function aliPayAccess($request, $response)
 {
     $hospital = DAL::get()->find('hospital', $request->hospitalid);
     DBC::requireNotNull($hospital, '医院不存在');
     $response->title = $response->topTitle = $hospital->name;
     $response->aliUrl = array_key_exists($hospital->id, Hospital::$aliPayHospitalUrl) ? Hospital::$aliPayHospitalUrl[$hospital->id] : '';
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:7,代码来源:hospitalcontroller.php

示例3: submitSignin

 public function submitSignin($request, $response)
 {
     $space = DAL::get()->find('space', $request->spaceId);
     DBC::requireNotNull($space, '医生不存在,或未开通空间');
     $response->setRedirect($response->router->urlfor('user/register4signin', array('mobile'=>$request->mobile, 'forward'=>$request->forward, 'spaceId'=>$space->id)));
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:6,代码来源:usercontroller.php

示例4: patientUpload

 public function patientUpload($request, $response)
 {
     /*{{{*/
     $patientId = $request->patientId;
     $patientCaseId = $request->patientCaseId;
     $response->patientId = $patientId;
     $response->patientCaseId = $patientCaseId;
     $list = $this->getPatientCaseandBreadCrumbNavigation($patientCaseId, $patientId);
     $breadcrumbNavigation = $list['breadcrumbNavigation'];
     $patientCase = $list['patientCase'];
     $memList = $memberIds = array();
     if (false == $patientCase->isNull()) {
         $patientCaseId = $patientCase->id;
         $patientIds = DAL::get()->queryValidPatientIds('patientcaseref', $patientCaseId);
         $doctorOwner = DAL::get()->find_by_sourceid('doctorowner', $this->space->id);
         if (false == empty($patientIds)) {
             $memIds = PatientClubClient::getInstance()->getMemberIdByPatientIdAndDoctorOwnerId($patientIds, $doctorOwner->id);
             $memList = DAL::get()->find('regroupmember', $memIds);
         }
         $patientIds = array();
         foreach ($memList as $mem) {
             $patientIds[] = $mem->patient->id;
         }
     } else {
         $patientIds = array($patientId);
     }
     $patientList = DAL::get()->find('patient', $patientIds);
     $groupNames = array();
     foreach ($patientList as $key => $patient) {
         $patientGroups = ForumClient::getInstance()->getGroupListByPatientIdAndSpaceId($patient->id, $this->space->id);
         foreach ($patientGroups as $patientGroup) {
             $groupName = $patientGroup->name;
             $groupNames[$key] = $groupName;
         }
     }
     $interactCounts = $members = array();
     $doctorOwner = DAL::get()->find_by_sourceid('doctorowner', $this->space->id);
     DBC::requireNotNull($doctorOwner, 'doctorOwner不存在');
     if (false == empty($patientIds)) {
         $memberIds = DAL::get()->queryMemberIdByPatientIdAndDoctorOwnerId('regroupmember', $patientIds, $doctorOwner->id);
         foreach ($memberIds as $map) {
             if (false == array_key_exists($map['patientid'], $members)) {
                 $members[$map['patientid']] = DAL::get()->find('regroupmember', $map['id']);
             }
         }
     }
     foreach ($patientIds as $patientId) {
         $interactCount = DAL::get()->queryValidCountOfPatientHad('doctorpatientref', $patientId);
         $interactCounts[$patientId] = $interactCount;
     }
     $response->RecordPatientIds = DAL::get()->queryRecordListByPatientIds('PatientHealthRecord', $patientIds);
     $response->patientList = $patientList;
     $response->groupNames = $groupNames;
     $response->members = $members;
     $response->interactCounts = $interactCounts;
     $response->breadcrumbNavigation = $breadcrumbNavigation;
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:57,代码来源:adminpatientcontroller.php


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