Merge branch '0418_小程序开发' of http://182.92.166.109:3000/zhuangyuanke/PostDischargePatientManage into 0418_小程序开发
This commit is contained in:
commit
b6a02c9221
@ -0,0 +1,24 @@
|
|||||||
|
package com.xinelu.common.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
public enum PhoneConnectStatusEnum {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已接通
|
||||||
|
*/
|
||||||
|
CONNECTED("CONNECTED"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 未接通
|
||||||
|
*/
|
||||||
|
NOTCONNECTED("NOTCONNECTED"),
|
||||||
|
;
|
||||||
|
|
||||||
|
final private String info;
|
||||||
|
|
||||||
|
PhoneConnectStatusEnum(String info) {
|
||||||
|
this.info = info;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,34 @@
|
|||||||
|
package com.xinelu.common.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
public enum PhoneMessageRemindEnum {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 不发送短信
|
||||||
|
*/
|
||||||
|
NOT_SEND_MESSAGE("NOT_SEND_MESSAGE"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 未接通发短信
|
||||||
|
*/
|
||||||
|
NOT_CONNECTED_SEND_MESSAGE("NOT_CONNECTED_SEND_MESSAGE"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接通后发短信
|
||||||
|
*/
|
||||||
|
CONNECTED_SEND_MESSAGE("CONNECTED_SEND_MESSAGE"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所有人发短信
|
||||||
|
*/
|
||||||
|
EVERYONE_SEND_MESSAGE("EVERYONE_SEND_MESSAGE"),
|
||||||
|
;
|
||||||
|
|
||||||
|
final private String info;
|
||||||
|
|
||||||
|
PhoneMessageRemindEnum(String info) {
|
||||||
|
this.info = info;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,25 +1,36 @@
|
|||||||
package com.xinelu.common.enums;
|
package com.xinelu.common.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 话术状态标识
|
* 话术状态标识
|
||||||
*
|
*
|
||||||
* @author : youxilong
|
* @author : youxilong
|
||||||
* @date : 2024/3/19 10:06
|
* @date : 2024/3/19 10:06
|
||||||
*/
|
*/
|
||||||
|
@Getter
|
||||||
public enum ScriptStatusEnum {
|
public enum ScriptStatusEnum {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 话术状态,正常
|
* 话术状态,正常
|
||||||
*/
|
*/
|
||||||
NORMAL,
|
NORMAL("NORMAL"),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 话术状态:下架
|
* 话术状态:下架
|
||||||
*/
|
*/
|
||||||
OFF_SHELF,
|
OFF_SHELF("OFF_SHELF"),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 话术状态:暂停
|
* 话术状态:暂停
|
||||||
*/
|
*/
|
||||||
SUSPEND
|
SUSPEND("SUSPEND"),
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
|
final private String info;
|
||||||
|
|
||||||
|
ScriptStatusEnum(String info) {
|
||||||
|
this.info = info;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -126,7 +126,7 @@ public class ScriptInfoController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增话术节点
|
* 新增话术节点(暂时不用)
|
||||||
*/
|
*/
|
||||||
@PostMapping("/insertScriptEdgeNode")
|
@PostMapping("/insertScriptEdgeNode")
|
||||||
public AjaxResult insertScriptEdgeNode(@RequestBody ScriptVO scriptVO) {
|
public AjaxResult insertScriptEdgeNode(@RequestBody ScriptVO scriptVO) {
|
||||||
|
|||||||
@ -330,4 +330,7 @@ public class SignPatientManageRouteNode extends BaseEntity {
|
|||||||
|
|
||||||
@ApiModelProperty(value = "消息状态:已读:READ;未读:UNREAD。")
|
@ApiModelProperty(value = "消息状态:已读:READ;未读:UNREAD。")
|
||||||
private String messageStatus;
|
private String messageStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "默认已接通:CONNECTED;未接通:NOTCONNECTED")
|
||||||
|
private String phoneConnectStatus;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -259,6 +259,10 @@ public class SpecialDiseaseNode extends BaseEntity {
|
|||||||
@Excel(name = "AI电话短信提醒,不发送短信:NOT_SEND_MESSAGE,未接通发短信:NOT_CONNECTED_SEND_MESSAGE,接通后发短信:CONNECTED_SEND_MESSAGE,所有人发短信:EVERYONE_SEND_MESSAGE")
|
@Excel(name = "AI电话短信提醒,不发送短信:NOT_SEND_MESSAGE,未接通发短信:NOT_CONNECTED_SEND_MESSAGE,接通后发短信:CONNECTED_SEND_MESSAGE,所有人发短信:EVERYONE_SEND_MESSAGE")
|
||||||
private String phoneMessageRemind;
|
private String phoneMessageRemind;
|
||||||
|
|
||||||
|
private String phoneRedialTimes;
|
||||||
|
|
||||||
|
private Integer phoneTimeInterval;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AI电话短信模板表id
|
* AI电话短信模板表id
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -30,6 +30,12 @@ public class PatientQuestionSubmitResultDTO extends PatientQuestionSubmitResult
|
|||||||
@ApiModelProperty(value = "任务处理信息")
|
@ApiModelProperty(value = "任务处理信息")
|
||||||
private String routeHandleRemark;
|
private String routeHandleRemark;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "电话是否接通:已接通:CONNECTED;未接通:NOTCONNECTED")
|
||||||
|
private String phoneConnectStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "电话短信提醒,不发送短信:NOT_SEND_MESSAGE,未接通发短信:NOT_CONNECTED_SEND_MESSAGE,接通后发短信:CONNECTED_SEND_MESSAGE,所有人发短信:EVERYONE_SEND_MESSAGE")
|
||||||
|
private String phoneMessageRemind;
|
||||||
|
|
||||||
@ApiModelProperty(value = "患者就诊记录基本信息表id")
|
@ApiModelProperty(value = "患者就诊记录基本信息表id")
|
||||||
private Long visitRecordId;
|
private Long visitRecordId;
|
||||||
|
|
||||||
|
|||||||
@ -77,4 +77,8 @@ public interface ScriptInfoMapper {
|
|||||||
List<Long> selectScriptInfoEdgeIds(Long id);
|
List<Long> selectScriptInfoEdgeIds(Long id);
|
||||||
|
|
||||||
List<Long> selectScriptInfoNodeIds(Long id);
|
List<Long> selectScriptInfoNodeIds(Long id);
|
||||||
|
|
||||||
|
int deleteScriptInfoNode(Long id);
|
||||||
|
|
||||||
|
int deleteScriptInfoEdge(Long id);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -222,6 +222,8 @@ public class ScriptInfoServiceImpl implements IScriptInfoService {
|
|||||||
public AjaxResult updateScriptEdgeNode(ScriptVO scriptVO) {
|
public AjaxResult updateScriptEdgeNode(ScriptVO scriptVO) {
|
||||||
List<Long> scriptInfoEdgeIds = scriptInfoMapper.selectScriptInfoEdgeIds(scriptVO.getScriptInfoId());
|
List<Long> scriptInfoEdgeIds = scriptInfoMapper.selectScriptInfoEdgeIds(scriptVO.getScriptInfoId());
|
||||||
List<Long> scriptInfoNodeIds = scriptInfoMapper.selectScriptInfoNodeIds(scriptVO.getScriptInfoId());
|
List<Long> scriptInfoNodeIds = scriptInfoMapper.selectScriptInfoNodeIds(scriptVO.getScriptInfoId());
|
||||||
|
scriptInfoMapper.deleteScriptInfoNode(scriptVO.getScriptInfoId());
|
||||||
|
scriptInfoMapper.deleteScriptInfoEdge(scriptVO.getScriptInfoId());
|
||||||
ScriptInfo scriptInfo = new ScriptInfo();
|
ScriptInfo scriptInfo = new ScriptInfo();
|
||||||
scriptInfo.setId(scriptVO.getScriptInfoId());
|
scriptInfo.setId(scriptVO.getScriptInfoId());
|
||||||
scriptInfo.setFlowScheme(scriptVO.getFlowScheme());
|
scriptInfo.setFlowScheme(scriptVO.getFlowScheme());
|
||||||
@ -237,8 +239,12 @@ public class ScriptInfoServiceImpl implements IScriptInfoService {
|
|||||||
for (Node node : scriptVO.getNodes()) {
|
for (Node node : scriptVO.getNodes()) {
|
||||||
node.setScriptInfoId(scriptVO.getScriptInfoId());
|
node.setScriptInfoId(scriptVO.getScriptInfoId());
|
||||||
String[] split = node.getLabel().split("\\n");
|
String[] split = node.getLabel().split("\\n");
|
||||||
node.setScriptNodeName(StringUtils.isBlank(split[0]) ? "" : split[0]);
|
if (split.length > 0) {
|
||||||
node.setScriptContent(StringUtils.isBlank(split[1]) ? "" : split[0]);
|
node.setScriptNodeName(split[0]);
|
||||||
|
}
|
||||||
|
if (split.length > 1) {
|
||||||
|
node.setScriptContent(split[1]);
|
||||||
|
}
|
||||||
node.setScriptNodeType(node.getType());
|
node.setScriptNodeType(node.getType());
|
||||||
node.setCreateBy(SecurityUtils.getUsername());
|
node.setCreateBy(SecurityUtils.getUsername());
|
||||||
node.setCreateTime(LocalDateTime.now());
|
node.setCreateTime(LocalDateTime.now());
|
||||||
|
|||||||
@ -2,9 +2,7 @@ package com.xinelu.manage.service.signpatientmanageroute.impl;
|
|||||||
|
|
||||||
import com.xinelu.common.constant.TaskCreateTypeConstant;
|
import com.xinelu.common.constant.TaskCreateTypeConstant;
|
||||||
import com.xinelu.common.core.domain.AjaxResult;
|
import com.xinelu.common.core.domain.AjaxResult;
|
||||||
import com.xinelu.common.enums.NodeExecuteStatusEnum;
|
import com.xinelu.common.enums.*;
|
||||||
import com.xinelu.common.enums.TaskContentEnum;
|
|
||||||
import com.xinelu.common.enums.TaskCreateTypeEnum;
|
|
||||||
import com.xinelu.common.exception.ServiceException;
|
import com.xinelu.common.exception.ServiceException;
|
||||||
import com.xinelu.common.utils.AgeUtil;
|
import com.xinelu.common.utils.AgeUtil;
|
||||||
import com.xinelu.common.utils.SecurityUtils;
|
import com.xinelu.common.utils.SecurityUtils;
|
||||||
@ -28,6 +26,7 @@ import com.xinelu.manage.mapper.signpatientmanageroute.SignPatientManageRouteMap
|
|||||||
import com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper;
|
import com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper;
|
||||||
import com.xinelu.manage.mapper.signroutetriggercondition.SignRouteTriggerConditionMapper;
|
import com.xinelu.manage.mapper.signroutetriggercondition.SignRouteTriggerConditionMapper;
|
||||||
import com.xinelu.manage.service.signpatientmanageroute.ISignPatientManageRouteService;
|
import com.xinelu.manage.service.signpatientmanageroute.ISignPatientManageRouteService;
|
||||||
|
import com.xinelu.manage.service.signpatientmanageroutenode.ISignPatientManageRouteNodeService;
|
||||||
import com.xinelu.manage.vo.manualfollowup.ManualFollowPatientVO;
|
import com.xinelu.manage.vo.manualfollowup.ManualFollowPatientVO;
|
||||||
import com.xinelu.manage.vo.manualfollowup.ManualFollowUpVO;
|
import com.xinelu.manage.vo.manualfollowup.ManualFollowUpVO;
|
||||||
import com.xinelu.manage.vo.signpatientmanageroute.SignPatientManageRouteVO;
|
import com.xinelu.manage.vo.signpatientmanageroute.SignPatientManageRouteVO;
|
||||||
@ -67,6 +66,8 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
|||||||
private PatientQuestionOptionResultMapper patientQuestionOptionResultMapper;
|
private PatientQuestionOptionResultMapper patientQuestionOptionResultMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private SignRouteTriggerConditionMapper signRouteTriggerConditionMapper;
|
private SignRouteTriggerConditionMapper signRouteTriggerConditionMapper;
|
||||||
|
@Resource
|
||||||
|
private ISignPatientManageRouteNodeService iSignPatientManageRouteNodeService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询签约患者管理任务路径
|
* 查询签约患者管理任务路径
|
||||||
@ -259,6 +260,13 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
|||||||
updateSignPatientManageRouteNode(dto, routeHandlePerson, time);
|
updateSignPatientManageRouteNode(dto, routeHandlePerson, time);
|
||||||
// 新增患者管理任务执行记录
|
// 新增患者管理任务执行记录
|
||||||
insertPatientTaskExecuteRecord(dto, routeHandlePerson, time);
|
insertPatientTaskExecuteRecord(dto, routeHandlePerson, time);
|
||||||
|
// 发送短信
|
||||||
|
if (StringUtils.isBlank(dto.getPhoneConnectStatus())) {
|
||||||
|
dto.setPhoneConnectStatus(PhoneConnectStatusEnum.CONNECTED.getInfo());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(dto.getPhoneMessageRemind()) && (PhoneMessageRemindEnum.EVERYONE_SEND_MESSAGE.getInfo().equals(dto.getPhoneMessageRemind()) || (PhoneConnectStatusEnum.CONNECTED.getInfo().equals(dto.getPhoneConnectStatus()) && PhoneMessageRemindEnum.CONNECTED_SEND_MESSAGE.getInfo().equals(dto.getPhoneMessageRemind())) || (PhoneConnectStatusEnum.NOTCONNECTED.getInfo().equals(dto.getPhoneConnectStatus()) && PhoneMessageRemindEnum.NOT_CONNECTED_SEND_MESSAGE.getInfo().equals(dto.getPhoneMessageRemind())))) {
|
||||||
|
iSignPatientManageRouteNodeService.generateTask(dto.getManageRouteNodeId(), dto.getTaskType());
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// 如果任务类型不是电话外呼,更新节点任务表,新增患者管理任务执行记录,新增问卷提交结果表、题目表、选项表
|
// 如果任务类型不是电话外呼,更新节点任务表,新增患者管理任务执行记录,新增问卷提交结果表、题目表、选项表
|
||||||
// 更新节点任务表
|
// 更新节点任务表
|
||||||
@ -348,6 +356,7 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
|||||||
signPatientManageRouteNode.setId(dto.getManageRouteNodeId());
|
signPatientManageRouteNode.setId(dto.getManageRouteNodeId());
|
||||||
signPatientManageRouteNode.setNodeExecuteStatus(NodeExecuteStatusEnum.EXECUTED.toString());
|
signPatientManageRouteNode.setNodeExecuteStatus(NodeExecuteStatusEnum.EXECUTED.toString());
|
||||||
signPatientManageRouteNode.setRouteHandleRemark(dto.getRouteHandleRemark());
|
signPatientManageRouteNode.setRouteHandleRemark(dto.getRouteHandleRemark());
|
||||||
|
signPatientManageRouteNode.setPhoneConnectStatus(dto.getPhoneConnectStatus());
|
||||||
signPatientManageRouteNode.setRouteHandleId(dto.getRouteHandleId());
|
signPatientManageRouteNode.setRouteHandleId(dto.getRouteHandleId());
|
||||||
signPatientManageRouteNode.setRouteHandlePerson(routeHandlePerson);
|
signPatientManageRouteNode.setRouteHandlePerson(routeHandlePerson);
|
||||||
signPatientManageRouteNode.setUpdateBy(routeHandlePerson);
|
signPatientManageRouteNode.setUpdateBy(routeHandlePerson);
|
||||||
@ -371,6 +380,9 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
|||||||
signPatientManageRouteNode.setPhoneNodeContent(StringUtils.isBlank(routeNode.getPhoneNodeContent()) ? null : routeNode.getPhoneNodeContent());
|
signPatientManageRouteNode.setPhoneNodeContent(StringUtils.isBlank(routeNode.getPhoneNodeContent()) ? null : routeNode.getPhoneNodeContent());
|
||||||
signPatientManageRouteNode.setPhoneRedialTimes(StringUtils.isBlank(routeNode.getPhoneRedialTimes()) ? null : routeNode.getPhoneRedialTimes());
|
signPatientManageRouteNode.setPhoneRedialTimes(StringUtils.isBlank(routeNode.getPhoneRedialTimes()) ? null : routeNode.getPhoneRedialTimes());
|
||||||
signPatientManageRouteNode.setPhoneTimeInterval(Objects.isNull(routeNode.getPhoneTimeInterval()) ? null : routeNode.getPhoneTimeInterval());
|
signPatientManageRouteNode.setPhoneTimeInterval(Objects.isNull(routeNode.getPhoneTimeInterval()) ? null : routeNode.getPhoneTimeInterval());
|
||||||
|
signPatientManageRouteNode.setPhoneMessageRemind(StringUtils.isBlank(routeNode.getPhoneMessageRemind()) ? null : routeNode.getPhoneMessageRemind());
|
||||||
|
signPatientManageRouteNode.setPhoneMessageTemplateId(Objects.isNull(routeNode.getPhoneMessageTemplateId()) ? null : routeNode.getPhoneMessageTemplateId());
|
||||||
|
signPatientManageRouteNode.setPhoneMessageTemplateName(StringUtils.isBlank(routeNode.getPhoneMessageTemplateName()) ? null : routeNode.getPhoneMessageTemplateName());
|
||||||
}
|
}
|
||||||
if (Objects.nonNull(routeNode) && TaskContentEnum.QUESTIONNAIRE_SCALE.getInfo().equals(routeNode.getTaskType())) {
|
if (Objects.nonNull(routeNode) && TaskContentEnum.QUESTIONNAIRE_SCALE.getInfo().equals(routeNode.getTaskType())) {
|
||||||
signPatientManageRouteNode.setQuestionInfoId(Objects.isNull(routeNode.getQuestionInfoId()) ? null : routeNode.getQuestionInfoId());
|
signPatientManageRouteNode.setQuestionInfoId(Objects.isNull(routeNode.getQuestionInfoId()) ? null : routeNode.getQuestionInfoId());
|
||||||
@ -391,6 +403,15 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
|||||||
signPatientManageRouteNode.setFollowContent(StringUtils.isBlank(routeNode.getFollowContent()) ? null : routeNode.getFollowContent());
|
signPatientManageRouteNode.setFollowContent(StringUtils.isBlank(routeNode.getFollowContent()) ? null : routeNode.getFollowContent());
|
||||||
signPatientManageRouteNode.setFollowTemplateName(StringUtils.isBlank(routeNode.getFollowTemplateName()) ? null : routeNode.getFollowTemplateName());
|
signPatientManageRouteNode.setFollowTemplateName(StringUtils.isBlank(routeNode.getFollowTemplateName()) ? null : routeNode.getFollowTemplateName());
|
||||||
}
|
}
|
||||||
|
signPatientManageRouteNode.setMessagePushSign(Objects.isNull(routeNode.getMessagePushSign()) ? null : routeNode.getMessagePushSign());
|
||||||
|
signPatientManageRouteNode.setMessageTemplateId(Objects.isNull(routeNode.getMessageTemplateId()) ? null : routeNode.getMessageTemplateId());
|
||||||
|
signPatientManageRouteNode.setMessageTemplateName(StringUtils.isBlank(routeNode.getMessageTemplateName()) ? null : routeNode.getMessageTemplateName());
|
||||||
|
signPatientManageRouteNode.setOfficialPushSign(Objects.isNull(routeNode.getOfficialPushSign()) ? null : routeNode.getOfficialPushSign());
|
||||||
|
signPatientManageRouteNode.setOfficialTemplateId(Objects.isNull(routeNode.getOfficialTemplateId()) ? null : routeNode.getOfficialTemplateId());
|
||||||
|
signPatientManageRouteNode.setOfficialTemplateName(StringUtils.isBlank(routeNode.getOfficialTemplateName()) ? null : routeNode.getOfficialTemplateName());
|
||||||
|
signPatientManageRouteNode.setAppletPushSign(Objects.isNull(routeNode.getAppletPushSign()) ? null : routeNode.getAppletPushSign());
|
||||||
|
signPatientManageRouteNode.setAppletTemplateId(Objects.isNull(routeNode.getAppletTemplateId()) ? null : routeNode.getAppletTemplateId());
|
||||||
|
signPatientManageRouteNode.setAppletTemplateName(StringUtils.isBlank(routeNode.getAppletTemplateName()) ? null : routeNode.getAppletTemplateName());
|
||||||
signPatientManageRouteNode.setManageRouteId(signPatientManageRoute.getId());
|
signPatientManageRouteNode.setManageRouteId(signPatientManageRoute.getId());
|
||||||
signPatientManageRouteNode.setManageRouteName(signPatientManageRoute.getRouteName());
|
signPatientManageRouteNode.setManageRouteName(signPatientManageRoute.getRouteName());
|
||||||
signPatientManageRouteNode.setNodeExecuteStatus(NodeExecuteStatusEnum.UNEXECUTED.getInfo());
|
signPatientManageRouteNode.setNodeExecuteStatus(NodeExecuteStatusEnum.UNEXECUTED.getInfo());
|
||||||
|
|||||||
@ -21,15 +21,6 @@ import com.xinelu.manage.service.patientinfo.IPatientAllInfoViewService;
|
|||||||
import com.xinelu.manage.service.specialdiseasenode.ISpecialDiseaseNodeService;
|
import com.xinelu.manage.service.specialdiseasenode.ISpecialDiseaseNodeService;
|
||||||
import com.xinelu.manage.vo.specialdiseasenode.SpecialDiseaseNodeVO;
|
import com.xinelu.manage.vo.specialdiseasenode.SpecialDiseaseNodeVO;
|
||||||
import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO;
|
import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO;
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Comparator;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.TreeSet;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
@ -41,6 +32,11 @@ import org.jsoup.select.Elements;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 专病路径-管理节点信息Service业务层处理
|
* 专病路径-管理节点信息Service业务层处理
|
||||||
*
|
*
|
||||||
@ -155,7 +151,7 @@ public class SpecialDiseaseNodeServiceImpl implements ISpecialDiseaseNodeService
|
|||||||
diseaseNode.setRouteName(specialDiseaseNode.getRouteName());
|
diseaseNode.setRouteName(specialDiseaseNode.getRouteName());
|
||||||
diseaseNode.setTemplateType(null);
|
diseaseNode.setTemplateType(null);
|
||||||
if (StringUtils.isNotBlank(diseaseNode.getTaskSubdivisiontemplateType())
|
if (StringUtils.isNotBlank(diseaseNode.getTaskSubdivisiontemplateType())
|
||||||
&& (TemplateTypeEnum.QUESTIONNAIRE.getInfo().equals(diseaseNode.getTaskSubdivisiontemplateType()) || TemplateTypeEnum.PROPAGANDA.getInfo().equals(diseaseNode.getTaskSubdivisiontemplateType()))) {
|
&& (TemplateTypeEnum.QUESTIONNAIRE.getInfo().equals(diseaseNode.getTaskSubdivisiontemplateType()) || TemplateTypeEnum.PROPAGANDA.getInfo().equals(diseaseNode.getTaskSubdivisiontemplateType()) || TemplateTypeEnum.SCRIPT.getInfo().equals(diseaseNode.getTaskSubdivisiontemplateType()))) {
|
||||||
diseaseNode.setTemplateType(diseaseNode.getTaskSubdivisiontemplateType());
|
diseaseNode.setTemplateType(diseaseNode.getTaskSubdivisiontemplateType());
|
||||||
}
|
}
|
||||||
diseaseNode.setUpdateTime(LocalDateTime.now());
|
diseaseNode.setUpdateTime(LocalDateTime.now());
|
||||||
|
|||||||
@ -6,6 +6,17 @@ import lombok.Data;
|
|||||||
@Data
|
@Data
|
||||||
public class PhonePush {
|
public class PhonePush {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 管理路径节点名称,出院后:AFTER_DISCHARGE,入院后:AFTER_ADMISSION,就诊后:AFTER_CONSULTATION
|
||||||
|
*/
|
||||||
|
private String routeNodeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 管理路径节点时间,时间单位为:天
|
||||||
|
*/
|
||||||
|
private String routeNodeDay;
|
||||||
|
|
||||||
|
|
||||||
private String patientName;
|
private String patientName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -14,6 +25,9 @@ public class PhonePush {
|
|||||||
@ApiModelProperty(value = "患者电话")
|
@ApiModelProperty(value = "患者电话")
|
||||||
private String patientPhone;
|
private String patientPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电话推送标识
|
||||||
|
*/
|
||||||
private Integer phonePushSign;
|
private Integer phonePushSign;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -58,6 +72,16 @@ public class PhonePush {
|
|||||||
@ApiModelProperty(value = "电话短信提醒,不发送短信:NOT_SEND_MESSAGE,未接通发短信:NOT_CONNECTED_SEND_MESSAGE,接通后发短信:CONNECTED_SEND_MESSAGE,所有人发短信:EVERYONE_SEND_MESSAGE")
|
@ApiModelProperty(value = "电话短信提醒,不发送短信:NOT_SEND_MESSAGE,未接通发短信:NOT_CONNECTED_SEND_MESSAGE,接通后发短信:CONNECTED_SEND_MESSAGE,所有人发短信:EVERYONE_SEND_MESSAGE")
|
||||||
private String phoneMessageRemind;
|
private String phoneMessageRemind;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 默认已接通:CONNECTED;未接通:NOTCONNECTED
|
||||||
|
*/
|
||||||
|
private String phoneConnectStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务处理信息;执行结果记录(电话反馈
|
||||||
|
*/
|
||||||
|
private String routeHandleRemark;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电话短信模板表id
|
* 电话短信模板表id
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -316,4 +316,16 @@
|
|||||||
from script_info_node
|
from script_info_node
|
||||||
where script_info_id = #{id}
|
where script_info_id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<delete id="deleteScriptInfoNode">
|
||||||
|
delete
|
||||||
|
from script_info_node
|
||||||
|
where script_info_id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteScriptInfoEdge">
|
||||||
|
delete
|
||||||
|
from script_info_edge
|
||||||
|
where script_info_id = #{id}
|
||||||
|
</delete>
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -637,12 +637,17 @@
|
|||||||
resultType="com.xinelu.manage.vo.signpatientmanageroute.PhonePush">
|
resultType="com.xinelu.manage.vo.signpatientmanageroute.PhonePush">
|
||||||
select pi.patient_name,
|
select pi.patient_name,
|
||||||
pi.patient_phone,
|
pi.patient_phone,
|
||||||
|
spmrn.route_node_name,
|
||||||
|
spmrn.phone_push_sign,
|
||||||
|
spmrn.route_node_day,
|
||||||
spmrn.phone_id,
|
spmrn.phone_id,
|
||||||
spmrn.phone_template_id,
|
spmrn.phone_template_id,
|
||||||
spmrn.phone_template_name,
|
spmrn.phone_template_name,
|
||||||
spmrn.phone_redial_times,
|
spmrn.phone_redial_times,
|
||||||
spmrn.phone_time_interval,
|
spmrn.phone_time_interval,
|
||||||
spmrn.phone_message_remind,
|
spmrn.phone_message_remind,
|
||||||
|
spmrn.phone_connect_status,
|
||||||
|
spmrn.route_handle_remark,
|
||||||
spmrn.phone_message_template_id,
|
spmrn.phone_message_template_id,
|
||||||
spmrn.phone_message_template_name,
|
spmrn.phone_message_template_name,
|
||||||
si.script_file_path
|
si.script_file_path
|
||||||
|
|||||||
@ -301,6 +301,8 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="routeHandleRemark != null">route_handle_remark,
|
<if test="routeHandleRemark != null">route_handle_remark,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="phoneConnectStatus != null">phone_connect_status,
|
||||||
|
</if>
|
||||||
<if test="routeHandleId != null">route_handle_id,
|
<if test="routeHandleId != null">route_handle_id,
|
||||||
</if>
|
</if>
|
||||||
<if test="routeHandlePerson != null">route_handle_person,
|
<if test="routeHandlePerson != null">route_handle_person,
|
||||||
@ -429,6 +431,8 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="routeHandleRemark != null">#{routeHandleRemark},
|
<if test="routeHandleRemark != null">#{routeHandleRemark},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="phoneConnectStatus != null">#{phoneConnectStatus},
|
||||||
|
</if>
|
||||||
<if test="routeHandleId != null">#{routeHandleId},
|
<if test="routeHandleId != null">#{routeHandleId},
|
||||||
</if>
|
</if>
|
||||||
<if test="routeHandlePerson != null">#{routeHandlePerson},
|
<if test="routeHandlePerson != null">#{routeHandlePerson},
|
||||||
@ -457,7 +461,7 @@
|
|||||||
phone_message_template_name, question_info_id, questionnaire_name, questionnaire_content, question_expiration_date, propaganda_info_id, propaganda_title, propaganda_content, message_push_sign,
|
phone_message_template_name, 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,
|
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, follow_template_id,
|
official_node_content, applet_push_sign, applet_template_id, applet_template_name, applet_remind_content, applet_prompt_description, applet_node_content, follow_template_id,
|
||||||
follow_template_name, follow_content, route_check_status, route_check_person, route_check_date, route_check_remark, route_node_remark, node_execute_status, route_handle_remark,
|
follow_template_name, follow_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_handle_id, route_handle_person, route_link, text_remind_content,node_content, del_flag, create_by, create_time, update_by, update_time)
|
route_handle_id, route_handle_person, route_link, text_remind_content,node_content, del_flag, create_by, create_time, update_by, update_time)
|
||||||
values
|
values
|
||||||
<foreach collection="nodeList" item="item" separator=",">
|
<foreach collection="nodeList" item="item" separator=",">
|
||||||
@ -466,7 +470,7 @@
|
|||||||
#{item.questionInfoId},#{item.questionnaireName},#{item.questionnaireContent},#{item.questionExpirationDate},#{item.propagandaInfoId},#{item.propagandaTitle},#{item.propagandaContent},#{item.messagePushSign},#{item.messageTemplateId},
|
#{item.questionInfoId},#{item.questionnaireName},#{item.questionnaireContent},#{item.questionExpirationDate},#{item.propagandaInfoId},#{item.propagandaTitle},#{item.propagandaContent},#{item.messagePushSign},#{item.messageTemplateId},
|
||||||
#{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.followTemplateId},
|
#{item.appletPushSign},#{item.appletTemplateId},#{item.appletTemplateName},#{item.appletRemindContent},#{item.appletPromptDescription},#{item.appletNodeContent},#{item.followTemplateId},
|
||||||
#{item.followTemplateName},#{item.followContent},#{item.routeCheckStatus},#{item.routeCheckPerson},#{item.routeCheckDate},#{item.routeCheckRemark},#{item.routeNodeRemark},#{item.nodeExecuteStatus},#{item.routeHandleRemark},
|
#{item.followTemplateName},#{item.followContent},#{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.routeHandleId},#{item.routeHandlePerson},#{item.routeLink},#{item.textRemindContent},#{item.nodeContent},0,#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
@ -632,6 +636,9 @@
|
|||||||
<if test="routeHandleRemark != null">route_handle_remark =
|
<if test="routeHandleRemark != null">route_handle_remark =
|
||||||
#{routeHandleRemark},
|
#{routeHandleRemark},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="phoneConnectStatus != null">phone_connect_status =
|
||||||
|
#{phoneConnectStatus},
|
||||||
|
</if>
|
||||||
<if test="routeHandleId != null">route_handle_id =
|
<if test="routeHandleId != null">route_handle_id =
|
||||||
#{routeHandleId},
|
#{routeHandleId},
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@ -58,6 +58,8 @@
|
|||||||
<result property="phoneTemplateId" column="phone_template_id"/>
|
<result property="phoneTemplateId" column="phone_template_id"/>
|
||||||
<result property="phoneTemplateName" column="phone_template_name"/>
|
<result property="phoneTemplateName" column="phone_template_name"/>
|
||||||
<result property="phoneMessageRemind" column="phone_message_remind"/>
|
<result property="phoneMessageRemind" column="phone_message_remind"/>
|
||||||
|
<result property="phoneRedialTimes" column="phone_redial_times"/>
|
||||||
|
<result property="phoneTimeInterval" column="phone_time_interval"/>
|
||||||
<result property="phoneMessageTemplateId" column="phone_message_template_id"/>
|
<result property="phoneMessageTemplateId" column="phone_message_template_id"/>
|
||||||
<result property="phoneMessageTemplateName" column="phone_message_template_name"/>
|
<result property="phoneMessageTemplateName" column="phone_message_template_name"/>
|
||||||
<result property="phoneAgencyName" column="phone_agency_name"/>
|
<result property="phoneAgencyName" column="phone_agency_name"/>
|
||||||
@ -107,6 +109,8 @@
|
|||||||
<result property="phoneTemplateId" column="phone_template_id"/>
|
<result property="phoneTemplateId" column="phone_template_id"/>
|
||||||
<result property="phoneTemplateName" column="phone_template_name"/>
|
<result property="phoneTemplateName" column="phone_template_name"/>
|
||||||
<result property="phoneMessageRemind" column="phone_message_remind"/>
|
<result property="phoneMessageRemind" column="phone_message_remind"/>
|
||||||
|
<result property="phoneRedialTimes" column="phone_redial_times"/>
|
||||||
|
<result property="phoneTimeInterval" column="phone_time_interval"/>
|
||||||
<result property="phoneMessageTemplateId" column="phone_message_template_id"/>
|
<result property="phoneMessageTemplateId" column="phone_message_template_id"/>
|
||||||
<result property="phoneMessageTemplateName" column="phone_message_template_name"/>
|
<result property="phoneMessageTemplateName" column="phone_message_template_name"/>
|
||||||
<result property="phoneAgencyName" column="phone_agency_name"/>
|
<result property="phoneAgencyName" column="phone_agency_name"/>
|
||||||
@ -155,6 +159,8 @@
|
|||||||
phone_template_id,
|
phone_template_id,
|
||||||
phone_template_name,
|
phone_template_name,
|
||||||
phone_message_remind,
|
phone_message_remind,
|
||||||
|
phone_redial_times,
|
||||||
|
phone_time_interval,
|
||||||
phone_message_template_id,
|
phone_message_template_id,
|
||||||
phone_message_template_name,
|
phone_message_template_name,
|
||||||
phone_agency_name,
|
phone_agency_name,
|
||||||
@ -374,6 +380,10 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="phoneMessageRemind != null">phone_message_remind,
|
<if test="phoneMessageRemind != null">phone_message_remind,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="phoneRedialTimes != null">phone_redial_times,
|
||||||
|
</if>
|
||||||
|
<if test="phoneTimeInterval != null">phone_time_interval,
|
||||||
|
</if>
|
||||||
<if test="phoneMessageTemplateId != null">phone_message_template_id,
|
<if test="phoneMessageTemplateId != null">phone_message_template_id,
|
||||||
</if>
|
</if>
|
||||||
<if test="phoneMessageTemplateName != null">phone_message_template_name,
|
<if test="phoneMessageTemplateName != null">phone_message_template_name,
|
||||||
@ -466,6 +476,10 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="phoneMessageRemind != null">#{phoneMessageRemind},
|
<if test="phoneMessageRemind != null">#{phoneMessageRemind},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="phoneRedialTimes != null">#{phoneRedialTimes},
|
||||||
|
</if>
|
||||||
|
<if test="phoneTimeInterval != null">#{phoneTimeInterval},
|
||||||
|
</if>
|
||||||
<if test="phoneMessageTemplateId != null">#{phoneMessageTemplateId},
|
<if test="phoneMessageTemplateId != null">#{phoneMessageTemplateId},
|
||||||
</if>
|
</if>
|
||||||
<if test="phoneMessageTemplateName != null">#{phoneMessageTemplateName},
|
<if test="phoneMessageTemplateName != null">#{phoneMessageTemplateName},
|
||||||
@ -594,6 +608,12 @@
|
|||||||
<if test="phoneMessageRemind != null">phone_message_remind =
|
<if test="phoneMessageRemind != null">phone_message_remind =
|
||||||
#{phoneMessageRemind},
|
#{phoneMessageRemind},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="phoneRedialTimes != null">phone_redial_times =
|
||||||
|
#{phoneRedialTimes},
|
||||||
|
</if>
|
||||||
|
<if test="phoneTimeInterval != null">phone_time_interval =
|
||||||
|
#{phoneTimeInterval},
|
||||||
|
</if>
|
||||||
<if test="phoneMessageTemplateId != null">phone_message_template_id =
|
<if test="phoneMessageTemplateId != null">phone_message_template_id =
|
||||||
#{phoneMessageTemplateId},
|
#{phoneMessageTemplateId},
|
||||||
</if>
|
</if>
|
||||||
@ -685,6 +705,8 @@
|
|||||||
phone_template_id,
|
phone_template_id,
|
||||||
phone_template_name,
|
phone_template_name,
|
||||||
phone_message_remind,
|
phone_message_remind,
|
||||||
|
phone_redial_times,
|
||||||
|
phone_time_interval,
|
||||||
phone_message_template_id,
|
phone_message_template_id,
|
||||||
phone_message_template_name,
|
phone_message_template_name,
|
||||||
phone_agency_name,
|
phone_agency_name,
|
||||||
@ -732,6 +754,8 @@
|
|||||||
#{specialDiseaseNodeList.phoneTemplateId},
|
#{specialDiseaseNodeList.phoneTemplateId},
|
||||||
#{specialDiseaseNodeList.phoneTemplateName},
|
#{specialDiseaseNodeList.phoneTemplateName},
|
||||||
#{specialDiseaseNodeList.phoneMessageRemind},
|
#{specialDiseaseNodeList.phoneMessageRemind},
|
||||||
|
#{specialDiseaseNodeList.phoneRedialTimes},
|
||||||
|
#{specialDiseaseNodeList.phoneTimeInterval},
|
||||||
#{specialDiseaseNodeList.phoneMessageTemplateId},
|
#{specialDiseaseNodeList.phoneMessageTemplateId},
|
||||||
#{specialDiseaseNodeList.phoneMessageTemplateName},
|
#{specialDiseaseNodeList.phoneMessageTemplateName},
|
||||||
#{specialDiseaseNodeList.phoneAgencyName},
|
#{specialDiseaseNodeList.phoneAgencyName},
|
||||||
@ -802,6 +826,8 @@
|
|||||||
sdn.phone_template_id,
|
sdn.phone_template_id,
|
||||||
sdn.phone_template_name,
|
sdn.phone_template_name,
|
||||||
sdn.phone_message_remind,
|
sdn.phone_message_remind,
|
||||||
|
sdn.phone_redial_times,
|
||||||
|
sdn.phone_time_interval,
|
||||||
sdn.phone_message_template_id,
|
sdn.phone_message_template_id,
|
||||||
sdn.phone_message_template_name,
|
sdn.phone_message_template_name,
|
||||||
sdn.phone_agency_name,
|
sdn.phone_agency_name,
|
||||||
|
|||||||
@ -67,20 +67,21 @@
|
|||||||
|
|
||||||
<select id="satisfactionQuestionnaireByResidentId"
|
<select id="satisfactionQuestionnaireByResidentId"
|
||||||
resultType="com.xinelu.mobile.vo.satisfactionquestionnaire.SatisfactionQuestionnaire">
|
resultType="com.xinelu.mobile.vo.satisfactionquestionnaire.SatisfactionQuestionnaire">
|
||||||
SELECT qi.id templateId,
|
SELECT spmrn.question_info_id templateId,
|
||||||
qi.questionnaire_name,
|
spmrn.questionnaire_name,
|
||||||
qi.create_time,
|
spmrn.execute_time,
|
||||||
(SELECT id
|
(SELECT id
|
||||||
FROM patient_question_submit_result
|
FROM patient_question_submit_result
|
||||||
WHERE resident_id = #{residentId}
|
WHERE resident_id = #{residentId}
|
||||||
AND question_info_id = qi.id) patientQuestionSubmitResultId,
|
AND question_info_id = spmrn.question_info_id) patientQuestionSubmitResultId
|
||||||
(SELECT create_time
|
from sign_patient_manage_route_node spmrn
|
||||||
FROM patient_question_submit_result
|
LEFT JOIN sign_patient_manage_route spmr on spmr.id = spmrn.manage_route_id
|
||||||
WHERE id = patientQuestionSubmitResultId) executeTime
|
LEFT JOIN patient_info pi ON pi.id = spmr.patient_id
|
||||||
FROM question_info qi
|
LEFT JOIN question_info qi on qi.id = spmrn.question_info_id
|
||||||
WHERE qi.question_type = #{questionType}
|
WHERE qi.question_type = #{questionType}
|
||||||
AND qi.questionnaire_status = #{questionnaireStatus}
|
AND qi.questionnaire_status = #{questionnaireStatus}
|
||||||
ORDER BY qi.create_time DESC
|
and pi.resident_id = #{residentId}
|
||||||
|
ORDER BY spmrn.execute_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectResidentAndSubscribeMessageRecord"
|
<select id="selectResidentAndSubscribeMessageRecord"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user