From a05b419384e148fc950c77553816a2d05144f4ae Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期四, 19 六月 2025 19:36:22 +0800 Subject: [PATCH] 修改生产环境配置 --- ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/model/UPExgMsgRegister.java | 38 +++++++++++++++++++++----------------- 1 files changed, 21 insertions(+), 17 deletions(-) diff --git a/ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/model/UPExgMsgRegister.java b/ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/model/UPExgMsgRegister.java index 81e07f7..fb0cf23 100644 --- a/ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/model/UPExgMsgRegister.java +++ b/ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/model/UPExgMsgRegister.java @@ -69,23 +69,27 @@ * 解析报文 */ public UPExgMsgRegister decode(UPExgMsg exgMsg) { - byte[] data = exgMsg.getData(); - ByteBuf byteBuf = Unpooled.wrappedBuffer(data); - this.vehicleNo = exgMsg.getVehicleNo(); - this.vehicleColor = exgMsg.getVehicleColor(); - this.dataType = exgMsg.getDataType(); - this.dataLength = exgMsg.getDataLength(); - - //平台唯一编码 - this.platformId = Jtt809Util.readGBKString(byteBuf, 11); - //车载终端厂商唯一编码 - this.producerId = Jtt809Util.readGBKString(byteBuf, 11); - //车载终端型号 - this.terminalModelType = Jtt809Util.readGBKString(byteBuf, 8); - //车载终端编号 - this.terminalId = Jtt809Util.readGBKString(byteBuf, 7); - //车载终端SIM卡电话号码 - this.terminalSIMCode = Jtt809Util.readGBKString(byteBuf, 12); + try { + byte[] data = exgMsg.getData(); + ByteBuf byteBuf = Unpooled.wrappedBuffer(data); + this.vehicleNo = exgMsg.getVehicleNo(); + this.vehicleColor = exgMsg.getVehicleColor(); + this.dataType = exgMsg.getDataType(); + this.dataLength = exgMsg.getDataLength(); + + //平台唯一编码 + this.platformId = Jtt809Util.readGBKString(byteBuf, 11); + //车载终端厂商唯一编码 + this.producerId = Jtt809Util.readGBKString(byteBuf, 11); + //车载终端型号 + this.terminalModelType = Jtt809Util.readGBKString(byteBuf, 8); + //车载终端编号 + this.terminalId = Jtt809Util.readGBKString(byteBuf, 7); + //车载终端SIM卡电话号码 + this.terminalSIMCode = Jtt809Util.readGBKString(byteBuf, 12); + }catch (Exception e){ + e.printStackTrace(); + } return this; } } -- Gitblit v1.7.1