From 77d2e1f1456d51ab8d1201102a724b1a7ecb8ae7 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期三, 24 七月 2024 10:44:40 +0800
Subject: [PATCH] 1、完善quarz的任务工厂类; 2、完善DateTime类; 3、application-global.yml中增加统计任务启动时刻; 4、通信中间件加入对阀开工作报处理间隔控制; 5、统计子模块中自动统计逻辑继续实现。
---
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/util/ByteUtil.java | 31 ++++++++++++++++++++++++++++---
1 files changed, 28 insertions(+), 3 deletions(-)
diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/util/ByteUtil.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/util/ByteUtil.java
index d0f7034..6819327 100644
--- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/util/ByteUtil.java
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/util/ByteUtil.java
@@ -511,9 +511,9 @@
for (int i = 0; i < 4; i++) {
bs[from + i] = Integer.valueOf(value & 0xff).byteValue();// 灏嗘渶浣庝綅淇濆瓨鍦ㄤ綆瀛楄妭
value = value >> 8; // 鍚戝彸绉�8浣�
- if(value == 0){
- break ;
- }
+ if(value == 0){
+ break ;
+ }
}
} else {
throw new Exception("int2Bytes鏃舵暟缁勮秺鐣�");
@@ -1210,6 +1210,31 @@
}
/**
+ * 灏忕妯″紡銆婃暟鎹綆浣嶅湪鏁扮粍浣庡瓧鑺傘��
+ * 鏁村舰杞垚BCD缂栫爜锛屽瓧鑺傞『搴忔槸鍊掔殑
+ * @param i
+ * @param bs
+ * @param from
+ * @return 杩斿洖
+ */
+ public static void int2BCD_LE(int i, byte[] bs, int from)throws Exception {
+ String str = "" + i;
+ byte[] b = null;
+ if (str.length() % 2 == 0) {
+ b = new byte[str.length() / 2];
+ } else {
+ b = new byte[(str.length() / 2) + 1];
+ }
+ encodeBCD_LE(str, b, 0, b.length);
+
+ int len = bs.length ;
+ int bLen = b.length ;
+ for(int j = 0; (j < len && j < bLen); j++){
+ bs[from + j] = b[j] ;
+ }
+ }
+
+ /**
* 澶х妯″紡銆婃暟鎹綆浣嶅湪鏁扮粍楂樺瓧鑺傘��
* 闀挎暣褰㈣浆鎴怋CD缂栫爜
* @param l
--
Gitblit v1.8.0