public function ajaxShowDoctorPresent($request, $response) {/*{{{*/ $patientId = $request->patientid; $response->patientId = $patientId; list($canSend, $errorMsg) = $this->canDoctorSendPresent(); $response->canSend = $canSend; $response->errorMsg = $errorMsg; if(false == $canSend) { return; } $nowPage = $request->getRequest('page', 1); $response->page = $nowPage; $pageSize = 4; $presentResult = PresentClient::getInstance()->getDoctorPresents($nowPage, $pageSize); $response->presentList = $presentResult['presents']; $response->pagelink = Pager::getNavLink('/api/present/ajaxshowdoctorpresent?patientid='.$patientId.'&uname='.$this->_newSpace->userName.'&page=', $presentResult['pageInfo'], false); }/*}}}*/
public function auditPresentOrderList($request, $response) { /*{{{*/ $params = array(); $isaudited = $request->getRequest('isaudited', 'all'); $response->isaudited = $isaudited; $params['isaudited'] = $isaudited; $presentName = $request->getRequest('presentName', ''); $response->presentName = $presentName; if ($presentName) { $present = DAL::get()->find_by_name('Present', $presentName); if ($present->isNull()) { $params['presentId'] = -1; } else { $params['presentId'] = $present->id; } } $userName = $request->getRequest('userName', ''); $response->userName = $userName; if ($userName) { $user = DAL::get()->find_by_name('User', $userName); if ($user->isNull()) { $params['userId'] = -1; } else { $params['userId'] = $user->id; } } $doctorName = $request->getRequest('doctorName', ''); $response->doctorName = $doctorName; if ($doctorName) { $space = DAL::get()->find_by_fld_SpaceUserName_or_fld_SpaceHostName('space', $doctorName, $doctorName); if ($space->isNull()) { $params['spaceId'] = -1; } else { $params['spaceId'] = $space->id; } } $patientName = $request->getRequest('patientName', ''); $response->patientName = $patientName; if ($patientName) { $patient = DAL::get()->find_all_by_fld_PatientName_or_fld_PatientMobile('Patient', $patientName, $patientName); if (empty($patient)) { $params['patientId'] = array(-1); } else { $params['patientId'] = array_keys($patient); } } $params['nowPage'] = $request->getRequest('page', 1); $params['pageSize'] = 18; $pStartTime = $request->getRequest('pStartTime', XDateTime::now()->addDay(-2)->toShortString()); $response->pStartTime = $pStartTime; $params['pStartTime'] = XDateTime::valueOf($pStartTime); $pEndTime = $request->getRequest('pEndTime', XDateTime::now()->toShortString()); $response->pEndTime = $pEndTime; $params['pEndTime'] = XDateTime::valueOf($pEndTime)->addDay(1); $params['notSpacePresentCate'] = false; $result = PresentClient::getInstance()->getPresentOrders($params); $response->presentOrders = $result['presentOrderList']; $pagelink = ''; $urlParams = array('presentName' => $presentName, 'isaudited' => $isaudited, 'userName' => $userName, 'doctorName' => $doctorName, 'patientName' => $patientName, 'pStartTime' => $pStartTime, 'pEndTime' => $pEndTime); $url = '/present/auditpresentorderlist?' . http_build_query($urlParams, '&') . '&page='; if (isset($result['pageInfo'])) { $pagelink = Pager::getNavLink($url, $result['pageInfo']); } $response->pagelink = $pagelink; }
public function scoreDetail($request, $response) {/*{{{*/ $pageSize = 25; $pageIndex = $request->getRequest('page', 1); $result = ScoreClient::getInstance()->getLastMonthAccountItemByUserId($this->user->id, $pageIndex, $pageSize); $response->scoreItems = $result['scoreItems']; $response->pageLink = Pager::getNavLink('/index/scoredetail?page=', $result['pageInfo'], false); }/*}}}*/