| | |
| | | import constant.ApiConstants; |
| | | import constant.CheckConstants; |
| | | import constant.CheckSnapCountConstants; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | * 更新或新增 |
| | | */ |
| | | @Component |
| | | @Slf4j |
| | | //TODD:系统配置里的区分人脸和车辆、累加次数的概念、区县不少于40路,不达标市州的当月该项成绩不能得分。 |
| | | public class FaceSnapshotDataCalculation extends IndexCalculationServe implements CalculationStrategy<SnapshotDataMonitorResult> { |
| | | @Autowired |
| | |
| | | @Override |
| | | public void calculate(List<SnapshotDataMonitorResult> list) { |
| | | if (CollectionUtils.isEmpty(list)) { |
| | | log.info("数据为空"); |
| | | return; |
| | | } |
| | | //返回以国标码为key的设备map |
| | |
| | | |
| | | // 处理省厅数据 |
| | | if (!CollectionUtils.isEmpty(provinceIds) && provinceIds.contains(monitor.getSerialNumber())) { |
| | | String provinceKey = "Province_" + deptId; |
| | | String provinceKey = ApiConstants.Province + deptId; |
| | | updateAreaStats(areaStatsMap, provinceKey, result); |
| | | } |
| | | } |
| | |
| | | BigDecimal siteOnline = siteOnline(siteOnlineParam); |
| | | checkIndexFace.setSiteOnline(siteOnline); |
| | | //视图库对接稳定性 |
| | | BigDecimal avgCount = key.startsWith("Province_") ? cityCountAvg : countyCountAvg; |
| | | BigDecimal avgCount = key.startsWith(ApiConstants.Province) ? cityCountAvg : countyCountAvg; |
| | | Map<String, Object> viewConnectParam = new HashMap<>(); |
| | | viewConnectParam.put("totalDataSum", stats.totalDataSum); |
| | | viewConnectParam.put("avgCount", avgCount); |