Browse Source

fix: 修复退回单位无法参与会签的问题

master
wxc 4 months ago
parent
commit
2bdea52bd6
  1. 2
      src/main/java/com/biutag/supervision/flow/action/ApplyCountersignAction.java

2
src/main/java/com/biutag/supervision/flow/action/ApplyCountersignAction.java

@ -82,7 +82,7 @@ public class ApplyCountersignAction implements Action {
Set<String> departIds = applyCountersignData.getCountersignDeparts().stream()
.map(ApplyCountersignData.CountersignDepart::getId)
.collect(Collectors.toSet());
List<NegativeWork> filterWorks = works.stream().filter(item -> !FlowNodeEnum.COUNTERSIGN.getKey().equals(item.getFlowKey()) && departIds.contains(item.getDepartId())).toList();
List<NegativeWork> filterWorks = works.stream().filter(item -> !FlowNodeEnum.COUNTERSIGN.getKey().equals(item.getFlowKey()) && departIds.contains(item.getDepartId()) && WorkStatusEnum.todo.name().equals(work.getStatus())).toList();
if (!filterWorks.isEmpty()) {
throw new RuntimeException(String.format("办理单位【%s】不能参与会签", filterWorks.stream().map(NegativeWork::getDepartName).collect(Collectors.joining("、"))));
}

Loading…
Cancel
Save