项目库-项目详情-bug57090

This commit is contained in:
liyawei
2022-08-04 18:32:44 +08:00
parent 884b50c6b1
commit 02937c2aea
@@ -116,6 +116,8 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
Date trueNow = cal1.getTime();
for (ProjectTaskPlanning projectTaskPlanning : list) {
List<TimeNodeVO> timeNodeVOS = new ArrayList<>();
// 清单确认
if(ObjectUtils.isNotEmpty(projectTaskPlanning.getListConfirmation())) {
listConfirmationVO = new TimeNodeVO();
@@ -137,6 +139,7 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
timeNodeVOS.add(listConfirmationVO);
}
// 任务确认
if(ObjectUtils.isNotEmpty(projectTaskPlanning.getLegalTaskConfirmation())) {
TimeNodeVO legalTaskConfirmationVO = new TimeNodeVO();
@@ -158,6 +161,7 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
timeNodeVOS.add(legalTaskConfirmationVO);
}
// 设计符合性
if(ObjectUtils.isNotEmpty(projectTaskPlanning.getDesignDeadline())) {
TimeNodeVO designDeadlineVO = new TimeNodeVO();
@@ -179,6 +183,7 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
timeNodeVOS.add(designDeadlineVO);
}
// 摸底试验结束
if(ObjectUtils.isNotEmpty(projectTaskPlanning.getPrehomoDeadline())) {
TimeNodeVO prehomoDeadlineVO = new TimeNodeVO();
@@ -200,6 +205,7 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
timeNodeVOS.add(prehomoDeadlineVO);
}
// 认证试验结束
if(ObjectUtils.isNotEmpty(projectTaskPlanning.getAttestationStartTime())) {
TimeNodeVO attestationStartTimeVO = new TimeNodeVO();
@@ -220,6 +226,8 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
attestationStartTimeVO.setProjectId(projectTaskPlanning.getProjectId());
timeNodeVOS.add(attestationStartTimeVO);
}
// 认证批准
if(ObjectUtils.isNotEmpty(projectTaskPlanning.getAttestationEndTime())) {
TimeNodeVO attestationEndTimeVO = new TimeNodeVO();
@@ -241,6 +249,7 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
timeNodeVOS.add(attestationEndTimeVO);
}
// 验证符合性
if(ObjectUtils.isNotEmpty(projectTaskPlanning.getVerifyDeadline())) {
TimeNodeVO verifyDeadlineVO = new TimeNodeVO();
@@ -261,8 +270,13 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
verifyDeadlineVO.setProjectId(projectTaskPlanning.getProjectId());
timeNodeVOS.add(verifyDeadlineVO);
}
// 排序
Collections.sort(timeNodeVOS, listConfirmationVO);
// Collections.sort(timeNodeVOS, listConfirmationVO);
timeNodeVOS = timeNodeVOS.stream()
.sorted(Comparator.comparing(TimeNodeVO::getTime))
.collect(Collectors.toList());
//设置在已过时,和未发生之间的数据的状态为进行中
for(int i=0;i<timeNodeVOS.size();i++){
if(i == timeNodeVOS.size()-1){