Commit e4521a85 authored by hezhuozhi's avatar hezhuozhi

27236 【智慧能源一体化】大屏监控运维数据接口返回添加Key字段

parent 8fda3abf
...@@ -74,6 +74,7 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -74,6 +74,7 @@ public class MonitorServiceImpl implements MonitorService {
for (StationType value : StationType.values()) { for (StationType value : StationType.values()) {
Map<String, Object> map = new LinkedHashMap<>(); Map<String, Object> map = new LinkedHashMap<>();
List<StationCacheInfoDto> dtos = listMap.get(value.getCode()); List<StationCacheInfoDto> dtos = listMap.get(value.getCode());
map.put("key", value.getCode());
map.put("data", dtos == null ? 0 : dtos.size()); map.put("data", dtos == null ? 0 : dtos.size());
map.put("title", dtos == null ? 0 : dtos.stream().filter(obj -> !ObjectUtils.isEmpty(obj.getInstalledCapacity())).mapToDouble(l -> Double.parseDouble(l.getInstalledCapacity())).sum()); map.put("title", dtos == null ? 0 : dtos.stream().filter(obj -> !ObjectUtils.isEmpty(obj.getInstalledCapacity())).mapToDouble(l -> Double.parseDouble(l.getInstalledCapacity())).sum());
map.put("title", keepTwodecimalPlaces(Double.valueOf(map.get("title").toString()))); map.put("title", keepTwodecimalPlaces(Double.valueOf(map.get("title").toString())));
......
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