fix(88091): 跳转校验顺序

This commit is contained in:
yjz
2024-08-06 09:49:26 +08:00
parent 2b28b038ee
commit 2b2c74aa72
4 changed files with 21 additions and 21 deletions
@@ -67,6 +67,22 @@ public class StandardUtil {
}
}
// 查询标准解读流程
List<ProcessStandardInterpret> list1 = processStandardInterpretService.list(
new LambdaQueryWrapper<ProcessStandardInterpret>()
.in(ProcessStandardInterpret::getStandardId, needDelStandardIdList));
if (CollectionUtils.isNotEmpty(list1)){
List<String> projectIdList = list1.stream()
.map(ProcessStandardInterpret::getProjectId)
.collect(Collectors.toList());
int count1 = processAllService.count(new LambdaQueryWrapper<ProcessAll>()
.in(ProcessAll::getProjectId, projectIdList)
.ne(ProcessAll::getPrcStatus, ProcessStatusEnum.WITHDRAWN.getValue()));
if (count1 > 0) {
throw new JeroBootException(ResultCommon.SCC_DELETE_STANDARD_ERROR3);
}
}
List<LawsDomesticStandard> list = lawsDomesticStandardService.list(
new LambdaQueryWrapper<LawsDomesticStandard>()
.select(LawsDomesticStandard::getStandardNumber)
@@ -83,22 +99,6 @@ public class StandardUtil {
if (count > 0) {
throw new JeroBootException(ResultCommon.SCC_DELETE_STANDARD_ERROR2);
}
// 查询标准解读流程
List<ProcessStandardInterpret> list1 = processStandardInterpretService.list(
new LambdaQueryWrapper<ProcessStandardInterpret>()
.in(ProcessStandardInterpret::getStandardId, needDelStandardIdList));
if (CollectionUtils.isNotEmpty(list1)){
List<String> projectIdList = list1.stream()
.map(ProcessStandardInterpret::getProjectId)
.collect(Collectors.toList());
int count1 = processAllService.count(new LambdaQueryWrapper<ProcessAll>()
.in(ProcessAll::getProjectId, projectIdList)
.ne(ProcessAll::getPrcStatus, ProcessStatusEnum.WITHDRAWN.getValue()));
if (count1 > 0) {
throw new JeroBootException(ResultCommon.SCC_DELETE_STANDARD_ERROR3);
}
}
}
}