| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.bean.BeanUtils; |
| | | import com.ruoyi.dataInterchange.api.vo.UPExgMsgRegisterVo; |
| | | import com.ruoyi.dataInterchange.dao.UPExgMsgRealLocationDao; |
| | | import com.ruoyi.dataInterchange.dao.UPExgMsgRegisterDao; |
| | | import com.ruoyi.dataInterchange.model.GnssData; |
| | | import com.ruoyi.dataInterchange.model.UPExgMsgRealLocation; |
| | | import com.ruoyi.dataInterchange.model.UPExgMsgRegister; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | @Resource |
| | | private UPExgMsgRegisterDao upExgMsgRegisterDao; |
| | | |
| | | @Resource |
| | | private UPExgMsgRealLocationDao upExgMsgRealLocationDao; |
| | | |
| | | |
| | | /** |
| | | * 查询添加时间大于等于给定时间的车辆基础数据 |
| | |
| | | UPExgMsgRegister register = iterator.next(); |
| | | UPExgMsgRegisterVo vo = new UPExgMsgRegisterVo(); |
| | | BeanUtils.copyProperties(register, vo); |
| | | UPExgMsgRealLocation realLocation = upExgMsgRealLocationDao.findByVehicleNoOrderByCreateTimeDesc(register.getVehicleNo()); |
| | | if (null != realLocation) { |
| | | GnssData gnssData = realLocation.getGnssData(); |
| | | vo.setLongitude(Double.valueOf(gnssData.getLon() / 1000000).toString()); |
| | | vo.setLatitude(Double.valueOf(gnssData.getLat() / 1000000).toString()); |
| | | } |
| | | voList.add(vo); |
| | | } |
| | | |
| | |
| | | for (UPExgMsgRegister register : list) { |
| | | UPExgMsgRegisterVo vo = new UPExgMsgRegisterVo(); |
| | | BeanUtils.copyProperties(register, vo); |
| | | UPExgMsgRealLocation realLocation = upExgMsgRealLocationDao.findByVehicleNoOrderByCreateTimeDesc(register.getVehicleNo()); |
| | | if (null != realLocation) { |
| | | GnssData gnssData = realLocation.getGnssData(); |
| | | vo.setLongitude(Double.valueOf(gnssData.getLon() / 1000000).toString()); |
| | | vo.setLatitude(Double.valueOf(gnssData.getLat() / 1000000).toString()); |
| | | } |
| | | voList.add(vo); |
| | | } |
| | | } |