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);