From bda423b1aae1d5322116511651ae03a54cdcd231 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期二, 26 十一月 2024 17:25:39 +0800
Subject: [PATCH] 1、几个测试模块系统的log4j.xml配置中的编码修改; 2、RTU升级模拟器增加命令行设置服务端IP和端口功能; 3、应王江海要求,井电双控协议中也实现远程升级功能,因井电双控协议、阀控器协议不同,而双方协议中的升级子协议相同,所以通信中间件做增量开发、适应性修改,以适应这种混合协议情况,同时也提高通信中间件运行效率。
---
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/MonitorSv.java | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/MonitorSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/MonitorSv.java
index a59a207..a85672a 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/MonitorSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/MonitorSv.java
@@ -5,7 +5,6 @@
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;
@@ -81,12 +80,12 @@
BaseResponse res = sendCom2Mw(restTemplate, comSendUrl, com) ;
if(res != null){
if(res.isSuccess()){
- 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) ;
+ 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()));
@@ -119,12 +118,12 @@
BaseResponse res = sendCom2Mw(restTemplate, comSendUrl, com) ;
if(res != null){
if(res.isSuccess()){
- 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) ;
+ 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();
--
Gitblit v1.8.0