Commit ca4fca05 authored by tianyiming's avatar tianyiming

12371

parent 35f93cf4
...@@ -330,7 +330,7 @@ public class SupervisionConfigureController extends AbstractBaseController { ...@@ -330,7 +330,7 @@ public class SupervisionConfigureController extends AbstractBaseController {
long nowDateTime = new Date().getTime();//当前时间戳 long nowDateTime = new Date().getTime();//当前时间戳
Map<String, String> stateMap = fireFightingSystemMapper.queryPressureNowStateBySpecificId((Long) item.get("id")); Map<String, String> stateMap = fireFightingSystemMapper.queryPressureNowStateBySpecificId((Long) item.get("id"));
ids.add((Long) item.get("id")); ids.add((Long) item.get("id"));
boolean time = false; boolean time = true;
if (!ObjectUtils.isEmpty(stateMap) && stateMap.containsKey("update_date") && stateMap.containsKey("equipment_index_name")) { if (!ObjectUtils.isEmpty(stateMap) && stateMap.containsKey("update_date") && stateMap.containsKey("equipment_index_name")) {
item.put("update_time", String.valueOf(stateMap.get("update_date")).replaceAll("T", " ")); item.put("update_time", String.valueOf(stateMap.get("update_date")).replaceAll("T", " "));
if (!ObjectUtils.isEmpty(stateMap.get("value"))) { if (!ObjectUtils.isEmpty(stateMap.get("value"))) {
...@@ -347,13 +347,13 @@ public class SupervisionConfigureController extends AbstractBaseController { ...@@ -347,13 +347,13 @@ public class SupervisionConfigureController extends AbstractBaseController {
} }
long res = nowDateTime - update_time; long res = nowDateTime - update_time;
long diffMinute = res / 1000 / 60; long diffMinute = res / 1000 / 60;
if (diffMinute <= 5) { if (diffMinute > 5) {
time = true; time = false;
} }
item.put("upTime", diffMinute); item.put("upTime", diffMinute);
} }
} }
item.put("stateDesc", Integer.parseInt(String.valueOf(item.get("isAlarm"))) == 0 || time ? "正常" : "异常"); item.put("stateDesc", Integer.parseInt(String.valueOf(item.get("isAlarm"))) == 0 && time ? "正常" : "异常");
return item; return item;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
List<Map<String, Object>> stateMap = fireFightingSystemMapper.queryStartAndStopBySpecificId(ids); List<Map<String, Object>> stateMap = fireFightingSystemMapper.queryStartAndStopBySpecificId(ids);
......
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