From 71947460b868eaace028de63da9ef9bfe4339653 Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Mon, 13 Mar 2023 17:11:24 +0800 Subject: [PATCH] 1 --- app/Controller/UserDoctorController.php | 1 - app/Services/PatientDoctorService.php | 2 +- app/Services/PatientOrderService.php | 17 +++++++++++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/app/Controller/UserDoctorController.php b/app/Controller/UserDoctorController.php index b1ca9e1..f761ac1 100644 --- a/app/Controller/UserDoctorController.php +++ b/app/Controller/UserDoctorController.php @@ -332,7 +332,6 @@ class UserDoctorController extends AbstractController return $this->response->json($data); } - /** * 获取医生问诊消息用户属性 * @return ResponseInterface diff --git a/app/Services/PatientDoctorService.php b/app/Services/PatientDoctorService.php index 1ae05fe..d2be83c 100644 --- a/app/Services/PatientDoctorService.php +++ b/app/Services/PatientDoctorService.php @@ -432,7 +432,7 @@ class PatientDoctorService extends BaseService } } - return success(); + return success($result); } /** diff --git a/app/Services/PatientOrderService.php b/app/Services/PatientOrderService.php index a332907..7a5860c 100644 --- a/app/Services/PatientOrderService.php +++ b/app/Services/PatientOrderService.php @@ -734,10 +734,23 @@ class PatientOrderService extends BaseService return fail(HttpEnumCode::HTTP_ERROR,"已使用"); } -// if (¥) - + if ($order_prescription['pharmacist_audit_status'] != 1){ + return fail(HttpEnumCode::HTTP_ERROR,"处方未审核"); + } // 检测是否已经存在药品订单数据 + $params = array(); + $params['order_inquiry_id'] = $order_prescription['order_inquiry_id']; + $params['order_prescription_id'] = $order_prescription['order_prescription_id']; + $params['patient_id'] = $user_info['client_user_id']; + $order_product = OrderProduct::getExists($params); + if ($order_product){ + return fail(HttpEnumCode::HTTP_ERROR,"处方已使用"); + } + + + + // 新增药品订单 // 新增药品订单详情 // 修正处方使用状态