修改医生问诊配置

This commit is contained in:
2024-04-10 08:55:44 +08:00
parent ccd5817faf
commit 6ff6ba2851
5 changed files with 100 additions and 18 deletions
+9 -9
View File
@@ -4,7 +4,6 @@ namespace App\Services;
use App\Constants\HttpEnumCode;
use App\Exception\BusinessException;
use App\Model\ConfigHealthPackage;
use App\Model\DoctorConfigDifficultConsultation;
use App\Model\DoctorConfigFollowPackage;
use App\Model\DoctorConfigFollowPackageItem;
@@ -12,6 +11,7 @@ use App\Model\DoctorConfigHealthPackage;
use App\Model\DoctorInquiryConfig;
use App\Model\DoctorInquiryConfigService;
use App\Model\DoctorInquiryPriceRecord;
use App\Model\HealthPackage;
use App\Model\SystemInquiryConfig;
use App\Model\UserDoctor;
use Hyperf\DbConnection\Db;
@@ -374,8 +374,8 @@ class DoctorInquiryService extends BaseService
if ($inquiry_type == 1 || $inquiry_mode == 8){
// 获取健康包配置
$params = array();
$config_health_package = ConfigHealthPackage::getOne($params);
if (empty($config_health_package)){
$health_package = HealthPackage::getOne($params);
if (empty($health_package)){
Db::rollBack();
return fail(HttpEnumCode::SERVER_ERROR);
}
@@ -392,12 +392,12 @@ class DoctorInquiryService extends BaseService
}
// 价格计算(专家图文问诊价格*费率+30盒35元的干爽颗粒)
$service_price = $doctor_inquiry_config['inquiry_price'] * $config_health_package['service_rate'] / 100 * 6 + 35 * 30;
$service_price = $doctor_inquiry_config['inquiry_price'] * $health_package['service_rate'] / 100 * 6 + 35 * 30;
// 创建医生健康包
$data = array();
$data['doctor_id'] = $user_info['client_user_id'];
$data['config_health_package_id'] = $config_health_package['config_health_package_id'];
$data['package_id'] = $health_package['package_id'];
$data['service_price'] = $service_price;
$doctor_config_health_package = DoctorConfigHealthPackage::addDoctorConfigHealthPackage($data);
if (empty($doctor_config_health_package)){
@@ -1136,14 +1136,14 @@ class DoctorInquiryService extends BaseService
// 获取健康包配置
$params = array();
$config_health_package = ConfigHealthPackage::getOne($params);
if (empty($config_health_package)){
$health_package = HealthPackage::getOne($params);
if (empty($health_package)){
return fail(HttpEnumCode::SERVER_ERROR);
}
$result = array();
$result['service_count'] = $config_health_package['service_count']; // 总服务次数
$result['service_rate'] = $config_health_package['service_rate']; // 服务费率。100为满值,表示1,正常费率。
$result['service_count'] = $health_package['service_count']; // 总服务次数
$result['service_rate'] = $health_package['service_rate']; // 服务费率。100为满值,表示1,正常费率。
$result['inquiry_price'] = $doctor_inquiry_config['inquiry_price']; // 专家问诊-图文接诊价格
return success($result);