fuliqi
2025-02-21 64efb660b2c119c00432434c0f651f8996483f18
ycl-server/src/main/java/com/ycl/calculate/CarClockAccuracyCalculation.java
@@ -1,9 +1,12 @@
package com.ycl.calculate;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ycl.platform.domain.entity.CheckIndexCar;
import com.ycl.platform.domain.entity.YwPoint;
import com.ycl.platform.domain.result.HK.VehicleDeviceInspectionResult;
import com.ycl.platform.mapper.CheckIndexCarMapper;
import com.ycl.platform.mapper.TMonitorMapper;
import com.ycl.platform.mapper.YwPointMapper;
import com.ycl.platform.service.ICheckIndexCarService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -15,6 +18,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
 * 计算车辆时钟准确性
@@ -69,7 +73,7 @@
        AreaStats stats = areaStatsMap.computeIfAbsent(key, k -> new AreaStats());
        stats.totalSites++;
        //时钟准确率大于90%为合格设备
        if (result.getSnapClock().getClockPercent() >= 0.9) {
        if (result.getSnapClock()!=null &&  result.getSnapClock().getClockPercent()!=null && result.getSnapClock().getClockPercent() >= 0.9) {
            stats.accuracySites++;
        }
    }