From 1071b47150bb9b18d2b11bf85f4d6a4972f054a5 Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Thu, 30 Mar 2023 19:00:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AD=97=E6=AE=B5=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/PatientOrderService.php | 4 ++-- app/Services/UserDoctorService.php | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/app/Services/PatientOrderService.php b/app/Services/PatientOrderService.php index 96b1d63..dd00454 100644 --- a/app/Services/PatientOrderService.php +++ b/app/Services/PatientOrderService.php @@ -1069,8 +1069,8 @@ class PatientOrderService extends BaseService } $result = array(); - $result['inquiry_no'] = $order_product['order_product_no']; // 订单编号 - $result['order_product_id'] = $order_product['order_product_id']; // 订单主键id + $result['inquiry_no'] = (string)$order_product['order_product_no']; // 订单编号 + $result['order_product_id'] = (string)$order_product['order_product_id']; // 订单主键id return success($result); } diff --git a/app/Services/UserDoctorService.php b/app/Services/UserDoctorService.php index ac2c3a8..0ee6504 100644 --- a/app/Services/UserDoctorService.php +++ b/app/Services/UserDoctorService.php @@ -1037,6 +1037,7 @@ class UserDoctorService extends BaseService $params['order_prescription_id'] = $order_prescription_id; OrderPrescriptionIcd::deleteOrderPrescriptionIcd($params); + // 处方疾病数据 foreach ($prescription_icd as $item) { // 获取疾病信息 $params = array(); @@ -1067,6 +1068,7 @@ class UserDoctorService extends BaseService $params['order_prescription_id'] = $order_prescription_id; OrderPrescriptionProduct::deleteOrderPrescriptionProduct($params); + // 处方商品数据 foreach ($prescription_product as $item) { // 获取商品数据 $params = array(); @@ -1113,6 +1115,22 @@ class UserDoctorService extends BaseService unset($product); } + $OrderPrescriptionService = new OrderPrescriptionService(); + $prescription_img = $OrderPrescriptionService->openPrescription($order_prescription->order_prescription_id,$user_info['user_id']); + if (empty($prescription_img)){ + Db::rollBack(); + return fail(HttpEnumCode::SERVER_ERROR, "处方开具失败"); + } + + // 修改处方表 + $data = array(); + $data['prescription_img'] = $prescription_img; + $data['doctor_created_time'] = date('Y-m-d H:i:s',time()); + + $params = array(); + $params['order_prescription_id'] = $order_prescription['order_prescription_id']; + OrderPrescription::edit($params,$data); + // 加入分配药师队列 $data = array(); $data['order_prescription_id'] = $order_prescription_id; @@ -1290,7 +1308,6 @@ class UserDoctorService extends BaseService } $OrderPrescriptionService = new OrderPrescriptionService(); - $prescription_img = $OrderPrescriptionService->openPrescription($order_prescription->order_prescription_id,$user_info['user_id']); if (empty($prescription_img)){ Db::rollBack();