From 41d82cc4eb437652ebad9f6d74d6bf9789af8a54 Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Wed, 11 Oct 2023 16:14:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A3=80=E6=B5=8B=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E5=8F=AF=E4=BB=A5=E6=8E=A5=E8=AF=8A=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/PatientDoctorService.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/Services/PatientDoctorService.php b/app/Services/PatientDoctorService.php index 76cccaf..d66d6c8 100644 --- a/app/Services/PatientDoctorService.php +++ b/app/Services/PatientDoctorService.php @@ -432,6 +432,20 @@ class PatientDoctorService extends BaseService return fail(HttpEnumCode::HTTP_ERROR,"医生暂不可接诊"); } + // 获取医生问诊配置 + $params = array(); + $params['doctor_id'] = $user_doctor['doctor_id']; + $params['inquiry_type'] = $inquiry_type; + $params['inquiry_mode'] = 1; + $doctor_inquiry_config = DoctorInquiryConfig::getOne($params); + if (empty($doctor_inquiry_config)){ + return fail(HttpEnumCode::HTTP_ERROR,"医生暂不可接诊"); + } + + if ($doctor_inquiry_config['is_enable'] == 0){ + return fail(HttpEnumCode::HTTP_ERROR,"医生暂不可接诊"); + } + // 检测当前医生是否和患者存在未完成问诊订单 $InquiryService = new InquiryService(); $order_inquiry = $InquiryService->checkPatientDoctorProgressInquiry($user_info['client_user_id'],$doctor_id);