新增未开发路由
This commit is contained in:
@@ -382,57 +382,10 @@ class PatientDoctorService extends BaseService
|
||||
|
||||
if ($inquiry_type == 2 || $inquiry_type == 4){
|
||||
// 快速问诊-问诊购药
|
||||
// 获取问诊配置
|
||||
$params = array();
|
||||
$params['inquiry_type'] = $inquiry_type;
|
||||
$params['inquiry_mode'] = $inquiry_mode;
|
||||
$system_inquiry_config = SystemInquiryConfig::getOne($params);
|
||||
if (empty($system_inquiry_config)){
|
||||
return fail(HttpEnumCode::SERVER_ERROR);
|
||||
}
|
||||
|
||||
// 获取系统工作时间
|
||||
$params = array();
|
||||
$params['system_inquiry_config_id'] = $system_inquiry_config['system_inquiry_config_id'];
|
||||
$system_inquiry_time = SystemInquiryTime::getList($params);
|
||||
if (empty($system_inquiry_time)){
|
||||
return fail(HttpEnumCode::SERVER_ERROR);
|
||||
}
|
||||
|
||||
// 检测当前是否坐班时间
|
||||
$is_time_pass = false;
|
||||
|
||||
foreach ($system_inquiry_time as $item){
|
||||
$start_time = strtotime(date('Y-m-d') . ' ' .$item['start_time']);
|
||||
$end_time = strtotime(date('Y-m-d') . ' ' .$item['end_time']);
|
||||
if ($start_time < time() && $end_time > time()){
|
||||
// 符合当前时间区间
|
||||
$is_time_pass = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$is_time_pass){
|
||||
// 非坐班时间
|
||||
// 检测是否存在对应问诊的在线医生
|
||||
$UserDoctorService = new UserDoctorService();
|
||||
$is_online = $UserDoctorService->checkDoctorOnline($inquiry_type);
|
||||
if (!$is_online){
|
||||
$UserDoctorService = new UserDoctorService();
|
||||
|
||||
// 获取当前时间10分钟前接诊中的医生
|
||||
$doctors = $UserDoctorService->getBeforeCurrentTimeDoctor(10,$inquiry_type);
|
||||
if (empty($doctors)){
|
||||
// 获取当前时间30分钟前接诊中的医生
|
||||
$doctors = $UserDoctorService->getBeforeCurrentTimeDoctor(30,$inquiry_type);
|
||||
if (empty($doctors)){
|
||||
return fail(HttpEnumCode::HTTP_ERROR,'当前不再就诊时间范围内,请您选择其它问诊服务');
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
// 坐班时间,检测全部医生接诊是否达到上限-暂不处理
|
||||
// 获取符合条件医生
|
||||
// 获取当前医生接诊订单数
|
||||
$UserDoctorService = new UserDoctorService();
|
||||
$doctor_id = $UserDoctorService->getInquiryAssignDoctor($inquiry_type);
|
||||
if (empty($doctor_id)){
|
||||
return fail();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user