From 415d55b27eb4a397c22ea170c9f08e4cc8ad22e0 Mon Sep 17 00:00:00 2001 From: wucongxing8150 <815046773@qq.com> Date: Wed, 31 Jul 2024 17:00:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E6=8A=A5=E5=A4=84=E6=96=B9=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E6=97=B6=EF=BC=8C=E5=A2=9E=E5=8A=A0=E4=BA=86=E5=A4=84?= =?UTF-8?q?=E6=96=B9pdf=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Command/ReportRegulatoryCommand.php | 2 ++ app/Services/OrderPrescriptionService.php | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/Command/ReportRegulatoryCommand.php b/app/Command/ReportRegulatoryCommand.php index e3c40f3..0c52d28 100644 --- a/app/Command/ReportRegulatoryCommand.php +++ b/app/Command/ReportRegulatoryCommand.php @@ -423,6 +423,7 @@ class ReportRegulatoryCommand extends HyperfCommand $params = array(); $params['user_id'] = $user_doctor['user_id']; $params['type'] = 2; + $params['is_latest'] = 1; $doctor_user_ca_cert = UserCaCert::getOne($params); if (empty($doctor_user_ca_cert)){ $this->line("错误:无医生ca数据"); @@ -433,6 +434,7 @@ class ReportRegulatoryCommand extends HyperfCommand $params = array(); $params['user_id'] = $user_pharmacist['user_id']; $params['type'] = 2; + $params['is_latest'] = 1; $pharmacist_user_ca_cert = UserCaCert::getOne($params); if (empty($pharmacist_user_ca_cert)){ $this->line("错误:无药师ca数据"); diff --git a/app/Services/OrderPrescriptionService.php b/app/Services/OrderPrescriptionService.php index 8902189..cb29b92 100644 --- a/app/Services/OrderPrescriptionService.php +++ b/app/Services/OrderPrescriptionService.php @@ -357,6 +357,9 @@ class OrderPrescriptionService extends BaseService throw new BusinessException("医生科室数据错误"); } + // 处方pdf地址 + $prescription_pdf_oss_path = "applet/prescription/" . $order_prescription["order_prescription_id"] . ".pdf"; + $arg = array(); $arg['terminalCode'] = "ZD-10003"; $arg['orderNo'] = $order_product['order_product_no']; // 订单编号 @@ -400,6 +403,7 @@ class OrderPrescriptionService extends BaseService $arg['presList'][0]['physicalExamination'] = "无"; // 体格检查 $arg['presList'][0]['supplementaryExamination'] = "无"; // 辅助检查 $arg['presList'][0]['allergicHistory'] = $order_inquiry_case['allergy_history'] ?: "无"; // 过敏史 + $arg['presList'][0]['prescriptionSignedUrl'] = addAliyunOssWebsite($prescription_pdf_oss_path) ?: "无"; // 药品数据 foreach ($order_product_item as $key => $item) { @@ -414,7 +418,7 @@ class OrderPrescriptionService extends BaseService $arg['presList'][0]['drugList'][$key]['drugCode'] = $product['product_platform_code']; // 药品编码 $arg['presList'][0]['drugList'][$key]['approvalNumber'] = $product['license_number']; // 批准文号 $arg['presList'][0]['drugList'][$key]['drugName'] = $product['product_name']; // 药品名称 - $arg['presList'][0]['drugList'][$key]['specifications'] = $product['product_spec']; // 药品规格 +// $arg['presList'][0]['drugList'][$key]['specifications'] = $product['product_spec']; // 药品规格 $arg['presList'][0]['drugList'][$key]['price'] = $product['product_price']; // 药品单价 $arg['presList'][0]['drugList'][$key]['packingCount'] = $item['amount']; // 药品数量 $arg['presList'][0]['drugList'][$key]['surplusPackingCount'] = 0; // 处方药品剩余使用数量 @@ -428,7 +432,7 @@ class OrderPrescriptionService extends BaseService $arg['presList'][0]['orderDrugList'][$key]['drugCode'] = $product['product_platform_code']; // 药品编码 $arg['presList'][0]['orderDrugList'][$key]['approvalNumber'] = $product['license_number']; // 批准文号 $arg['presList'][0]['orderDrugList'][$key]['drugName'] = $product['product_name']; // 药品名称 - $arg['presList'][0]['orderDrugList'][$key]['specifications'] = $product['product_spec']; // 药品规格 +// $arg['presList'][0]['orderDrugList'][$key]['specifications'] = $product['product_spec']; // 药品规格 $arg['presList'][0]['orderDrugList'][$key]['price'] = $product['product_price']; // 药品单价 $arg['presList'][0]['orderDrugList'][$key]['drugCount'] = $item['amount']; // 药品数量 $arg['presList'][0]['orderDrugList'][$key]['packingUnit'] = $product['packaging_unit']; // 药品单位