From 065142057ba3983af899991085e37ac1ec502320 Mon Sep 17 00:00:00 2001
From: aijinhui <aijinhui>
Date: 星期二, 19 九月 2023 14:06:30 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
ard-work/src/main/java/com/ruoyi/sy/gps31/PushClientImplPosition.java | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/sy/gps31/PushClientImplPosition.java b/ard-work/src/main/java/com/ruoyi/sy/gps31/PushClientImplPosition.java
index 674d023..9be6f79 100644
--- a/ard-work/src/main/java/com/ruoyi/sy/gps31/PushClientImplPosition.java
+++ b/ard-work/src/main/java/com/ruoyi/sy/gps31/PushClientImplPosition.java
@@ -13,6 +13,7 @@
import com.gps31.push.netty.client.TcpClient;
import com.gps31.push.util.MapUtil;
import com.ruoyi.common.utils.spring.SpringUtils;
+import com.ruoyi.sy.service.impl.ArdSyCarDayServiceImpl;
import com.ruoyi.sy.service.impl.ArdSyCarServiceImpl;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -74,6 +75,7 @@
System.out.println(sdf.format(new Date()));
log.error(String.format(" ---->鏀跺埌瀹氫綅鏁版嵁:%s",JSON.toJSONString(gpsMap)));*/
String carId = (String)gpsMap.get("carId");
+ ((ArdSyCarDayServiceImpl)SpringUtils.getBean("ardSyCarDayServiceImpl")).insertArdSyCarDay(carId);//鏂板杞﹁締涓婃姤鏃堕棿
Map<String,Object> result = ((ArdSyCarServiceImpl)SpringUtils.getBean("ardSyCarServiceImpl")).getArdSyCarAndDeptByCarId(carId);//鏌ヨ杞﹁締鍙婇儴闂�
if(result != null){
gpsMap.putAll(result);
@@ -117,14 +119,13 @@
if(PositionContainer.getUserPositionMap().size() != 0){
for(String userId : PositionContainer.getUserPositionMap().keySet()){
Map<String,Map<String,Object>> carIdCarMap = PositionContainer.getUserPositionMap().get(userId);
- if(carIdCarMap.keySet().contains(carId)){
- PositionContainer.getUserPositionMap().get(userId).put(carId,gpsMap);
+ if(carIdCarMap != null){
+ if(carIdCarMap.keySet().contains(carId)){
+ PositionContainer.getUserPositionMap().get(userId).put(carId,gpsMap);
+ }
}
}
}
-
-
-
}
/**
*
--
Gitblit v1.9.3