|
|
|
|
@ -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("、")))); |
|
|
|
|
} |
|
|
|
|
|