From ddf59a58c56b08d4eb4c3a22097bf50e5da8aa6c Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Tue, 26 Dec 2023 15:51:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E6=8A=A5=E7=9B=91=E7=AE=A1=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E6=96=B0=E5=A2=9Eca=E7=AD=BE=E5=90=8D=E5=80=BC?= =?UTF-8?q?=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Command/ReportRegulatoryCommand.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/app/Command/ReportRegulatoryCommand.php b/app/Command/ReportRegulatoryCommand.php index 4badcf4..e3c40f3 100644 --- a/app/Command/ReportRegulatoryCommand.php +++ b/app/Command/ReportRegulatoryCommand.php @@ -14,6 +14,7 @@ use App\Model\OrderPrescriptionProduct; use App\Model\PatientFamily; use App\Model\Product; use App\Model\ReportRegulatory; +use App\Model\UserCaCert; use App\Model\UserDoctor; use App\Model\UserDoctorInfo; use App\Model\UserPharmacist; @@ -418,6 +419,26 @@ class ReportRegulatoryCommand extends HyperfCommand return false; } + // 获取医生ca数据 + $params = array(); + $params['user_id'] = $user_doctor['user_id']; + $params['type'] = 2; + $doctor_user_ca_cert = UserCaCert::getOne($params); + if (empty($doctor_user_ca_cert)){ + $this->line("错误:无医生ca数据"); + return false; + } + + // 获取药师ca数据 + $params = array(); + $params['user_id'] = $user_pharmacist['user_id']; + $params['type'] = 2; + $pharmacist_user_ca_cert = UserCaCert::getOne($params); + if (empty($pharmacist_user_ca_cert)){ + $this->line("错误:无药师ca数据"); + return false; + } + $data = array(); $data['thirdUniqueid'] = $order_inquiry['order_inquiry_id']; // 唯一标识 $data['orgName'] = "成都金牛欣欣相照互联网医院"; // 机构名称 @@ -455,6 +476,8 @@ class ReportRegulatoryCommand extends HyperfCommand $data['drugPackage'] = $order_prescription_product['drug_package']; // 药品包装 $data['recipeAllPrice'] = $order_prescription_product['amount_total']; // 处方总价 $data['uploadTime'] = date("Y-m-d H:i:s",time()); // 上传时间 + $data['docCaSign'] = $doctor_user_ca_cert['cert_base64']; // 医师ca签名值 + $data['pharmacistCaSign'] = $pharmacist_user_ca_cert['cert_base64']; // 药师ca签名值 $data['recipeNo'] = $order_prescription['order_prescription_id']; // 医院处方编号 $data['cityId'] = "510100"; // 城市ID(参考地区字段)