puzhibing
2025-05-26 312f26c49124f355e9f78c6ddd69f71895aa73fc
ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/server/DOWNPlaybackMsgStartupService.java
@@ -15,8 +15,6 @@
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
/**
 * @author zhibing.pu
@@ -40,7 +38,7 @@
    * @param vehicleNo
    * @return
    */
   public R playbackMsgStartup(Integer inferiorPlatformId, String vehicleNo, LocalDateTime startTime, LocalDateTime endTime) {
   public R<String> playbackMsgStartup(Integer inferiorPlatformId, String vehicleNo, Long startTime, Long endTime) {
      Channel channel = ChannelMap.getClientChannel(inferiorPlatformId);
      if (!channel.isActive()) {
         return R.fail("失败");
@@ -60,14 +58,14 @@
      downPlaybackMsgStartup.setAvttemType(0X00);
      downPlaybackMsgStartup.setStreamType(0);
      downPlaybackMsgStartup.setMemType(0);
      downPlaybackMsgStartup.setPlaybackStartTime(startTime.toEpochSecond(ZoneOffset.ofHours(8)));
      downPlaybackMsgStartup.setPlaybackEndTime(endTime.toEpochSecond(ZoneOffset.ofHours(8)));
      downPlaybackMsgStartup.setPlaybackStartTime(startTime);
      downPlaybackMsgStartup.setPlaybackEndTime(endTime);
      downPlaybackMsgStartup.setAuthorizeCode(authorizeMsgStartup.getAuthorizeCode1());
      downPlaybackMsgStartup.setGnssData("");
      byte[] body = downPlaybackMsgStartup.encode();
      OuterPacket out = new OuterPacket(DataType.DOWN_PLAYBACK_MSG.getCode(), body);
      OuterPacket out = new OuterPacket(DataType.DOWN_PLAYBACK_MSG.getCode(), inferiorPlatformId, body);
      channel.writeAndFlush(out);
      log.info("远程录像回放请求({}):{}", DataType.DOWN_PLAYBACK_MSG_STARTUP.getCode(), JSON.toJSONString(downPlaybackMsgStartup));
      return R.ok();
      return R.ok(authorizeMsgStartup.getAuthorizeCode1());
   }
}