xiangpei
2024-07-23 f5e1051a7e6d3ffccc815a631d8be372d772c58f
ycl-server/src/main/java/com/ycl/task/HKTask.java
@@ -7,6 +7,7 @@
import com.ycl.platform.domain.result.HK.FaceDeviceInspectionResult;
import com.ycl.platform.domain.result.HK.VehicleDeviceInspectionResult;
import com.ycl.platform.mapper.YwThresholdMapper;
import com.ycl.platform.service.IYwThresholdService;
import com.ycl.web.HKClient;
import enumeration.BusinessType;
import enumeration.general.BusinessTypeEnum;
@@ -30,7 +31,7 @@
    @Autowired
    private HKClient hkClient;
    @Autowired
    private YwThresholdMapper thresholdMapper;
    private IYwThresholdService ywThresholdService;
    private final static Integer pageNo = 1;
    private final static Integer pageSize = 5000;
@@ -53,10 +54,11 @@
            if (CollectionUtils.isEmpty(list)) {
                throw new RuntimeException("车辆设备全检指标监测结果数据为空");
            }
            //TODO:同步的数据可能需要工单阈值等处理
            List<YwThreshold> ywThresholds = thresholdMapper.selectByType(BusinessTypeEnum.CAR.name());
            //存放在mongo中
            mongoTemplate.insert(list);
            //同步的数据进行工单阈值处理
            ywThresholdService.carCheck(list);
        } else {
            log.error("同步车辆设备全检指标监测结果失败", jsonObject);
        }
@@ -79,10 +81,10 @@
            if (CollectionUtils.isEmpty(list)) {
                throw new RuntimeException("人脸设备全检指标监测结果数据为空");
            }
            //TODO:同步的数据可能需要工单阈值等处理
            //存放在mongo中
            mongoTemplate.insert(list);
            //TODO:同步的数据可能需要工单阈值等处理
        } else {
            log.error("同步人脸设备全检指标监测结果失败", jsonObject);
        }