From 63e468fb0ac358c1502983e16999f374054c1c94 Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Sat, 1 Apr 2023 11:05:22 +0800 Subject: [PATCH] 1 --- app/Controller/TestController.php | 23 ++++++++++++++++++++--- app/Services/MessageNoticeService.php | 1 - app/Services/PatientOrderService.php | 21 +++++++++++++++++++++ 3 files changed, 41 insertions(+), 4 deletions(-) diff --git a/app/Controller/TestController.php b/app/Controller/TestController.php index 0f017d5..bc534cc 100644 --- a/app/Controller/TestController.php +++ b/app/Controller/TestController.php @@ -31,14 +31,14 @@ class TestController extends AbstractController { public function test(){ // $this->test_8(); - $this->test_3(); +// $this->test_3(); // $this->test_4(); // $this->test_6(); // $this->test_9(); // $this->test_10(); // $this->test_11(); // $this->test_5(); -// $this->test_1(); + $this->test_1(); // $this->test_11(); } @@ -62,7 +62,24 @@ class TestController extends AbstractController // return fail(); // } - // 测试药师 +// // 测试药师 +// $data = array(); +// $data['user_id'] = "534534546"; +// $data['card_num'] = "410323199603261240"; +// $result = $ca->getCloudCert($data); +// +// $data = array(); +// $data['user_id'] = "534534546"; +// $data['cert_base64'] = $result['certBase64']; +// $data['cert_chain_p7'] = $result['certP7']; +// $data['cert_serial_number'] = $result['certSerialnumber']; +// $data['ca_pin'] = "534534546"; +// $doctor_pharmacist_cert = DoctorPharmacistCert::addDoctorPharmacistCert($data); +// if (empty($doctor_pharmacist_cert)){ +// return fail(); +// } + + // 测试企业 $data = array(); $data['user_id'] = "534534546"; $data['card_num'] = "410323199603261240"; diff --git a/app/Services/MessageNoticeService.php b/app/Services/MessageNoticeService.php index aa34eef..4a425d6 100644 --- a/app/Services/MessageNoticeService.php +++ b/app/Services/MessageNoticeService.php @@ -210,7 +210,6 @@ class MessageNoticeService extends BaseService // 服务消息 $params = array(); $params['user_id'] = $user_info['user_id']; - $params['user_id'] = 1; $params['user_type'] = 1; $params['notice_type'] = 3; // 消息类型(1:医生服务通知 2:医生系统公告 3:患者系统消息 $params['notice_system_type'] = 1; // 系统消息类型(患者端系统消息存在 1:服务消息 2:福利消息 3:退款消息 4:物流消息) diff --git a/app/Services/PatientOrderService.php b/app/Services/PatientOrderService.php index 3b82314..49d7644 100644 --- a/app/Services/PatientOrderService.php +++ b/app/Services/PatientOrderService.php @@ -17,6 +17,8 @@ use App\Model\PatientFollow; use App\Model\Product; use App\Model\ProductPlatformAmount; use App\Model\UserDoctor; +use App\Model\UserDoctorInfo; +use App\Model\UserPharmacistInfo; use App\Model\UserShipAddress; use App\Utils\Log; use Extend\Prescription\Prescription; @@ -1121,6 +1123,7 @@ class PatientOrderService extends BaseService 'order_prescription_id', 'prescription_status', 'prescription_img', + 'prescription_pdf', ]; $params = array(); $params['order_prescription_id'] = $order_prescription_id; @@ -1135,6 +1138,24 @@ class PatientOrderService extends BaseService $order_prescription['prescription_img'] = addAliyunOssWebsite($order_prescription['prescription_img']); + // 获取处方中医生签名 + $params = array(); + $params['doctor_id'] = $order_prescription['doctor_id']; + $user_doctor_info = UserDoctorInfo::getOne($params); + if (empty($user_doctor_info)){ + return fail(HttpEnumCode::SERVER_ERROR); + } + $order_prescription['doctor_sign_image'] = addAliyunOssWebsite($user_doctor_info['sign_image']); + + // 获取处方中药师签名 + $params = array(); + $params['pharmacist_id'] = $order_prescription['pharmacist_id']; + $user_pharmacist_info = UserPharmacistInfo::getOne($params); + if (empty($user_pharmacist_info)){ + return fail(HttpEnumCode::SERVER_ERROR); + } + $order_prescription['pharmacist_sign_image'] = addAliyunOssWebsite($user_pharmacist_info['sign_image']); + return success($order_prescription->toArray()); }