ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/OrderController.java
@@ -23,6 +23,7 @@ import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.apache.poi.ss.usermodel.Workbook; import org.springframework.beans.factory.annotation.Value; import org.springframework.data.redis.core.RedisTemplate; @@ -50,6 +51,7 @@ * @author zhibing.pu * @Date 2025/3/24 17:50 */ @Slf4j @RestController @RequestMapping("/order") public class OrderController { @@ -182,7 +184,7 @@ public R<RealVideoResp> getOrderMonitoring(Integer id) { Order order = orderService.getById(id); if (null == order) { return R.fail("失败"); return R.fail("获取视频失败"); } Car car = carService.getById(order.getCarId()); //手动加一次状态数据,避免定时任务结束任务线程 @@ -206,7 +208,8 @@ resp.setServerPort(flvHttpPort); return R.ok(resp); } return R.fail(startupAckVoR.getMsg()); log.error("获取视频失败:{}", startupAckVoR.getMsg()); return R.fail("获取视频失败"); } ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CarServiceImpl.java
@@ -153,6 +153,7 @@ updateWrapper.set(Car::getDownlineTime, LocalDateTime.now()); } updateWrapper.set(Car::getStatus, 3); updateWrapper.eq(Car::getId, car.getId()); this.update(updateWrapper); } else { String dateTime = gnssDataVo.getDate() + " " + gnssDataVo.getTime(); @@ -163,6 +164,7 @@ updateWrapper.set(Car::getDownlineTime, LocalDateTime.now()); } updateWrapper.set(Car::getStatus, 3); updateWrapper.eq(Car::getId, car.getId()); this.update(updateWrapper); } else { if (car.getStatus() != 1) { @@ -170,6 +172,7 @@ updateWrapper.set(Car::getOnlineTime, LocalDateTime.now()); } updateWrapper.set(Car::getStatus, 1); updateWrapper.eq(Car::getId, car.getId()); this.update(updateWrapper); } } ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/WarnServiceImpl.java
@@ -86,7 +86,7 @@ warn.setEndTime(LocalDateTime.ofInstant(Instant.ofEpochMilli(vo.getCreateTime() * 1000), ZoneOffset.ofHours(8)).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); warn.setWarnType(WarnType.getWarnTypeName(vo.getWarnType())); warn.setWarnNumber(1); warn.setSpeed(new BigDecimal(vo.getSpeed())); warn.setSpeed(null == vo.getSpeed() ? BigDecimal.ZERO : new BigDecimal(vo.getSpeed())); warn.setLongitude(new BigDecimal(vo.getLongitude()).divide(new BigDecimal(1000000)).toString()); warn.setLatitude(new BigDecimal(vo.getLatitude()).divide(new BigDecimal(1000000)).toString()); Map<String, String> geocode = null; ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/controller/UPWarnMsgAdptInfoController.java
@@ -82,8 +82,11 @@ @PostMapping("/findByInfoId") public R<UPWarnMsgAdptInfoVo> findByInfoId(@RequestParam("infoId") Integer infoId) { UPWarnMsgAdptInfo warnMsgAdptInfo = upWarnMsgAdptInfoDao.findByInfoIdIs(infoId); UPWarnMsgAdptInfoVo vo = new UPWarnMsgAdptInfoVo(); BeanUtils.copyProperties(warnMsgAdptInfo, vo); return R.ok(vo); if(null != warnMsgAdptInfo){ UPWarnMsgAdptInfoVo vo = new UPWarnMsgAdptInfoVo(); BeanUtils.copyProperties(warnMsgAdptInfo, vo); return R.ok(vo); } return R.ok(); } }