修改医生疑难问诊配置
This commit is contained in:
@@ -632,13 +632,6 @@ class DoctorInquiryService extends BaseService
|
||||
{
|
||||
$user_info = $this->request->getAttribute("userInfo") ?? [];
|
||||
|
||||
$inquiry_type = $this->request->input('inquiry_type');// 接诊类型(1:专家问诊 2:快速问诊 3:公益问诊)
|
||||
$inquiry_mode = $this->request->input('inquiry_mode');// 接诊方式(1:图文 2:视频 3:语音 4:电话 5:会员 6:疑难会诊 7:附赠 8:健康包 9:随访包)
|
||||
|
||||
if ($inquiry_mode != 6) {
|
||||
return fail();
|
||||
}
|
||||
|
||||
// 获取医生信息
|
||||
$params = array();
|
||||
$params['doctor_id'] = $user_info['client_user_id'];
|
||||
@@ -661,13 +654,11 @@ class DoctorInquiryService extends BaseService
|
||||
|
||||
$params = array();
|
||||
$params['doctor_id'] = $user_info['client_user_id'];
|
||||
$params['inquiry_type'] = $inquiry_type;
|
||||
$params['inquiry_mode'] = $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 success(null);
|
||||
} else {
|
||||
return success($doctor_inquiry_config_service->toArray());
|
||||
return success($doctor_config_difficult_consultation->toArray());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -706,23 +697,19 @@ class DoctorInquiryService extends BaseService
|
||||
|
||||
$params = array();
|
||||
$params['doctor_id'] = $user_info['client_user_id'];
|
||||
$params['inquiry_type'] = 1;
|
||||
$params['inquiry_mode'] = 6;
|
||||
$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(HttpEnumCode::HTTP_ERROR, "已存在服务设置,请勿重复设置");
|
||||
}
|
||||
|
||||
$data = array();
|
||||
$data['doctor_id'] = $doctor['doctor_id'];
|
||||
$data['inquiry_type'] = 1;
|
||||
$data['inquiry_mode'] = 6;
|
||||
$data['service_content'] = $service_content;
|
||||
$data['service_process'] = $service_process;
|
||||
$data['service_period'] = $service_period;
|
||||
$data['service_rounds'] = $service_rounds;
|
||||
$doctor_inquiry_config_service = DoctorInquiryConfigService::addDoctorInquiryConfigService($data);
|
||||
if (empty($doctor_inquiry_config_service)) {
|
||||
$doctor_config_difficult_consultation = DoctorConfigDifficultConsultation::addDoctorConfigDifficultConsultation($data);
|
||||
if (empty($doctor_config_difficult_consultation)) {
|
||||
return fail();
|
||||
}
|
||||
|
||||
@@ -737,7 +724,7 @@ class DoctorInquiryService extends BaseService
|
||||
{
|
||||
$user_info = $this->request->getAttribute("userInfo") ?? [];
|
||||
|
||||
$config_service_id = $this->request->route('config_service_id');
|
||||
$difficult_consultation_id = $this->request->route('difficult_consultation_id');
|
||||
|
||||
$service_content = $this->request->input('service_content');
|
||||
$service_process = $this->request->input('service_process');
|
||||
@@ -765,34 +752,34 @@ class DoctorInquiryService extends BaseService
|
||||
}
|
||||
|
||||
$params = array();
|
||||
$params['config_service_id'] = $config_service_id;
|
||||
$params['difficult_consultation_id'] = $difficult_consultation_id;
|
||||
$params['doctor_id'] = $user_info['client_user_id'];
|
||||
$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();
|
||||
}
|
||||
|
||||
$data = array();
|
||||
if ($doctor_inquiry_config_service['service_content'] != $service_content) {
|
||||
if ($doctor_config_difficult_consultation['service_content'] != $service_content) {
|
||||
$data['service_content'] = $service_content;
|
||||
}
|
||||
|
||||
if ($doctor_inquiry_config_service['service_process'] != $service_process) {
|
||||
if ($doctor_config_difficult_consultation['service_process'] != $service_process) {
|
||||
$data['service_process'] = $service_process;
|
||||
}
|
||||
|
||||
if ($doctor_inquiry_config_service['service_period'] != $service_period) {
|
||||
if ($doctor_config_difficult_consultation['service_period'] != $service_period) {
|
||||
$data['service_period'] = $service_period;
|
||||
}
|
||||
|
||||
if ($doctor_inquiry_config_service['service_rounds'] != $service_rounds) {
|
||||
if ($doctor_config_difficult_consultation['service_rounds'] != $service_rounds) {
|
||||
$data['service_rounds'] = $service_rounds;
|
||||
}
|
||||
|
||||
if (!empty($data)) {
|
||||
$params = array();
|
||||
$params['config_service_id'] = $doctor_inquiry_config_service['config_service_id'];
|
||||
$res = DoctorInquiryConfigService::edit($params, $data);
|
||||
$params['difficult_consultation_id'] = $doctor_config_difficult_consultation['difficult_consultation_id'];
|
||||
$res = DoctorConfigDifficultConsultation::edit($params, $data);
|
||||
if (!$res) {
|
||||
return fail();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user