|
@@ -76,6 +76,7 @@ import java.util.Map;
|
|
|
import java.util.Objects;
|
|
|
import java.util.Set;
|
|
|
import java.util.function.Function;
|
|
|
+import java.util.stream.Collector;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
@@ -1259,6 +1260,7 @@ public class WmSupervisionManager {
|
|
|
// 营销中心财务部监督员
|
|
|
int optFinaSupTotal = 0;
|
|
|
|
|
|
+ Set<Integer> todos = new HashSet<>();
|
|
|
// 获取c端包统计信息
|
|
|
if (CollUtil.isNotEmpty(pkgs)) {
|
|
|
|
|
@@ -1400,6 +1402,7 @@ public class WmSupervisionManager {
|
|
|
|
|
|
Map<UpmsState.TaskSupervisionState, Set<Integer>> collect1 =
|
|
|
supervisions.stream()
|
|
|
+ .filter(sup -> !sup.getModifiable())
|
|
|
.collect(
|
|
|
Collectors.groupingBy(
|
|
|
WmTaskSupervision::getSupervisionState,
|
|
@@ -1415,9 +1418,9 @@ public class WmSupervisionManager {
|
|
|
Set<Integer> ckt2 =
|
|
|
collect1.getOrDefault(
|
|
|
UpmsState.TaskSupervisionState.CKT2, Collections.emptySet());
|
|
|
- Set<Integer> passed =
|
|
|
- collect1.getOrDefault(
|
|
|
- UpmsState.TaskSupervisionState.PASSED, Collections.emptySet());
|
|
|
+ // Set<Integer> passed =
|
|
|
+ // collect1.getOrDefault(
|
|
|
+ // UpmsState.TaskSupervisionState.PASSED, Collections.emptySet());
|
|
|
// Set<Integer> rejected =
|
|
|
// collect1.getOrDefault(UpmsState.TaskSupervisionState.REJECTED,
|
|
|
// Collections.emptySet());
|
|
@@ -1427,17 +1430,20 @@ public class WmSupervisionManager {
|
|
|
|
|
|
supTotal1 = advices.size();
|
|
|
total1 = init.size() + supTotal1;
|
|
|
+ todos = init;
|
|
|
}
|
|
|
// 分管领导
|
|
|
else if (CollUtil.containsAny(roles, List.of(51, 54, 55, 61))) {
|
|
|
|
|
|
supTotal1 = advices.size();
|
|
|
total1 = ckt1.size() + supTotal1;
|
|
|
+ todos = ckt1;
|
|
|
}
|
|
|
// 事业部总经理
|
|
|
else if (CollUtil.containsAny(roles, List.of(39))) {
|
|
|
supTotal1 = advices.size();
|
|
|
total1 = ckt2.size() + supTotal1;
|
|
|
+ todos = ckt2;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1451,13 +1457,18 @@ public class WmSupervisionManager {
|
|
|
stat.put("optLawSupTotal", optLawSupTotal);
|
|
|
stat.put("optFinaSupTotal", optFinaSupTotal);
|
|
|
map.put("taskSupStat", stat);
|
|
|
- map.put("toCheck", supTotal1 != total1);
|
|
|
+ map.put("toCheck", todos.size() > 0);
|
|
|
map.put("checked", supTotal1 != 0);
|
|
|
|
|
|
return map;
|
|
|
})
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
+ // show actionable only
|
|
|
+ if(query.getSupervision()) {
|
|
|
+ collect = collect.stream().filter((record) -> (Boolean)record.get("toCheck"))
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ }
|
|
|
page.setRecords(collect);
|
|
|
page.setTotal(deptPage.getTotal());
|
|
|
return page;
|