puzhibing
3 天以前 4ad32c37e3317fb6cb7cbfb034b53d3220c27db4
ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/model/UPExgMsgHistoryLocation.java
@@ -56,18 +56,22 @@
    * 解析报文
    */
   public UPExgMsgHistoryLocation 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.gnssCnt = byteBuf.readByte();
      List<GnssData> gnssData = new ArrayList<>();
      for (int i = 0; i < this.gnssCnt; i++) {
         gnssData.add(new GnssData().decode(byteBuf));
      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.gnssCnt = byteBuf.readByte();
         List<GnssData> gnssData = new ArrayList<>();
         for (int i = 0; i < this.gnssCnt; i++) {
            gnssData.add(new GnssData().decode(byteBuf));
         }
         this.gnssData = gnssData;
      }catch (Exception e){
         e.printStackTrace();
      }
      this.gnssData = gnssData;
      return this;
   }
}