Commit 81f6b425 authored by zhangsen's avatar zhangsen

稳压泵bug

parent 1c72033d
...@@ -115,13 +115,14 @@ public class BigScreenController extends AbstractBaseController { ...@@ -115,13 +115,14 @@ public class BigScreenController extends AbstractBaseController {
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
if (200 == entity1.getStatus() && !ObjectUtils.isEmpty(entity1.getResult()) && if (200 == entity1.getStatus() && 200 == entity2.getStatus()) {
200 == entity2.getStatus() && !ObjectUtils.isEmpty(entity2.getResult())) {
String json1 = JSON.toJSONString(entity1.getResult()); String json1 = JSON.toJSONString(entity1.getResult());
List<Map<String, String>> listObject1 = (List<Map<String, String>>) JSONArray.parse(json1); List<Map<String, String>> listObject1 = (List<Map<String, String>>) JSONArray.parse(json1);
String json2 = JSON.toJSONString(entity1.getResult()); String json2 = JSON.toJSONString(entity2.getResult());
List<Map<String, String>> listObject2 = (List<Map<String, String>>) JSONArray.parse(json2); List<Map<String, String>> listObject2 = (List<Map<String, String>>) JSONArray.parse(json2);
int num = listObject1.size() + listObject2.size(); listObject1.addAll(listObject2);
List<Map<String, String>> collect = listObject1.stream().filter(t -> (t.containsKey("FHS_PressurePump_Start") && t.get("FHS_PressurePump_Start").equals("true")) || (t.containsKey("FHS_PressurePump_Stop") && t.get("FHS_PressurePump_Stop").equals("true"))).collect(Collectors.toList());
int num = collect.size();
item.put("startAndStopNum", num); item.put("startAndStopNum", num);
} }
item.put("stateDesc", (Integer) item.get("startAndStopNum") <= 1 && Integer.parseInt(String.valueOf(item.get("isAlarm"))) == 0 ? "1" : "0"); item.put("stateDesc", (Integer) item.get("startAndStopNum") <= 1 && Integer.parseInt(String.valueOf(item.get("isAlarm"))) == 0 ? "1" : "0");
......
...@@ -254,13 +254,14 @@ public class ConfigureController extends AbstractBaseController { ...@@ -254,13 +254,14 @@ public class ConfigureController extends AbstractBaseController {
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
if (200 == entity1.getStatus() && !ObjectUtils.isEmpty(entity1.getResult()) && if (200 == entity1.getStatus() && 200 == entity2.getStatus()) {
200 == entity2.getStatus() && !ObjectUtils.isEmpty(entity2.getResult())) {
String json1 = JSON.toJSONString(entity1.getResult()); String json1 = JSON.toJSONString(entity1.getResult());
List<Map<String, String>> listObject1 = (List<Map<String, String>>) JSONArray.parse(json1); List<Map<String, String>> listObject1 = (List<Map<String, String>>) JSONArray.parse(json1);
String json2 = JSON.toJSONString(entity1.getResult()); String json2 = JSON.toJSONString(entity2.getResult());
List<Map<String, String>> listObject2 = (List<Map<String, String>>) JSONArray.parse(json2); List<Map<String, String>> listObject2 = (List<Map<String, String>>) JSONArray.parse(json2);
int num = listObject1.size() + listObject2.size(); listObject1.addAll(listObject2);
List<Map<String, String>> collect = listObject1.stream().filter(t -> (t.containsKey("FHS_PressurePump_Start") && t.get("FHS_PressurePump_Start").equals("true")) || (t.containsKey("FHS_PressurePump_Stop") && t.get("FHS_PressurePump_Stop").equals("true"))).collect(Collectors.toList());
int num = collect.size();
item.put("startAndStopNum", num); item.put("startAndStopNum", num);
} }
item.put("stateDesc", (Integer) item.get("startAndStopNum") <= 1 && Integer.parseInt(String.valueOf(item.get("isAlarm"))) == 0 ? "正常" : "异常"); item.put("stateDesc", (Integer) item.get("startAndStopNum") <= 1 && Integer.parseInt(String.valueOf(item.get("isAlarm"))) == 0 ? "正常" : "异常");
...@@ -313,13 +314,14 @@ public class ConfigureController extends AbstractBaseController { ...@@ -313,13 +314,14 @@ public class ConfigureController extends AbstractBaseController {
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
if (200 == entity1.getStatus() && !ObjectUtils.isEmpty(entity1.getResult()) && if (200 == entity1.getStatus() && 200 == entity2.getStatus()) {
200 == entity2.getStatus() && !ObjectUtils.isEmpty(entity2.getResult())) {
String json1 = JSON.toJSONString(entity1.getResult()); String json1 = JSON.toJSONString(entity1.getResult());
List<Map<String, String>> listObject1 = (List<Map<String, String>>) JSONArray.parse(json1); List<Map<String, String>> listObject1 = (List<Map<String, String>>) JSONArray.parse(json1);
String json2 = JSON.toJSONString(entity1.getResult()); String json2 = JSON.toJSONString(entity2.getResult());
List<Map<String, String>> listObject2 = (List<Map<String, String>>) JSONArray.parse(json2); List<Map<String, String>> listObject2 = (List<Map<String, String>>) JSONArray.parse(json2);
int num = listObject1.size() + listObject2.size(); listObject1.addAll(listObject2);
List<Map<String, String>> collect = listObject1.stream().filter(t -> (t.containsKey("FHS_PressurePump_Start") && t.get("FHS_PressurePump_Start").equals("true")) || (t.containsKey("FHS_PressurePump_Stop") && t.get("FHS_PressurePump_Stop").equals("true"))).collect(Collectors.toList());
int num = collect.size();
item.put("startAndStopNum", num); item.put("startAndStopNum", num);
} }
item.put("stateDesc", (Integer) item.get("startAndStopNum") <= 1 && Integer.parseInt(String.valueOf(item.get("isAlarm"))) == 0 ? "正常" : "异常"); item.put("stateDesc", (Integer) item.get("startAndStopNum") <= 1 && Integer.parseInt(String.valueOf(item.get("isAlarm"))) == 0 ? "正常" : "异常");
......
...@@ -2651,6 +2651,7 @@ ...@@ -2651,6 +2651,7 @@
wl_equipment_specific_index i wl_equipment_specific_index i
WHERE WHERE
i.equipment_specific_id = #{id,jdbcType=VARCHAR} i.equipment_specific_id = #{id,jdbcType=VARCHAR}
AND i.equipment_index_key in ('FHS_PressurePump_Start', 'FHS_PressurePump_Stop')
ORDER BY ORDER BY
i.update_date DESC i.update_date DESC
LIMIT 1 LIMIT 1
......
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