流程发送消息-定时器统一修改

This commit is contained in:
wangzhijiang
2022-05-31 09:36:10 +08:00
parent dcd334f5e8
commit ff93603d5a
4 changed files with 85 additions and 75 deletions
@@ -89,29 +89,31 @@ public class InventoryAffirmJob implements Job {
for (ProjectLawsInventoryEO projectLawsInventoryEO : projectLawsInventoryEOList) { for (ProjectLawsInventoryEO projectLawsInventoryEO : projectLawsInventoryEOList) {
if(StringUtils.equals(projectLibraryBase.getId(),projectLawsInventoryEO.getProjectLibraryId())){ if(StringUtils.equals(projectLibraryBase.getId(),projectLawsInventoryEO.getProjectLibraryId())){
//如果清单确认结束日期是当前日期 if(projectLawsInventoryEO.getInventoryAffirmDueDate() != null){
if(StringUtils.equals(currentDateStr,sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate()))){ //如果清单确认结束日期是当前日期
if(StringUtils.isEmpty(projectLawsInventoryEO.getSendMsgFlag())){ if(StringUtils.equals(currentDateStr,sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate()))){
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getRegulationOwnerId())){ if(StringUtils.isEmpty(projectLawsInventoryEO.getSendMsgFlag())){
currentDaysUserIdList.add(projectLawsInventoryEO.getRegulationOwnerId()); if(StringUtils.isNotEmpty(projectLawsInventoryEO.getRegulationOwnerId())){
}if(StringUtils.isNotEmpty(projectLawsInventoryEO.getHomologationEngineerId())){ currentDaysUserIdList.add(projectLawsInventoryEO.getRegulationOwnerId());
currentDaysUserIdList.add(projectLawsInventoryEO.getHomologationEngineerId()); }if(StringUtils.isNotEmpty(projectLawsInventoryEO.getHomologationEngineerId())){
currentDaysUserIdList.add(projectLawsInventoryEO.getHomologationEngineerId());
}
projectLawsInventoryEO.setSendMsgFlag(SendMsgFlagEnum.FALSE.getValue());
projectLawsInventoryEOMapper.updateById(projectLawsInventoryEO);
} }
projectLawsInventoryEO.setSendMsgFlag(SendMsgFlagEnum.FALSE.getValue());
projectLawsInventoryEOMapper.updateById(projectLawsInventoryEO);
} }
}
//如果清单确认结束时间是当前系统时间后三天 //如果清单确认结束时间是当前系统时间后三天
if(StringUtils.equals(threeDaysStr,sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate()))){ if(StringUtils.equals(threeDaysStr,sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate()))){
if(StringUtils.isEmpty(projectLawsInventoryEO.getSendMsgCurrentFlag())){ if(StringUtils.isEmpty(projectLawsInventoryEO.getSendMsgCurrentFlag())){
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getRegulationOwnerId())){ if(StringUtils.isNotEmpty(projectLawsInventoryEO.getRegulationOwnerId())){
threeDaysUserIdList.add(projectLawsInventoryEO.getRegulationOwnerId()); threeDaysUserIdList.add(projectLawsInventoryEO.getRegulationOwnerId());
}if(StringUtils.isNotEmpty(projectLawsInventoryEO.getHomologationEngineerId())){ }if(StringUtils.isNotEmpty(projectLawsInventoryEO.getHomologationEngineerId())){
threeDaysUserIdList.add(projectLawsInventoryEO.getHomologationEngineerId()); threeDaysUserIdList.add(projectLawsInventoryEO.getHomologationEngineerId());
}
projectLawsInventoryEO.setSendMsgCurrentFlag(SendMsgFlagEnum.FALSE.getValue());
projectLawsInventoryEOMapper.updateById(projectLawsInventoryEO);
} }
projectLawsInventoryEO.setSendMsgCurrentFlag(SendMsgFlagEnum.FALSE.getValue());
projectLawsInventoryEOMapper.updateById(projectLawsInventoryEO);
} }
} }
} }
@@ -97,28 +97,30 @@ public class PrehomoJob implements Job {
for (ProjectTaskInventoryEO projectTaskInventoryEO : projectTaskInventoryEOList) { for (ProjectTaskInventoryEO projectTaskInventoryEO : projectTaskInventoryEOList) {
if(StringUtils.equals(projectTaskInventoryEO.getProjectLawsInventoryId(),projectLawsInventoryEO.getId())){ if(StringUtils.equals(projectTaskInventoryEO.getProjectLawsInventoryId(),projectLawsInventoryEO.getId())){
//如果prehomo - 结束日期是当前日期 if(projectLawsInventoryEO.getPrehomoDueDate() != null){
if(StringUtils.equals(currentDateStr,sdf.format(projectLawsInventoryEO.getPrehomoDueDate()))){ //如果prehomo - 结束日期是当前日期
if(StringUtils.isEmpty(projectTaskInventoryEO.getPrehomoSendMsgFlag())){ if(StringUtils.equals(currentDateStr,sdf.format(projectLawsInventoryEO.getPrehomoDueDate()))){
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getPrehomoDutyId())){ if(StringUtils.isEmpty(projectTaskInventoryEO.getPrehomoSendMsgFlag())){
currentDaysUserIdList.add(projectLawsInventoryEO.getPrehomoDutyId()); if(StringUtils.isNotEmpty(projectLawsInventoryEO.getPrehomoDutyId())){
}if(StringUtils.isNotEmpty(projectLawsInventoryEO.getPrehomoInitiatorId())){ currentDaysUserIdList.add(projectLawsInventoryEO.getPrehomoDutyId());
currentDaysUserIdList.add(projectLawsInventoryEO.getPrehomoInitiatorId()); }if(StringUtils.isNotEmpty(projectLawsInventoryEO.getPrehomoInitiatorId())){
currentDaysUserIdList.add(projectLawsInventoryEO.getPrehomoInitiatorId());
}
projectTaskInventoryEO.setPrehomoSendMsgFlag(SendMsgFlagEnum.FALSE.getValue());
projectTaskInventoryEOService.updateById(projectTaskInventoryEO);
} }
projectTaskInventoryEO.setPrehomoSendMsgFlag(SendMsgFlagEnum.FALSE.getValue());
projectTaskInventoryEOService.updateById(projectTaskInventoryEO);
} }
} //如果prehomo - 结束日期是三天后的日期
//如果prehomo - 结束日期是三天后的日期 if(StringUtils.equals(threeDaysStr,sdf.format(projectLawsInventoryEO.getPrehomoDueDate()))){
if(StringUtils.equals(threeDaysStr,sdf.format(projectLawsInventoryEO.getPrehomoDueDate()))){ if(StringUtils.isEmpty(projectTaskInventoryEO.getPrehomoSendMsgCurrentFlag())){
if(StringUtils.isEmpty(projectTaskInventoryEO.getPrehomoSendMsgCurrentFlag())){ if(StringUtils.isNotEmpty(projectLawsInventoryEO.getPrehomoDutyId())){
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getPrehomoDutyId())){ threeDaysUserIdList.add(projectLawsInventoryEO.getPrehomoDutyId());
threeDaysUserIdList.add(projectLawsInventoryEO.getPrehomoDutyId()); }if(StringUtils.isNotEmpty(projectLawsInventoryEO.getPrehomoInitiatorId())){
}if(StringUtils.isNotEmpty(projectLawsInventoryEO.getPrehomoInitiatorId())){ threeDaysUserIdList.add(projectLawsInventoryEO.getPrehomoInitiatorId());
threeDaysUserIdList.add(projectLawsInventoryEO.getPrehomoInitiatorId()); }
projectTaskInventoryEO.setPrehomoSendMsgCurrentFlag(SendMsgFlagEnum.FALSE.getValue());
projectTaskInventoryEOService.updateById(projectTaskInventoryEO);
} }
projectTaskInventoryEO.setPrehomoSendMsgCurrentFlag(SendMsgFlagEnum.FALSE.getValue());
projectTaskInventoryEOService.updateById(projectTaskInventoryEO);
} }
} }
} }
@@ -97,28 +97,30 @@ public class VerifyComplianceJob implements Job {
for (ProjectTaskInventoryEO projectTaskInventoryEO : projectTaskInventoryEOList) { for (ProjectTaskInventoryEO projectTaskInventoryEO : projectTaskInventoryEOList) {
if(StringUtils.equals(projectTaskInventoryEO.getProjectLawsInventoryId(),projectLawsInventoryEO.getId())){ if(StringUtils.equals(projectTaskInventoryEO.getProjectLawsInventoryId(),projectLawsInventoryEO.getId())){
//如果验证符合性 - 结束日期是当前日期 if(projectLawsInventoryEO.getVerifyDueDate() != null){
if(StringUtils.equals(currentDateStr,sdf.format(projectLawsInventoryEO.getVerifyDueDate()))){ //如果验证符合性 - 结束日期是当前日期
if(StringUtils.isEmpty(projectTaskInventoryEO.getVerifySendMsgFlag())){ if(StringUtils.equals(currentDateStr,sdf.format(projectLawsInventoryEO.getVerifyDueDate()))){
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getVerifyDutyId())){ if(StringUtils.isEmpty(projectTaskInventoryEO.getVerifySendMsgFlag())){
currentDaysUserIdList.add(projectLawsInventoryEO.getVerifyDutyId()); if(StringUtils.isNotEmpty(projectLawsInventoryEO.getVerifyDutyId())){
}if(StringUtils.isNotEmpty(projectLawsInventoryEO.getVerifyInitiatorId())){ currentDaysUserIdList.add(projectLawsInventoryEO.getVerifyDutyId());
currentDaysUserIdList.add(projectLawsInventoryEO.getVerifyInitiatorId()); }if(StringUtils.isNotEmpty(projectLawsInventoryEO.getVerifyInitiatorId())){
currentDaysUserIdList.add(projectLawsInventoryEO.getVerifyInitiatorId());
}
projectTaskInventoryEO.setVerifySendMsgFlag(SendMsgFlagEnum.FALSE.getValue());
projectTaskInventoryEOService.updateById(projectTaskInventoryEO);
} }
projectTaskInventoryEO.setVerifySendMsgFlag(SendMsgFlagEnum.FALSE.getValue());
projectTaskInventoryEOService.updateById(projectTaskInventoryEO);
} }
} //如果验证符合性 - 结束日期是三天后的日期
//如果验证符合性 - 结束日期是三天后的日期 if(StringUtils.equals(threeDaysStr,sdf.format(projectLawsInventoryEO.getVerifyDueDate()))){
if(StringUtils.equals(threeDaysStr,sdf.format(projectLawsInventoryEO.getVerifyDueDate()))){ if(StringUtils.isEmpty(projectTaskInventoryEO.getVerifySendMsgCurrentFlag())){
if(StringUtils.isEmpty(projectTaskInventoryEO.getVerifySendMsgCurrentFlag())){ if(StringUtils.isNotEmpty(projectLawsInventoryEO.getVerifyDutyId())){
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getVerifyDutyId())){ threeDaysUserIdList.add(projectLawsInventoryEO.getVerifyDutyId());
threeDaysUserIdList.add(projectLawsInventoryEO.getVerifyDutyId()); }if(StringUtils.isNotEmpty(projectLawsInventoryEO.getVerifyInitiatorId())){
}if(StringUtils.isNotEmpty(projectLawsInventoryEO.getVerifyInitiatorId())){ threeDaysUserIdList.add(projectLawsInventoryEO.getVerifyInitiatorId());
threeDaysUserIdList.add(projectLawsInventoryEO.getVerifyInitiatorId()); }
projectTaskInventoryEO.setVerifySendMsgCurrentFlag(SendMsgFlagEnum.FALSE.getValue());
projectTaskInventoryEOService.updateById(projectTaskInventoryEO);
} }
projectTaskInventoryEO.setVerifySendMsgCurrentFlag(SendMsgFlagEnum.FALSE.getValue());
projectTaskInventoryEOService.updateById(projectTaskInventoryEO);
} }
} }
} }
@@ -95,29 +95,33 @@ public class designComplianceJob implements Job {
for (ProjectTaskInventoryEO projectTaskInventoryEO : projectTaskInventoryEOList) { for (ProjectTaskInventoryEO projectTaskInventoryEO : projectTaskInventoryEOList) {
if(StringUtils.equals(projectTaskInventoryEO.getProjectLawsInventoryId(),projectLawsInventoryEO.getId())){ if(StringUtils.equals(projectTaskInventoryEO.getProjectLawsInventoryId(),projectLawsInventoryEO.getId())){
//如果设计符合性 - 结束日期是当前日期 //如果设计符合性 - 结束日期是当前日期
if(StringUtils.equals(currentDateStr,sdf.format(projectLawsInventoryEO.getDesignDueDate()))){ if(projectLawsInventoryEO.getDesignDueDate() != null){
if(StringUtils.isEmpty(projectTaskInventoryEO.getDesignSendMsgFlag())){ if(StringUtils.equals(currentDateStr,sdf.format(projectLawsInventoryEO.getDesignDueDate()))){
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getDesignDutyId())){ if(StringUtils.isEmpty(projectTaskInventoryEO.getDesignSendMsgFlag())){
currentDaysUserIdList.add(projectLawsInventoryEO.getDesignDutyId()); if(StringUtils.isNotEmpty(projectLawsInventoryEO.getDesignDutyId())){
}if(StringUtils.isNotEmpty(projectLawsInventoryEO.getDesignInitiatorId())){ currentDaysUserIdList.add(projectLawsInventoryEO.getDesignDutyId());
currentDaysUserIdList.add(projectLawsInventoryEO.getDesignInitiatorId()); }if(StringUtils.isNotEmpty(projectLawsInventoryEO.getDesignInitiatorId())){
currentDaysUserIdList.add(projectLawsInventoryEO.getDesignInitiatorId());
}
projectTaskInventoryEO.setDesignSendMsgFlag(SendMsgFlagEnum.FALSE.getValue());
projectTaskInventoryEOService.updateById(projectTaskInventoryEO);
} }
projectTaskInventoryEO.setDesignSendMsgFlag(SendMsgFlagEnum.FALSE.getValue());
projectTaskInventoryEOService.updateById(projectTaskInventoryEO);
} }
}
//如果设计符合性 - 结束日期是三天后的日期 //如果设计符合性 - 结束日期是三天后的日期
if(StringUtils.equals(threeDaysStr,sdf.format(projectLawsInventoryEO.getDesignDueDate()))){ if(StringUtils.equals(threeDaysStr,sdf.format(projectLawsInventoryEO.getDesignDueDate()))){
if(StringUtils.isEmpty(projectTaskInventoryEO.getDesignSendMsgCurrentFlag())){ if(StringUtils.isEmpty(projectTaskInventoryEO.getDesignSendMsgCurrentFlag())){
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getDesignDutyId())){ if(StringUtils.isNotEmpty(projectLawsInventoryEO.getDesignDutyId())){
threeDaysUserIdList.add(projectLawsInventoryEO.getDesignDutyId()); threeDaysUserIdList.add(projectLawsInventoryEO.getDesignDutyId());
}if(StringUtils.isNotEmpty(projectLawsInventoryEO.getDesignInitiatorId())){ }if(StringUtils.isNotEmpty(projectLawsInventoryEO.getDesignInitiatorId())){
threeDaysUserIdList.add(projectLawsInventoryEO.getDesignInitiatorId()); threeDaysUserIdList.add(projectLawsInventoryEO.getDesignInitiatorId());
}
projectTaskInventoryEO.setDesignSendMsgCurrentFlag(SendMsgFlagEnum.FALSE.getValue());
projectTaskInventoryEOService.updateById(projectTaskInventoryEO);
} }
projectTaskInventoryEO.setDesignSendMsgCurrentFlag(SendMsgFlagEnum.FALSE.getValue());
projectTaskInventoryEOService.updateById(projectTaskInventoryEO);
} }
} }
} }
} }
if(CollectionUtils.isNotEmpty(threeDaysUserIdList)){ if(CollectionUtils.isNotEmpty(threeDaysUserIdList)){