wuzeyu
2024-10-24 830295f3693ac5c916a0f50a38d23918843005aa
优化代码 取水口分页查询
1个文件已修改
15 ■■■■■ 已修改文件
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeSv.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeSv.java
@@ -144,14 +144,17 @@
        if (response != null && response.getString("code").equals("0001")) {
            JSONObject attachment = response.getJSONObject("content").getJSONObject("attachment").getJSONObject("onLineMap");
            HashMap<String, Boolean> onLineMap = JSON.parseObject(attachment.toJSONString(), HashMap.class);
            JSONArray jsonArray = new JSONArray();
            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);
            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);
                }
            }
            queryVo.setOnLineMap(jsonArray.toJSONString());