From 8b6c03b3f14f1e140c2ab694f1e2a3bbc123d7f4 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期六, 13 八月 2022 16:32:32 +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..2cbb610 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]});
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