消息推送修改

This commit is contained in:
zhangheng 2024-07-25 09:52:37 +08:00
parent 39c068eb69
commit a926f6324d

View File

@ -2,7 +2,6 @@ package com.xinelu.quartz.service.impl;
import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSON;
import com.xinelu.common.config.WeChatAppletChatConfig; import com.xinelu.common.config.WeChatAppletChatConfig;
import com.xinelu.common.enums.PatientTypeEnum;
import com.xinelu.common.enums.RouteNodeNameEnum; import com.xinelu.common.enums.RouteNodeNameEnum;
import com.xinelu.common.enums.SubscribeStatusEnum; import com.xinelu.common.enums.SubscribeStatusEnum;
import com.xinelu.mobile.domain.TemplateContent; import com.xinelu.mobile.domain.TemplateContent;
@ -57,9 +56,17 @@ public class subscribeTaskServiceImpl implements SubscribeTaskService {
continue; continue;
} }
//判断路径节点组装数据 //判断路径节点组装数据
LocalDate localDate = null;
PatientVO patientVO = patientList.stream().filter(Objects::nonNull).filter(item -> signPatientManageRouteNode.getPatientId().equals(item.getPatientId())).findFirst().orElse(new PatientVO()); PatientVO patientVO = patientList.stream().filter(Objects::nonNull).filter(item -> signPatientManageRouteNode.getPatientId().equals(item.getPatientId())).findFirst().orElse(new PatientVO());
LocalDate localDate = patientVO.getDischargeTime().plusDays(signPatientManageRouteNode.getRouteNodeDay()); if (Objects.nonNull(patientVO.getDischargeTime())) {
localDate = patientVO.getDischargeTime().plusDays(signPatientManageRouteNode.getRouteNodeDay());
}
if (Objects.nonNull(patientVO.getVisitDate())) {
localDate = patientVO.getVisitDate().plusDays(signPatientManageRouteNode.getRouteNodeDay());
}
if (Objects.isNull(localDate)) {
continue;
}
boolean before = localDate.isBefore(LocalDate.now()) || localDate.isEqual(LocalDate.now()); boolean before = localDate.isBefore(LocalDate.now()) || localDate.isEqual(LocalDate.now());
if (before) { if (before) {
signPatientManageRouteNode.setOpenId(patientVO.getOpenId()); signPatientManageRouteNode.setOpenId(patientVO.getOpenId());
@ -67,8 +74,7 @@ public class subscribeTaskServiceImpl implements SubscribeTaskService {
signPatientManageRouteNode.setRouteNodeName(RouteNodeNameEnum.getNameByInfo(signPatientManageRouteNode.getRouteNodeName()).getName()); signPatientManageRouteNode.setRouteNodeName(RouteNodeNameEnum.getNameByInfo(signPatientManageRouteNode.getRouteNodeName()).getName());
patientVOList.add(signPatientManageRouteNode); patientVOList.add(signPatientManageRouteNode);
} }
patientVOList.add(signPatientManageRouteNode); }
// //如果节点 适用范围是 出院后或就诊/出院后 // //如果节点 适用范围是 出院后或就诊/出院后
// if (signPatientManageRouteNode.getRouteNodeName().equals(RouteNodeNameEnum.AFTER_DISCHARGE.getInfo()) || signPatientManageRouteNode.getRouteNodeName().equals(RouteNodeNameEnum.AFTER_VISIT_DISCHARGE.getInfo())) { // if (signPatientManageRouteNode.getRouteNodeName().equals(RouteNodeNameEnum.AFTER_DISCHARGE.getInfo()) || signPatientManageRouteNode.getRouteNodeName().equals(RouteNodeNameEnum.AFTER_VISIT_DISCHARGE.getInfo())) {
@ -116,9 +122,6 @@ public class subscribeTaskServiceImpl implements SubscribeTaskService {
// } // }
// } // }
}
List<Long> signPatientManageRouteNodeIds = new ArrayList<>(); List<Long> signPatientManageRouteNodeIds = new ArrayList<>();
//发送 //发送
for (PatientVO patientVO : patientVOList) { for (PatientVO patientVO : patientVOList) {