fuliqi
2024-08-02 3a40cec4bd55a9668f1b47111c48e99889a5c7d8
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;
@@ -105,24 +103,7 @@
     * 车辆点位在线率和视图库对接稳定性
     */
    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);
        //调用抓拍上传及时性计算方法
        Map<String, Object> param = new HashMap<>();
        param.put("totalCount", stats.totalCount);