|
@ -45,22 +45,22 @@ public enum StaticIndexEnum { |
|
|
DF_QX_DJ_LX_SUM("零星", sp -> { |
|
|
DF_QX_DJ_LX_SUM("零星", sp -> { |
|
|
DfCheckingProblemV2Mapper mapper = SpringUtils.getBean(DfCheckingProblemV2Mapper.class); |
|
|
DfCheckingProblemV2Mapper mapper = SpringUtils.getBean(DfCheckingProblemV2Mapper.class); |
|
|
List<CountDateDto> list = mapper.countLevel(sp, PatrolMaintenanceCategory.DJ_LX); |
|
|
List<CountDateDto> list = mapper.countLevel(sp, PatrolMaintenanceCategory.DJ_LX); |
|
|
return levelGroup(list); |
|
|
return dataGroup(list); |
|
|
}, "个", "0"), |
|
|
}, "个", "0"), |
|
|
DF_QX_DJ_YB_SUM("一般", sp -> { |
|
|
DF_QX_DJ_YB_SUM("一般", sp -> { |
|
|
DfCheckingProblemV2Mapper mapper = SpringUtils.getBean(DfCheckingProblemV2Mapper.class); |
|
|
DfCheckingProblemV2Mapper mapper = SpringUtils.getBean(DfCheckingProblemV2Mapper.class); |
|
|
List<CountDateDto> list = mapper.countLevel(sp, PatrolMaintenanceCategory.DJ_YB); |
|
|
List<CountDateDto> list = mapper.countLevel(sp, PatrolMaintenanceCategory.DJ_YB); |
|
|
return levelGroup(list); |
|
|
return dataGroup(list); |
|
|
}, "个", "0"), |
|
|
}, "个", "0"), |
|
|
DF_QX_DJ_JD_SUM("较大", sp -> { |
|
|
DF_QX_DJ_JD_SUM("较大", sp -> { |
|
|
DfCheckingProblemV2Mapper mapper = SpringUtils.getBean(DfCheckingProblemV2Mapper.class); |
|
|
DfCheckingProblemV2Mapper mapper = SpringUtils.getBean(DfCheckingProblemV2Mapper.class); |
|
|
List<CountDateDto> list = mapper.countLevel(sp, PatrolMaintenanceCategory.DJ_JD); |
|
|
List<CountDateDto> list = mapper.countLevel(sp, PatrolMaintenanceCategory.DJ_JD); |
|
|
return levelGroup(list); |
|
|
return dataGroup(list); |
|
|
}, "个", "0"), |
|
|
}, "个", "0"), |
|
|
DF_QX_DJ_ZD_SUM("重大", sp -> { |
|
|
DF_QX_DJ_ZD_SUM("重大", sp -> { |
|
|
DfCheckingProblemV2Mapper mapper = SpringUtils.getBean(DfCheckingProblemV2Mapper.class); |
|
|
DfCheckingProblemV2Mapper mapper = SpringUtils.getBean(DfCheckingProblemV2Mapper.class); |
|
|
List<CountDateDto> list = mapper.countLevel(sp, PatrolMaintenanceCategory.DJ_ZD); |
|
|
List<CountDateDto> list = mapper.countLevel(sp, PatrolMaintenanceCategory.DJ_ZD); |
|
|
return levelGroup(list); |
|
|
return dataGroup(list); |
|
|
}, "个", "0"), |
|
|
}, "个", "0"), |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -127,20 +127,13 @@ public enum StaticIndexEnum { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static Map<String, String> levelGroup(List<CountDateDto> list) { |
|
|
|
|
|
if (CollectionUtil.isEmpty(list) && list.isEmpty()) { |
|
|
|
|
|
return Collections.emptyMap(); |
|
|
|
|
|
} |
|
|
|
|
|
return list.stream() |
|
|
|
|
|
.collect(Collectors.toMap(CountDateDto::getLevel, CountDateDto::getMySum)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static Map<String, String> dataGroup(List<CountDateDto> list) { |
|
|
public static Map<String, String> dataGroup(List<CountDateDto> list) { |
|
|
if (CollectionUtil.isEmpty(list) && list.isEmpty()) { |
|
|
if (CollectionUtil.isEmpty(list) && list.isEmpty()) { |
|
|
return Collections.emptyMap(); |
|
|
return Collections.emptyMap(); |
|
|
} |
|
|
} |
|
|
return list.stream() |
|
|
return list.stream() |
|
|
.collect(Collectors.toMap(CountDateDto::getMyData, CountDateDto::getMySum)); |
|
|
.collect(Collectors.toMap(CountDateDto::getMyDate, CountDateDto::getMySum)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|