修改医生疑难问诊配置
This commit is contained in:
@@ -12,6 +12,7 @@ use App\Constants\HttpEnumCode;
|
||||
use App\Exception\BusinessException;
|
||||
use App\Model\DetectionProject;
|
||||
use App\Model\DiseaseClass;
|
||||
use App\Model\DoctorConfigDifficultConsultation;
|
||||
use App\Model\DoctorInquiryConfig;
|
||||
use App\Model\DoctorInquiryConfigService;
|
||||
use App\Model\Hospital;
|
||||
@@ -977,15 +978,13 @@ class InquiryService extends BaseService
|
||||
if ($order_inquiry['inquiry_type'] == 1 && $order_inquiry['inquiry_mode'] == 6) {
|
||||
$params = array();
|
||||
$params['doctor_id'] = $order_inquiry['doctor_id'];
|
||||
$params['inquiry_type'] = $order_inquiry['inquiry_type'];
|
||||
$params['inquiry_mode'] = $order_inquiry['inquiry_mode'];
|
||||
$doctor_inquiry_config_service = DoctorInquiryConfigService::getOne($params);
|
||||
if (empty($doctor_inquiry_config_service)) {
|
||||
$doctor_config_difficult_consultation = DoctorConfigDifficultConsultation::getOne($params);
|
||||
if (empty($doctor_config_difficult_consultation)) {
|
||||
return fail();
|
||||
}
|
||||
|
||||
$order_inquiry['times_number'] = $doctor_inquiry_config_service['service_rounds']; // 服务回合数
|
||||
$order_inquiry['duration'] = $doctor_inquiry_config_service['service_period'] * 24 * 60; // 服务周期
|
||||
$order_inquiry['times_number'] = $doctor_config_difficult_consultation['service_rounds']; // 服务回合数
|
||||
$order_inquiry['duration'] = $doctor_config_difficult_consultation['service_period'] * 24 * 60; // 服务周期
|
||||
} else {
|
||||
$params = array();
|
||||
$params['inquiry_type'] = $order_inquiry['inquiry_type'];
|
||||
@@ -1003,14 +1002,8 @@ class InquiryService extends BaseService
|
||||
$order_inquiry['duration'] = $system_inquiry_config['duration'];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 获取服务包当月剩余次数
|
||||
|
||||
// 获取服务包到期天数
|
||||
|
||||
|
||||
$result = array();
|
||||
$result['doctor_user_id'] = $user_doctor['user_id'];
|
||||
$result['patient_user_id'] = $order_inquiry['user_id'];
|
||||
@@ -1570,22 +1563,15 @@ class InquiryService extends BaseService
|
||||
$finish_day = ceil((strtotime($order_service_package['finish_time']) - time()) / 60 / 60 / 24);
|
||||
}
|
||||
|
||||
// 获取剩余药品数量
|
||||
$remaining_quantity = 0;
|
||||
if ($order_service_package['order_service_type'] == 1) {
|
||||
if ($order_service_package['order_service_type'] == 1){
|
||||
$OrderServicePackageService = new OrderServicePackageService();
|
||||
|
||||
$params = array();
|
||||
$params['order_service_id'] = $order_service_package['order_service_id'];
|
||||
$order_service_package_products = OrderServicePackageProduct::getList($params);
|
||||
if (!empty($order_service_package_products)){
|
||||
foreach ($order_service_package_products as $order_service_package_product){
|
||||
// 获取服务包内某一药品的总数量
|
||||
$total_quantity = $OrderServicePackageService->getOrderServiceProductTotalQuantity($order_service_package_product['product_id']);
|
||||
|
||||
// 获取服务包内某一药品的剩余数量
|
||||
$remaining_quantity = $OrderServicePackageService->getOrderServiceProductCanUseQuantity($order_service_package['order_service_id'],$order_service_package_product['product_id'],$total_quantity);
|
||||
}
|
||||
// 获取服务包内所有药品
|
||||
$health_package_products = $OrderServicePackageService->getOrderServiceProduct($order_service_package_detail['package_id']);
|
||||
foreach ($health_package_products as $health_package_product) {
|
||||
// 获取服务包内某一药品的剩余数量
|
||||
$remaining_quantity = $OrderServicePackageService->getOrderServiceProductCanUseQuantity($order_service_package['order_service_id'],$health_package_product['product_id'],$health_package_product['quantity']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user