From 25ff2fc4ef2ad4bfccf6d2059d0159608ad71f8f Mon Sep 17 00:00:00 2001
From: ancienter <36272003+ancienter@users.noreply.github.com>
Date: 星期二, 09 四月 2024 09:52:23 +0800
Subject: [PATCH] Merge branch '648540858:master' into develop-add-api-key

---
 src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestProcessor.java |   44 ++------------------------------------------
 1 files changed, 2 insertions(+), 42 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestProcessor.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestProcessor.java
index 435f35f..e54aa2d 100755
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestProcessor.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestProcessor.java
@@ -1,7 +1,5 @@
 package com.genersoft.iot.vmp.gb28181.transmit.event.request.impl;
 
-import com.alibaba.fastjson2.JSONObject;
-import com.genersoft.iot.vmp.conf.CivilCodeFileConf;
 import com.genersoft.iot.vmp.conf.SipConfig;
 import com.genersoft.iot.vmp.conf.UserSetting;
 import com.genersoft.iot.vmp.gb28181.bean.*;
@@ -78,9 +76,6 @@
 	@Autowired
 	private NotifyRequestForCatalogProcessor notifyRequestForCatalogProcessor;
 
-	@Autowired
-	private CivilCodeFileConf civilCodeFileConf;
-
 	private ConcurrentLinkedQueue<HandlerCatchData> taskQueue = new ConcurrentLinkedQueue<>();
 
 	@Qualifier("taskExecutor")
@@ -98,7 +93,6 @@
 	@Override
 	public void process(RequestEvent evt) {
 		try {
-
 			if (taskQueue.size() >= userSetting.getMaxNotifyCountQueue()) {
 				responseAck((SIPRequest) evt.getRequest(), Response.BUSY_HERE, null, null);
 				logger.error("[notify] 寰呭鐞嗘秷鎭槦鍒楀凡婊� {}锛岃繑鍥�486 BUSY_HERE锛屾秷鎭笉鍋氬鐞�", userSetting.getMaxNotifyCountQueue());
@@ -234,25 +228,8 @@
 			mobilePosition.setLongitudeGcj02(deviceChannel.getLongitudeGcj02());
 			mobilePosition.setLatitudeGcj02(deviceChannel.getLatitudeGcj02());
 
-			if (userSetting.getSavePositionHistory()) {
-				storager.insertMobilePosition(mobilePosition);
-			}
+			deviceChannelService.updateChannelGPS(device, deviceChannel, mobilePosition);
 
-			storager.updateChannelPosition(deviceChannel);
-			// 鍚戝叧鑱斾簡璇ラ�氶亾骞朵笖寮�鍚Щ鍔ㄤ綅缃闃呯殑涓婄骇骞冲彴鍙戦�佺Щ鍔ㄤ綅缃闃呮秷鎭�
-
-
-			// 鍙戦�乺edis娑堟伅銆� 閫氱煡浣嶇疆淇℃伅鐨勫彉鍖�
-			JSONObject jsonObject = new JSONObject();
-			jsonObject.put("time", DateUtil.yyyy_MM_dd_HH_mm_ssToISO8601(mobilePosition.getTime()));
-			jsonObject.put("serial", deviceId);
-			jsonObject.put("code", channelId);
-			jsonObject.put("longitude", mobilePosition.getLongitude());
-			jsonObject.put("latitude", mobilePosition.getLatitude());
-			jsonObject.put("altitude", mobilePosition.getAltitude());
-			jsonObject.put("direction", mobilePosition.getDirection());
-			jsonObject.put("speed", mobilePosition.getSpeed());
-			redisCatchStorage.sendMobilePositionMsg(jsonObject);
 		} catch (DocumentException  e) {
 			logger.error("鏈鐞嗙殑寮傚父 ", e);
 		}
@@ -340,25 +317,8 @@
 				mobilePosition.setLongitudeGcj02(deviceChannel.getLongitudeGcj02());
 				mobilePosition.setLatitudeGcj02(deviceChannel.getLatitudeGcj02());
 
-				if (userSetting.getSavePositionHistory()) {
-					storager.insertMobilePosition(mobilePosition);
-				}
-
-				storager.updateChannelPosition(deviceChannel);
-				// 鍙戦�乺edis娑堟伅銆� 閫氱煡浣嶇疆淇℃伅鐨勫彉鍖�
-				JSONObject jsonObject = new JSONObject();
-				jsonObject.put("time", DateUtil.yyyy_MM_dd_HH_mm_ssToISO8601(mobilePosition.getTime()));
-				jsonObject.put("serial", deviceChannel.getDeviceId());
-				jsonObject.put("code", deviceChannel.getChannelId());
-				jsonObject.put("longitude", mobilePosition.getLongitude());
-				jsonObject.put("latitude", mobilePosition.getLatitude());
-				jsonObject.put("altitude", mobilePosition.getAltitude());
-				jsonObject.put("direction", mobilePosition.getDirection());
-				jsonObject.put("speed", mobilePosition.getSpeed());
-				redisCatchStorage.sendMobilePositionMsg(jsonObject);
-
+				deviceChannelService.updateChannelGPS(device, deviceChannel, mobilePosition);
 			}
-			// TODO: 闇�瑕佸疄鐜板瓨鍌ㄦ姤璀︿俊鎭�佹姤璀﹀垎绫�
 
 			// 鍥炲200 OK
 			if (redisCatchStorage.deviceIsOnline(deviceId)) {

--
Gitblit v1.8.0