From cad8d3cdcb6253ef719bb9c85391df7d90d5ac59 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期三, 21 五月 2025 14:44:55 +0800 Subject: [PATCH] 新增公交的接口对接 --- ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/model/UPPlaybackMsgControlAck.java | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 deletions(-) diff --git a/ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/model/UPPlaybackMsgControlAck.java b/ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/model/UPPlaybackMsgControlAck.java index 328065e..93bac1d 100644 --- a/ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/model/UPPlaybackMsgControlAck.java +++ b/ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/model/UPPlaybackMsgControlAck.java @@ -52,13 +52,17 @@ * 解析报文 */ public UPPlaybackMsgControlAck decode(PlaybackMsg playbackMsg) { - byte[] data = playbackMsg.getData(); - ByteBuf byteBuf = Unpooled.wrappedBuffer(data); - this.vehicleNo = playbackMsg.getVehicleNo(); - this.vehicleColor = playbackMsg.getVehicleColor(); - this.dataType = playbackMsg.getDataType(); - this.dataLength = playbackMsg.getDataLength(); - this.result = byteBuf.readByte(); + try { + byte[] data = playbackMsg.getData(); + ByteBuf byteBuf = Unpooled.wrappedBuffer(data); + this.vehicleNo = playbackMsg.getVehicleNo(); + this.vehicleColor = playbackMsg.getVehicleColor(); + this.dataType = playbackMsg.getDataType(); + this.dataLength = playbackMsg.getDataLength(); + this.result = byteBuf.readByte(); + }catch (Exception e){ + e.printStackTrace(); + } return this; } } -- Gitblit v1.7.1