|
|
@@ -268,7 +268,7 @@ public class AppCockpitServiceImpl implements AppCockpitService {
|
|
|
predicate3.test(Arrays.asList("5"), "UPS维护", null);
|
|
|
predicate3.test(Arrays.asList("6"), "夜间值守", null);
|
|
|
predicate3.test(Arrays.asList("7"), "离行巡检", null);
|
|
|
- predicate3.test(Arrays.asList("8"), "其它", null);
|
|
|
+ predicate3.test(Arrays.asList("8"), "其它履职", null);
|
|
|
return vo;
|
|
|
}
|
|
|
|
|
|
@@ -279,7 +279,39 @@ public class AppCockpitServiceImpl implements AppCockpitService {
|
|
|
|
|
|
@Override
|
|
|
public AppSyntheticSafetycheckVo syntheticSafetyCheck(Date month) {
|
|
|
- return new AppSyntheticSafetycheckVo();
|
|
|
+ SysOrg org = getLoginOrg();
|
|
|
+ DateRange range = DateUtils.getStartAndEnd(month, CycleCommonEnum.MONTHLY);
|
|
|
+ List<AppSyntheticTaskCategoryDto> taskCategoryDtos = appCockpitMapper.selectSyntheticResumption(org.getPath(), range.getStartTime(), range.getEndTime());
|
|
|
+
|
|
|
+ AppSyntheticSafetycheckVo vo = new AppSyntheticSafetycheckVo();
|
|
|
+ vo.setTaskInfoByType(new HashMap<>());
|
|
|
+ vo.setRateByType(new HashMap<>());
|
|
|
+
|
|
|
+ Predicate3<List<String>, String, String> predicate3 = (List<String> types, String label, String no) -> {
|
|
|
+ List<AppSyntheticTaskCategoryDto> used = taskCategoryDtos.stream().filter(d -> types.contains(d.getPlanType())).collect(Collectors.toList());
|
|
|
+ int total = used.stream().mapToInt(AppSyntheticTaskCategoryDto::getTotal).sum();
|
|
|
+ int completed = used.stream().mapToInt(AppSyntheticTaskCategoryDto::getCompleted).sum();
|
|
|
+ Float rate = computeRate(total, completed);
|
|
|
+
|
|
|
+ vo.getRateByType().put(label, rate);
|
|
|
+ vo.getTaskInfoByType().put(label, AppSyntheticSafetycheckTaskVo.builder()
|
|
|
+ .questionCount(completed)
|
|
|
+ .shouldCheckCount(total)
|
|
|
+ .checkedCount(completed)
|
|
|
+ .completedRate(rate)
|
|
|
+ .build());
|
|
|
+
|
|
|
+ return true;
|
|
|
+ };
|
|
|
+
|
|
|
+ predicate3.test(Arrays.asList("3"),"网点自查",null);
|
|
|
+ predicate3.test(Arrays.asList("4"),"全面检查",null);
|
|
|
+ predicate3.test(Arrays.asList("2"),"办事处检查",null);
|
|
|
+ predicate3.test(Arrays.asList("1"),"省联社检查",null);
|
|
|
+ predicate3.test(Arrays.asList("5"),"阶段性检查",null);
|
|
|
+ predicate3.test(Arrays.asList("6"),"专项检查",null);
|
|
|
+ predicate3.test(Arrays.asList("7"),"其它检查",null);
|
|
|
+ return vo;
|
|
|
}
|
|
|
|
|
|
@Override
|