新增功能
This commit is contained in:
@@ -197,7 +197,19 @@ class DiagnosisController extends BaseAdminController
|
||||
}
|
||||
return $this->fail(DiagnosisLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 指派医助操作记录
|
||||
* @return \think\response\Json
|
||||
*/
|
||||
public function assignLogList()
|
||||
{
|
||||
$params = (new DiagnosisValidate())->goCheck('id');
|
||||
$result = DiagnosisLogic::assignLogList((int) $params['id']);
|
||||
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取通话签名
|
||||
* @return \think\response\Json
|
||||
@@ -316,10 +328,11 @@ class DiagnosisController extends BaseAdminController
|
||||
|
||||
$params['admin_id'] = (int)$this->adminId;
|
||||
$result = DiagnosisLogic::bindCallRoom($params);
|
||||
if ($result) {
|
||||
return $this->success('', [], 1, 1);
|
||||
if ($result === false) {
|
||||
return $this->fail(DiagnosisLogic::getError());
|
||||
}
|
||||
return $this->fail(DiagnosisLogic::getError());
|
||||
|
||||
return $this->success('', is_array($result) ? $result : [], 1, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -67,13 +67,46 @@ class PrescriptionController extends BaseAdminController
|
||||
public function detail()
|
||||
{
|
||||
$params = (new PrescriptionValidate())->get()->goCheck('detail');
|
||||
$detail = PrescriptionLogic::detail((int)$params['id']);
|
||||
$detail = PrescriptionLogic::detail((int) $params['id'], (int) $this->adminId, $this->adminInfo);
|
||||
if (!$detail) {
|
||||
return $this->fail('处方不存在');
|
||||
$msg = PrescriptionLogic::getError();
|
||||
|
||||
return $this->fail($msg !== '' ? $msg : '处方不存在');
|
||||
}
|
||||
|
||||
return $this->data($detail);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 审核处方(通过 / 驳回,驳回即作废)
|
||||
*/
|
||||
public function audit()
|
||||
{
|
||||
$params = (new PrescriptionValidate())->post()->goCheck('audit');
|
||||
$ok = PrescriptionLogic::audit(
|
||||
(int) $params['id'],
|
||||
(string) $params['action'],
|
||||
(string) ($params['remark'] ?? ''),
|
||||
(int) $this->adminId,
|
||||
$this->adminInfo
|
||||
);
|
||||
if (!$ok) {
|
||||
return $this->fail(PrescriptionLogic::getError());
|
||||
}
|
||||
|
||||
$msg = $params['action'] === 'reject' ? '已驳回并作废处方' : '审核通过';
|
||||
$wecom = PrescriptionLogic::consumeLastAuditWecomNotify();
|
||||
$data = [];
|
||||
if (is_array($wecom)) {
|
||||
$data['wecom_notify_ok'] = !empty($wecom['ok']);
|
||||
if (empty($wecom['ok']) && !empty($wecom['message'])) {
|
||||
$data['wecom_notify_hint'] = (string) $wecom['message'];
|
||||
}
|
||||
}
|
||||
|
||||
return $this->success($msg, $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 根据诊单获取处方列表
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user