|  |  |  | 
|---|
|  |  |  | import com.alibaba.fastjson2.JSONObject; | 
|---|
|  |  |  | import com.dy.common.mw.protocol.Command; | 
|---|
|  |  |  | import com.dy.common.mw.protocol.CommandBackParam; | 
|---|
|  |  |  | import com.dy.common.mw.protocol.p206V1_0_0.downVos.Com99Vo; | 
|---|
|  |  |  | import com.dy.common.webUtil.BaseResponse; | 
|---|
|  |  |  | import com.dy.common.webUtil.QueryResultVo; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.daoPr.PrIntakeMapper; | 
|---|
|  |  |  | 
|---|
|  |  |  | 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 : ((JSONObject)res.getContent()).toJSONString(), Command.class) ; | 
|---|
|  |  |  | CommandBackParam bakParam = JSON.parseObject((reCom== null || reCom.param == null) ? null : ((JSONObject)reCom.param).toJSONString(), CommandBackParam.class) ; | 
|---|
|  |  |  | if(bakParam != null){ | 
|---|
|  |  |  | if(bakParam.getSuccess().booleanValue()){ | 
|---|
|  |  |  | //通信中间件成功返回命令结果 | 
|---|
|  |  |  | 
|---|
|  |  |  | //向通信中间件发关命令,查询部分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 : ((JSONObject)res.getContent()).toJSONString(), Command.class) ; | 
|---|
|  |  |  | CommandBackParam bakParam = JSON.parseObject((reCom== null || reCom.param == null) ? null : ((JSONObject)reCom.param).toJSONString(), CommandBackParam.class) ; | 
|---|
|  |  |  | if(bakParam != null){ | 
|---|
|  |  |  | if(bakParam.getSuccess().booleanValue()){ | 
|---|
|  |  |  | //通信中间件成功返回命令结果 | 
|---|