Commit dca8f51e authored by Lambertliu's avatar Lambertliu

fix(jg):设备列表bug修改

parent cc294fb8
...@@ -685,8 +685,8 @@ public class ZLDPStatisticsServiceImpl { ...@@ -685,8 +685,8 @@ public class ZLDPStatisticsServiceImpl {
public Map<String, Object> getEquipManagementRateStatistics(DPFilterParamForDetailDto paramDto) { public Map<String, Object> getEquipManagementRateStatistics(DPFilterParamForDetailDto paramDto) {
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>();
List<Map<String, Object>> legendData = new ArrayList<>(); List<Map<String, Object>> legendData = new ArrayList<>();
legendData.add(createLegend("设备总数", "equipTotal", "bar")); legendData.add(createLegend("设备总数", "equipTotal", "bar", "个"));
legendData.add(createLegend("纳管率", "claimRate", "line")); legendData.add(createLegend("纳管率", "claimRate", "line", "%"));
List<RegionModel> regionList = stCommonService.setRegionIfRootParentAndNoAccessIf3Level("610000"); List<RegionModel> regionList = stCommonService.setRegionIfRootParentAndNoAccessIf3Level("610000");
// 获取区域名称并过滤 // 获取区域名称并过滤
...@@ -698,7 +698,6 @@ public class ZLDPStatisticsServiceImpl { ...@@ -698,7 +698,6 @@ public class ZLDPStatisticsServiceImpl {
List<CountDto> yData = getYDataForQZ(regionList, paramDto); List<CountDto> yData = getYDataForQZ(regionList, paramDto);
result.put("legendData", legendData); result.put("legendData", legendData);
result.put("xdata", xData); result.put("xdata", xData);
result.put("unit", "%");
result.put("equipTotal", yData.stream().map(CountDto::getLongValue).collect(Collectors.toList())); result.put("equipTotal", yData.stream().map(CountDto::getLongValue).collect(Collectors.toList()));
result.put("claimRate", yData.stream().map(CountDto::getStrValue).collect(Collectors.toList())); result.put("claimRate", yData.stream().map(CountDto::getStrValue).collect(Collectors.toList()));
return result; return result;
...@@ -747,11 +746,12 @@ public class ZLDPStatisticsServiceImpl { ...@@ -747,11 +746,12 @@ public class ZLDPStatisticsServiceImpl {
} }
} }
private Map<String, Object> createLegend(String value, String dataKey, String chartType) { private Map<String, Object> createLegend(String value, String dataKey, String chartType, String unit) {
return new HashMap<String, Object>() {{ return new HashMap<String, Object>() {{
put("value", value); put("value", value);
put("dataKey", dataKey); put("dataKey", dataKey);
put("chartType", chartType); put("chartType", chartType);
put("unit", unit);
}}; }};
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment