| | |
| | | * online字段来自于优云,pingOnline为主动ping检测的。存入mongo给数据中心查阅 |
| | | */ |
| | | public void pointOnline() throws ExecutionException, InterruptedException { |
| | | |
| | | |
| | | log.info("开始检测点位在线"); |
| | | Integer times = 2; |
| | | SysConfig config = new SysConfig(); |
| | |
| | | unKnownList.add(item.getIp()); |
| | | } |
| | | }); |
| | | |
| | | if(!CollectionUtils.isEmpty(onLineList)){ |
| | | log.error("在线点位集合:{}",onLineList); |
| | | } |
| | | |
| | | log.error("unKnownList:{}",unKnownList); |
| | | if(!CollectionUtils.isEmpty(offLineList)) { |
| | | log.error("修改离线的点位集合:{}",offLineList); |
| | |
| | | mongoData.setProvinceTag(mongoData.getProvinceTagCar()); |
| | | }else if("3".equals(type)){ |
| | | mongoData.setProvinceTag(mongoData.getProvinceTagFace()); |
| | | } |
| | | //修改线上 |
| | | if(mongoData.getPingOnline()){ |
| | | mongoData.setOnline(1); |
| | | } |
| | | mongoList.add(mongoData); |
| | | } |
| | |
| | | instance.setTime(new Date()); |
| | | instance.add(Calendar.DAY_OF_MONTH, -1); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
| | | |
| | | String yesterday = format.format(instance.getTime()); |
| | | param.setStatTime(yesterday); |
| | | log.error("开始同步mongodb录像可用数据日期为{}",yesterday); |
| | | JSONObject jsonObject = uyClient.recordMetaDSumList(param); |
| | | double minTime = getSySMinTime(); |
| | | AtomicReference<Integer> count = new AtomicReference<>(0); |