From cb7ca191bf7dfe5db4dc30f1576f8c5362761154 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期四, 16 五月 2024 18:38:02 +0800
Subject: [PATCH] 修改bug,协议中报警及状态是4个字节,程序实现中当2个字节

---
 pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/Cd_65_Up.java |   31 ++++++++-----------------------
 1 files changed, 8 insertions(+), 23 deletions(-)

diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/Cd_65_Up.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/Cd_65_Up.java
index 1f5f933..5b65103 100644
--- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/Cd_65_Up.java
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/Cd_65_Up.java
@@ -4,7 +4,6 @@
 import com.dy.common.mw.protocol.*;
 import com.dy.common.mw.protocol.p206V202404.*;
 import com.dy.common.mw.protocol.p206V202404.parse.global.GlParse;
-import com.dy.common.mw.protocol.p206V202404.upVos.DataCd5BVo;
 import com.dy.common.mw.protocol.p206V202404.upVos.DataCd65Vo;
 import com.dy.common.util.ByteUtil;
 import org.apache.logging.log4j.LogManager;
@@ -97,42 +96,28 @@
             cdData.icCardNo  = GlParse.parseIcCardNo(bs, index, 6, 2) ;
 
             index += 8 ;
-            int moneyRemain = ByteUtil.BCD2Int_BE(bs, index, index + 4) ;
+            Long moneyRemain = ByteUtil.BCD2Long_LE(bs, index, index + 4) ;
             cdData.moneyRemain = moneyRemain/100.0D;
 
             index += 5 ;
-            int waterRemain = ByteUtil.BCD2Int_BE(bs, index, index + 4) ;
+            Long waterRemain = ByteUtil.BCD2Long_LE(bs, index, index + 4) ;
             cdData.waterRemain = waterRemain/100.0D;
 
             index += 5 ;
-            int thisEle = ByteUtil.BCD2Int_BE(bs, index, index + 3) ;
+            int thisEle = ByteUtil.BCD2Int_LE(bs, index, index + 3) ;
             cdData.thisEle = thisEle/100.0D;
 
             index += 4 ;
-            int thisWater = ByteUtil.BCD2Int_BE(bs, index, index + 3) ;
+            int thisWater = ByteUtil.BCD2Int_LE(bs, index, index + 3) ;
             cdData.thisWater = thisWater/100.0D;
 
             index += 4 ;
-            String mm = ByteUtil.BCD2String_BE(bs, index, index) ;
-            index++ ;
-            String HH = ByteUtil.BCD2String_BE(bs, index, index) ;
-            index++ ;
-            String dd = ByteUtil.BCD2String_BE(bs, index, index) ;
-            index++ ;
-            String MM = ByteUtil.BCD2String_BE(bs, index, index) ;
-            cdData.rtuStartDt = MM + "-" + dd + " " + HH + ":" + mm ;
+            cdData.rtuStartDt = GlParse.parseRtuDt(bs, index) ;
 
-            index++ ;
-            mm = ByteUtil.BCD2String_BE(bs, index, index) ;
-            index++ ;
-            HH = ByteUtil.BCD2String_BE(bs, index, index) ;
-            index++ ;
-            dd = ByteUtil.BCD2String_BE(bs, index, index) ;
-            index++ ;
-            MM = ByteUtil.BCD2String_BE(bs, index, index) ;
-            cdData.rtuEndDt = MM + "-" + dd + " " + HH + ":" + mm ;
+            index += 6 ;
+            cdData.rtuEndDt = GlParse.parseRtuDt(bs, index) ;
 
-            index++ ;
+            index += 6 ;
             cdData.useWaterType = bs[index];
 
             return cdData ;

--
Gitblit v1.8.0