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


PHP XDateTime::dayDiff方法代码示例

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


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

示例1: attendance

 public function attendance($request, $response)
 {
     /*{{{*/
     $options = array();
     $queueId = $request->queueId;
     $workId = $request->workId;
     $queueList = $this->curOperator->returnServiceQueues();
     $workIds = DAL::get()->queryWorkIds('TeleOperator', array_keys($queueList));
     $fromDate = $request->fromDate;
     $toDate = $request->toDate;
     $fromDate = empty($fromDate) ? XDateTime::today()->toShortString() : $request->fromDate;
     $toDate = empty($toDate) ? XDateTime::today()->toShortString() : $request->toDate;
     $dayDiff = XDateTime::dayDiff(XDateTime::valueOf($fromDate), XDateTime::valueOf($toDate));
     if (0 < $dayDiff) {
         throw new TelConfException('每次仅可查询一天的数据');
     }
     $teleOperatorIds = DAL::get()->find_id_by_serviceQueueAndValid('TeleOperator', array_keys($queueList));
     $options['teleOperatorIds'] = $teleOperatorIds;
     $teleOperators = DAL::get()->find('TeleOperator', $teleOperatorIds);
     if (false == empty($queueId)) {
         $workIds = DAL::get()->queryWorkIds('TeleOperator', $queueId);
         $selectedOperatorIds = DAL::get()->find_id_by_serviceQueueAndValid('TeleOperator', $queueId);
         $options['teleOperatorIds'] = $selectedOperatorIds;
         $options['queueId'] = $queueId;
         $teleOperators = DAL::get()->find('TeleOperator', $selectedOperatorIds);
     }
     if (false == empty($workId)) {
         $teleOperator = DAL::get()->find_by_workid('TeleOperator', $workId);
         if (false == $teleOperator->isNull()) {
             $options['teleOperatorIds'] = $teleOperator->id;
         }
     }
     $options['fromDate'] = $fromDate;
     $options['toDate'] = $toDate;
     if ('calc' == $request->doaction && false == empty($queueId)) {
         $ids = TeleConversationClient::getInstance()->attendance($options);
     }
     $logList = array();
     if (false == empty($ids)) {
         $logList = DAL::get()->find('TelLog', $ids);
     }
     $response->logList = $logList;
     $response->teleOperators = $teleOperators;
     $response->fromDate = $fromDate;
     $response->toDate = $toDate;
     $response->selectedQueueId = $queueId;
     $response->selectedWorkId = $workId;
     $response->queueList = $queueList;
     $response->workIds = $workIds;
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:50,代码来源:reportcontroller.php

示例2: foreach

{
?>
<input type="hidden" class="ajaxdiaryid" value='<?=$lastDiary->id?>'/>
<?php
    if($lastDiary->isEmpty())
    {
        continue;
    }
?>
                <!-- start healthDaily-item -->
                <div class="healthDaily-item mt20">
                    <div class="healthDaily-item-t">
                        <p class="gray">
                            <?=$lastDiary->doTime->toShortString()?>  
                            <?=$lastDiary->doTime->getWeekDesc()?> 出院
                            <?=XDateTime::dayDiff($followupOwner->leaveHospitalDate, $lastDiary->doTime)?>天
                            <?php
                            if($lastDiary->isAuditorAgent())
                            {
                            ?>
                                <span class="darkBlue f14">医助整理</span>
                            <?php
                            }
                            ?>
                        </p>
                        <div class="circle"></div>
                    </div>
                    <div class="radiusBox">
                    <?php
                       foreach($lastDiary->getFormativeDiary() as $categoryId => $answerArr)
                       {
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:31,代码来源:ajaxgethealthdiarylist.php

示例3: medicineId_dotime_answer

 private function medicineId_dotime_answer($userLastFiveDaysAnswerList)
 {/*{{{*/
     $resultArr = array();
     foreach($userLastFiveDaysAnswerList as $answer)
     {
             $resultArr[$answer->medicineUserScheme->medicine->id][ XDateTime::dayDiff( $answer->doTime,  XDateTime::today())] = $answer;
     }
     return $resultArr;
 }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:9,代码来源:myhealthcontroller.php

示例4: queryHospitalMaintenance

 /**
  * queryHospitalMaintenance 
  * 主管查询推广情况 
  * @author wx 
  * @param mixed $request 
  * @param mixed $response 
  * @access public
  */
 public function queryHospitalMaintenance($request, $response)
 {
     /*{{{*/
     $inspector = $this->curInspector;
     DBC::requireTrue($inspector->user->name == 'tiger_liu', '权限不足无法访问!');
     $startTime = $request->startTime;
     $endTime = $request->endTime;
     $extensionWorkName = $request->extensionWorkName;
     $doctorName = $request->doctorName;
     $userName = $request->userName;
     $hospitalName = $request->hospitalName;
     $page = $request->getRequest('page', '1');
     $pageSize = 20;
     $totalSigninNum = 0;
     $spaceIds = $signinInfo = array();
     $inspectorId = '';
     $isQuery = empty($startTime) && empty($endTime) && empty($extensionWorkName) && empty($doctorName) && empty($userName) && empty($hospitalName);
     if ($startTime && $endTime) {
         DBC::requireTrue(XDateTime::dayDiff(XDateTime::valueOf($startTime), XDateTime::valueOf($endTime)) >= 0, "日期范围不正确");
     }
     if (false == $isQuery) {
         $spaceIds = $this->getSpacesByQueryCondition($doctorName, $userName, $hospitalName);
         $extensionWorker = $this->queryInspectorAccurately($extensionWorkName);
         if (false == $extensionWorker->isNull()) {
             $inspectorId = $extensionWorker->id;
         } else {
             if ($extensionWorker->isNull() && false == empty($extensionWorkName)) {
                 $inspectorId = 'all';
             }
         }
         $totalSigninNum = DAL::get()->queryAllBindCntByInspector('SubsidyOrder', $inspectorId, $spaceIds, $startTime, $endTime);
         list($spaceIds, $pageInfo) = DAL::get()->queryInspectorBindedSpaceId('SubsidySwitch', $inspectorId, $spaceIds, $page, $pageSize, $startTime, $endTime);
         if (false == empty($spaceIds)) {
             foreach ($spaceIds as $spaceId) {
                 $count = DAL::get()->querySpaceSigninSubsidyOrderCntByTimeSpan('SubsidyOrder', $spaceId, $startTime, $endTime);
                 $space = DAL::get()->find('Space', $spaceId);
                 $subsidySwitch = DAL::get()->find_by_spaceid_and_category('SubsidySwitch', $spaceId, SubsidySwitch::TYPE_SIGNIN_SWITCH);
                 $extentionWorker = DAL::get()->find('Inspector', $subsidySwitch->inspectorid);
                 $signinInfo[$space->id]['cnt'] = $count;
                 $signinInfo[$space->id]['space'] = $space;
                 $signinInfo[$space->id]['inspector'] = $extentionWorker;
             }
         }
         $response->pageLink = PageNav::getNavLink(PageNav::getPageNavTemplate('queryhospitalmaintenance?startTime=' . $startTime . '&endTime=' . $endTime . '&doctorName=' . $doctorName . '&userName=' . $userName . '&hospitalName=' . $hospitalName . '&extensionWorkName=' . $extensionWorkName . '&page='), $pageInfo['nowpage'], $pageInfo['pagesize'], $pageInfo['total']);
     }
     $response->signinInfo = $signinInfo;
     $response->totalSigninNum = $totalSigninNum;
     $response->startTime = $startTime;
     $response->endTime = $endTime;
     $response->extensionWorkName = $extensionWorkName;
     $response->doctorName = $doctorName;
     $response->userName = $userName;
     $response->hospitalName = $hospitalName;
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:62,代码来源:doctormanagercontroller.php

示例5: isset

        ?>
            </td>
            <td>
                <?php 
        if (false == $customer->getBindUser()->getFollowupPatientSignin()->isNull()) {
            echo "已报到";
        } else {
            echo "未报到";
        }
        ?>
            </td>
            <td>
                <?php 
        $deadline = isset($deadlines[$customer->id]) ? $deadlines[$customer->id] : (empty($firstTaskStr) ? '' : $firstTaskStr[$customer->id]['deadline']);
        if ($deadline instanceof XDateTime) {
            echo XDateTime::dayDiff(XDateTime::now(), $deadline) + 1 . '天';
        }
        ?>
            </td>
            <td>
                <?php 
        echo isset($firstTaskStr[$customer->id]['record']) ? $firstTaskStr[$customer->id]['record'] : '';
        ?>
            </td>
			<td>
                <?php 
        echo isset($firstTaskStr[$customer->id]['ctime']) ? $firstTaskStr[$customer->id]['ctime'] : '';
        ?>
				</td>
        </tr>
        <?php 
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:31,代码来源:firstsaletasklist.php

示例6: showOrderList

    public function showOrderList($request, $response)
    {/*{{{*/
        $orderId = $request->orderid;
        $status = $request->type;
        $beginDate = $request->beginDate;
        $endDate = $request->endDate ? $request->endDate : XDateTime::now()->today()->toShortString();
        $page = $request->page?$request->page : 1;
        $pageSize = 20;
        $telOwner = DAL::get()->find_by_relatedObject('telowner', $this->_newSpace->user);
        $options = array();
        $options['orderId'] = $orderId;
        if($status != TelOrder::SEARCH_FINISHED_CLOSE) 
        {
            $options['desc'] = 'asc';
        }
        $res = TelOrderClient::getInstance()->getList($status, $page, $pageSize, $telOwner->id, $options);
        $pagelink = PageNav::getNavLink(PageNav::getPageNavTemplate("showorderlist?type=$status&orderId=$orderId&actionclass=$request->actionclass&page="),$res['pageInfo']['nowpage'],$res['pageInfo']['pagesize'],$res['pageInfo']['total']);
        $waittimearray = array();
        $waittimeall = 0;
        $visitordersarray = array();
        $now = XDateTime::now();
        foreach($res['list'] as $telOrder)
        {
            $confirmtime = $telOrder->confirmStartTime;
            if(($telOrder->status != TelOrder::STATUS_FINISHED && $telOrder->status != TelOrder::STATUS_CLOSED) || $confirmtime > $now)
            {
                $confirmtime = $now;
            }
            $paytime = $telOrder->payTime;
            if(XDateTime::valueOf($telOrder->payTime)->isZero() == true)
            {
                $paytime = $telOrder->ctime;
            }
            $visitOrder = DAL::get()->find_by_orderid('TelVisit', $telOrder->id);    
            $flow = DAL::get()->find_by_patientid_and_spaceid('DoctorPatientRef', 
                    $telOrder->patient->id, $telOrder->executer->relatedObject->id);
            if($visitOrder->isNull() == false && $flow->isNull() == false && $visitOrder->rank != TelVisit::RANK_ZERO && $visitOrder->content != '')
            {
                $visitordersarray[$telOrder->id] = true;
            }
            if($telOrder->status == TelOrder::STATUS_FINISHED || $telOrder->status == TelOrder::STATUS_CLOSED || $telOrder->status == TelOrder::STATUS_CONFIRM)
            {
                $waittimearray[$telOrder->id] = XDateTime::monthDiff($paytime,$confirmtime)."月";
                if($waittimearray[$telOrder->id] <= 0)
                {
                    $waittimearray[$telOrder->id] = XDateTime::dayDiff($paytime,$confirmtime)."天";
                    if($waittimearray[$telOrder->id] <= 0)
                    {
                        $waittimearray[$telOrder->id] = XDateTime::HourDiff($paytime,$confirmtime)."小时";
                        if($waittimearray[$telOrder->id] <= 0)
                        {
                            $waittimearray[$telOrder->id] = XDateTime::minuteDiff($paytime,$confirmtime)."分";
                            if($waittimearray[$telOrder->id] <= 0)
                            {
                                $waittimearray[$telOrder->id] = XDateTime::minuteDiff($paytime,$confirmtime)."秒"; 
                                if($waittimearray[$telOrder->id] <= 0)
                                {
                                    $waittimearray[$telOrder->id] = 0;
                                }
                            }
                        }
                    }
                }
            }
            if(XDateTime::secondDiff($paytime,$confirmtime) > 0)
            {
                $waittimeall += XDateTime::secondDiff($paytime,$confirmtime);
            }
        }
        $avgtime = "0天";
        if(count($res['list']) > 0)
        {
            $avgtimeall = $waittimeall/count($res['list']);
            $avgtime = floor($avgtimeall/2592000)."月";

            if(($avgtimeall/2592000) < 1)
            {
                $avgtime = floor($avgtimeall/86400)."天";
            }
            if($avgtimeall/86400 < 1)
            {
                $avgtime = floor($avgtimeall/3600)."小时";
            }
            if($avgtimeall/3600 < 1)
            {
                $avgtime = floor($avgtimeall/60)."分";
            }
        }
        $response->waittimearray = $waittimearray;
        $response->avgtime = $avgtime;
        $response->orderid = $orderId;
        $response->visitordersarray = $visitordersarray;
        $response->telOrderList = $res['list'];
        $response->space = $this->_newSpace;
        $response->beginDate = $beginDate;
        $response->endDate = $endDate;
        $response->pagelink = $pagelink;
        $response->type = $status;
        $response->telOwner = $telOwner;
        $response->actionClass = $request->actionclass;
//.........这里部分代码省略.........
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:101,代码来源:adminpaymentcontroller.php

示例7: inComingCallStatistics

 public function inComingCallStatistics($request, $response)
 {/*{{{*/
     	
 	$fromdate = ($request->fromdate != null)?$request->fromdate:XDateTime::now()->toShortString();
     $todate = ($request->todate != null)?$request->todate:XDateTime::now()->toShortString();
     $errorMsg = "查询日期相差最多93天,请重新选择";
     $rows = array();
     $callType = $request->callType == null ? 0 : $request->callType;
     if(XDateTime::dayDiff(XDateTime::valueOf($fromdate),XDateTime::valueOf($todate)) <= 92)
     {
         $errorMsg = "";
         $params = array('fromdate'=>$fromdate." 00:00:00",'todate'=>$todate." 23:59:59",'calltype'=>$callType,
             'incomingcallsettingid'=>$request->inComingCallSettingId,'admin4tel'=>$request->admin4tel);
         $rows = PaymentClient::getInstance()->getInComingCallStatistics($params);
     }
     $inComingCallSettings = PaymentClient::getinstance()->getInComingCallSettings();
     $response->rows = $rows;
     $response->inComingCallSettings = $inComingCallSettings;
     $response->fromdate = $fromdate;
     $response->todate = $todate;
     $response->inComingCallSettingId = $request->inComingCallSettingId;
     $response->callType = $request->callType;
     $response->admin4tel = $request->admin4tel;
     $response->errorMsg = $errorMsg;
 }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:25,代码来源:patientcontroller.php

示例8: is_null

            <?php 
    }
    ?>
            </li>
            <?php 
}
/*}}}*/
?>
                    </ul>
                    </td>
                </tr>
                <tr>
                    <td>
                    <div>
                    <span class="fb">距离上次批注时间:</span><?php 
echo is_null($annotation) ? '' : XDateTime::dayDiff(XDateTime::valueOf($annotation->ctime->toShortString()), XDateTime::today());
?>
天
                    </div>
                    <div>
                    <span class="fb">上次批注内容:</span><?php 
echo is_null($annotation) ? '' : $annotation->content;
?>
                    </div>
                    </td>
                </tr>
            </table>
            </div>
            </div>
            <!--end左侧危险因素-->
        </td>
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:31,代码来源:showtaskticketdangerfactors.php

示例9: foreach

<?php 
        }
        ?>
                                    <p class="f12 green2"><?php 
        echo $diary->getDoTime()->getYear();
        ?>
</p>
                                    <p class="f12 gray3"><?php 
        echo $diary->getDoTime()->getWeekDesc();
        ?>
</p>
<?php 
        if ($leaveHospitalDate instanceof XDateTime) {
            ?>
                                        <p class="f12 gray3">出院<?php 
            echo XDateTime::dayDiff($leaveHospitalDate, $diary->getDoTime());
            ?>
天</p>
<?php 
        }
        ?>
                                </div>
                                <div class="oh zoom pl50 gray2 f14 fs">
                                    <p>
                                    <?php 
        foreach ($diary->getHealthRecordAnwsers() as $curCategoryTitle => $answerList) {
            ?>
                                    <div class='clearfix'>
                                        <div class='fl tr' style='width:20%;'>
                                            <span class='fb'><?php 
            echo $curCategoryTitle;
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:31,代码来源:_patientdiarylist_diarycontent.php

示例10: getDepositeOrderList

 public function getDepositeOrderList($request, $response)
 {/*{{{*/
     $userName = $request->userName;
     $depositeOrderId = $request->depositeOrderId;
     $rechargeType = $request->rechargeType;
     $startDate = $request->startDate;
     $endDate = $request->endDate;
     $nowPage = $request->page ? $request->page : 1;
     $pageSize = 20;
     $query = $request->query;   //第一次查询query有值
     $errorMsg = null;
     if($startDate && $endDate)
     {
         DBC::requireTrue(XDateTime::dayDiff(XDateTime::valueOf($startDate), XDateTime::valueOf($endDate)) >= 0 
                                                                                 , "结束时间不能小于开始时间");
     }
     if(!empty($depositeOrderId))
     {
         DBC::requireTrue(is_numeric($depositeOrderId), '充值单ID不正确');
     }
    
     $depositeOrders = array();
     $isSuccess = false;
     //第一次查询,query存在
     $user = DAL::get()->find_by_name('user', $userName);
     if(empty($query))
     {/*{{{*/
         if('' == $userName || ('' != $userName && false == $user->isNull()))
         {
             $isSuccess = true;
             list($ids, $pageInfo) = DAL::get()->find_id_by_depositeOrderConditions('depositeorder', $nowPage, $pageSize, $depositeOrderId, $userName, $rechargeType, $startDate, $endDate);
             $depositeOrders = DAL::get()->find('depositeorder', $ids);
             $response->pageLink = PageNav::getNavLink(PageNav::getPageNavTemplate('getdepositeorderlist?userName='.$userName
                                                       .'&depositeOrderId='.$depositeOrderId.'&rechargeType='.$rechargeType
                                                       .'&startDate='.$startDate.'&endDate='.$endDate.'&page='), 
                                                       $pageInfo['nowpage'], $pageInfo['pagesize'], $pageInfo['total']);
         }    
         else
         {
             $errorMsg = '用户名不正确'; 
         }
     }/*}}}*/
     $hasTrans = array();
     foreach($depositeOrders as $depositeOrder)
     {
         $payTrans = DAL::get()->find_by_sourceid('payTrans', $depositeOrder->id);
         if(false == $payTrans->isNull())
         {    
             $hasTrans[$depositeOrder->id] = $depositeOrder->id;
         }                
     }            
     $response->hasTrans = $hasTrans;
     $response->errorMsg = $errorMsg;
     $response->rechargeTypeDesc = DepositeOrder::$rechargeTypeDesc;
     $response->rechargeType = $rechargeType;
     $response->userName = $userName;
     $response->depositeOrderId = $depositeOrderId;
     $response->isSuccess = $isSuccess;
     $response->depositeOrders = $depositeOrders;
     $response->userName = $userName;
     $response->depositeOrderId = $depositeOrderId;
     $response->startDate = $startDate;
     $response->endDate = $endDate;
 }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:64,代码来源:accountcontroller.php

示例11: registerDevice

    public function registerDevice($deviceId, $os, $deviceType, $app, $vd = "", $userId = "")
    {/*{{{*/


        if('' == trim($deviceId) || $deviceId == null)
        {
            $this->setErrorCode(179);
            return 0;
        }
        if('' == trim($app) || $app == null)
        {
            $this->setErrorCode(180);
            return 0;
        }
        $phoneRegisterLog = DAL::get()->find_by_devicetoken_and_app('phoneRegisterLog', $deviceId, $app);
        $isFirst = 0;//默认是第一次
        if(false == $phoneRegisterLog->isNull()) { $isFirst = 1; }
        // 拿出这一天是不是第一次
        $phoneRegisterLog2 = StationLetterClient::getInstance()->getTodayLogin($deviceId, $app);
        if($phoneRegisterLog2->isNull())
        {
            if ($userId || (isset($_REQUEST['currentUserId']) && $_REQUEST['currentUserId']))
            {
                $userId = $userId ? $userId : $_REQUEST['currentUserId'];
                $user = DAL::get()->find('user', $userId);
                if (false == $user->isNull())
                {
                    $lastSubscriptionRecordId = DAL::get()->queryLastSubscriptionRecordId('usersubscriptionrecord', $user->id);
                    if ($lastSubscriptionRecordId)
                    {
                        $record = DAL::get()->find('usersubscriptionrecord', $lastSubscriptionRecordId);
                        if ($record->isNull() || XDateTime::dayDiff(XDateTime::valueOf($record->ctime), XDateTime::now()) > 0)
                        {
                            SubscriptionClient::getInstance()->addReadRecord4User($user->id);
                        }
                    }
                    else
                    {
                        SubscriptionClient::getInstance()->addReadRecord4User($user->id);
                    }
                }
            }
            StationLetterClient::getInstance()->createPhoneRegisterLog($os, $app, $deviceType, $deviceId, $vd, $isFirst);
        }

        //记录手机用户
        $user = DAL::get()->find('user', $userId);
        if(false == $user->isNull())
        {
            self::recordWapUser($user, $app, $os);
        }
    }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:52,代码来源:databucket.php

示例12: operatorReport

 /**
  * operatorReport 
  * 座席报表,根据搜索条件和组长权限可查看队列座席的接听工作情况,目前只针对呼入
  * 分为按日查询和分时查询
  */
 public function operatorReport($request, $response)
 {
     /*{{{*/
     $reportInfoList = $options = $serviceQueues = array();
     $serviceQueueList = $this->curOperator->returnServiceQueues();
     $timeType = $request->timeType;
     $fromDate = $request->fromDate;
     $toDate = $request->toDate;
     $fromHour = $request->fromHour;
     $toHour = $request->toHour;
     if (empty($fromDate)) {
         $fromDate = XDateTime::today()->toShortString();
     }
     if (empty($toDate)) {
         $toDate = XDateTime::valueOf($fromDate)->toShortString();
     }
     $firstday = XDateTime::valueOf(date('Y-m-01', strtotime(XDateTime::valueOf($fromDate))))->toShortString();
     $lastday = XDateTime::valueOf(date('Y-m-d', strtotime("{$firstday} +1 month -1 day")))->toShortString();
     $dayDiff = XDateTime::dayDiff(XDateTime::valueOf($fromDate), XDateTime::valueOf($toDate));
     if (0 == $timeType && 0 < $dayDiff) {
         throw new TelConfException('分时查询每次仅可查询一天的数据');
     } else {
         if (1 == $timeType && 7 < $dayDiff) {
             throw new TelConfException('分日查询每次最多可查询一周的数据');
         } else {
             if (2 == $timeType && $firstday != $fromDate && $lastday != $toDate) {
                 throw new TelConfException('分月查询每次仅可查询整月的数据');
             }
         }
     }
     if ('' != $request->direction) {
         $options['direction'] = $request->direction;
     }
     if ('' != trim($request->minduration)) {
         $options['minduration'] = trim($request->minduration);
     }
     if ('' != trim($request->maxduration)) {
         $options['maxduration'] = trim($request->maxduration);
     }
     $options['timeType'] = $timeType;
     $options['fromDate'] = $fromDate;
     $options['toDate'] = $toDate;
     $options['fromHour'] = empty($fromHour) ? 0 : $fromHour;
     $options['toHour'] = empty($toHour) ? 24 : $toHour;
     $serviceQueueIds = $request->queueIds;
     if (false == $serviceQueueIds) {
         $serviceQueueIds = array();
     }
     $reportInfoList = array();
     $serviceQueues = array();
     if ('calc' == $request->doaction && false == empty($serviceQueueIds)) {
         $serviceQueues = DAL::get()->find('ServiceQueue', $serviceQueueIds);
         $reportInfoList = DAL::get()->queryOperatorReportInfo('TeleConversation', $options, $serviceQueueIds);
     }
     $response->timeType = $timeType;
     $response->serviceQueueList = $serviceQueueList;
     $response->serviceQueueIds = $serviceQueueIds;
     $response->serviceQueues = $serviceQueues;
     $response->reportInfoList = $reportInfoList;
     $response->fromDate = $fromDate;
     $response->toDate = $toDate;
     $response->fromHour = $fromHour;
     $response->toHour = $toHour;
     $response->minDuration = trim($request->minduration);
     $response->maxDuration = trim($request->maxduration);
     $response->direction = $request->direction;
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:72,代码来源:operatorcontroller.php

示例13: if

	float:left;
	/*filter:alpha(opacity=50);*/
}
</style>
                      <!--start scenterMain-->
			 <div class="scenterMain">
			   <div class="scenterNotice-main-title">
                    <h3 class="scenterHealthDiary-review-title fl">全部健康日记</h3>
                    <p class="fr pr30"><a href="/myhealth/healthdiary">&lt;&lt;返回</a></p>
				</div>
<?php
	foreach ($diaryList as $diary) { ?>
				<!--start sHistoryDetails-->
				<div class="sHistoryDetails">
				  <div class="sHistoryDetails-title clearfix">
				   <span class="fl fb"><?=$diary->doTime?>  <?=$diary->doTime->getWeekDesc()?> <?php if ($isUserAboutPregnancy == false && $leaveHospitalDate instanceof XDateTime) echo '出院'.XDateTime::dayDiff($leaveHospitalDate, $diary->doTime).'天';?></span>
				   <span class="fr" style="margin-top: 5px;"><?=$diary->getHtmlImgAgentAuditor()?></span>
				  </div>
				  <div class="clearfix">
				    <?php include('_diarylist_diarycontent.php'); ?>				  
 				<!--start yz-content-->
		<?php
		$sourceId = $diary->id;
		$sourceType = 'HealthDiary';
		$annotation = DAL::get()->find_by_hostid_and_hosttype('NfsAnnotation', $sourceId, $sourceType);
		if(false == $annotation->isNull()) 
		{	 				
		 	$headImageUrl = "http://i1.hdfimg.com/space/images/icondoctor24.gif";
		?> 				
				  <div class="fr nav-yz-box">
				    <div class="ml15 mt10"><img src="<?=$headImageUrl?>"  width="30" height="30"/><span class="fb">&nbsp;医生助理</div>
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:31,代码来源:diarylist.php

示例14: if

<!--start scenter-pillList-->
<iframe id="medicineiframe" src="/myhealth/medicinecondition?userid=<?=$user->id?>" width="678" height="387" frameborder="0" scrolling="no" class="mb15"></iframe>
<!--end scenter-pillList-->


<!--start scenter-diary-->
<div class="scenter-diary">
    <div class="scenter-main-title clearfix">
	    <h3 class="scenter-diary-title fl">健康日记</h3>
<?php
$nextCheckupStatus = '';
if ($nextTask->isNull() == false && XDateTime::dayDiff( XDateTime::today(), $nextTaskTime) <= 30) {
  if ($nextTask->queue->isNoticeQueue()) {
    $nextCheckupStatus = '距支架术后下一次疾病知识学习还有 '.XDateTime::dayDiff( XDateTime::today(), $nextTaskTime).' 天';
  } else {
    $nextCheckupStatus = '距'.$nextTask->getDisplayName().'还有 '.XDateTime::dayDiff( XDateTime::today(), $nextTaskTime).' 天';
  }
}
?>
    <p class="fr pr30"><?=XDateTime::now()?> <?=XDateTime::today()->getWeekDesc()?> <em class="orange"><?=$nextCheckupStatus?></em></p>
    </div>
<?php if(isset($signin) && $signin->isPayed()) 
      {  ?>
    <p  class="mt10 p10 f14" style="text-indent:2em;padding-bottom:0" >请详细记录患者病情变化情况。如果出现下面症状,请说明出现症状的时间以及是否进行了处理。这些症状是能反映患者心肌缺血情况和用药后的不良反应的,这对于及时发现严重的药物不良反应和病情变化有重要意义(如果是子女协助管理,请记录时主动询问患者是否出现了以下症状)。 </p>

    <?php  include ('indetail/_healthdiary_diary_content.php');
      } 
?>

<p class="tr">
<?php if(isset($signin) && false == $signin->isPayed()) { ?>
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:31,代码来源:healthdiary.php

示例15: addIntentionManual

 public function addIntentionManual($request, $response)
 {
     /*{{{*/
     $patientId = $request->patientId;
     $type = $request->getRequest('type', 'nomal');
     $response->userId = $request->userId;
     $patient = DAL::get()->find('Patient', $request->patientId);
     $response->age = $response->month = $response->province = $response->city = $response->mobile = '';
     $response->sex = -1;
     if (false == $patient->isNull()) {
         if (false == empty($patient->birthday)) {
             $dayDiff = XDateTime::dayDiff(XDateTime::valueOf($patient->birthday), XDateTime::now());
             $response->age = intval($dayDiff / 365);
             $response->month = ceil($dayDiff % 365 / 30);
         }
         $response->patientId = $patient->id;
         $response->relation = $patient->relation;
         $response->sex = $patient->sex;
         $response->province = $patient->province;
         $response->city = $patient->city;
         $response->mobile = $patient->mobile;
     }
     $response->patientClassfy = array_keys(IntentionRecord::$recommendFacultyDesc);
     $response->symptonClassfy = array_keys(current(IntentionRecord::$recommendFacultyDesc));
     $response->facultyClassfy = current(current(IntentionRecord::$recommendFacultyDesc));
     $provInfo = array_merge(Area::provInfo(), Area::provInfoAppend());
     unset($provInfo['q']);
     $cities = Area::cityInfo();
     $hospitalList = HospitalClient::getInstance()->getHospitalByProvinceAndCity(current($provInfo)['Name'], current(current($cities)['Cities'])['Name']);
     $questionSheet = DAL::get()->find_by_title('QuestionSheet', IntentionRecord::QUESTIONSHEET_TITLE);
     $response->questionSheet = $questionSheet;
     $response->questions = $questionSheet->getQuestions();
     $response->provInfo = $provInfo;
     $response->cities = $cities;
     $response->type = $type;
     $response->hospitalList = $hospitalList;
     $response->phoneNumber = $request->showPhoneNumber;
     $mobileNumber = substr($request->showPhoneNumber, 0, 7);
     $mobileNumberArea = DAL::get()->find_by_mobilenumber("MobileNumberArea", $mobileNumber);
     if (false == $mobileNumberArea->isNull()) {
         $areaInfo = $mobileNumberArea->mobileArea;
         if (false == empty($areaInfo)) {
             $areaInfoArr = explode(' ', $areaInfo);
             if (count($areaInfoArr) >= 2) {
                 $response->province = $areaInfoArr[0];
                 $response->city = $areaInfoArr[1];
             }
         }
     }
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:50,代码来源:intentioncontroller.php


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