From dd15f7f00e9eda3b15bd956ff830ccbe78752a4f Mon Sep 17 00:00:00 2001
From: wuzeyu <1223318623@qq.com>
Date: 星期一, 20 五月 2024 17:11:07 +0800
Subject: [PATCH] 田间灌溉项目管理 项目模块 解决分页问题、增加创建时间字段、解决地址ID不一致问题 灌溉单元模块 创建Ctrl SV mapper 实体类
---
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/CommonV1_0_1.java | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/CommonV1_0_1.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/CommonV1_0_1.java
index a80528a..30df01f 100644
--- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/CommonV1_0_1.java
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/CommonV1_0_1.java
@@ -81,8 +81,8 @@
*/
public String parseRtuAddr(byte[] bs)throws Exception{
String rtuAddrBCD = "" + ByteUtil.BCD2Long_BE(bs, ProtocolConstantV206V1_0_0.rtuAddr1Index_start, ProtocolConstantV206V1_0_0.rtuAddr1Index_end) ;
- String rtuAddrStr = "" + ByteUtilUnsigned.bytes2Short_BE(bs, ProtocolConstantV206V1_0_0.rtuAddr2Index_start) ;
- while(rtuAddrStr.length() < 4){
+ String rtuAddrStr = "" + ByteUtilUnsigned.bytes2Short_LE(bs, ProtocolConstantV206V1_0_0.rtuAddr2Index_start) ;
+ while(rtuAddrStr.length() < 5){
rtuAddrStr = "0" + rtuAddrStr ;
}
return rtuAddrBCD + rtuAddrStr ;
@@ -97,9 +97,9 @@
* @throws Exception 寮傚父
*/
public String parseRtuAddr(byte[] bs, int index)throws Exception{
- String rtuAddrBCD = "" + ByteUtil.BCD2Long_BE(bs, index, index + 2) ;
- String rtuAddrStr = "" + ByteUtilUnsigned.bytes2Short_BE(bs, index + 3) ;
- while(rtuAddrStr.length() < 4){
+ String rtuAddrBCD = "" + ByteUtil.BCD2Long_BE(bs, index, index + 2) ;//鍦板潃鏄ぇ绔ā寮�
+ String rtuAddrStr = "" + ByteUtilUnsigned.bytes2Short_LE(bs, index + 3) ;
+ while(rtuAddrStr.length() < 5){
rtuAddrStr = "0" + rtuAddrStr ;
}
return rtuAddrBCD + rtuAddrStr ;
--
Gitblit v1.8.0