From a88ba6b7606a73086cadb02c6115c3c01ce03f3e Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期一, 24 三月 2025 20:00:51 +0800 Subject: [PATCH] 开发管理后台车辆管理模块部分接口和订单模块部分接口 --- ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/model/DOWNExgMsgReportDriverInfo.java | 10 +++++++--- 1 files changed, 7 insertions(+), 3 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 9430488..00a683e 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 @@ -37,11 +37,15 @@ public byte[] encode() { ByteBuf byteBuf = Unpooled.buffer(28); byte[] bytes1 = this.getVehicleNo().getBytes(); - for (byte b : bytes1) { - byteBuf.writeByte(b); + for (int i = 0; i < 21; i++) { + if (i < bytes1.length) { + byteBuf.writeByte(bytes1[i]); + } else { + byteBuf.writeByte(0x00); + } } byteBuf.writeByte(this.getVehicleColor()); - byteBuf.writeByte(this.getDataType()); + byteBuf.writeShort(this.getDataType()); byteBuf.writeInt(this.getDataLength()); byte[] bytes = ByteBufUtil.getBytes(byteBuf); byteBuf.release(); -- Gitblit v1.7.1