fix: 外标删除报错

This commit is contained in:
2024-08-08 11:36:51 +08:00
parent 232e786c2b
commit d8b397733e
2 changed files with 7 additions and 1 deletions
@@ -1129,6 +1129,9 @@ public class ProcessStandardComplianceCheckServiceImpl extends ServiceImpl<Proce
List<ProcessStandardComplianceCheck> list = list();
List<ProcessStandardComplianceCheck> collect =
list.stream().filter(e -> StrUtil.isNotBlank(e.getStandardId())).collect(Collectors.toList());
if (collect.isEmpty()) {
return new ArrayList<>();
}
// 去流程主表判断对应的流程是否已经结束
List<String> prcIdList = collect.stream().map(ProcessStandardComplianceCheck::getProcessInstanceId)
.collect(Collectors.toList());
@@ -1137,6 +1140,9 @@ public class ProcessStandardComplianceCheckServiceImpl extends ServiceImpl<Proce
wrapper.eq(ProcessAll::getPrcStatus, FinishFlagEnum.INCOMPLETE.getValue());
// 未完成的流程
List<ProcessAll> incompleteList = paService.list(wrapper);
if (incompleteList.isEmpty()) {
return new ArrayList<>();
}
List<String> incompletePrcIdList = incompleteList.stream().map(ProcessAll::getProcessInstanceId).collect(Collectors.toList());
// 筛选出未完成的流程对应的标准id
return collect.stream().filter(e -> incompletePrcIdList.contains(e.getProcessInstanceId()))
@@ -68,7 +68,7 @@
UNION ALL
SELECT id, standard_number, standard_name, release_date, standard_state, '3' AS source, create_time,
SELECT id, standard_number, standard_name, release_date, standard_state as es_standard_state, '3' AS source, create_time,
null as new_product_impl_date, null as new_auth_impl_date, create_by, null as responsible_user
FROM laws_enterprise_standard
WHERE del_flag = 0) standard