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)); }
public function startInspect($request, $response) { /*{{{*/ $inspectGroup = DAL::get()->find('InspectGroup', $request->inspectgroupid); $nextTicket = InspectClient::getInstance()->pickTicket($this->inspector, $inspectGroup); if ($nextTicket->isNull()) { // 没有下一条工单了 echo "没有工单了,审核结束"; return parent::DIRECT_OUTPUT; } else { $source = $nextTicket->source; // 还有下一条 if (DoctorCommentInspectRule::isDoctorCommentGroup($inspectGroup)) { $response->setRedirect('/doctorcomment/showdetail?id=' . $source->id . '&ticketid=' . $nextTicket->id); } else { if (DoctorCommentInspectRule::isDoctorCommentTelGroup($inspectGroup)) { $response->setRedirect('/commentconfirm/edit?ticketid=' . $nextTicket->id); } else { if (DoctorCommentInspectRule::isDoctorCommentContentGroup($inspectGroup)) { $response->setRedirect('/doctorcomment/commentcontentaudit?id=' . $source->id . '&ticketid=' . $nextTicket->id); } else { if (DoctorCommentInspectRule::isDoctorCommentPostGroup($inspectGroup)) { $response->setRedirect('/commentpost/edit?id=' . $source->id . '&ticketid=' . $nextTicket->id); } else { if (DoctorCommentInspectRule::isDoctorCommentBackGroup($inspectGroup)) { $response->setRedirect('/doctorcomment/showdetail?id=' . $source->id . '&ticketid=' . $nextTicket->id); } else { if (DoctorCommentInspectRule::isDoctorCommentDoctorFinal($inspectGroup)) { $response->setRedirect('/commentdoctor/showdetail?id=' . $source->id . '&ticketid=' . $nextTicket->id); } else { if (DoctorCommentInspectRule::isDoctorRankWarningGroup($inspectGroup)) { $response->setRedirect('/commentdoctor/showrankwarningdetail?id=' . $source->id . '&ticketid=' . $nextTicket->id); } } } } } } } } }