From 6a71abffa9fc4de5be65bea089d7aae24a4b5752 Mon Sep 17 00:00:00 2001 From: wucongxing8150 <815046773@qq.com> Date: Wed, 10 Apr 2024 10:55:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=BB=E7=94=9F=E5=88=97=E8=A1=A8=EF=BC=8C?= =?UTF-8?q?=E5=A4=84=E7=90=86=E9=9A=8F=E8=AE=BF=E5=8C=85=E9=97=AE=E8=AF=8A?= =?UTF-8?q?=E4=BB=B7=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/PatientDoctorService.php | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/app/Services/PatientDoctorService.php b/app/Services/PatientDoctorService.php index 50b11f4..8dcb9c7 100644 --- a/app/Services/PatientDoctorService.php +++ b/app/Services/PatientDoctorService.php @@ -5,6 +5,8 @@ namespace App\Services; use App\Constants\DoctorTitleCode; use App\Constants\HttpEnumCode; use App\Model\DiseaseClassExpertise; +use App\Model\DoctorConfigFollowPackage; +use App\Model\DoctorConfigFollowPackageItem; use App\Model\DoctorExpertise; use App\Model\DoctorInquiryConfig; use App\Model\DoctorInquiryConfig as DoctorInquiryConfigModel; @@ -129,6 +131,32 @@ class PatientDoctorService extends BaseService // 头像 $user_doctor['avatar'] = addAliyunOssWebsite($user_doctor['avatar']); + + // 随访包配置 + foreach ($user_doctor['DoctorInquiryConfig'] as $key => $doctor_inquiry_config){ + if ($doctor_inquiry_config['inquiry_type'] == 1 && $doctor_inquiry_config['inquiry_mode'] == 9){ + $params = array(); + $params['doctor_id'] = $doctor_inquiry_config['doctor_id']; + $doctor_config_follow_package = DoctorConfigFollowPackage::getOne($params); + if (!empty($doctor_config_follow_package)) { + $params = array(); + $params['follow_package_id'] = $doctor_config_follow_package['follow_package_id']; + $doctor_config_follow_package_items = DoctorConfigFollowPackageItem::getList($params); + if (!empty($doctor_config_follow_package_items)) { + foreach ($doctor_config_follow_package_items as $k => $doctor_config_follow_package_item){ + if ($k == 0){ + $user_doctor['DoctorInquiryConfig'][$key]['inquiry_price'] = $doctor_config_follow_package_item['service_price']; + continue; + } + + if ($doctor_config_follow_package_item['service_price'] < $user_doctor['DoctorInquiryConfig'][$key]['inquiry_price']){ + $user_doctor['DoctorInquiryConfig'][$key]['inquiry_price'] = $doctor_config_follow_package_item['service_price']; + } + } + } + } + } + } } } return success($user_doctors);