From c9f0aedf624f425051cf5d8f6cd95c3ef5640484 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期五, 16 五月 2025 15:21:35 +0800
Subject: [PATCH] 增加《用水户(农户)信息》表格文档

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