From 0c870ae5b2af348e19b10cc1a99f103f95c5a1cc Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期六, 21 六月 2025 11:47:09 +0800
Subject: [PATCH] 1、通信中间件重构MQTT相关下行命令的逻辑; 2、remote模块完善MQTT相关下行命令解除报警、搅拌启停、注肥启停、灌溉启停功能类;

---
 pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/Cd_87_Up.java |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 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 de6d0ea..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
@@ -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