Browse Source

# 日常维护逾期判断逻辑bug

zhongwei
haungxing 8 months ago
parent
commit
bc70b21840
  1. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskRemindHandler.java

4
hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskRemindHandler.java

@ -49,14 +49,14 @@ public class MaintenanceTaskRemindHandler {
if(CollectionUtil.isNotEmpty(taskEntitySet)) {
taskEntitySet.forEach(operMaintenanceTaskEntity -> {
OperMaintenanceTaskEntity taskEntity = taskService.getById(operMaintenanceTaskEntity.getId());
if(ObjectUtil.isNotEmpty(taskEntity) || StringUtil.isBlank(taskEntity.getFlowTaskName())) {
if(ObjectUtil.isEmpty(taskEntity) || StringUtil.isBlank(taskEntity.getFlowTaskName())) {
redisTemplate.opsForZSet().remove(RedisKeyConstants.REMIND_TASK_END_LIST,operMaintenanceTaskEntity);
}
//如果任务仍在待执行则自动结束
else if(Lists.newArrayList("待领用","待执行").contains(taskEntity.getFlowTaskName())) {
XxlJobLogger.log("开始执行id为{}的任务", Optional.ofNullable(operMaintenanceTaskEntity.getId()).orElse(0L));
//日常维护任务到期消息提醒,提醒对象:执行人、项目经理角色 取出
this.sendMessage(taskEntity);
//this.sendMessage(taskEntity);
redisTemplate.opsForZSet().remove(RedisKeyConstants.MAINTENANCE_TASK_DELAY_LIST,operMaintenanceTaskEntity);
}
});

Loading…
Cancel
Save