From 4c391aa12cdb8e32d194cfc70096c6a5dea72893 Mon Sep 17 00:00:00 2001
From: wuzeyu <1223318623@qq.com>
Date: 星期五, 13 九月 2024 09:26:54 +0800
Subject: [PATCH] 优化代码 指定时间段内用水量超过指定值的农户 指定时间段内消费金额超过指定值的农户 指定时间段内用水时长超过指定值的农户
---
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/Cd_38_Down.java | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/Cd_38_Down.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/Cd_38_Down.java
index 3f18c40..672ae4f 100644
--- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/Cd_38_Down.java
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/parse/Cd_38_Down.java
@@ -95,7 +95,14 @@
byte[] bs = new byte[10];
Double remainMoneyAlarmDb = cvo.remainMoneyAlarm * 100.0;
Integer remainMoneyAlarmInt = remainMoneyAlarmDb.intValue();
- ByteUtilUnsigned.short2Bytes_LE(bs, remainMoneyAlarmInt.shortValue(), index);
+ byte[] bb = ByteUtil.int2BCD_LE(remainMoneyAlarmInt) ;
+ if(bb.length == 1){
+ bs[0] = bb[0] ;
+ }else if(bb.length == 2){
+ bs[0] = bb[0] ;
+ bs[1] = bb[1] ;
+ }
+ //ByteUtilUnsigned.short2Bytes_LE(bs, remainMoneyAlarmInt.shortValue(), index);
index += 2;
GlCreate.createPw(bs, index);
index += 2;
--
Gitblit v1.8.0