| | |
| | | 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.GnssDataVo; |
| | | import com.ruoyi.dataInterchange.api.vo.OrderTravelVo; |
| | | import com.ruoyi.dataInterchange.dao.UPExgMsgRealLocationDao; |
| | | import com.ruoyi.dataInterchange.model.GnssData; |
| | |
| | | |
| | | /** |
| | | * 获取订单行程轨迹 |
| | | * |
| | | * @param vehicleNo |
| | | * @param start |
| | | * @param end |
| | |
| | | */ |
| | | @PostMapping("/getOrderTravel") |
| | | public R<List<OrderTravelVo>> getOrderTravel(@RequestParam("vehicleNo") String vehicleNo, @RequestParam("start") Long start, |
| | | @RequestParam("end") Long end){ |
| | | @RequestParam("end") Long end) { |
| | | List<UPExgMsgRealLocation> list = upExgMsgRealLocationDao.findByVehicleNoAndCreateTimeBetween(vehicleNo, start, end); |
| | | List<OrderTravelVo> orderTravelVos = new ArrayList<>(); |
| | | for (UPExgMsgRealLocation upExgMsgRealLocation : list) { |
| | |
| | | return R.ok(orderTravelVos); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取司机的最新行驶速度 |
| | | * |
| | | * @param vehicleNo |
| | | * @return |
| | | */ |
| | | @PostMapping("/getVehicleSpeed") |
| | | public R<GnssDataVo> getVehicleSpeed(@RequestParam("vehicleNo") String vehicleNo) { |
| | | UPExgMsgRealLocation upExgMsgRealLocation = upExgMsgRealLocationDao.findByVehicleNoOrderByCreateTimeDesc(vehicleNo); |
| | | if (null == upExgMsgRealLocation) { |
| | | return R.ok(); |
| | | } |
| | | GnssData gnssData = upExgMsgRealLocation.getGnssData(); |
| | | GnssDataVo vo = new GnssDataVo(); |
| | | BeanUtils.copyProperties(gnssData, vo); |
| | | return R.ok(vo); |
| | | } |
| | | |
| | | } |