手动创建任务新加字段
This commit is contained in:
parent
64b23966ef
commit
a1a419cce4
@ -331,4 +331,15 @@ public class SignPatientManageRouteNode extends BaseEntity {
|
|||||||
@ApiModelProperty(value = "AI:自动 或 COMMON:手动")
|
@ApiModelProperty(value = "AI:自动 或 COMMON:手动")
|
||||||
@Excel(name = "AI:自动 或 COMMON:手动")
|
@Excel(name = "AI:自动 或 COMMON:手动")
|
||||||
private String phoneDialMethod;
|
private String phoneDialMethod;
|
||||||
|
|
||||||
|
|
||||||
|
/** 人工随访问卷模板表id */
|
||||||
|
@ApiModelProperty(value = "人工随访模板表id")
|
||||||
|
@Excel(name = "人工随访模板表id")
|
||||||
|
private Long followTemplateId;
|
||||||
|
|
||||||
|
/** 人工随访问卷模板名称 */
|
||||||
|
@ApiModelProperty(value = "人工随访模板名称")
|
||||||
|
@Excel(name = "人工随访模板名称")
|
||||||
|
private String followTemplateName;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package com.xinelu.manage.service.scriptInfo.impl;
|
|||||||
import com.xinelu.common.annotation.DataScope;
|
import com.xinelu.common.annotation.DataScope;
|
||||||
import com.xinelu.common.config.SystemBusinessConfig;
|
import com.xinelu.common.config.SystemBusinessConfig;
|
||||||
import com.xinelu.common.core.domain.AjaxResult;
|
import com.xinelu.common.core.domain.AjaxResult;
|
||||||
|
import com.xinelu.common.enums.ScriptStatusEnum;
|
||||||
import com.xinelu.common.exception.ServiceException;
|
import com.xinelu.common.exception.ServiceException;
|
||||||
import com.xinelu.common.utils.SecurityUtils;
|
import com.xinelu.common.utils.SecurityUtils;
|
||||||
import com.xinelu.common.utils.file.FileUploadUtils;
|
import com.xinelu.common.utils.file.FileUploadUtils;
|
||||||
@ -89,6 +90,7 @@ public class ScriptInfoServiceImpl implements IScriptInfoService {
|
|||||||
// 设置创建人与创建时间
|
// 设置创建人与创建时间
|
||||||
scriptInfo.setCreateBy(SecurityUtils.getUsername());
|
scriptInfo.setCreateBy(SecurityUtils.getUsername());
|
||||||
scriptInfo.setCreateTime(LocalDateTime.now());
|
scriptInfo.setCreateTime(LocalDateTime.now());
|
||||||
|
scriptInfo.setScriptStatus(ScriptStatusEnum.OFF_SHELF.getInfo());
|
||||||
scriptInfo.setScriptId(IdUtils.fastUUID());
|
scriptInfo.setScriptId(IdUtils.fastUUID());
|
||||||
return scriptInfoMapper.insertScriptInfo(scriptInfo);
|
return scriptInfoMapper.insertScriptInfo(scriptInfo);
|
||||||
}
|
}
|
||||||
@ -102,6 +104,13 @@ public class ScriptInfoServiceImpl implements IScriptInfoService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public int updateScriptInfo(ScriptInfo scriptInfo) {
|
public int updateScriptInfo(ScriptInfo scriptInfo) {
|
||||||
|
ScriptInfo scriptInfo1 = scriptInfoMapper.selectScriptInfoById(scriptInfo.getId());
|
||||||
|
if (Objects.isNull(scriptInfo1)) {
|
||||||
|
throw new ServiceException("该话术名称已删除!");
|
||||||
|
}
|
||||||
|
if (ScriptStatusEnum.NORMAL.getInfo().equals(scriptInfo.getScriptStatus()) && Objects.isNull(scriptInfo1.getScriptFilePath())) {
|
||||||
|
throw new ServiceException("请生成话术图片后上架该话术!");
|
||||||
|
}
|
||||||
// 检查除当前记录之外是否存在同名的话术名称
|
// 检查除当前记录之外是否存在同名的话术名称
|
||||||
if (scriptInfoMapper.countByScriptNameExcludingId(scriptInfo.getScriptName(), scriptInfo.getDepartmentId(), scriptInfo.getId(), scriptInfo.getCommonScriptName()) > 0) {
|
if (scriptInfoMapper.countByScriptNameExcludingId(scriptInfo.getScriptName(), scriptInfo.getDepartmentId(), scriptInfo.getId(), scriptInfo.getCommonScriptName()) > 0) {
|
||||||
// 存在同名的通用话术名称,不能进行更新
|
// 存在同名的通用话术名称,不能进行更新
|
||||||
|
|||||||
@ -234,8 +234,8 @@ public class SignPatientManageRouteNodeServiceImpl implements ISignPatientManage
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case (TaskContentConstants.ARTIFICIAL_FOLLOW_UP): // 人工随访-返回问卷信息
|
case (TaskContentConstants.ARTIFICIAL_FOLLOW_UP): // 人工随访-返回问卷信息
|
||||||
if (node.getPhoneTemplateId() != null) {
|
if (node.getFollowTemplateId() != null) {
|
||||||
QuestionVO questionVO = questionInfoService.selectQuestionInfoById(Long.valueOf(node.getPhoneTemplateId()));
|
QuestionVO questionVO = questionInfoService.selectQuestionInfoById(node.getFollowTemplateId());
|
||||||
detailInfo = JSONObject.parseObject(JSONObject.toJSONString(questionVO));
|
detailInfo = JSONObject.parseObject(JSONObject.toJSONString(questionVO));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -123,5 +123,9 @@ public class ManualFollowUpVO {
|
|||||||
@ApiModelProperty(value = "任务处理信息")
|
@ApiModelProperty(value = "任务处理信息")
|
||||||
private String routeHandleRemark;
|
private String routeHandleRemark;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "人工随访问卷模板表id")
|
||||||
|
private Long followTemplateId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "电话话术表id")
|
||||||
|
private Long phoneId;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -331,15 +331,17 @@
|
|||||||
spmrn.route_node_name AS 'routeNodeName',
|
spmrn.route_node_name AS 'routeNodeName',
|
||||||
spmrn.task_type,
|
spmrn.task_type,
|
||||||
CASE
|
CASE
|
||||||
WHEN spmrn.task_type = 'PHONE_OUTBOUND' THEN spmrn.phone_template_name
|
WHEN spmrn.task_type = 'PHONE_OUTBOUND' THEN COALESCE(spmrn.phone_template_name, spmrn.follow_template_name)
|
||||||
WHEN spmrn.task_type = 'QUESTIONNAIRE_SCALE' THEN spmrn.questionnaire_name
|
WHEN spmrn.task_type = 'QUESTIONNAIRE_SCALE' THEN spmrn.questionnaire_name
|
||||||
WHEN spmrn.task_type = 'ARTIFICIAL_FOLLOW_UP' THEN spmrn.follow_template_name
|
WHEN spmrn.task_type = 'ARTIFICIAL_FOLLOW_UP' THEN spmrn.follow_template_name
|
||||||
END AS 'templateName',
|
END AS 'templateName',
|
||||||
CASE
|
CASE
|
||||||
WHEN spmrn.task_type = 'PHONE_OUTBOUND' THEN spmrn.phone_id
|
WHEN spmrn.task_type = 'PHONE_OUTBOUND' THEN COALESCE(spmrn.phone_id, spmrn.follow_template_id)
|
||||||
WHEN spmrn.task_type = 'QUESTIONNAIRE_SCALE' THEN spmrn.question_info_id
|
WHEN spmrn.task_type = 'QUESTIONNAIRE_SCALE' THEN spmrn.question_info_id
|
||||||
WHEN spmrn.task_type = 'ARTIFICIAL_FOLLOW_UP' THEN spmrn.follow_template_id
|
WHEN spmrn.task_type = 'ARTIFICIAL_FOLLOW_UP' THEN spmrn.follow_template_id
|
||||||
END AS 'templateId',
|
END AS 'templateId',
|
||||||
|
spmrn.phone_id,
|
||||||
|
spmrn.follow_template_id,
|
||||||
spmrn.node_execute_status,
|
spmrn.node_execute_status,
|
||||||
spmrn.route_handle_remark
|
spmrn.route_handle_remark
|
||||||
FROM
|
FROM
|
||||||
|
|||||||
@ -50,6 +50,8 @@
|
|||||||
<result property="appletRemindContent" column="applet_remind_content"/>
|
<result property="appletRemindContent" column="applet_remind_content"/>
|
||||||
<result property="appletPromptDescription" column="applet_prompt_description"/>
|
<result property="appletPromptDescription" column="applet_prompt_description"/>
|
||||||
<result property="appletNodeContent" column="applet_node_content"/>
|
<result property="appletNodeContent" column="applet_node_content"/>
|
||||||
|
<result property="followTemplateId" column="follow_template_id"/>
|
||||||
|
<result property="followTemplateName" column="follow_template_name"/>
|
||||||
<result property="routeCheckStatus" column="route_check_status"/>
|
<result property="routeCheckStatus" column="route_check_status"/>
|
||||||
<result property="routeCheckPerson" column="route_check_person"/>
|
<result property="routeCheckPerson" column="route_check_person"/>
|
||||||
<result property="routeCheckDate" column="route_check_date"/>
|
<result property="routeCheckDate" column="route_check_date"/>
|
||||||
@ -72,7 +74,7 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectSignPatientManageRouteNodeVo">
|
<sql id="selectSignPatientManageRouteNodeVo">
|
||||||
select id, manage_route_id, manage_route_name, route_node_id, route_node_name, route_node_day, task_type, task_status, task_subdivision, second_classify_describe, execute_time, phone_push_sign, phone_id, phone_template_id, phone_template_name, phone_node_content, phone_redial_times, phone_time_interval, phone_message_remind, phone_message_template_id, phone_message_template_name,phone_message_template_content,question_info_id, questionnaire_name, questionnaire_content, question_expiration_date, propaganda_info_id, propaganda_title, propaganda_content, message_push_sign, message_template_id, message_template_name, message_preview, message_node_content, official_push_sign, official_template_id, official_template_name, official_remind_content, official_node_content, applet_push_sign, applet_template_id, applet_template_name, applet_remind_content, applet_prompt_description, applet_node_content, route_check_status, route_check_person, route_check_date, route_check_remark, route_node_remark, node_execute_status, route_handle_remark, route_handle_id, route_handle_person, route_link,text_remind_content, node_content,message_status, del_flag, create_by, create_time, update_by, update_time, phone_dial_method from sign_patient_manage_route_node
|
select id, manage_route_id, manage_route_name, route_node_id, route_node_name, route_node_day, task_type, task_status, task_subdivision, second_classify_describe, execute_time, phone_push_sign, phone_id, phone_template_id, phone_template_name, phone_node_content, phone_redial_times, phone_time_interval, phone_message_remind, phone_message_template_id, phone_message_template_name,phone_message_template_content,question_info_id, questionnaire_name, questionnaire_content, question_expiration_date, propaganda_info_id, propaganda_title, propaganda_content, message_push_sign, message_template_id, message_template_name, message_preview, message_node_content, official_push_sign, official_template_id, official_template_name, official_remind_content, official_node_content, follow_template_id, follow_template_name, applet_push_sign, applet_template_id, applet_template_name, applet_remind_content, applet_prompt_description, applet_node_content, route_check_status, route_check_person, route_check_date, route_check_remark, route_node_remark, node_execute_status, route_handle_remark, route_handle_id, route_handle_person, route_link,text_remind_content, node_content,message_status, del_flag, create_by, create_time, update_by, update_time, phone_dial_method from sign_patient_manage_route_node
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectSignPatientManageRouteNodeList" parameterType="com.xinelu.manage.dto.signpatientmanageroutenode.SignPatientManageRouteNodeDto" resultMap="SignPatientManageRouteNodeResult">
|
<select id="selectSignPatientManageRouteNodeList" parameterType="com.xinelu.manage.dto.signpatientmanageroutenode.SignPatientManageRouteNodeDto" resultMap="SignPatientManageRouteNodeResult">
|
||||||
@ -149,7 +151,7 @@
|
|||||||
node.phone_template_id, node.phone_template_name, node.phone_node_content, node.phone_redial_times, node.phone_time_interval,
|
node.phone_template_id, node.phone_template_name, node.phone_node_content, node.phone_redial_times, node.phone_time_interval,
|
||||||
node.phone_message_remind, node.phone_message_template_id, node.phone_message_template_name,node.phone_message_template_content,
|
node.phone_message_remind, node.phone_message_template_id, node.phone_message_template_name,node.phone_message_template_content,
|
||||||
node.question_info_id, node.questionnaire_name, node.questionnaire_content, node.question_expiration_date,
|
node.question_info_id, node.questionnaire_name, node.questionnaire_content, node.question_expiration_date,
|
||||||
node.propaganda_info_id, node.propaganda_title, node.propaganda_content,
|
node.propaganda_info_id, node.propaganda_title, node.propaganda_content,node.follow_template_id, node.follow_template_name,
|
||||||
node.message_push_sign, node.message_template_id, node.message_template_name,node.message_preview, node.message_node_content,
|
node.message_push_sign, node.message_template_id, node.message_template_name,node.message_preview, node.message_node_content,
|
||||||
node.official_push_sign, node.official_template_id, node.official_template_name, node.official_remind_content, node.official_node_content,
|
node.official_push_sign, node.official_template_id, node.official_template_name, node.official_remind_content, node.official_node_content,
|
||||||
node.applet_push_sign, node.applet_template_id, node.applet_template_name, node.applet_remind_content, node.applet_prompt_description, node.applet_node_content,
|
node.applet_push_sign, node.applet_template_id, node.applet_template_name, node.applet_remind_content, node.applet_prompt_description, node.applet_node_content,
|
||||||
@ -322,6 +324,10 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="phoneDialMethod != null">phone_dial_method,
|
<if test="phoneDialMethod != null">phone_dial_method,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="followTemplateId != null">follow_template_id,
|
||||||
|
</if>
|
||||||
|
<if test="followTemplateName != null">follow_template_name,
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="manageRouteId != null">#{manageRouteId},
|
<if test="manageRouteId != null">#{manageRouteId},
|
||||||
@ -448,7 +454,11 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="updateTime != null">#{updateTime},
|
<if test="updateTime != null">#{updateTime},
|
||||||
</if>
|
</if>
|
||||||
<if test="phoneDialMethod != null ">#{phoneDialMethod}
|
<if test="phoneDialMethod != null ">#{phoneDialMethod},
|
||||||
|
</if>
|
||||||
|
<if test="followTemplateId != null">#{followTemplateId},
|
||||||
|
</if>
|
||||||
|
<if test="followTemplateName != null">#{followTemplateName},
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
@ -459,7 +469,7 @@
|
|||||||
message_template_id, message_template_name, message_preview, message_node_content, official_push_sign, official_template_id, official_template_name, official_remind_content,
|
message_template_id, message_template_name, message_preview, message_node_content, official_push_sign, official_template_id, official_template_name, official_remind_content,
|
||||||
official_node_content, applet_push_sign, applet_template_id, applet_template_name, applet_remind_content, applet_prompt_description, applet_node_content,
|
official_node_content, applet_push_sign, applet_template_id, applet_template_name, applet_remind_content, applet_prompt_description, applet_node_content,
|
||||||
route_check_status, route_check_person, route_check_date, route_check_remark, route_node_remark, node_execute_status, route_handle_remark,phone_connect_status,
|
route_check_status, route_check_person, route_check_date, route_check_remark, route_node_remark, node_execute_status, route_handle_remark,phone_connect_status,
|
||||||
route_handle_id, route_handle_person, route_link, text_remind_content,node_content, del_flag, create_by, create_time, update_by, update_time,phone_dial_method)
|
route_handle_id, route_handle_person, route_link, text_remind_content,node_content, del_flag, create_by, create_time, update_by, update_time,phone_dial_method,follow_template_id, follow_template_name)
|
||||||
values
|
values
|
||||||
<foreach collection="nodeList" item="item" separator=",">
|
<foreach collection="nodeList" item="item" separator=",">
|
||||||
(#{item.manageRouteId},#{item.manageRouteName},#{item.routeNodeId},#{item.routeNodeName},#{item.routeNodeDay},#{item.taskType},#{item.taskStatus},#{item.taskSubdivision},#{item.secondClassifyDescribe},
|
(#{item.manageRouteId},#{item.manageRouteName},#{item.routeNodeId},#{item.routeNodeName},#{item.routeNodeDay},#{item.taskType},#{item.taskStatus},#{item.taskSubdivision},#{item.secondClassifyDescribe},
|
||||||
@ -468,7 +478,7 @@
|
|||||||
#{item.messageTemplateName},#{item.messagePreview},#{item.messageNodeContent},#{item.officialPushSign},#{item.officialTemplateId},#{item.officialTemplateName},#{item.officialRemindContent},#{item.officialNodeContent},
|
#{item.messageTemplateName},#{item.messagePreview},#{item.messageNodeContent},#{item.officialPushSign},#{item.officialTemplateId},#{item.officialTemplateName},#{item.officialRemindContent},#{item.officialNodeContent},
|
||||||
#{item.appletPushSign},#{item.appletTemplateId},#{item.appletTemplateName},#{item.appletRemindContent},#{item.appletPromptDescription},#{item.appletNodeContent},
|
#{item.appletPushSign},#{item.appletTemplateId},#{item.appletTemplateName},#{item.appletRemindContent},#{item.appletPromptDescription},#{item.appletNodeContent},
|
||||||
#{item.routeCheckStatus},#{item.routeCheckPerson},#{item.routeCheckDate},#{item.routeCheckRemark},#{item.routeNodeRemark},#{item.nodeExecuteStatus},#{item.routeHandleRemark},#{item.phoneConnectStatus},
|
#{item.routeCheckStatus},#{item.routeCheckPerson},#{item.routeCheckDate},#{item.routeCheckRemark},#{item.routeNodeRemark},#{item.nodeExecuteStatus},#{item.routeHandleRemark},#{item.phoneConnectStatus},
|
||||||
#{item.routeHandleId},#{item.routeHandlePerson},#{item.routeLink},#{item.textRemindContent},#{item.nodeContent},0,#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.phoneDialMethod})
|
#{item.routeHandleId},#{item.routeHandlePerson},#{item.routeLink},#{item.textRemindContent},#{item.nodeContent},0,#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.phoneDialMethod},#{item.followTemplateId},#{item.followTemplateName})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
<update id="updateSignPatientManageRouteNode" parameterType="SignPatientManageRouteNode">
|
<update id="updateSignPatientManageRouteNode" parameterType="SignPatientManageRouteNode">
|
||||||
@ -663,6 +673,12 @@
|
|||||||
<if test="phoneDialMethod != null ">phone_dial_method =
|
<if test="phoneDialMethod != null ">phone_dial_method =
|
||||||
#{phoneDialMethod},
|
#{phoneDialMethod},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="followTemplateId != null">follow_template_id =
|
||||||
|
#{followTemplateId},
|
||||||
|
</if>
|
||||||
|
<if test="followTemplateName != null">follow_template_name =
|
||||||
|
#{followTemplateName},
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user