feat: 企标计划判断所有进行中的是否逾期
This commit is contained in:
+12
@@ -52,6 +52,9 @@ public class ESPlanProjectStatusJob implements Job {
|
|||||||
.filter(esp -> ESPChangeType.CANCEL.getValue().equals(esp.getChangeStatus()) ||
|
.filter(esp -> ESPChangeType.CANCEL.getValue().equals(esp.getChangeStatus()) ||
|
||||||
ESPChangeType.WORK_TERMINATE.getValue().equals(esp.getChangeStatus()))
|
ESPChangeType.WORK_TERMINATE.getValue().equals(esp.getChangeStatus()))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
List<EnterpriseStandardPlan> inprogressList = list.stream()
|
||||||
|
.filter(esp -> ESPProjectStatus.IN_PROGRESS.getValue().equals(esp.getProjectStatus()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
// 将工作中止和取消的设置为未开始
|
// 将工作中止和取消的设置为未开始
|
||||||
cancelList.forEach(esp -> {
|
cancelList.forEach(esp -> {
|
||||||
esp.setProjectStatus(ESPProjectStatus.NOT_STARTED.getValue());
|
esp.setProjectStatus(ESPProjectStatus.NOT_STARTED.getValue());
|
||||||
@@ -70,6 +73,15 @@ public class ESPlanProjectStatusJob implements Job {
|
|||||||
p.setProjectStatus(ESPProjectStatus.OVERDUE.getValue());
|
p.setProjectStatus(ESPProjectStatus.OVERDUE.getValue());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
// 判断所有进行中的是否逾期
|
||||||
|
inprogressList.parallelStream().forEach(p -> {
|
||||||
|
Date planApprovalDate = p.getPlanApprovalDate();
|
||||||
|
if (curDate.after(planApprovalDate)) {
|
||||||
|
log.info("计划【" + p.getNewEnStandardName() + "】逾期,计划完成日期:" + p.getPlanApprovalDate());
|
||||||
|
p.setProjectStatus(ESPProjectStatus.OVERDUE.getValue());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
espService.updateBatchById(inprogressList);
|
||||||
espService.updateBatchById(notStartedList);
|
espService.updateBatchById(notStartedList);
|
||||||
log.info("计划状态更新完成");
|
log.info("计划状态更新完成");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user