Pu Zhibing
2025-03-24 a88ba6b7606a73086cadb02c6115c3c01ce03f3e
ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/controller/RealVideoMsgController.java
@@ -1,6 +1,8 @@
package com.ruoyi.dataInterchange.controller;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.utils.bean.BeanUtils;
import com.ruoyi.dataInterchange.api.vo.UPRealvideoMsgStartupAckVo;
import com.ruoyi.dataInterchange.dao.UPRealvideoMsgEndAckDao;
import com.ruoyi.dataInterchange.dao.UPRealvideoMsgStartupAckDao;
import com.ruoyi.dataInterchange.model.UPRealvideoMsgEndAck;
@@ -45,7 +47,7 @@
    * @return
    */
   @PostMapping("/startupRealVideo")
   public R<UPRealvideoMsgStartupAck> startupRealVideo(@RequestParam("inferiorPlatformId") Integer inferiorPlatformId, @RequestParam("vehicleNo") String vehicleNo) {
   public R<UPRealvideoMsgStartupAckVo> startupRealVideo(@RequestParam("inferiorPlatformId") Integer inferiorPlatformId, @RequestParam("vehicleNo") String vehicleNo) {
      R realVideo = downRealvideoMsgStartupService.startupRealVideo(inferiorPlatformId, vehicleNo);
      if (realVideo.getCode() != 200) {
         return realVideo;
@@ -64,8 +66,29 @@
            num++;
            continue;
         }
         if (null != realvideoMsgStartupAck || num >= 30) {
            return R.ok(realvideoMsgStartupAck);
         if (null != realvideoMsgStartupAck) {
            int result = realvideoMsgStartupAck.getResult();
            switch (result){
               case 0:
                  UPRealvideoMsgStartupAckVo vo = new UPRealvideoMsgStartupAckVo();
                  BeanUtils.copyProperties(realvideoMsgStartupAck, vo);
                  return R.ok(vo);
               case 1:
                  return R.fail("失败");
               case 2:
                  return R.fail("不支持");
               case 3:
                  return R.fail("会话结束");
               case 4:
                  return R.fail("失效口令错误");
               case 5:
                  return R.fail("不满足跨域条件");
               default:
                  return R.fail("失败");
            }
         }
         if (num >= 30) {
            return R.fail("失败");
         }
      }
   }