亳州位置汇聚
parent
3a814fc911
commit
623c35da0a
4
pom.xml
4
pom.xml
|
|
@ -89,12 +89,12 @@
|
|||
<id>prod</id>
|
||||
<properties>
|
||||
<profiles.active>prod</profiles.active>
|
||||
<nacos.server>10.129.221.10:8848</nacos.server>
|
||||
<nacos.server>53.248.2.142:8848</nacos.server>
|
||||
<nacos.discovery.group>DEFAULT_GROUP</nacos.discovery.group>
|
||||
<nacos.config.group>DEFAULT_GROUP</nacos.config.group>
|
||||
<nacos.username>nacos</nacos.username>
|
||||
<nacos.password>Ycgis!2509</nacos.password>
|
||||
<logstash.address>10.129.221.10:4560</logstash.address>
|
||||
<logstash.address>53.248.2.142:4560</logstash.address>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@ public class RedisOnlineUserSchedule {
|
|||
List<EsGpsInfoVO2> 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;
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@
|
|||
</if>
|
||||
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 @@
|
|||
</if>
|
||||
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 @@
|
|||
</if>
|
||||
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 @@
|
|||
</if>
|
||||
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
|
||||
<!--四级机构-->
|
||||
|
|
|
|||
|
|
@ -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"});
|
||||
|
|
|
|||
|
|
@ -73,8 +73,8 @@ public class OriginalUdpReceiver implements ApplicationListener<ApplicationReady
|
|||
public void onApplicationEvent(ApplicationReadyEvent event) {
|
||||
logger.info("原生方式启动");
|
||||
try {
|
||||
Executors.newSingleThreadExecutor().execute(new UDPProcess("10.129.221.10",Integer.parseInt("10033")));
|
||||
// Executors.newSingleThreadExecutor().execute(new UDPProcess("10.129.221.10",Integer.parseInt("10034")));
|
||||
// Executors.newSingleThreadExecutor().execute(new UDPProcess("53.248.2.143",Integer.parseInt("10033")));
|
||||
Executors.newSingleThreadExecutor().execute(new UDPProcess("53.248.2.143",Integer.parseInt("10034")));
|
||||
} catch (SocketException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
@ -103,7 +103,7 @@ public class OriginalUdpReceiver implements ApplicationListener<ApplicationReady
|
|||
String unSendData = new String(buffer,0,data.length);
|
||||
//String sendData = bytes2hexStr(data);
|
||||
logger.error("接收到了数据"+data);
|
||||
asyncUtils.saveData(data,"2");
|
||||
asyncUtils.saveData(data,"3");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,10 +41,10 @@ db.num=1
|
|||
|
||||
### Connect URL of DB:
|
||||
#db.url.0=jdbc:mysql://127.0.0.1:3306/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
|
||||
db.url.0=jdbc:mysql://10.129.221.10:3306/wzhj-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
|
||||
db.url.0=jdbc:mysql://53.248.2.141:3306/wzhj-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
|
||||
db.user.0=root
|
||||
#db.password.0=root
|
||||
db.password.0=Ycgis@2509
|
||||
db.password.0=Ycgi!2509
|
||||
|
||||
### the maximum retry times for push
|
||||
nacos.config.push.maxRetryTime=50
|
||||
|
|
|
|||
Loading…
Reference in New Issue