File was renamed from ycl-server/src/main/java/com/ycl/calculate/FaceSiteOnlineCalculation.java |
| | |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 抓拍数据量监测结果接口数据 |
| | | * 计算人脸点位在线率、视图库对接稳定性 |
| | | * 获取分省厅、区域的map<k,v> k为deptId或者Province_deptId |
| | | * 循环map计算点位在线率 |
| | | * 更新或新增 |
| | | */ |
| | | @Component |
| | | public class FaceSiteOnlineCalculation extends IndexCalculationServe implements CalculationStrategy<SnapshotDataMonitorResult> { |
| | | public class FaceSnapshotDataCalculation extends IndexCalculationServe implements CalculationStrategy<SnapshotDataMonitorResult> { |
| | | @Autowired |
| | | private CheckIndexFaceMapper checkIndexFaceMapper; |
| | | @Autowired |
| | |
| | | areaStatsMap.forEach((deptId, stats) -> { |
| | | if (stats.totalSites > 0) { |
| | | CheckIndexFace checkIndexFace = createOrUpdateCheckIndexFace(deptId, stats, cityCountAvg, countyCountAvg, checkIndexFaceList); |
| | | if (checkIndexFace != null) { |
| | | checkIndexFaces.add(checkIndexFace); |
| | | } |
| | | } |
| | | }); |
| | | |
| | |
| | | //车辆点位在线率和视图库对接稳定性 |
| | | private CheckIndexFace createOrUpdateCheckIndexFace(String key, AreaStats stats, BigDecimal cityCountAvg, BigDecimal countyCountAvg, List<CheckIndexFace> checkIndexFaceList) { |
| | | CheckIndexFace checkIndexFace = getCheckIndex(key, checkIndexFaceList, CheckIndexFace.class); |
| | | if (checkIndexFace == null) { |
| | | return null; |
| | | } |
| | | //调用点位在线计算方法 |
| | | Map<String, Object> siteOnlineParam = new HashMap<>(); |
| | | siteOnlineParam.put("totalSites", stats.totalSites); |