From 4ad32c37e3317fb6cb7cbfb034b53d3220c27db4 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期五, 30 五月 2025 17:59:16 +0800
Subject: [PATCH] 优化报警

---
 ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/model/DOWNExgMsgReportDriverInfo.java |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/model/DOWNExgMsgReportDriverInfo.java b/ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/model/DOWNExgMsgReportDriverInfo.java
index 00a683e..4afadea 100644
--- a/ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/model/DOWNExgMsgReportDriverInfo.java
+++ b/ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/model/DOWNExgMsgReportDriverInfo.java
@@ -5,6 +5,8 @@
 import io.netty.buffer.Unpooled;
 import lombok.Data;
 
+import java.io.UnsupportedEncodingException;
+
 /**
  * 上报驾驶员身份信息请求
  *
@@ -36,7 +38,12 @@
 	 */
 	public byte[] encode() {
 		ByteBuf byteBuf = Unpooled.buffer(28);
-		byte[] bytes1 = this.getVehicleNo().getBytes();
+		byte[] bytes1 = new byte[0];
+		try {
+			bytes1 = this.getVehicleNo().getBytes("GBK");
+		} catch (UnsupportedEncodingException e) {
+			throw new RuntimeException(e);
+		}
 		for (int i = 0; i < 21; i++) {
 			if (i < bytes1.length) {
 				byteBuf.writeByte(bytes1[i]);

--
Gitblit v1.7.1