fix: 立项变更合并 发起校验BUG

This commit is contained in:
2024-01-26 13:37:56 +08:00
parent 1ffcdfdbf1
commit 0f5c901979
@@ -364,8 +364,15 @@ public class ProcessEsInitChangeServiceImpl extends ServiceImpl<ProcessEsInitCha
// 校验企标编号是否冲突
ProcessEsInitChange initChange = esInitChangeList.get(0);
if (ESPApplicationCategoryEnum.CHANGE.getValue().equals(initChange.getApplicationCategory())) {
Set<String> espIdSet = new HashSet<>();
// 如果是变更流程,则需要判断计划是否有效
Set<String> espIdSet = esInitChangeList.stream().map(ProcessEsInitChange::getEspId).collect(Collectors.toSet());
if (ESPProjectType.MERGE.getValue().equals(initChange.getProjectType())) {
// 如果是合并流程,需要判断计划是否已经逾期
espIdSet.add(initChange.getStandardIdOne());
espIdSet.add(initChange.getStandardIdTwo());
} else {
espIdSet = esInitChangeList.stream().map(ProcessEsInitChange::getEspId).collect(Collectors.toSet());
}
List<EnterpriseStandardPlan> esplist = espService.list(new LambdaQueryWrapper<EnterpriseStandardPlan>().in(EnterpriseStandardPlan::getId, espIdSet));
if (esplist == null || esplist.size() != espIdSet.size()) {
throw new JeroBootException(ResultCommon.INVALID_ESP);