xiangpei
2024-08-02 1fc5877f61c9b15f5daa5f328f9deae2e8a50e84
ycl-server/src/main/java/com/ycl/calculate/FaceSnapshotDelayCalculation.java
@@ -30,8 +30,6 @@
    @Autowired
    private CheckIndexFaceMapper checkIndexFaceMapper;
    @Autowired
    private SysConfigMapper sysConfigMapper;
    @Autowired
    private ITMonitorService monitorService;
    @Autowired
    private ICheckIndexFaceService checkIndexFaceService;
@@ -81,7 +79,9 @@
        areaStatsMap.forEach((deptId, stats) -> {
            if (stats.totalCount > 0) {
                CheckIndexFace checkIndexFace = createOrUpdateCheckIndexFace(deptId, stats, checkIndexFaceList);
                checkIndexFaces.add(checkIndexFace);
                if (checkIndexFace != null) {
                    checkIndexFaces.add(checkIndexFace);
                }
            }
        });
@@ -105,24 +105,10 @@
     * 车辆点位在线率和视图库对接稳定性
     */
    private CheckIndexFace createOrUpdateCheckIndexFace(String key, AreaStats stats, 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, CheckIndexFace.class);
        if (checkIndexFace == null) {
            return null;
        }
        //调用抓拍上传及时性计算方法
        Map<String, Object> param = new HashMap<>();
        param.put("totalCount", stats.totalCount);