From d3a1050004b7ba0a2f29655ab7f5d298c9a3f251 Mon Sep 17 00:00:00 2001 From: zhubaomin <zhubaomin> Date: 星期二, 29 十月 2024 15:45:45 +0800 Subject: [PATCH] 2024-10-29 优化获取一页取水口接口 --- pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/common/CommandSv.java | 27 +-------------------------- 1 files changed, 1 insertions(+), 26 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/common/CommandSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/common/CommandSv.java index dd734a3..9cbb39f 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/common/CommandSv.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/common/CommandSv.java @@ -122,18 +122,10 @@ JSONObject response = (JSONObject) JSON.toJSON(sendCom2Mw(com)); if(response != null && response.getString("code").equals("0001")) { - //JSONObject attachment = response.getJSONObject("content").getJSONObject("attachment").getJSONObject("onLineMap"); JSONObject attachment = response.getJSONObject("content").getJSONObject("attachment"); JSONArray jsonArray = new JSONArray(); if(attachment != null) { - //HashMap<String, Boolean> onLineMap = JSON.parseObject(attachment.toJSONString(), HashMap.class); - //for (Map.Entry<String, Boolean> entry : onLineMap.entrySet()) { - // JSONObject jsonObject = new JSONObject(); - // jsonObject.put("rtuAddr", entry.getKey()); - // jsonObject.put("isOnLine", entry.getValue()); - // jsonArray.add(jsonObject); - //} attachment.forEach((key, value) -> { JSONObject jsonObject = new JSONObject(); jsonObject.put("rtuAddr", key); @@ -198,18 +190,10 @@ JSONObject response = (JSONObject) JSON.toJSON(sendCom2Mw(com)); if(response != null && response.getString("code").equals("0001")) { - //JSONObject attachment = response.getJSONObject("content").getJSONObject("attachment").getJSONObject("onLineMap"); JSONObject attachment = response.getJSONObject("content").getJSONObject("attachment"); JSONArray jsonArray = new JSONArray(); if(attachment != null) { - //HashMap<String, Boolean> onLineMap = JSON.parseObject(attachment.toJSONString(), HashMap.class); - //for (Map.Entry<String, Boolean> entry : onLineMap.entrySet()) { - // JSONObject jsonObject = new JSONObject(); - // jsonObject.put("rtuAddr", entry.getKey()); - // jsonObject.put("isOnLine", entry.getValue()); - // jsonArray.add(jsonObject); - //} attachment.forEach((key, value) -> { JSONObject jsonObject = new JSONObject(); jsonObject.put("rtuAddr", key); @@ -244,16 +228,7 @@ */ public QueryResultVo<List<VoCommand>> getCommandHistories(QoCommand query) { // 瀹屽杽鏌ヨ璧锋鏃堕棿 - String timeStart = query.getTimeStart(); - String timeStop = query.getTimeStop(); - if(timeStart != null) { - timeStart = timeStart + " 00:00:00"; - query.setTimeStart(timeStart); - } - if(timeStop != null) { - timeStop = timeStop + " 23:59:59"; - query.setTimeStop(timeStop); - } + query.completionTime(); Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(query); -- Gitblit v1.8.0