| | |
| | | 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; |
| | |
| | | * @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; |
| | |
| | | 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("失败"); |
| | | } |
| | | } |
| | | } |