From 755fb711a957d5ed25ca4cd52505d47c11c26e4e Mon Sep 17 00:00:00 2001 From: haomingming Date: Fri, 26 Dec 2025 13:50:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=9A=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/PatientOrderService.php | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/app/Services/PatientOrderService.php b/app/Services/PatientOrderService.php index d9a01a7..9d86f78 100644 --- a/app/Services/PatientOrderService.php +++ b/app/Services/PatientOrderService.php @@ -1997,11 +1997,12 @@ class PatientOrderService extends BaseService $params['platform_audit_status'] = 1; $params['is_delete'] = 0; $order_prescription = OrderPrescription::getWithPage($params, ['*'], $page, $per_page); - Log::getInstance("PatientOrderService-getPatientPrescriptionOrderList")->info("order_prescription", [ - 'order_prescription' => $order_prescription, - ]); - if (!empty($order_prescription['data'])) { - foreach ($order_prescription['data'] as &$item) { + + // 创建新的数据副本 + $order_prescription_new = $order_prescription; + + if (!empty($order_prescription_new['data'])) { + foreach ($order_prescription_new['data'] as &$item) { //处理抄方情况 $params = array(); $params['order_inquiry_id'] = $item['order_inquiry_id']; @@ -2013,12 +2014,8 @@ class PatientOrderService extends BaseService //若为抄方订单则显示原订单 $params['doctor_id'] = $OrderInquiry['doctor_id']; $fields = ['doctor_id','user_name','doctor_title']; - $UserDoctor = UserDoctor::getOne($params, $fields); if (!empty($UserDoctor)) { - Log::getInstance("PatientOrderService-getPatientPrescriptionOrderList")->info("修改 UserDoctor", [ - 'UserDoctor' => $UserDoctor->toArray(), - ]); $item['UserDoctor'] = $UserDoctor; } } @@ -2030,11 +2027,8 @@ class PatientOrderService extends BaseService } } - Log::getInstance("PatientOrderService-getPatientPrescriptionOrderList")->info("order_prescription 最终", [ - 'order_prescription' => $order_prescription, - ]); - return success($order_prescription); + return success($order_prescription_new); } catch (\Throwable $e) { Log::getInstance("PatientOrderService-getPatientPrescriptionOrderList")->error("获取处方订单列表异常", [ 'message' => $e->getMessage(),