From 3d4eeb82dd61f8951616dece2425e870116bc23d Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期五, 04 四月 2025 15:56:37 +0800
Subject: [PATCH] 提交最终版本和配置线上环境

---
 ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/controller/UPExgMsgRegisterController.java |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/controller/UPExgMsgRegisterController.java b/ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/controller/UPExgMsgRegisterController.java
index f2c5a78..4929a40 100644
--- a/ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/controller/UPExgMsgRegisterController.java
+++ b/ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/controller/UPExgMsgRegisterController.java
@@ -3,7 +3,10 @@
 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;
@@ -26,6 +29,9 @@
 	@Resource
 	private UPExgMsgRegisterDao upExgMsgRegisterDao;
 	
+	@Resource
+	private UPExgMsgRealLocationDao upExgMsgRealLocationDao;
+	
 	
 	/**
 	 * 查询添加时间大于等于给定时间的车辆基础数据
@@ -42,6 +48,12 @@
 				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);
 			}
 			
@@ -50,6 +62,12 @@
 			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);
 			}
 		}

--
Gitblit v1.7.1