From 8bfb1a91458ff158da73e7b8ccda2501cc7fea04 Mon Sep 17 00:00:00 2001
From: aijinhui <aijinhui>
Date: 星期二, 05 十二月 2023 11:57:00 +0800
Subject: [PATCH] 清淤
---
ard-work/src/main/java/com/ruoyi/sy/gps31/PushClientImplPosition.java | 29 +++++++++++++++++------------
1 files changed, 17 insertions(+), 12 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 41e9316..cb1de71 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
@@ -286,19 +286,24 @@
ardAccessFence.setNowWallName(null);
//濡傛灉鍦ㄨ矾涓婂垽鏂潗鏍囨槸鍚︿笌涓婃涓�鏍�
if(ardAccessFence.getLng().equals(lng) && ardAccessFence.getLat().equals(lat)){
- //濡傛灉鍧愭爣涓�鏍风浉鍑�
- 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){
- ardAccessFence.setIsWarning(1);
- ardAccessFence.setAlarmLat(lat);
- ardAccessFence.setAlarmLng(lng);
- ardAccessFenceService.updAccess(ardAccessFence);
+ if(ardAccessFence.getLastTime()!=null){
+ //濡傛灉鍧愭爣涓�鏍风浉鍑�
+ 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){
+ ardAccessFence.setIsWarning(1);
+ ardAccessFence.setAlarmLat(lat);
+ ardAccessFence.setAlarmLng(lng);
+ ardAccessFenceService.updAccess(ardAccessFence);
+ }
}
+ }else {
+ ardAccessFence.setLastTime(time);
+ ardAccessFenceService.updAccess(ardAccessFence);
}
}else {
//濡傛灉涓嶄竴鏍锋洿鏂板潗鏍�
--
Gitblit v1.9.3