[1078] 修复分包合并,优化设备列表排序,优化设备上线逻辑

This commit is contained in:
lin
2025-07-15 16:30:34 +08:00
parent e28141da6e
commit be04660de8
10 changed files with 52 additions and 146 deletions

View File

@@ -1,6 +1,7 @@
package com.genersoft.iot.vmp.jt1078.bean;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufUtil;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@@ -37,10 +38,9 @@ public class JTMediaEventInfo {
jtMediaEventInfo.setCode(buf.readUnsignedByte());
jtMediaEventInfo.setEventCode(buf.readUnsignedByte());
jtMediaEventInfo.setChannelId(buf.readUnsignedByte());
if (buf.readableBytes() > 0) {
if (buf.readableBytes() > 28) {
ByteBuf byteBuf = buf.readSlice(28);
jtMediaEventInfo.setPositionBaseInfo(JTPositionBaseInfo.decode(byteBuf));
byte[] bytes = new byte[buf.readableBytes()];
buf.readBytes(bytes);
jtMediaEventInfo.setMediaData(bytes);