public function update($request, $response) { /*{{{*/ $ticketId = $request->ticketid; $response->title = '电话核实编辑'; $ticket = DAL::get()->find('ticket', $ticketId); if ($ticket->isNull() || false == DoctorCommentInspectRule::isDoctorCommentTelGroup($ticket->inspectGroup)) { echo '审核工单不存在'; exit; } if ($ticket->isDone() && $request->next > 0) { $group = DAL::get()->find_by_name('inspectgroup', DoctorCommentInspectRule::GROUP_DOCTORCOMMENT_TEL); $ticket = InspectClient::getInstance()->pickTicket($this->inspector, $group); } if ($ticket->isNull()) { echo "没有待审核的工单,审核完成"; exit; } $response->ticket = $ticket; $doctorComment = $ticket->getInspectSource(); $response->doctorComment = $doctorComment; $this->getPosterInfo($doctorComment, $response); $response->telDoctorComment = new TelDoctorComment($doctorComment->id); $source = $ticket->source; $response->telResult = DAL::get()->find_by_sourceid_and_sourcetype('telinspectresult', $source->id, get_class($source)); }
<td class="t_center"><a href="/doctorcomment/startinspect?inspectgroupid=<?php echo $group->id; ?> "><?php echo isset($waitingTicketInfos[$group->id]) ? $waitingTicketInfos[$group->id] : 0; ?> </a></td> <?php } ?> </tr> <tr> <td class="t_left">已审工单</td> <?php foreach ($inspectGroupList as $group) { if (DoctorCommentInspectRule::isDoctorCommentTomorrowGroup($group)) { continue; } ?> <td class="t_center"> <?php foreach ($group->getActivedInspectorList() as $tmpInspector) { if ($tmpInspector->countTodayTickets($group) > 0) { ?> <p color=red> <nobr> <?php if ($group->name == DoctorCommentInspectRule::GROUP_DOCTORCOMMENT || $group->name == DoctorCommentInspectRule::GROUP_DOCTORCOMMENT_CONTENT) { ?> <a target="_blank" href="/doctorcomment/chooselisttype?showtype=1&target=record&inspectorid=<?php echo $tmpInspector->id;
echo $diseaseDoctor->disease->name; ?> </span> </a>(<?php echo $diseaseDoctor->goodVoteCount; ?> 票) <?php } } ?> </div> <div class="handle"> <a href="javascript:;" class="pass green_btn on" id="item5_next" style="display:none;">审核完成,进入下一条</a> <?php if (false == DoctorCommentInspectRule::isDoctorCommentBackGroup($ticket->inspectGroup)) { ?> <a href="javascript:;" class="normal_next" id="item5_nextstep">无法判定?我要上交</a> <?php } ?> </div> </div> </div> <div class="item" id="item6" style="display:none;"> <div class="tit">上交理由</div> <input name="data[remark]" id="remark" type="hidden"/> <div class="con"> <div class="placeholder"> <span class="left_tit">已选无法判定项:</span><span id="allHtmlUnDecide"></span> </div>
public function pass($request, $response) { /*{{{*/ $commentId = $request->id; $commentData = $request->getRequest('data'); $newData = $request->getRequest('commit'); $disease = DAL::get()->find('disease', $commentData['diseaseKey']); $commentData['diseaseKey'] = $disease->key; $ticket = DAL::get()->find('ticket', $request->ticketid); if ($ticket->isNull()) { echo 'ticket does not exist'; exit; } $doctorComment = $ticket->getInspectSource(); $response->oldData = array('DoctorComment' => $this->makeOldData4doctorComment($doctorComment, $commentData)); $response->newData = $commentData; //更改所属医生 $doctor = $doctorComment->doctor; if ($commentData['doctorId'] != $doctorComment->doctor->id) { $newDoctor = DAL::get()->find('doctor', $commentData['doctorId']); if ($newDoctor->isNull() == false) { $doctor = $newDoctor; } } //文字审核结果 $textInspectResultDto = $this->getInspectResult($ticket, $commentData); //dodo::psq $passContent = $this->getPassContent($request, $doctorComment->tag); $res = InspectClient::getInstance()->next($request->ticketid, $textInspectResultDto, $this->inspector); if (false == DoctorCommentInspectRule::isDoctorCommentBackGroup($ticket->inspectGroup)) { S3LogClient::getInstance()->add($this->inspector, $ticket->source->getLogable()->action(DoctorCommentLog::ACTION_TRIAL_COMMIT, $passContent)); } else { S3LogClient::getInstance()->add($this->inspector, $ticket->source->getLogable()->action(DoctorCommentLog::ACTION_HAND_COMMIT, $passContent)); } if ($res == false) { $response->msg = '审核失败'; } else { $nextTicket = InspectClient::getInstance()->pickTicket($this->inspector, $ticket->inspectGroup); if ($nextTicket->isNull()) { // 没有下一条工单了 $response->msg = "没有工单了,审核结束"; } else { // 还有下一条 $comment = $nextTicket->source; $response->setRedirect('/doctorcomment/showdetail?id=' . $comment->id . '&ticketid=' . $nextTicket->id); } } self::clearCache($request->id); }
public function findList() { /*{{{*/ $nowPage = $this->request->getRequest('page', 1); $group = DoctorCommentInspectRule::getDoctorCommentGroup(); $groupId = $this->request->groupid ? $this->request->groupid : $group->id; if ($this->request->showtype) { $recordListAndPageInfo = InspectClient::getInstance()->getInspectorRecordList($nowPage, 50, $this->request->inspectorid, $groupId); } else { $recordListAndPageInfo = DoctorCommentClient::getInstance()->getDoctorCommentListForInspector($nowPage, self::PAGE_SIZE, $this->request->inspectorid, $groupId, $this->getOptions()); self::$doctorCommentList = $recordListAndPageInfo['list']; } $this->res = $recordListAndPageInfo; $dcIds = array(); foreach ($this->getDoctorCommentList() as $doctorComment) { $dcIds[] = $doctorComment->id; } if (false == empty($dcIds)) { $this->response->inspectResultInfos = InspectClient::getInstance()->getInspectResultInfos($dcIds); } return $this; }