From 3878bfa207d6dd0a8a84177a437ec3b3a9a6825d Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期五, 27 六月 2025 14:30:41 +0800
Subject: [PATCH] remote模块远程开关阀逻辑修改
---
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/Cd_87_Up.java | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/Cd_87_Up.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/Cd_87_Up.java
index 5759e11..9111656 100644
--- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/Cd_87_Up.java
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/Cd_87_Up.java
@@ -42,7 +42,7 @@
midRs.reportOrResponse_trueOrFalse = false ;
- callback.callback(midRs.reportOrResponse_trueOrFalse);
+ callback.callback(midRs.reportOrResponse_trueOrFalse, para.data.subData==null?null:((DataV202404)(para.data.subData)).subData);
return new MidResult[]{midRs} ;
}
/**
@@ -54,9 +54,9 @@
* @throws Exception 寮傚父
*/
protected void doParse(byte[] bs, int bsLen, String dataCode, Data data) throws Exception {
- DataV202404 dV1 = (DataV202404)data.getSubData() ;
+ DataV202404 dV202404 = (DataV202404)data.getSubData() ;
DataCd87Vo cdData = new DataCd87Vo(CodeV202404.getCodeName(dataCode)) ;
- dV1.subData = cdData ;
+ dV202404.subData = cdData ;
int index = ProtocolConstantV206V202404.dataIndex ;
cdData.controllerType = ByteUtil.bytes2Hex(bs, false, index, 1) ;
@@ -73,10 +73,17 @@
short portLen = ByteUtilUnsigned.byte2Byte(bs, index) ;
index++ ;
- cdData.domain = ByteUtil.bytes2String_BE(bs, index, index + domainLen - 1) ;
-
+ if(domainLen > 0){
+ cdData.domain = ByteUtil.bytes2String_BE(bs, index, index + domainLen - 1) ;
+ }else{
+ cdData.domain = "" ;
+ }
index += domainLen ;
- cdData.port = Integer.parseInt(ByteUtil.bytes2String_BE(bs, index, index + portLen - 1)) ;
+ if(portLen > 0){
+ cdData.port = Integer.parseInt(ByteUtil.bytes2String_BE(bs, index, index + portLen - 1)) ;
+ }else{
+ cdData.port = 0 ;
+ }
}
}
--
Gitblit v1.8.0