From 2b2a90e952c2c59642c41d8af5759ceb51b9e099 Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期一, 13 五月 2024 16:19:14 +0800 Subject: [PATCH] 根据王江海修改完善的协议(20240510),进行协议实现完善。 --- pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/Cd_15_Down.java | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/Cd_15_Down.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/Cd_15_Down.java index 51818e1..647a77f 100644 --- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/Cd_15_Down.java +++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/Cd_15_Down.java @@ -62,7 +62,7 @@ if(cvo.flowNo.length() != 12){ throw new Exception("娴佹按鍙峰繀椤绘槸12浣嶆暟瀛�") ; } - byte[] bs = new byte[34] ; + byte[] bs = new byte[40] ; int index = 0 ; bs[index] = (byte)(Integer.parseInt(cvo.controllerType, 16)); @@ -96,9 +96,9 @@ bs[index++] = 0 ; } } - if(cvo.chargeMoney != null){ - String chargeMoney = "" + (Double.valueOf(cvo.chargeWater * 100)).longValue() ; - byte[] bTemp = ByteUtil.string2BCD_LE(chargeMoney) ; + if(cvo.chargeWater != null){ + String chargeWater = "" + (Double.valueOf(cvo.chargeWater * 100)).longValue() ; + byte[] bTemp = ByteUtil.string2BCD_LE(chargeWater) ; int bTempLen = bTemp.length ; int count = 0 ; for(int i = 0 ; i < bTempLen; i++){ @@ -120,6 +120,9 @@ ByteUtil.string2BCD_BE(bs, cvo.flowNo, index) ; index += 6 ; + GlCreate.createDt(bs, index); + + index += 6 ; GlCreate.createPw(bs, index); index += 2 ; -- Gitblit v1.8.0