亳州修改
parent
4022dfa7b0
commit
2e1676aa36
|
|
@ -39,7 +39,7 @@ public class DeviceRedisSchedule {
|
||||||
/*
|
/*
|
||||||
* 把Redis中 online_user数据存入t_device_redis表中
|
* 把Redis中 online_user数据存入t_device_redis表中
|
||||||
* */
|
* */
|
||||||
// @Scheduled(cron = "0/30 * * * * ?")
|
@Scheduled(cron = "0/30 * * * * ?")
|
||||||
public void handleDeviceRedis(){
|
public void handleDeviceRedis(){
|
||||||
List<JSONObject> jlist = RedisUtils.searchAndGetKeysValues("online_users:*");
|
List<JSONObject> jlist = RedisUtils.searchAndGetKeysValues("online_users:*");
|
||||||
redisService.insertBatch(BeanUtil.copyToList(jlist, DeviceRedis.class));
|
redisService.insertBatch(BeanUtil.copyToList(jlist, DeviceRedis.class));
|
||||||
|
|
|
||||||
|
|
@ -112,10 +112,10 @@ public class AsyncUtils {
|
||||||
byte[] sfm = Arrays.copyOfRange(copyByte, 46, 51);
|
byte[] sfm = Arrays.copyOfRange(copyByte, 46, 51);
|
||||||
String time = singleByteToString2(sfm);
|
String time = singleByteToString2(sfm);
|
||||||
String time2 = singleByteToString2(sfm);
|
String time2 = singleByteToString2(sfm);
|
||||||
logger.error("time2:"+time2);
|
logger.error("time2:"+year+time2);
|
||||||
logger.error("time:"+year+time);
|
logger.error("time:"+year+time);
|
||||||
|
|
||||||
return BuilderEsGpsInfo(gpsId, lonD, latD, speed, angle, height, jingdu, (year + time));
|
return BuilderEsGpsInfo(gpsId, lonD, latD, speed, angle, height, jingdu, (year + time2));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -73,8 +73,8 @@ public class OriginalUdpReceiver implements ApplicationListener<ApplicationReady
|
||||||
public void onApplicationEvent(ApplicationReadyEvent event) {
|
public void onApplicationEvent(ApplicationReadyEvent event) {
|
||||||
logger.info("原生方式启动");
|
logger.info("原生方式启动");
|
||||||
try {
|
try {
|
||||||
// Executors.newSingleThreadExecutor().execute(new UDPProcess("10.129.221.10",Integer.parseInt("10033")));
|
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("10.129.221.10",Integer.parseInt("10034")));
|
||||||
} catch (SocketException e) {
|
} catch (SocketException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
@ -103,7 +103,7 @@ public class OriginalUdpReceiver implements ApplicationListener<ApplicationReady
|
||||||
String unSendData = new String(buffer,0,data.length);
|
String unSendData = new String(buffer,0,data.length);
|
||||||
//String sendData = bytes2hexStr(data);
|
//String sendData = bytes2hexStr(data);
|
||||||
logger.error("接收到了数据"+data);
|
logger.error("接收到了数据"+data);
|
||||||
asyncUtils.saveData(data,"3");
|
asyncUtils.saveData(data,"2");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue