From d5c6fde48f53ff57f1dec547a4e17ce3d54a2a4d Mon Sep 17 00:00:00 2001 From: zhangheng <3226558941@qq.com> Date: Mon, 17 Jun 2024 16:01:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=B7=A5=E9=9A=8F=E8=AE=BF=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/enums/PhoneConnectStatusEnum.java | 24 +++++++++++++ .../common/enums/PhoneMessageRemindEnum.java | 34 +++++++++++++++++++ .../PatientQuestionSubmitResultDTO.java | 3 ++ .../SignPatientManageRouteServiceImpl.java | 13 +++++-- 4 files changed, 71 insertions(+), 3 deletions(-) create mode 100644 postdischarge-common/src/main/java/com/xinelu/common/enums/PhoneConnectStatusEnum.java create mode 100644 postdischarge-common/src/main/java/com/xinelu/common/enums/PhoneMessageRemindEnum.java diff --git a/postdischarge-common/src/main/java/com/xinelu/common/enums/PhoneConnectStatusEnum.java b/postdischarge-common/src/main/java/com/xinelu/common/enums/PhoneConnectStatusEnum.java new file mode 100644 index 00000000..c907816a --- /dev/null +++ b/postdischarge-common/src/main/java/com/xinelu/common/enums/PhoneConnectStatusEnum.java @@ -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; + } +} \ No newline at end of file diff --git a/postdischarge-common/src/main/java/com/xinelu/common/enums/PhoneMessageRemindEnum.java b/postdischarge-common/src/main/java/com/xinelu/common/enums/PhoneMessageRemindEnum.java new file mode 100644 index 00000000..b6960acb --- /dev/null +++ b/postdischarge-common/src/main/java/com/xinelu/common/enums/PhoneMessageRemindEnum.java @@ -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; + } +} \ No newline at end of file diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientquestionsubmitresult/PatientQuestionSubmitResultDTO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientquestionsubmitresult/PatientQuestionSubmitResultDTO.java index 360c59c8..7d1d5ae4 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientquestionsubmitresult/PatientQuestionSubmitResultDTO.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientquestionsubmitresult/PatientQuestionSubmitResultDTO.java @@ -33,6 +33,9 @@ public class PatientQuestionSubmitResultDTO extends PatientQuestionSubmitResult @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") private Long visitRecordId; diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java index 91c6ed71..24124ce2 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java @@ -2,9 +2,7 @@ package com.xinelu.manage.service.signpatientmanageroute.impl; import com.xinelu.common.constant.TaskCreateTypeConstant; import com.xinelu.common.core.domain.AjaxResult; -import com.xinelu.common.enums.NodeExecuteStatusEnum; -import com.xinelu.common.enums.TaskContentEnum; -import com.xinelu.common.enums.TaskCreateTypeEnum; +import com.xinelu.common.enums.*; import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.AgeUtil; 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.signroutetriggercondition.SignRouteTriggerConditionMapper; 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.ManualFollowUpVO; import com.xinelu.manage.vo.signpatientmanageroute.SignPatientManageRouteVO; @@ -67,6 +66,8 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout private PatientQuestionOptionResultMapper patientQuestionOptionResultMapper; @Resource private SignRouteTriggerConditionMapper signRouteTriggerConditionMapper; + @Resource + private ISignPatientManageRouteNodeService iSignPatientManageRouteNodeService; /** * 查询签约患者管理任务路径 @@ -259,6 +260,12 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout updateSignPatientManageRouteNode(dto, routeHandlePerson, time); // 新增患者管理任务执行记录 insertPatientTaskExecuteRecord(dto, routeHandlePerson, time); + // 发送短信 + if (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 { // 如果任务类型不是电话外呼,更新节点任务表,新增患者管理任务执行记录,新增问卷提交结果表、题目表、选项表 // 更新节点任务表