feat: 立项变更流程 完成时间变更不撤回流程
This commit is contained in:
+23
-22
@@ -367,7 +367,6 @@ public class ProcessEsInitChangeServiceImpl extends ServiceImpl<ProcessEsInitCha
|
||||
Set<String> espIdSet = new HashSet<>();
|
||||
// 如果是变更流程,则需要判断计划是否有效
|
||||
if (ESPProjectType.MERGE.getValue().equals(initChange.getProjectType())) {
|
||||
// 如果是合并流程,需要判断计划是否已经逾期
|
||||
espIdSet.add(initChange.getStandardIdOne());
|
||||
espIdSet.add(initChange.getStandardIdTwo());
|
||||
} else {
|
||||
@@ -385,28 +384,30 @@ public class ProcessEsInitChangeServiceImpl extends ServiceImpl<ProcessEsInitCha
|
||||
}
|
||||
}
|
||||
}
|
||||
// 如果是变更流程,则需要撤回制修订流程
|
||||
List<String> espIdList = initChangeData.getDataList().stream().map(ProcessEsInitChange::getEspId).collect(Collectors.toList());
|
||||
// 未开始的企标计划不需要强制撤回
|
||||
espService.listByIds(espIdList).forEach(esp -> {
|
||||
if (esp.getProjectStatus().equals(ESPProjectStatus.NOT_STARTED.getValue())) {
|
||||
espIdList.remove(esp.getId());
|
||||
// 如果是变更流程且不是完成时间变更,则需要撤回制修订流程
|
||||
if (!ESPProjectType.COMPLETE_TIME_CHANGE.getValue().equals(initChange.getProjectType())) {
|
||||
List<String> espIdList = initChangeData.getDataList().stream().map(ProcessEsInitChange::getEspId).collect(Collectors.toList());
|
||||
// 未开始的企标计划不需要强制撤回
|
||||
espService.listByIds(espIdList).forEach(esp -> {
|
||||
if (esp.getProjectStatus().equals(ESPProjectStatus.NOT_STARTED.getValue())) {
|
||||
espIdList.remove(esp.getId());
|
||||
}
|
||||
});
|
||||
if (espIdList.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
LambdaQueryWrapper<ProcessEsRevision> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.in(ProcessEsRevision::getEspId, espIdList);
|
||||
lambdaQueryWrapper.eq(ProcessEsRevision::getDelFlag, YesOrNoEnum.NO.getValue());
|
||||
List<ProcessEsRevision> enactList = revisionService.list(lambdaQueryWrapper);
|
||||
if (enactList == null || enactList.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
for (ProcessEsRevision esRevision : enactList) {
|
||||
String processInstanceId = esRevision.getProcessInstanceId();
|
||||
processAllService.forcedWithdrawal(processInstanceId);
|
||||
processAllService.updateDraftStatusByProjectId(esRevision.getId());
|
||||
}
|
||||
});
|
||||
if (espIdList.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
LambdaQueryWrapper<ProcessEsRevision> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.in(ProcessEsRevision::getEspId, espIdList);
|
||||
lambdaQueryWrapper.eq(ProcessEsRevision::getDelFlag, YesOrNoEnum.NO.getValue());
|
||||
List<ProcessEsRevision> enactList = revisionService.list(lambdaQueryWrapper);
|
||||
if (enactList == null || enactList.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
for (ProcessEsRevision esRevision : enactList) {
|
||||
String processInstanceId = esRevision.getProcessInstanceId();
|
||||
processAllService.forcedWithdrawal(processInstanceId);
|
||||
processAllService.updateDraftStatusByProjectId(esRevision.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user