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 | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 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 bb667de..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);
@@ -113,6 +115,17 @@
}
}
}
+ //瀛樺叆鐢ㄦ埛瀹瑰櫒
+ if(PositionContainer.getUserPositionMap().size() != 0){
+ for(String userId : PositionContainer.getUserPositionMap().keySet()){
+ Map<String,Map<String,Object>> carIdCarMap = PositionContainer.getUserPositionMap().get(userId);
+ if(carIdCarMap != null){
+ if(carIdCarMap.keySet().contains(carId)){
+ PositionContainer.getUserPositionMap().get(userId).put(carId,gpsMap);
+ }
+ }
+ }
+ }
}
/**
*
@@ -143,7 +156,7 @@
public void sendMassage() {
try {
PushClientImplPosition client = new PushClientImplPosition();
- client.setLog(true);//鏄惁鎵撳嵃鏄庢枃
+ client.setLog(false);//鏄惁鎵撳嵃鏄庢枃
client.setHost(this.ip);//鏈嶅姟鍣↖P
client.setPort(10100);//鏈嶅姟鍣ㄧ鍙�
client.setUserName(this.userId);//绯荤粺鐢ㄦ埛鍚�
--
Gitblit v1.9.3