|
@@ -975,7 +975,9 @@ public class SysStatisticManager {
|
|
|
// 封装参数
|
|
|
List<Map<String, Object>> collect = depts.stream().map(dept -> {
|
|
|
Map<String, Object> map = new HashMap<>(3);
|
|
|
+ // 服务商名称
|
|
|
map.put("deptName", dept.getName());
|
|
|
+ // 服务商ID
|
|
|
map.put("deptId", dept.getDeptId());
|
|
|
|
|
|
// 获取当前企业当季度的包
|
|
@@ -983,6 +985,7 @@ public class SysStatisticManager {
|
|
|
|
|
|
int total = 0;
|
|
|
int supTotal = 0;
|
|
|
+ int passedScoreTotal = 0;
|
|
|
int passedTotal = 0;
|
|
|
int rejectTotal = 0;
|
|
|
|
|
@@ -1004,6 +1007,10 @@ public class SysStatisticManager {
|
|
|
|
|
|
if (CollUtil.isNotEmpty(supervisions)) {
|
|
|
|
|
|
+ List<Integer> collect2 = supervisions.stream().mapToInt(WmTaskSupervision::getTaskId).boxed().distinct().sorted().collect(Collectors.toList());
|
|
|
+
|
|
|
+ passedScoreTotal = taskService.listByIds(collect2).stream().mapToInt(WmTask::getScore).sum();
|
|
|
+
|
|
|
Map<Boolean, List<WmTaskSupervision>> collect1 = supervisions.stream().collect(Collectors.partitioningBy(WmTaskSupervision::getSupervisionResult));
|
|
|
|
|
|
passedTotal = CollUtil.isEmpty(collect1.get(Boolean.TRUE)) ? 0 : collect1.get(Boolean.TRUE).size();
|
|
@@ -1012,11 +1019,18 @@ public class SysStatisticManager {
|
|
|
}
|
|
|
|
|
|
|
|
|
- Map<String, Integer> stat = new HashMap<>(4);
|
|
|
+ Map<String, Integer> stat = new HashMap<>(5);
|
|
|
+ // 抽查总数
|
|
|
stat.put("supTotal", supTotal);
|
|
|
+ // 任务总数
|
|
|
stat.put("total", total);
|
|
|
+ // 抽查分值
|
|
|
+ stat.put("passedScoreTotal", passedScoreTotal);
|
|
|
+ // 抽查通过数
|
|
|
stat.put("passedTotal", passedTotal);
|
|
|
+ // 抽查预警率
|
|
|
stat.put("rejectTotal", rejectTotal);
|
|
|
+ // 统计信息
|
|
|
map.put("taskSupStat", stat);
|
|
|
|
|
|
return map;
|