diff --git a/pom.xml b/pom.xml
index 478bbf43..fc44e58e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -89,12 +89,12 @@
prod
prod
- 10.129.221.10:8848
+ 53.248.2.142:8848
DEFAULT_GROUP
DEFAULT_GROUP
nacos
Ycgis!2509
- 10.129.221.10:4560
+ 53.248.2.142:4560
diff --git a/stwzhj-modules/wzhj-data2es/src/main/java/org/dromara/data2es/handler/RequestHandler.java b/stwzhj-modules/wzhj-data2es/src/main/java/org/dromara/data2es/handler/RequestHandler.java
index 54bcbd85..393ac865 100644
--- a/stwzhj-modules/wzhj-data2es/src/main/java/org/dromara/data2es/handler/RequestHandler.java
+++ b/stwzhj-modules/wzhj-data2es/src/main/java/org/dromara/data2es/handler/RequestHandler.java
@@ -151,7 +151,7 @@ public class RequestHandler {
long betweenS = DateUtil.between(gpsTime, new Date(), DateUnit.SECOND);
//过期时间应该是20分钟减去设备定位时间与当前时间的差值,比如设备已经比当前时间晚15分钟了,那么设备的过期时间应该只剩5分钟了
- long onlineTime = 60*10 - betweenS;
+ long onlineTime = 60*15 - betweenS;
String deviceCode = esGpsInfoVo2.getDeviceCode();
String deviceType = esGpsInfoVo2.getDeviceType();
diff --git a/stwzhj-modules/wzhj-data2es/src/main/java/org/dromara/data2es/schedule/RedisOnlineUserSchedule.java b/stwzhj-modules/wzhj-data2es/src/main/java/org/dromara/data2es/schedule/RedisOnlineUserSchedule.java
index 8d99d3c5..22df8593 100644
--- a/stwzhj-modules/wzhj-data2es/src/main/java/org/dromara/data2es/schedule/RedisOnlineUserSchedule.java
+++ b/stwzhj-modules/wzhj-data2es/src/main/java/org/dromara/data2es/schedule/RedisOnlineUserSchedule.java
@@ -34,9 +34,9 @@ public class RedisOnlineUserSchedule {
List gpsInfoVO2s = new ArrayList<>();
for (JSONObject job : jlist) {
String deviceType = job.getStr("deviceType");
- if ("05".equals(deviceType)){
+ /*if ("05".equals(deviceType)){
continue;
- }
+ }*/
Integer online = job.getInt("online");
if (0 == online){
continue;
diff --git a/stwzhj-modules/wzhj-system/src/main/resources/mapper/system/SysDeptMapper.xml b/stwzhj-modules/wzhj-system/src/main/resources/mapper/system/SysDeptMapper.xml
index 3b6bae79..441bf848 100644
--- a/stwzhj-modules/wzhj-system/src/main/resources/mapper/system/SysDeptMapper.xml
+++ b/stwzhj-modules/wzhj-system/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -70,7 +70,7 @@
group by SUBSTRING(zzjgdm,1,8)) a
on SUBSTRING(d.dept_id,1,8) = SUBSTRING(a.zzjgdm,1,8)
- where `status` = '0' and del_flag =0 and is_visible = '1' and parent_id = '341300000000' and dept_id like '341300%'
+ where `status` = '0' and del_flag =0 and is_visible = '1' and parent_id = '341600000000' and dept_id like '341600%'
union
@@ -92,7 +92,7 @@
group by SUBSTRING(zzjgdm,1,6)) a
on SUBSTRING(d.dept_id,1,6) = SUBSTRING(a.zzjgdm,1,6)
- where `status` = '0' and del_flag =0 and is_visible = '1' and parent_id = '341300000000' and dept_id not like '341300%'
+ where `status` = '0' and del_flag =0 and is_visible = '1' and parent_id = '341600000000' and dept_id not like '341600%'
union
@@ -113,7 +113,7 @@
group by SUBSTRING(zzjgdm,1,8)) a
on SUBSTRING(d.dept_id,1,8) = SUBSTRING(a.zzjgdm,1,8)
- where `status` = '0' and del_flag =0 and is_visible = '1' and parent_id != '341300000000' and parent_id != '0' and dept_id like '%0000'
+ where `status` = '0' and del_flag =0 and is_visible = '1' and parent_id != '341600000000' and parent_id != '0' and dept_id like '%0000'
UNION
select dept_id as deptId,short_name as deptName,parent_id as parentId,IFNULL(onlineCount,0) as onlineCount,IFNULL(allCount,0) as allCount from sys_dept d
@@ -133,7 +133,7 @@
group by SUBSTRING(zzjgdm,1,10)) a
on SUBSTRING(d.dept_id,1,10) = SUBSTRING(a.zzjgdm,1,10)
- where `status` = '0' and del_flag =0 and is_visible = '1' and parent_id != '341300000000' and parent_id != '0' and dept_id not like '%0000' and dept_id like '%00'
+ where `status` = '0' and del_flag =0 and is_visible = '1' and parent_id != '341600000000' and parent_id != '0' and dept_id not like '%0000' and dept_id like '%00'
union
@@ -175,7 +175,7 @@
LEFT JOIN
(select substring(zzjgdm,1,8) as zzjgdm ,count(*) as allCount from t_device where device_type = #{deviceType} and valid =1 group by SUBSTRING(zzjgdm,1,8)) a
on SUBSTRING(d.dept_id,1,8) = SUBSTRING(a.zzjgdm,1,8)
- where `status` = '0' and del_flag =0 and is_visible = '1' and parent_id = '341300000000' and dept_id like '341300%'
+ where `status` = '0' and del_flag =0 and is_visible = '1' and parent_id = '341600000000' and dept_id like '341600%'
union
@@ -187,7 +187,7 @@
LEFT JOIN
(select substring(zzjgdm,1,6) as zzjgdm ,count(*) as allCount from t_device where device_type = #{deviceType} and valid =1 group by SUBSTRING(zzjgdm,1,6)) a
on SUBSTRING(d.dept_id,1,6) = SUBSTRING(a.zzjgdm,1,6)
- where `status` = '0' and del_flag =0 and is_visible = '1' and parent_id = '341300000000' and dept_id not like '341300%'
+ where `status` = '0' and del_flag =0 and is_visible = '1' and parent_id = '341600000000' and dept_id not like '341600%'
union
@@ -198,7 +198,7 @@
LEFT JOIN
(select substring(zzjgdm,1,8) as zzjgdm ,count(*) as allCount from t_device where device_type = #{deviceType} and valid = 1 group by SUBSTRING(zzjgdm,1,8)) a
on SUBSTRING(d.dept_id,1,8) = SUBSTRING(a.zzjgdm,1,8)
- where `status` = '0' and del_flag =0 and is_visible = '1' and parent_id != '341300000000' and parent_id != '0' and dept_id like '%0000'
+ where `status` = '0' and del_flag =0 and is_visible = '1' and parent_id != '341600000000' and parent_id != '0' and dept_id like '%0000'
UNION
select dept_id as deptId,short_name as deptName,parent_id as parentId,IFNULL(onlineCount,0) as onlineCount,IFNULL(allCount,0) as allCount from sys_dept d
@@ -208,7 +208,7 @@
LEFT JOIN
(select substring(zzjgdm,1,10) as zzjgdm ,count(*) as allCount from t_device where device_type = #{deviceType} and valid = 1 group by SUBSTRING(zzjgdm,1,10)) a
on SUBSTRING(d.dept_id,1,10) = SUBSTRING(a.zzjgdm,1,10)
- where `status` = '0' and del_flag =0 and is_visible = '1' and parent_id != '341300000000' and parent_id != '0' and dept_id not like '%0000' and dept_id like '%00'
+ where `status` = '0' and del_flag =0 and is_visible = '1' and parent_id != '341600000000' and parent_id != '0' and dept_id not like '%0000' and dept_id like '%00'
union
diff --git a/stwzhj-modules/wzhj-udp/src/main/java/org/dromara/udp/config/AsyncUtils.java b/stwzhj-modules/wzhj-udp/src/main/java/org/dromara/udp/config/AsyncUtils.java
index 80995f57..3eaecc81 100644
--- a/stwzhj-modules/wzhj-udp/src/main/java/org/dromara/udp/config/AsyncUtils.java
+++ b/stwzhj-modules/wzhj-udp/src/main/java/org/dromara/udp/config/AsyncUtils.java
@@ -55,7 +55,15 @@ public class AsyncUtils {
esGpsInfo = parseBytes(bytes);
esGpsInfo.setDeviceType(deviceType);
//和redis过期监听时间一定要一致
- if (DateUtil.between(new Date(),esGpsInfo.getGpsTime(),DateUnit.MINUTE)> 10){
+ // 计算15分钟后的时间点
+ Date fifteenMinutesLater = DateUtil.offsetMinute(new Date(), 15);
+
+ if (esGpsInfo.getGpsTime().after(fifteenMinutesLater)) {
+ // GPS时间在15分钟后,属于超前数据
+ logger.error("GPS时间超前15分钟以上");
+ return;
+ }
+ if (DateUtil.between(new Date(),esGpsInfo.getGpsTime(),DateUnit.MINUTE)> 15){
esGpsInfo.setOnline(0);
}else {
esGpsInfo.setOnline(1);
@@ -126,7 +134,7 @@ public class AsyncUtils {
logger.error("year={},time2={}",year,time2);
logger.error("time:"+time);
- return BuilderEsGpsInfo(gpsId, lonD, latD, speed, angle, height, jingdu, (yearBE + time2));
+ return BuilderEsGpsInfo(gpsId, lonD, latD, speed, angle, height, jingdu, (year + time2));
}
@@ -162,6 +170,7 @@ public class AsyncUtils {
if(StringUtils.isEmpty(time)){
logger.error("时间为空");
}
+ logger.error("gpstime={}",time);
Date date = null;
try {
date = DateUtils.parseDate(time, new String[]{"yyyy-MM-dd HH:mm:ss", "yyyyMMddHHmmss"});
diff --git a/stwzhj-modules/wzhj-udp/src/main/java/org/dromara/udp/controller/OriginalUdpReceiver.java b/stwzhj-modules/wzhj-udp/src/main/java/org/dromara/udp/controller/OriginalUdpReceiver.java
index 3843c591..d107417e 100644
--- a/stwzhj-modules/wzhj-udp/src/main/java/org/dromara/udp/controller/OriginalUdpReceiver.java
+++ b/stwzhj-modules/wzhj-udp/src/main/java/org/dromara/udp/controller/OriginalUdpReceiver.java
@@ -73,8 +73,8 @@ public class OriginalUdpReceiver implements ApplicationListener