From 1ca78d9eebf459a417ea1339d0bcfd32837b517d Mon Sep 17 00:00:00 2001
From: 野心家 <1051256694@qq.com>
Date: 星期二, 31 十月 2023 15:02:47 +0800
Subject: [PATCH] 移库优化
---
src/main/java/com/zy/core/netty/domain/fire/Fire_3030.java | 20 +++++++++++++++++---
1 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/src/main/java/com/zy/core/netty/domain/fire/Fire_3030.java b/src/main/java/com/zy/core/netty/domain/fire/Fire_3030.java
index 0c9a03e..14d48c6 100644
--- a/src/main/java/com/zy/core/netty/domain/fire/Fire_3030.java
+++ b/src/main/java/com/zy/core/netty/domain/fire/Fire_3030.java
@@ -5,8 +5,7 @@
import io.netty.buffer.ByteBufAllocator;
import io.netty.buffer.ByteBufUtil;
import lombok.Data;
-
-import java.nio.charset.StandardCharsets;
+import org.springframework.cache.annotation.SpringCacheAnnotationParser;
/**
* 蹇冭烦 pac
@@ -16,7 +15,20 @@
@Data
public class Fire_3030 implements IMessageBody {
+ /**
+ * 鏈哄櫒鍙�
+ */
private Integer no;
+
+ /**
+ * 鍥炶矾
+ */
+ private Integer loop;
+
+ /**
+ * 閮ㄤ綅鍙�
+ */
+ private Integer partNo;
private Integer year;
@@ -59,6 +71,8 @@
// byteBuf.release();
// System.out.println(byteBuf.refCnt());
this.no = analyze(new byte[]{bytes[3], bytes[4]});
+ this.loop = analyze(new byte[]{bytes[5], bytes[6]});
+ this.partNo = analyze(new byte[]{bytes[7], bytes[8]}); //0100201 瀵瑰簲 30 31 0200201 瀵瑰簲 34 35
this.year = analyze(new byte[]{bytes[11], bytes[12]});
this.month = analyze(new byte[]{bytes[13], bytes[14]});
this.day = analyze(new byte[]{bytes[15], bytes[16]});
@@ -70,7 +84,7 @@
}
public static Integer analyze(byte[] bytes) {
- return Integer.parseInt(new String(bytes, StandardCharsets.US_ASCII), 16);
+ return Integer.parseInt(Integer.toString(bytes[0] & 0x0F, 16) + Integer.toString(bytes[1] & 0x0F, 16), 16);
}
}
--
Gitblit v1.9.1