提交 fca87d16 authored 作者: 杨凯's avatar 杨凯

feat:家庭医生初始化

上级 edfd6068
...@@ -158,15 +158,14 @@ public class ImChatTemplateImpl implements ImChatTemplate { ...@@ -158,15 +158,14 @@ public class ImChatTemplateImpl implements ImChatTemplate {
List<MessageInfo> messageInfos = new ArrayList<>(); List<MessageInfo> messageInfos = new ArrayList<>();
PatientSignInfo patientSignInfo = getPatientSignInfo(sendImMsgDTO.getAdmId()); PatientSignInfo patientSignInfo = getPatientSignInfo(sendImMsgDTO.getAdmId());
MessageInfo messageInfo = new MessageInfo(); MessageInfo messageInfo = new MessageInfo();
content = MessageFormat.format(content, patientSignInfo.getDoctorName());
if (!StringUtils.isEmpty(sendImMsgDTO.getOldAdmId())) {
PatientSignInfo oldPatientSignInfo = getPatientSignInfo(sendImMsgDTO.getOldAdmId());
log.info("之前的oldPatientSignInfo={}", oldPatientSignInfo);
log.info("来源patientSignInfo={}", patientSignInfo);
content = MessageFormat.format(content, oldPatientSignInfo.getDoctorName(), patientSignInfo.getDoctorName());
// 改签的时候判断患者健康计划是否开启,开启则不发送健康计划信息 // 报告异常特殊处理
if (MsgTempTypeEnum.REP_ANO.getValue().equals(sendImMsgDTO.getType())) {
content = MessageFormat.format(content, patientSignInfo.getDoctorName(), sendImMsgDTO.getIntention());
} else {
if (!StringUtils.isEmpty(sendImMsgDTO.getOldAdmId())) {
if (MsgTempTypeEnum.UP_SUC.getValue().equals(sendImMsgDTO.getType())) { if (MsgTempTypeEnum.UP_SUC.getValue().equals(sendImMsgDTO.getType())) {
content = MessageFormat.format(content, patientSignInfo.getDoctorName());
if (!Objects.nonNull(componentsList.get(i).getConditionFlag()) if (!Objects.nonNull(componentsList.get(i).getConditionFlag())
&& CommonConstants.STATUS_VALID.equals(componentsList.get(i).getConditionFlag())) { && CommonConstants.STATUS_VALID.equals(componentsList.get(i).getConditionFlag())) {
// 查询用户健康计划是否开启状态 // 查询用户健康计划是否开启状态
...@@ -180,12 +179,17 @@ public class ImChatTemplateImpl implements ImChatTemplate { ...@@ -180,12 +179,17 @@ public class ImChatTemplateImpl implements ImChatTemplate {
} }
} }
} }
} else {
PatientSignInfo oldPatientSignInfo = getPatientSignInfo(sendImMsgDTO.getOldAdmId());
log.info("之前的doctorName={}", oldPatientSignInfo.getDoctorName());
log.info("来源的doctorName={}", oldPatientSignInfo.getDoctorName());
content = MessageFormat.format(content, oldPatientSignInfo.getDoctorName(), patientSignInfo.getDoctorName());
} }
} else {
content = MessageFormat.format(content, patientSignInfo.getDoctorName());
} }
// 报告异常特殊处理
if (MsgTempTypeEnum.REP_ANO.getValue().equals(sendImMsgDTO.getType())) {
content = MessageFormat.format(content, patientSignInfo.getDoctorName(), sendImMsgDTO.getIntention());
} }
if (SenderEnum.DOCTOR.getDesc().equals(componentsList.get(i).getSender())) { if (SenderEnum.DOCTOR.getDesc().equals(componentsList.get(i).getSender())) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论