| | |
| | | List<String> offLineList = new ArrayList<>(); |
| | | List<String> onLineList = new ArrayList<>(); |
| | | //查出数据库纯车辆或纯人脸设备 |
| | | List<String> serialNumbers = monitorMapper.selectCarOrFace().stream().map(TMonitor::getSerialNumber).collect(Collectors.toList()); |
| | | // List<String> serialNumbers = monitorMapper.selectCarOrFace().stream().map(TMonitor::getSerialNumber).collect(Collectors.toList()); |
| | | dataList.forEach(item->{ |
| | | //更新纯车辆或纯人脸的设备的在线状态(这部分设备不会拉流检测) |
| | | if(item.getPingOnline() && !CollectionUtils.isEmpty(serialNumbers) && serialNumbers.contains(item.getNo())) { |
| | | if(item.getPingOnline()) { |
| | | onLineList.add(item.getIp()); |
| | | } else if(!item.getPingOnline()) { |
| | | //筛选出ping离线的设备,更改数据库为离线 |
| | |
| | | item.setNo(item.getDeviceId()); |
| | | } |
| | | }); |
| | | //貌似这里可以忽略省厅标签因为项目展示的后面ping的时候存的数据 |
| | | pointService.setDeviceTagByGB(records,CheckConstants.Rule_Category_Video); |
| | | //存放在mongo中 |
| | | mongoTemplate.insertAll(records); |