This commit is contained in:
Your Name
2026-04-30 14:04:12 +08:00
parent eb782305e6
commit d3003ce0ac
19 changed files with 1560 additions and 313 deletions
@@ -33,7 +33,7 @@ class AppointmentController extends BaseAdminController
{
$params = (new AppointmentValidate())->post()->goCheck('create');
$params['assistant_id'] = $this->adminId;
$result = AppointmentLogic::create($params);
$result = AppointmentLogic::create($params, $this->adminId, $this->adminInfo);
if ($result === false) {
return $this->fail(AppointmentLogic::getError());
}
@@ -47,7 +47,7 @@ class AppointmentController extends BaseAdminController
public function cancel()
{
$params = (new AppointmentValidate())->post()->goCheck('cancel');
$result = AppointmentLogic::cancel($params);
$result = AppointmentLogic::cancel($params, $this->adminId, $this->adminInfo);
if ($result === false) {
return $this->fail(AppointmentLogic::getError());
}
@@ -118,6 +118,16 @@ class DiagnosisController extends BaseAdminController
$result = DiagnosisLogic::detail($params);
return $this->data($result);
}
/**
* @notes 诊单挂号 / 取消挂号 操作日志(谁在何时操作)
*/
public function guahaoLogList()
{
$params = (new DiagnosisValidate())->get()->goCheck('guahaoLogList');
return $this->data(DiagnosisLogic::guahaoLogList((int) $params['id']));
}
/**
* @notes 诊单详情(患者端)
@@ -191,13 +201,15 @@ class DiagnosisController extends BaseAdminController
return $this->fail('诊单ID不能为空');
}
if (!isset($params['assistant_id'])) {
return $this->fail('请选择医助');
if (!array_key_exists('assistant_id', $params)) {
return $this->fail('请选择医助或取消指派');
}
$result = DiagnosisLogic::assign($params);
if ($result) {
return $this->success('指派成功', [], 1, 1);
$msg = (int) ($params['assistant_id'] ?? -1) === 0 ? '已取消指派' : '指派成功';
return $this->success($msg, [], 1, 1);
}
return $this->fail(DiagnosisLogic::getError());
}
@@ -103,6 +103,26 @@ class PrescriptionOrderController extends BaseAdminController
return $this->success('保存成功', $result);
}
/**
* 修改关联处方的患者姓名与手机号(订单详情场景)
*/
public function patchPrescriptionPatient()
{
$params = (new PrescriptionOrderValidate())->post()->goCheck('patchPrescriptionPatient');
$ok = PrescriptionOrderLogic::patchPrescriptionPatient(
(int) $params['id'],
(string) $params['patient_name'],
(string) $params['phone'],
$this->adminId,
$this->adminInfo
);
if (!$ok) {
return $this->fail(PrescriptionOrderLogic::getError());
}
return $this->success('保存成功');
}
public function auditPrescription()
{
$params = (new PrescriptionOrderValidate())->post()->goCheck('auditPrescription');