Commit 10eb3466 authored by tianyiming's avatar tianyiming

四横八纵本月稳压泵启停次数统计bug修改

parent b7d61f76
......@@ -57,6 +57,9 @@ public class SupervisionConfigureController extends AbstractBaseController {
@Value("${equipment.pressurepump.start}")
private String pressurePumpStart;
@Value("${equipment.pressurepump.stop}")
private String pressurePumpStop;
@PersonIdentify
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "监盘概览水源信息")
......@@ -515,7 +518,7 @@ public class SupervisionConfigureController extends AbstractBaseController {
map.put("name", pressurePump.get("name"));
String json1 = JSON.toJSONString(mounthEntity.getResult());
List<Map<String, String>> list = (List<Map<String, String>>) JSONArray.parse(json1);
List<Map<String, String>> collect = list.stream().filter(t -> (t.containsKey("time") && t.get("time").substring(0, 10).equals(item.get("date")))).collect(Collectors.toList());
List<Map<String, String>> collect = list.stream().filter(t -> (t.containsKey("time") && t.get("time").substring(0, 10).equals(item.get("date")))&&((t.containsKey(pressurePumpStart) && t.get(pressurePumpStart).equals("true")) || (t.containsKey(pressurePumpStop) && t.get(pressurePumpStop).equals("true")))).collect(Collectors.toList());
map.put("value", collect.size());
map.put("id", pressurePump.get("id"));
if (item.containsKey("yData")) {
......
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