| | |
| | | import com.ruoyi.dataInterchange.api.feignClient.PlaybackMsgClient; |
| | | import com.ruoyi.dataInterchange.api.feignClient.RealVideoMsgClient; |
| | | import com.ruoyi.dataInterchange.api.feignClient.UPExgMsgRealLocationClient; |
| | | import com.ruoyi.dataInterchange.api.vo.GnssDataVo; |
| | | import com.ruoyi.dataInterchange.api.vo.OrderTravelVo; |
| | | import com.ruoyi.dataInterchange.api.vo.UPPlaybackMsgStartupAckVo; |
| | | import com.ruoyi.dataInterchange.api.vo.UPRealvideoMsgStartupAckVo; |
| | |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | |
| | | @Resource |
| | | private ICarTypeService carTypeService; |
| | | |
| | | @Resource |
| | | private RedisTemplate redisTemplate; |
| | | |
| | | |
| | | @GetMapping("/getCarList") |
| | |
| | | return R.ok(carStatusCount); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/getMapCarList") |
| | | @ApiOperation(value = "获取地图司机数据", tags = {"首页"}) |
| | | public R<List<Car>> getMapCarList() { |
| | | List<Car> list = carService.list(); |
| | | for (Car car : list) { |
| | | GnssDataVo gnssDataVo = (GnssDataVo) redisTemplate.opsForValue().get("location:" + car.getVehicleNumber()); |
| | | car.setLongitude(Double.valueOf(gnssDataVo.getLon() / 1000000).toString()); |
| | | car.setLatitude(Double.valueOf(gnssDataVo.getLat() / 1000000).toString()); |
| | | } |
| | | return R.ok(list); |
| | | } |
| | | } |