| | |
| | | //同步的数据进行工单阈值处理 |
| | | ywThresholdService.carCheck(list); |
| | | } |
| | | // 本地测试 |
| | | // Query query = new Query(Criteria.where("mongoCreateTime").lt(DateUtils.getDayEnd(new Date()))); |
| | | // ywThresholdService.carCheck(mongoTemplate.find(query, VehicleDeviceInspectionResult.class)); |
| | | log.info("结束车辆设备全检指标监测结果数据同步"); |
| | |
| | | //存放在mongo中 |
| | | mongoTemplate.insertAll(list); |
| | | //同步的数据进行工单阈值处理 |
| | | //TODO:可能有重复工单 |
| | | ywThresholdService.faceCheck(list); |
| | | } |
| | | // Query query = new Query(Criteria.where("mongoCreateTime").lt(DateUtils.getDayEnd(new Date()))); |
| | |
| | | faceParam.setDataType(ApiConstants.HK_DataType_FACE); |
| | | List<SnapshotDataMonitorResult> faceList = HkApiUtil.sendAPI(host,appKey,appSecret,"/api/dqd/service/rs/v1/data/snapCountDetail/query", faceParam, SnapshotDataMonitorResult.class); |
| | | if (!CollectionUtils.isEmpty(faceList)) { |
| | | log.info("结果数据大小:{}",faceList.size()); |
| | | //如果今天存在之前的数据先删除 |
| | | Query query = new Query(Criteria |
| | | .where("mongoCreateTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date())) |
| | | .and("dataType").is(ApiConstants.HK_DataType_FACE)); |
| | | DeleteResult result = mongoTemplate.remove(query, SnapshotDataMonitorResult.class); |
| | | //存放在mongo中 |
| | | carList.forEach(item -> item.setDataType(ApiConstants.HK_DataType_FACE)); |
| | | faceList.forEach(item -> item.setDataType(ApiConstants.HK_DataType_FACE)); |
| | | mongoTemplate.insertAll(faceList); |
| | | } |
| | | log.info("结束抓拍数据量检测结果数据同步"); |