| | |
| | | |
| | | //车辆点位在线率和视图库对接稳定性 |
| | | private CheckIndexFace createOrUpdateCheckIndexFace(String key, AreaStats stats, BigDecimal cityCountAvg, BigDecimal countyCountAvg, List<CheckIndexFace> checkIndexFaceList) { |
| | | CheckIndexFace checkIndexFace; |
| | | |
| | | // 检查是否已存在今日数据 |
| | | Optional<CheckIndexFace> existingFace = checkIndexFaceList.stream() |
| | | .filter(face -> key.equals(face.getDeptId().toString()) && |
| | | (key.startsWith("Province_") ? CheckConstants.Examine_Tag_City.equals(face.getExamineTag()) |
| | | : CheckConstants.Examine_Tag_County.equals(face.getExamineTag()))) |
| | | .findFirst(); |
| | | |
| | | if (existingFace.isPresent()) { |
| | | checkIndexFace = existingFace.get(); |
| | | } else { |
| | | checkIndexFace = new CheckIndexFace(); |
| | | checkIndexFace.setDeptId(key.startsWith("Province_") ? Long.parseLong(key.split("_")[1]) : Long.parseLong(key)); |
| | | checkIndexFace.setExamineTag(key.startsWith("Province_") ? CheckConstants.Examine_Tag_City : CheckConstants.Examine_Tag_County); |
| | | checkIndexFace.setCreateTime(new Date()); |
| | | } |
| | | |
| | | CheckIndexFace checkIndexFace = getCheckIndex(key, checkIndexFaceList); |
| | | //调用点位在线计算方法 |
| | | Map<String, Object> siteOnlineParam = new HashMap<>(); |
| | | siteOnlineParam.put("totalSites", stats.totalSites); |