|
@@ -813,8 +813,28 @@ public class IotStaticController {
|
|
fillData.add(v);
|
|
fillData.add(v);
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ iotDeviceRunLogPageReqVO.setPointName("累计注水量");
|
|
|
|
+ List<IotDeviceRunLogRespVO> waterDOs = iotDeviceRunLogMapper.selectListByCreateTimeAndDeptList(iotDeviceRunLogPageReqVO);
|
|
|
|
+ List<Map<String, Object>> waters = waterDOs
|
|
|
|
+ .stream().map(e -> {
|
|
|
|
+ Map<String, Object> abc = new HashMap<>();
|
|
|
|
+ abc.put("id", e.getId());
|
|
|
|
+ abc.put("createTime", e.getCreateTime());
|
|
|
|
+ abc.put("total", e.getTotalRunTime());
|
|
|
|
+ abc.put("today", e.getFillContent());
|
|
|
|
+ return abc;
|
|
|
|
+ }).collect(Collectors.toList());
|
|
|
|
+ LinkedHashMap<String, Long> waterMap = sumTotalByDate(waters, 7,"total");
|
|
|
|
+ LinkedList<Object> waterXAxis = new LinkedList<>();
|
|
|
|
+ LinkedList<Object> waterData = new LinkedList<>();
|
|
|
|
+ waterMap.forEach( (k,v)->{
|
|
|
|
+ waterXAxis.add(k);
|
|
|
|
+ waterData.add(v);
|
|
|
|
+ });
|
|
|
|
+
|
|
ImmutableMap<String, Serializable> fillResult = ImmutableMap.of("name", "累计注气量", "data", fillData);
|
|
ImmutableMap<String, Serializable> fillResult = ImmutableMap.of("name", "累计注气量", "data", fillData);
|
|
- return success(ImmutableMap.of("xAxis", xAxis, "series", ImmutableList.of(fillResult)));
|
|
|
|
|
|
+ ImmutableMap<String, Serializable> waterResult = ImmutableMap.of("name", "累计注水量", "data", waterData);
|
|
|
|
+ return success(ImmutableMap.of("xAxis", xAxis, "series", ImmutableList.of(fillResult,waterResult)));
|
|
|
|
|
|
}
|
|
}
|
|
@GetMapping("/rh/zql/today/{dept}")
|
|
@GetMapping("/rh/zql/today/{dept}")
|
|
@@ -849,8 +869,26 @@ public class IotStaticController {
|
|
fillData.add(v);
|
|
fillData.add(v);
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ iotDeviceRunLogPageReqVO.setPointName("当日注水量");
|
|
|
|
+ List<Map<String, Object>> waters = iotDeviceRunLogMapper.selectListByCreateTimeAndDeptList(iotDeviceRunLogPageReqVO).stream().map(e -> {
|
|
|
|
+ Map<String, Object> abc = new HashMap<>();
|
|
|
|
+ abc.put("id", e.getId());
|
|
|
|
+ abc.put("createTime", e.getCreateTime());
|
|
|
|
+ abc.put("total", e.getTotalRunTime());
|
|
|
|
+ abc.put("today", e.getFillContent());
|
|
|
|
+ return abc;
|
|
|
|
+ }).collect(Collectors.toList());
|
|
|
|
+ LinkedHashMap<String, Long> waterMap = sumTotalByDate(waters, 7,"today");
|
|
|
|
+ LinkedList<Object> waterxAxis = new LinkedList<>();
|
|
|
|
+ LinkedList<Object> waterData = new LinkedList<>();
|
|
|
|
+ waterMap.forEach( (k,v)->{
|
|
|
|
+ waterxAxis.add(k);
|
|
|
|
+ waterData.add(v);
|
|
|
|
+ });
|
|
|
|
+
|
|
ImmutableMap<String, Serializable> fillResult = ImmutableMap.of("name", "当日注气量", "data", fillData);
|
|
ImmutableMap<String, Serializable> fillResult = ImmutableMap.of("name", "当日注气量", "data", fillData);
|
|
- return success(ImmutableMap.of("xAxis", xAxis, "series", ImmutableList.of(fillResult)));
|
|
|
|
|
|
+ ImmutableMap<String, Serializable> waterResult = ImmutableMap.of("name", "当日注水量", "data", waterData);
|
|
|
|
+ return success(ImmutableMap.of("xAxis", xAxis, "series", ImmutableList.of(fillResult, waterResult)));
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|