From 0771b90c0e49714e1682dc133d1bebafb545dd5a Mon Sep 17 00:00:00 2001
From: zhangnaisong <2434969829@qq.com>
Date: 星期六, 02 三月 2024 19:45:12 +0800
Subject: [PATCH] app无人机航线管理提交
---
ard-work/src/main/java/com/ruoyi/sy/gps31/PushClientImplPosition.java | 73 ++++++++++++++++++------------------
1 files changed, 37 insertions(+), 36 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 83c365d..bf31f63 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
@@ -177,42 +177,7 @@
}
}
//杞﹁締鏈夊�间紭鍏堝垽鏂槸鍚︿负鎵嬪姩娣诲姞杞﹁締
- if(ardAccessFence.getIsAlarm()==1){
- //1涓烘墜鍔ㄦ坊鍔犺溅杈嗘棤闇�鎶ヨ淇℃伅锛屾洿鏂颁綅缃嵆鍙�
- ardAccessFence.setLng(lng);
- ardAccessFence.setLat(lat);
- ardAccessFenceService.updAccess(ardAccessFence);
- }else if(ardAccessFence.getIsAlarm() == 2){
- //2涓烘墜鍔ㄦ坊鍔犳姤璀﹁溅杈嗘湁鎶ヨ锛屾墍鍦ㄥ洿鏍忓悕绉拌祴null,鎺掓煡鎶ヨ淇℃伅,鍙渶澶勭悊璺笂鎯呭喌
- ardAccessFence.setNowWallName(null);
- //濡傛灉鍦ㄨ矾涓婂垽鏂潗鏍囨槸鍚︿笌涓婃涓�鏍�
- if(ardAccessFence.getLng().equals(lng) && ardAccessFence.getLat().equals(lat)){
- if(timeType){
- Date nowTime = sdf.parse(time);
- Date lastTime = sdf.parse(ardAccessFence.getLastTime());
- Long diff = (nowTime.getTime() - lastTime.getTime())/1000;
- ArdAccessNum list = accessNumService.queryNum();
- if(list!=null){
- int alarm = list.getAlarm();
- if(diff>=alarm){
- //鎶ヨ瀛楁涓�1鎻愮ず鎶ヨ
- ardAccessFence.setIsWarning(1);
- ardAccessFence.setAlarmLat(lat);
- ardAccessFence.setAlarmLng(lng);
- ardAccessFenceService.updAccess(ardAccessFence);
- }
- }
- }else {
- log.debug(carId+"鍙疯溅瀹氫綅鏃堕棿涓虹┖");
- }
- }else {
- //濡傛灉涓嶄竴鏍锋洿鏂板潗鏍�
- ardAccessFence.setLat(lat);
- ardAccessFence.setLng(lng);
- ardAccessFence.setLastTime(time);
- ardAccessFenceService.updAccess(ardAccessFence);
- }
- }else if(ardAccessFence.getIsAlarm() == 0 || ardAccessFence.getIsAlarm() == null){
+ if(ardAccessFence.getIsAlarm() == 0 || ardAccessFence.getIsAlarm() == null){
//杞﹁締闈炴墜鍔ㄦ坊鍔犳暟鎹紝鍒ゆ柇鏄惁鏈夎繘鍏ュ洿鏍廔D
if(ardAccessFence.getIntoShipmentId()==null){
//娌℃湁杩涘叆瑁呮补鐐癸紝璧嬪�肩粡绾害
@@ -368,6 +333,42 @@
}
}
}
+ }else
+ if(ardAccessFence.getIsAlarm()==1){
+ //1涓烘墜鍔ㄦ坊鍔犺溅杈嗘棤闇�鎶ヨ淇℃伅锛屾洿鏂颁綅缃嵆鍙�
+ ardAccessFence.setLng(lng);
+ ardAccessFence.setLat(lat);
+ ardAccessFenceService.updAccess(ardAccessFence);
+ }else if(ardAccessFence.getIsAlarm() == 2){
+ //2涓烘墜鍔ㄦ坊鍔犳姤璀﹁溅杈嗘湁鎶ヨ锛屾墍鍦ㄥ洿鏍忓悕绉拌祴null,鎺掓煡鎶ヨ淇℃伅,鍙渶澶勭悊璺笂鎯呭喌
+ ardAccessFence.setNowWallName(null);
+ //濡傛灉鍦ㄨ矾涓婂垽鏂潗鏍囨槸鍚︿笌涓婃涓�鏍�
+ if(ardAccessFence.getLng().equals(lng) && ardAccessFence.getLat().equals(lat)){
+ if(timeType){
+ Date nowTime = sdf.parse(time);
+ Date lastTime = sdf.parse(ardAccessFence.getLastTime());
+ Long diff = (nowTime.getTime() - lastTime.getTime())/1000;
+ ArdAccessNum list = accessNumService.queryNum();
+ if(list!=null){
+ int alarm = list.getAlarm();
+ if(diff>=alarm){
+ //鎶ヨ瀛楁涓�1鎻愮ず鎶ヨ
+ ardAccessFence.setIsWarning(1);
+ ardAccessFence.setAlarmLat(lat);
+ ardAccessFence.setAlarmLng(lng);
+ ardAccessFenceService.updAccess(ardAccessFence);
+ }
+ }
+ }else {
+ log.debug(carId+"鍙疯溅瀹氫綅鏃堕棿涓虹┖");
+ }
+ }else {
+ //濡傛灉涓嶄竴鏍锋洿鏂板潗鏍�
+ ardAccessFence.setLat(lat);
+ ardAccessFence.setLng(lng);
+ ardAccessFence.setLastTime(time);
+ ardAccessFenceService.updAccess(ardAccessFence);
+ }
}
}
//娓呮筏缁撴潫------------
--
Gitblit v1.9.3