| | |
| | | import com.ycl.platform.domain.entity.TMonitor; |
| | | import com.ycl.platform.domain.result.HK.SnapshotDelayMonitorResult; |
| | | import com.ycl.platform.domain.result.UY.QueryVqdResult; |
| | | import com.ycl.platform.domain.vo.TMonitorVO; |
| | | import com.ycl.platform.mapper.CheckIndexVideoMapper; |
| | | import com.ycl.platform.mapper.TMonitorMapper; |
| | | import com.ycl.platform.service.ICheckIndexFaceService; |
| | | import com.ycl.platform.service.ICheckIndexVideoService; |
| | | import com.ycl.platform.service.ITMonitorService; |
| | |
| | | @Autowired |
| | | private CheckIndexVideoMapper checkIndexVideoMapper; |
| | | @Autowired |
| | | private ITMonitorService monitorService; |
| | | private TMonitorMapper monitorMapper; |
| | | @Autowired |
| | | private ICheckIndexVideoService checkIndexVideoService; |
| | | |
| | |
| | | } |
| | | |
| | | //获得国标码为key的设备map |
| | | Map<String, TMonitor> monitorMap = monitorService.list(new QueryWrapper<TMonitor>() |
| | | .in("serial_number", list.stream().map(QueryVqdResult::getDeviceId).collect(Collectors.toList()))) |
| | | .stream().collect(Collectors.toMap(TMonitor::getSerialNumber, Function.identity())); |
| | | Map<String, TMonitorVO> monitorMap = monitorMapper.selectListByIds(list.stream().map(QueryVqdResult::getDeviceId).collect(Collectors.toList())) |
| | | .stream().collect(Collectors.toMap(TMonitorVO::getSerialNumber, Function.identity())); |
| | | //获取省厅国标码集合 |
| | | List<String> provinceIds = getProvince(); |
| | | //重点点位集合 |
| | |
| | | |
| | | Map<String, AreaStats> areaStatsMap = new HashMap<>(); |
| | | for (QueryVqdResult result : list) { |
| | | TMonitor monitor = monitorMap.get(result.getDeviceId()); |
| | | TMonitorVO monitor = monitorMap.get(result.getDeviceId()); |
| | | if (monitor == null) continue; |
| | | |
| | | String deptId = monitor.getDeptId().toString(); |
| | |
| | | * 视频点位在线率 |
| | | */ |
| | | private CheckIndexVideo createOrUpdateCheckIndexFace(String key, AreaStats stats, List<CheckIndexVideo> checkIndexVideoList) { |
| | | CheckIndexVideo CheckIndexVideo = getCheckIndex(key, checkIndexVideoList, CheckIndexVideo.class); |
| | | if (CheckIndexVideo == null) { |
| | | CheckIndexVideo checkIndexVideo = getCheckIndex(key, checkIndexVideoList, CheckIndexVideo.class); |
| | | if (checkIndexVideo == null) { |
| | | return null; |
| | | } |
| | | //调用点位在线率计算方法 |
| | |
| | | param.put("totalSites", stats.totalSites); |
| | | param.put("onlineSites", stats.onlineSites); |
| | | BigDecimal siteOnline = siteOnline(param); |
| | | CheckIndexVideo.setSiteOnline(siteOnline); |
| | | checkIndexVideo.setSiteOnline(siteOnline); |
| | | //调用点位在线率计算方法 计算重点点位在线率 |
| | | Map<String, Object> importantParam = new HashMap<>(); |
| | | param.put("totalSites", stats.importantSites); |
| | | param.put("onlineSites", stats.importantOnlineSites); |
| | | BigDecimal importantSiteOnline = siteOnline(importantParam); |
| | | CheckIndexVideo.setKeySiteOnline(importantSiteOnline); |
| | | return CheckIndexVideo; |
| | | checkIndexVideo.setKeySiteOnline(importantSiteOnline); |
| | | return checkIndexVideo; |
| | | } |
| | | } |