From a47dccdedcf8bde953ec37a129e9372be84b5c45 Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Mon, 28 Aug 2023 09:05:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A3=80=E6=B5=8B=E6=A3=80?= =?UTF-8?q?=E6=B5=8B=E5=BD=93=E5=89=8D=E5=8C=BB=E7=94=9F=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E5=92=8C=E6=82=A3=E8=80=85=E5=AD=98=E5=9C=A8=E6=9C=AA=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E9=97=AE=E8=AF=8A=E8=AE=A2=E5=8D=95=E5=A6=82=E6=83=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DetectionCompleteDelayDirectConsumer.php | 2 +- app/Controller/CallBackController.php | 3 +- app/Services/DetectionService.php | 59 ++++++++++--------- 3 files changed, 33 insertions(+), 31 deletions(-) diff --git a/app/Amqp/Consumer/DetectionCompleteDelayDirectConsumer.php b/app/Amqp/Consumer/DetectionCompleteDelayDirectConsumer.php index 69c44ee..8505043 100644 --- a/app/Amqp/Consumer/DetectionCompleteDelayDirectConsumer.php +++ b/app/Amqp/Consumer/DetectionCompleteDelayDirectConsumer.php @@ -59,7 +59,7 @@ class DetectionCompleteDelayDirectConsumer extends ConsumerMessage try { // 检测当前医生是否和患者存在未完成问诊订单 $InquiryService = new InquiryService(); - $order_inquiry = $InquiryService->checkPatientDoctorProgressInquiry($order_detection['user_id'],$order_detection['doctor_id']); + $order_inquiry = $InquiryService->checkPatientDoctorProgressInquiry($order_detection['patient_id'],$order_detection['doctor_id']); if (!empty($order_inquiry)){ // 存在未完成订单 // 获取现在时间距离订单结束时间的时间差 diff --git a/app/Controller/CallBackController.php b/app/Controller/CallBackController.php index f63f933..221c6ed 100644 --- a/app/Controller/CallBackController.php +++ b/app/Controller/CallBackController.php @@ -1690,7 +1690,7 @@ class CallBackController extends AbstractController // 检测当前医生是否和患者存在未完成问诊订单 $InquiryService = new InquiryService(); - $order_inquiry = $InquiryService->checkPatientDoctorProgressInquiry($order_detection['user_id'],$order_detection['doctor_id']); + $order_inquiry = $InquiryService->checkPatientDoctorProgressInquiry($order_detection['patient_id'],$order_detection['doctor_id']); if(!empty($order_inquiry)){ // 存在问诊订单 $time_diff = $InquiryService->getInquiryFinishTimeDiff($order_inquiry); @@ -1698,6 +1698,7 @@ class CallBackController extends AbstractController $time_diff = 60; } + dump($time_diff); // 计算时间并重新加入队列 $queue_data = array(); $queue_data['detection_no'] = $order_detection['detection_no']; diff --git a/app/Services/DetectionService.php b/app/Services/DetectionService.php index e96908b..76959fc 100644 --- a/app/Services/DetectionService.php +++ b/app/Services/DetectionService.php @@ -567,7 +567,8 @@ class DetectionService extends BaseService try { // 检测当前医生是否和患者存在未完成问诊订单 $InquiryService = new InquiryService(); - $order_inquiry = $InquiryService->checkPatientDoctorProgressInquiry($order_detection['user_id'],$order_detection['doctor_id']); + $order_inquiry = $InquiryService->checkPatientDoctorProgressInquiry($order_detection['patient_id'],$order_detection['doctor_id']); + dump($order_inquiry); if (!empty($order_inquiry)){ if ($order_inquiry['inquiry_status'] == 1){ // 待支付 @@ -714,35 +715,35 @@ class DetectionService extends BaseService return fail(); } - // 发送im消息 - $imService = new ImService(); +// // 发送im消息 +// $imService = new ImService(); +// +// // 患者病例 +// $imService->patientCase( +// $order_inquiry, +// $user_doctor['user_id'], +// $order_inquiry_case['disease_desc'] +// ); +// +// // 发送IM消息-检测报告结果 +// $imService->detectionTestReport( +// $order_detection, +// $user_doctor['user_id'], +// $order_detection['user_id'], +// $order_detection_case['detection_disease_class_names'], +// $detection_project['detection_project_name'] +// ); +// +// // 发送IM消息-检测报告结果-文字 +// $imService->detectionTestReportStr( +// $order_detection, +// $user_doctor['user_name'], +// $detection_project['detection_project_name'], +// $user_doctor['user_id'], +// $order_detection['user_id'] +// ); - // 患者病例 - $imService->patientCase( - $order_inquiry, - $user_doctor['user_id'], - $order_inquiry_case['disease_desc'] - ); - - // 发送IM消息-检测报告结果 - $imService->detectionTestReport( - $order_detection, - $user_doctor['user_id'], - $order_detection['user_id'], - $order_detection_case['detection_disease_class_names'], - $detection_project['detection_project_name'] - ); - - // 发送IM消息-检测报告结果-文字 - $imService->detectionTestReportStr( - $order_detection, - $user_doctor['user_name'], - $detection_project['detection_project_name'], - $user_doctor['user_id'], - $order_detection['user_id'] - ); - - Db::commit(); +// Db::commit(); }catch (\Throwable $e){ Db::rollBack(); Log::getInstance("DetectionService-bindDetectionTube")->error($e->getMessage());