diff --git a/app/Model/UserDoctor.php b/app/Model/UserDoctor.php index d38f166..01b36a3 100644 --- a/app/Model/UserDoctor.php +++ b/app/Model/UserDoctor.php @@ -324,10 +324,10 @@ class UserDoctor extends Model "Hospital:hospital_id,hospital_name,hospital_status,hospital_level_name,province_id,city_id", "DoctorExpertise", "DoctorInquiryConfig" => function ($query) use ($is_search_welfare_reception) { - $inquiry_type = [1,3,4]; + $inquiry_type = [1,3]; $is_enable = 0; if (!empty($is_search_welfare_reception)){ - $inquiry_type = [3,4]; + $inquiry_type = [3]; $is_enable = 1; } @@ -353,10 +353,10 @@ class UserDoctor extends Model $query->where($doctor_expertise_params); }) ->whereHas('DoctorInquiryConfig', function ($query) use ($is_search_welfare_reception) { - $inquiry_type = [1,3,4]; + $inquiry_type = [1,3]; $is_enable = 0; if (!empty($is_search_welfare_reception)){ - $inquiry_type = [3,4]; + $inquiry_type = [3]; $is_enable = 1; } diff --git a/app/Services/PatientDoctorService.php b/app/Services/PatientDoctorService.php index 64b5153..673883e 100644 --- a/app/Services/PatientDoctorService.php +++ b/app/Services/PatientDoctorService.php @@ -186,12 +186,6 @@ class PatientDoctorService extends BaseService $doctor_params["iden_auth_status"] = 1;// 身份认证状态(0:未认证 1:认证通过 2:审核中 3:认证失败) $doctor_params["is_bind_bank"] = 1;// 是否已绑定结算银行卡(0:否 1:是) - // 问诊类型 - $inquiry_type = [1,3,4]; - if (!empty($is_search_welfare_reception)){ - $inquiry_type = [3,4]; - } - $fields = [ "doctor_id", "user_id", @@ -243,14 +237,23 @@ class PatientDoctorService extends BaseService // 公益 $user_doctor['free_clinic_price'] = $doctor_inquiry_config['inquiry_price']; } - if ($doctor_inquiry_config['inquiry_type'] == 4 && $doctor_inquiry_config['is_enable'] == 1) { - // 问诊购药 - $user_doctor['multi_point_enable'] = 1; - } } } } + // 处理可处方字段 + $user_doctor['multi_point_enable'] = 0; + + $params = array(); + $params['doctor_id'] = $user_doctor["doctor_id"]; + $params['inquiry_type'] = 4; + $params['inquiry_mode'] = 1; + $params['is_enable'] = 1; + $result = DoctorInquiryConfig::getOne($params); + if (!empty($result)){ + $user_doctor['multi_point_enable'] = 1; + } + // 好评率-超过5个已结束的订单后展示 $user_doctor['praise_rate'] = floor($user_doctor['praise_rate'] * 0.05 * 100) / 100; // 响应时间-超过5个已结束的订单后展示