fuliqi
2024-08-02 829e47bcaccf0481d39b737da203fa271bd7f4e8
ycl-server/src/main/java/com/ycl/calculate/FaceSiteOnlineCalculation.java
@@ -115,24 +115,7 @@
    //车辆点位在线率和视图库对接稳定性
    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);