liurunyu
2024-10-23 1bae77546205c892b48b9b1e84319108f440207a
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/MonitorSv.java
@@ -77,15 +77,15 @@
            Command com = this.createInnerCommand(CodeLocal.onLinePart);
            com.setParam(rtuAddrs) ;
            String comSendUrl = this.getToMwUrl(this.env) ;
            BaseResponse<Command> res = sendCom2Mw(restTemplate, comSendUrl, com) ;
            BaseResponse res = sendCom2Mw(restTemplate, comSendUrl, com) ;
            if(res != null){
                if(res.isSuccess()){
                    Command reCom = res.getContent() ;
                    CommandBackParam bakParam = JSON.parseObject(((JSONObject)reCom.param).toJSONString(), CommandBackParam.class) ;
                    Command reCom = JSON.parseObject(res.getContent() == null ? null : JSON.toJSONString(res.getContent()), Command.class) ;
                    CommandBackParam bakParam = JSON.parseObject((reCom== null || reCom.param == null) ? null : JSON.toJSONString(reCom.param), CommandBackParam.class) ;
                    if(bakParam != null){
                        if(bakParam.getSuccess().booleanValue()){
                            //通信中间件成功返回命令结果
                            HashMap<String, Boolean> onLineMap = JSON.parseObject(((JSONObject)reCom.getAttachment()).toJSONString(), HashMap.class);
                            HashMap<String, Boolean> onLineMap = JSON.parseObject(JSON.toJSONString(reCom.getAttachment()), HashMap.class);
                            for(VoOnLineIntake rVo : rsVo.obj){
                                if(onLineMap.containsKey(rVo.getRtuAddr())) {
                                    rVo.setIsOnLine(onLineMap.get(rVo.getRtuAddr()));
@@ -115,15 +115,15 @@
        //向通信中间件发关命令,查询部分RTU在线情况
        Command com = this.createInnerCommand(CodeLocal.onLineAll);
        String comSendUrl = this.getToMwUrl(this.env) ;
        BaseResponse<Command> res = sendCom2Mw(restTemplate, comSendUrl, com) ;
        BaseResponse res = sendCom2Mw(restTemplate, comSendUrl, com) ;
        if(res != null){
            if(res.isSuccess()){
                Command reCom = res.getContent() ;
                CommandBackParam bakParam = JSON.parseObject(((JSONObject)reCom.param).toJSONString(), CommandBackParam.class) ;
                Command reCom = JSON.parseObject(res.getContent() == null ? null : JSON.toJSONString(res.getContent()), Command.class) ;
                CommandBackParam bakParam = JSON.parseObject((reCom== null || reCom.param == null) ? null : JSON.toJSONString(reCom.param), CommandBackParam.class) ;
                if(bakParam != null){
                    if(bakParam.getSuccess().booleanValue()){
                        //通信中间件成功返回命令结果
                        HashMap<String, Boolean> onLineMap = JSON.parseObject(((JSONObject)reCom.getAttachment()).toJSONString(), HashMap.class);
                        HashMap<String, Boolean> onLineMap = JSON.parseObject(JSON.toJSONString(reCom.getAttachment()), HashMap.class);
                        JSONArray jsonArray = new JSONArray();
                        for (Map.Entry<String, Boolean> entry : onLineMap.entrySet()) {
                            JSONObject jsonObject = new JSONObject();