[1078] 增加立即拍摄

This commit is contained in:
lin
2025-07-25 15:37:03 +08:00
parent ee52b43c99
commit 43ef080f55
12 changed files with 506 additions and 134 deletions

View File

@@ -33,8 +33,16 @@ public class JTQueryMediaDataCommand {
byteBuf.writeByte(type);
byteBuf.writeByte(chanelId);
byteBuf.writeByte(event);
byteBuf.writeBytes(BCDUtil.strToBcd(DateUtil.yyyy_MM_dd_HH_mm_ssTo1078(startTime)));
byteBuf.writeBytes(BCDUtil.strToBcd(DateUtil.yyyy_MM_dd_HH_mm_ssTo1078(endTime)));
if (startTime == null) {
byteBuf.writeBytes(BCDUtil.strToBcd("000000000000"));
}else {
byteBuf.writeBytes(BCDUtil.strToBcd(DateUtil.yyyy_MM_dd_HH_mm_ssTo1078(startTime)));
}
if (endTime == null) {
byteBuf.writeBytes(BCDUtil.strToBcd("000000000000"));
}else {
byteBuf.writeBytes(BCDUtil.strToBcd(DateUtil.yyyy_MM_dd_HH_mm_ssTo1078(endTime)));
}
if (delete != null) {
byteBuf.writeByte(delete);
}

View File

@@ -23,7 +23,7 @@ public class Jt808Encoder extends MessageToByteEncoder<Rs> {
protected void encode(ChannelHandlerContext ctx, Rs msg, ByteBuf out) throws Exception {
Session session = ctx.channel().attr(Session.KEY).get();
List<ByteBuf> encodeList = Jt808EncoderCmd.encode(msg, session, session.nextSerialNo());
List<ByteBuf> encodeList = Jt808EncoderCmd.encode(msg, session, session.nextSerialNo());
if(encodeList!=null && !encodeList.isEmpty()){
for (ByteBuf byteBuf : encodeList) {
log.debug("< {} hex:{}", session, ByteBufUtil.hexDump(byteBuf));

View File

@@ -812,8 +812,8 @@ public class jt1078ServiceImpl implements Ijt1078Service {
J8805 j8805 = new J8805();
j8805.setMediaId(mediaId);
j8805.setDelete(1);
log.info("[JT-单条存储多媒体数据上传] 请求上传图片,媒体编号: {} 设备编号: {}", mediaId, phoneNumber);
JTMediaEventInfo mediaEventInfo = (JTMediaEventInfo)jt1078Template.uploadMediaDataForSingle(phoneNumber, j8805, 300);
log.info("[JT-单条存储多媒体数据上传] 请求上传,媒体编号: {} 设备编号: {}", mediaId, phoneNumber);
JTMediaEventInfo mediaEventInfo = (JTMediaEventInfo)jt1078Template.uploadMediaDataForSingle(phoneNumber, j8805, 600);
if (mediaEventInfo == null) {
throw new ControllerException(ErrorCode.ERROR100.getCode(), ErrorCode.ERROR100.getMsg());
}