| | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.mongodb.client.result.DeleteResult; |
| | | import com.ycl.feign.HkApiUtil; |
| | | import com.ycl.feign.HkApiUtil; |
| | | import com.ycl.platform.domain.param.HK.*; |
| | | import com.ycl.platform.domain.result.HK.*; |
| | | import com.ycl.platform.service.ICheckIndexCarService; |
| | | import com.ycl.platform.service.ICheckIndexFaceService; |
| | | import com.ycl.platform.service.ICheckIndexVideoService; |
| | | import com.ycl.platform.service.IYwThresholdService; |
| | | import com.ycl.platform.service.*; |
| | | import com.ycl.utils.DateUtils; |
| | | import constant.ApiConstants; |
| | | import com.ycl.feign.HKClient; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.data.mongodb.core.MongoTemplate; |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | | import org.springframework.data.mongodb.core.query.Query; |
| | |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | //海康对接数据任务 |
| | | @Slf4j |
| | | @Component("HKTask") |
| | | public class HKTask { |
| | | |
| | | @Value("${HK.host}") |
| | | public String host; |
| | | @Value("${HK.appKey}") |
| | | public String appKey; |
| | | @Value("${HK.appSecret}") |
| | | public String appSecret; |
| | | @Autowired |
| | | private MongoTemplate mongoTemplate; |
| | | @Autowired |
| | | private IYwThresholdService ywThresholdService; |
| | | @Autowired |
| | | private ICheckIndexFaceService checkIndexFaceService; |
| | | @Autowired |
| | | private ICheckIndexCarService checkIndexCarService; |
| | | @Autowired |
| | | private ICheckIndexVideoService checkIndexVideoService; |
| | | private YwPointService pointService; |
| | | |
| | | //车辆设备全检指标监测结果 |
| | | public void vehicleDeviceInspectionTask() { |
| | | log.info("开始执行车辆设备全检指标监测结果数据同步"); |
| | | // VehicleDeviceInspectionParam param = new VehicleDeviceInspectionParam(); |
| | | // param.setPageNo(ApiConstants.PageNo); |
| | | // param.setPageSize(ApiConstants.HKPageSize); |
| | | // param.setDate(DateUtils.getDate()); |
| | | // param.setDataType(ApiConstants.HK_DataType_CAR); |
| | | // List<VehicleDeviceInspectionResult> list = HkApiUtil.sendAPI("/api/dqd/service/rs/v2/data/vehFullAmount/query", param, VehicleDeviceInspectionResult.class); |
| | | // if (!CollectionUtils.isEmpty(list)) { |
| | | // //如果存在之前的数据先删除 |
| | | // Query query = new Query(Criteria.where("mongoCreateTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | // DeleteResult result = mongoTemplate.remove(query, VehicleDeviceInspectionResult.class); |
| | | // //存放在mongo中 |
| | | // mongoTemplate.insertAll(list); |
| | | // //同步的数据进行工单阈值处理 |
| | | // ywThresholdService.carCheck(list); |
| | | // } |
| | | Query query = new Query(Criteria.where("mongoCreateTime").lt(DateUtils.getDayEnd(new Date()))); |
| | | ywThresholdService.carCheck(mongoTemplate.find(query, VehicleDeviceInspectionResult.class)); |
| | | VehicleDeviceInspectionParam param = new VehicleDeviceInspectionParam(); |
| | | param.setPageNo(ApiConstants.PageNo); |
| | | param.setPageSize(ApiConstants.HKPageSize); |
| | | param.setDate(DateUtils.getDate()); |
| | | param.setDataType(ApiConstants.HK_DataType_CAR); |
| | | List<VehicleDeviceInspectionResult> list = HkApiUtil.sendAPI(host,appKey,appSecret,"/api/dqd/service/rs/v2/data/vehFullAmount/query", param, VehicleDeviceInspectionResult.class); |
| | | if (!CollectionUtils.isEmpty(list)) { |
| | | //如果存在之前的数据先删除 |
| | | Query query = new Query(Criteria.where("mongoCreateTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | DeleteResult result = mongoTemplate.remove(query, VehicleDeviceInspectionResult.class); |
| | | list.stream().forEach(item -> { |
| | | if (Objects.nonNull(item.getExternalIndexCode())) { |
| | | item.setNo(item.getExternalIndexCode()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(list); |
| | | //存放在mongo中 |
| | | mongoTemplate.insertAll(list); |
| | | //同步的数据进行工单阈值处理 |
| | | ywThresholdService.carCheck(list); |
| | | } |
| | | // 本地测试 |
| | | // Query query = new Query(Criteria.where("mongoCreateTime").lt(DateUtils.getDayEnd(new Date()))); |
| | | // ywThresholdService.carCheck(mongoTemplate.find(query, VehicleDeviceInspectionResult.class)); |
| | | log.info("结束车辆设备全检指标监测结果数据同步"); |
| | | } |
| | | |
| | | //人脸设备全检指标监测结果 |
| | | public void faceDeviceInspectionTask() { |
| | | log.info("开始执行人脸设备全检指标监测结果数据同步"); |
| | | // FaceDeviceInspectionParam param = new FaceDeviceInspectionParam(); |
| | | // param.setPageNo(ApiConstants.PageNo); |
| | | // param.setPageSize(ApiConstants.HKPageSize); |
| | | // param.setDate(DateUtils.getDate()); |
| | | // List<FaceDeviceInspectionResult> list = HkApiUtil.sendAPI("/api/dqd/service/rs/v2/data/faceFullAmount/query", param, FaceDeviceInspectionResult.class); |
| | | // if (!CollectionUtils.isEmpty(list)) { |
| | | // //如果存在之前的数据先删除 |
| | | // Query query = new Query(Criteria.where("mongoCreateTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | // DeleteResult result = mongoTemplate.remove(query, FaceDeviceInspectionResult.class); |
| | | // //存放在mongo中 |
| | | // mongoTemplate.insertAll(list); |
| | | // //同步的数据进行工单阈值处理 |
| | | // //TODO:可能有重复工单 |
| | | // ywThresholdService.faceCheck(list); |
| | | // } |
| | | Query query = new Query(Criteria.where("mongoCreateTime").lt(DateUtils.getDayEnd(new Date()))); |
| | | ywThresholdService.faceCheck(mongoTemplate.find(query, FaceDeviceInspectionResult.class)); |
| | | FaceDeviceInspectionParam param = new FaceDeviceInspectionParam(); |
| | | param.setPageNo(ApiConstants.PageNo); |
| | | param.setPageSize(ApiConstants.HKPageSize); |
| | | param.setDate(DateUtils.getDate()); |
| | | List<FaceDeviceInspectionResult> list = HkApiUtil.sendAPI(host,appKey,appSecret,"/api/dqd/service/rs/v2/data/faceFullAmount/query", param, FaceDeviceInspectionResult.class); |
| | | if (!CollectionUtils.isEmpty(list)) { |
| | | //如果存在之前的数据先删除 |
| | | Query query = new Query(Criteria.where("mongoCreateTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | DeleteResult result = mongoTemplate.remove(query, FaceDeviceInspectionResult.class); |
| | | list.stream().forEach(item -> { |
| | | if (Objects.nonNull(item.getExternalIndexCode())) { |
| | | item.setNo(item.getExternalIndexCode()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(list); |
| | | //存放在mongo中 |
| | | mongoTemplate.insertAll(list); |
| | | //同步的数据进行工单阈值处理 |
| | | ywThresholdService.faceCheck(list); |
| | | } |
| | | // Query query = new Query(Criteria.where("mongoCreateTime").lt(DateUtils.getDayEnd(new Date()))); |
| | | // ywThresholdService.faceCheck(mongoTemplate.find(query, FaceDeviceInspectionResult.class)); |
| | | log.info("结束人脸设备全检指标监测结果数据同步"); |
| | | } |
| | | |
| | |
| | | carParam.setPageSize(ApiConstants.HKPageSize); |
| | | carParam.setDate(DateUtils.getDate()); |
| | | carParam.setDataType(ApiConstants.HK_DataType_CAR); |
| | | List<SnapshotDataMonitorResult> carList = HkApiUtil.sendAPI("/api/dqd/service/rs/v1/data/snapCountDetail/query", carParam, SnapshotDataMonitorResult.class); |
| | | List<SnapshotDataMonitorResult> carList = HkApiUtil.sendAPI(host,appKey,appSecret,"/api/dqd/service/rs/v1/data/snapCountDetail/query", carParam, SnapshotDataMonitorResult.class); |
| | | if (!CollectionUtils.isEmpty(carList)) { |
| | | //如果今天存在之前的数据先删除 |
| | | Query query = new Query(Criteria |
| | | .where("mongoCreateTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date())) |
| | | .and("dataType").is(ApiConstants.HK_DataType_CAR)); |
| | | DeleteResult result = mongoTemplate.remove(query, SnapshotDataMonitorResult.class); |
| | | carList.stream().forEach(item -> { |
| | | if (Objects.nonNull(item.getExternalIndexCode())) { |
| | | item.setNo(item.getExternalIndexCode()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(carList); |
| | | //存放在mongo中 |
| | | carList.forEach(item -> item.setDataType(ApiConstants.HK_DataType_CAR)); |
| | | mongoTemplate.insertAll(carList); |
| | |
| | | faceParam.setPageSize(ApiConstants.HKPageSize); |
| | | faceParam.setDate(DateUtils.getDate()); |
| | | faceParam.setDataType(ApiConstants.HK_DataType_FACE); |
| | | List<SnapshotDataMonitorResult> faceList = HkApiUtil.sendAPI("/api/dqd/service/rs/v1/data/snapCountDetail/query", faceParam, SnapshotDataMonitorResult.class); |
| | | 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); |
| | | faceList.stream().forEach(item -> { |
| | | if (Objects.nonNull(item.getExternalIndexCode())) { |
| | | item.setNo(item.getExternalIndexCode()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(faceList); |
| | | //存放在mongo中 |
| | | carList.forEach(item -> item.setDataType(ApiConstants.HK_DataType_FACE)); |
| | | faceList.forEach(item -> item.setDataType(ApiConstants.HK_DataType_FACE)); |
| | | mongoTemplate.insertAll(faceList); |
| | | } |
| | | //TODO:工单 |
| | | log.info("结束抓拍数据量检测结果数据同步"); |
| | | } |
| | | |
| | |
| | | param.setPageNo(ApiConstants.PageNo); |
| | | param.setPageSize(ApiConstants.HKPageSize); |
| | | param.setDate(DateUtils.getDate()); |
| | | List<MonitoringDetailResult> faceList = HkApiUtil.sendAPI("/api/dqd/service/rs/v1/device/cameraExpDetailInfo/query", param, MonitoringDetailResult.class); |
| | | List<MonitoringDetailResult> faceList = HkApiUtil.sendAPI(host,appKey,appSecret,"/api/dqd/service/rs/v1/device/cameraExpDetailInfo/query", param, MonitoringDetailResult.class); |
| | | if (!CollectionUtils.isEmpty(faceList)) { |
| | | //如果今天存在之前的数据先删除 |
| | | Query query = new Query(Criteria |
| | | .where("mongoCreateTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | DeleteResult result = mongoTemplate.remove(query, MonitoringDetailResult.class); |
| | | faceList.stream().forEach(item -> { |
| | | if (Objects.nonNull(item.getExternalIndexCode())) { |
| | | item.setNo(item.getExternalIndexCode()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(faceList); |
| | | //存放在mongo中 |
| | | mongoTemplate.insertAll(faceList); |
| | | } |
| | | //TODO:工单处理 |
| | | log.info("结束采集设备属性监测结果数据同步"); |
| | | } |
| | | |
| | |
| | | param.setPageNo(ApiConstants.PageNo); |
| | | param.setPageSize(ApiConstants.HKPageSize); |
| | | param.setDate(DateUtils.getDate()); |
| | | List<CrossDetailResult> faceList = HkApiUtil.sendAPI("/api/dqd/service/rs/v1/device/crossExpDetailInfo/query", param, CrossDetailResult.class); |
| | | List<CrossDetailResult> faceList = HkApiUtil.sendAPI(host,appKey,appSecret,"/api/dqd/service/rs/v1/device/crossExpDetailInfo/query", param, CrossDetailResult.class); |
| | | if (!CollectionUtils.isEmpty(faceList)) { |
| | | //如果今天存在之前的数据先删除 |
| | | Query query = new Query(Criteria |
| | | .where("mongoCreateTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | DeleteResult result = mongoTemplate.remove(query, CrossDetailResult.class); |
| | | faceList.stream().forEach(item -> { |
| | | if (Objects.nonNull(item.getExternalIndexCode())) { |
| | | item.setNo(item.getExternalIndexCode()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(faceList); |
| | | //存放在mongo中 |
| | | mongoTemplate.insertAll(faceList); |
| | | } |
| | | //TODO:工单处理 |
| | | log.info("结束卡口属性监测结果数据同步"); |
| | | } |
| | | |
| | |
| | | param.setPageSize(ApiConstants.HKPageSize); |
| | | param.setDate(DateUtils.getDate()); |
| | | param.setDataType(ApiConstants.HK_DataType_CAR); |
| | | List<DataIntegrityMonitoringResult> faceList = HkApiUtil.sendAPI("/api/dqd/service/rs/v1/data/attributeIntegrity/query", param, DataIntegrityMonitoringResult.class); |
| | | List<DataIntegrityMonitoringResult> faceList = HkApiUtil.sendAPI(host,appKey,appSecret,"/api/dqd/service/rs/v1/data/attributeIntegrity/query", param, DataIntegrityMonitoringResult.class); |
| | | |
| | | if (!CollectionUtils.isEmpty(faceList)) { |
| | | //如果今天存在之前的数据先删除 |
| | | Query query = new Query(Criteria |
| | | .where("mongoCreateTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | DeleteResult result = mongoTemplate.remove(query, DataIntegrityMonitoringResult.class); |
| | | faceList.stream().forEach(item -> { |
| | | if (Objects.nonNull(item.getExternalIndexCode())) { |
| | | item.setNo(item.getExternalIndexCode()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(faceList); |
| | | //存放在mongo中 |
| | | mongoTemplate.insertAll(faceList); |
| | | } |
| | | //TODO:工单处理 |
| | | log.info("结束数据完整性监测结果数据同步"); |
| | | } |
| | | |
| | |
| | | param.setPageSize(ApiConstants.HKPageSize); |
| | | param.setDate(DateUtils.getDate()); |
| | | param.setDataType(ApiConstants.HK_DataType_CAR); |
| | | List<AttrRecognitionMonitorResult> faceList = HkApiUtil.sendAPI("/api/dqd/service/rs/v1/data/attributeRecognition/query", param, AttrRecognitionMonitorResult.class); |
| | | List<AttrRecognitionMonitorResult> faceList = HkApiUtil.sendAPI(host,appKey,appSecret,"/api/dqd/service/rs/v1/data/attributeRecognition/query", param, AttrRecognitionMonitorResult.class); |
| | | |
| | | if (!CollectionUtils.isEmpty(faceList)) { |
| | | //如果今天存在之前的数据先删除 |
| | | Query query = new Query(Criteria |
| | | .where("mongoCreateTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | DeleteResult result = mongoTemplate.remove(query, AttrRecognitionMonitorResult.class); |
| | | faceList.stream().forEach(item -> { |
| | | if (Objects.nonNull(item.getExternalIndexCode())) { |
| | | item.setNo(item.getExternalIndexCode()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(faceList); |
| | | //存放在mongo中 |
| | | mongoTemplate.insertAll(faceList); |
| | | } |
| | | //TODO:工单处理 |
| | | log.info("结束属性识别准确监测结果数据同步"); |
| | | |
| | | } |
| | |
| | | carParam.setPageSize(ApiConstants.HKPageSize); |
| | | carParam.setDate(DateUtils.getDate()); |
| | | carParam.setDataType(ApiConstants.HK_DataType_CAR); |
| | | List<SnapshotDelayMonitorResult> carList = HkApiUtil.sendAPI("/api/dqd/service/rs/v1/data/snapAgingDetail/query", carParam, SnapshotDelayMonitorResult.class); |
| | | List<SnapshotDelayMonitorResult> carList = HkApiUtil.sendAPI(host,appKey,appSecret,"/api/dqd/service/rs/v1/data/snapAgingDetail/query", carParam, SnapshotDelayMonitorResult.class); |
| | | |
| | | if (!CollectionUtils.isEmpty(carList)) { |
| | | //如果今天存在之前的数据先删除 |
| | |
| | | DeleteResult result = mongoTemplate.remove(query, SnapshotDelayMonitorResult.class); |
| | | //存放在mongo中 |
| | | carList.forEach(item -> item.setDataType(ApiConstants.HK_DataType_CAR)); |
| | | carList.stream().forEach(item -> { |
| | | if (Objects.nonNull(item.getExternalIndexCode())) { |
| | | item.setNo(item.getExternalIndexCode()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(carList); |
| | | mongoTemplate.insertAll(carList); |
| | | } |
| | | |
| | |
| | | faceParam.setPageSize(ApiConstants.HKPageSize); |
| | | faceParam.setDate(DateUtils.getDate()); |
| | | faceParam.setDataType(ApiConstants.HK_DataType_FACE); |
| | | List<SnapshotDelayMonitorResult> faceList = HkApiUtil.sendAPI("/api/dqd/service/rs/v1/data/snapAgingDetail/query", faceParam, SnapshotDelayMonitorResult.class); |
| | | List<SnapshotDelayMonitorResult> faceList = HkApiUtil.sendAPI(host,appKey,appSecret,"/api/dqd/service/rs/v1/data/snapAgingDetail/query", faceParam, SnapshotDelayMonitorResult.class); |
| | | |
| | | if (!CollectionUtils.isEmpty(faceList)) { |
| | | //如果今天存在之前的数据先删除 |
| | |
| | | faceList.forEach(item -> item.setDataType(ApiConstants.HK_DataType_FACE)); |
| | | mongoTemplate.insertAll(faceList); |
| | | } |
| | | //TODO:工单 |
| | | log.info("结束抓拍数据时延监测结果数据同步"); |
| | | } |
| | | |
| | |
| | | param.setPageSize(ApiConstants.HKPageSize); |
| | | param.setDate(DateUtils.getDate()); |
| | | param.setDataType(ApiConstants.HK_DataType_CAR); |
| | | List<PicAccessResult> faceList = HkApiUtil.sendAPI("/api/dqd/service/rs/v1/data/picAccessDetail/query", param, PicAccessResult.class); |
| | | List<PicAccessResult> faceList = HkApiUtil.sendAPI(host,appKey,appSecret,"/api/dqd/service/rs/v1/data/picAccessDetail/query", param, PicAccessResult.class); |
| | | |
| | | if (!CollectionUtils.isEmpty(faceList)) { |
| | | //如果今天存在之前的数据先删除 |
| | | Query query = new Query(Criteria |
| | | .where("mongoCreateTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | DeleteResult result = mongoTemplate.remove(query, PicAccessResult.class); |
| | | faceList.stream().forEach(item -> { |
| | | if (Objects.nonNull(item.getExternalIndexCode())) { |
| | | item.setNo(item.getExternalIndexCode()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(faceList); |
| | | //存放在mongo中 |
| | | mongoTemplate.insertAll(faceList); |
| | | } |
| | | //TODO:工单处理 |
| | | log.info("结束图片访问监测结果数据同步"); |
| | | } |
| | | |
| | |
| | | param.setPageSize(ApiConstants.HKPageSize); |
| | | param.setDate(DateUtils.getDate()); |
| | | param.setDataType(ApiConstants.HK_DataType_CAR); |
| | | List<VehicleDeviceSamplingResult> faceList = HkApiUtil.sendAPI("/api/dqd/service/rs/v2/data/vehSampleAmount/query", param, VehicleDeviceSamplingResult.class); |
| | | List<VehicleDeviceSamplingResult> faceList = HkApiUtil.sendAPI(host,appKey,appSecret,"/api/dqd/service/rs/v2/data/vehSampleAmount/query", param, VehicleDeviceSamplingResult.class); |
| | | |
| | | if (!CollectionUtils.isEmpty(faceList)) { |
| | | //如果今天存在之前的数据先删除 |
| | | Query query = new Query(Criteria |
| | | .where("mongoCreateTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | DeleteResult result = mongoTemplate.remove(query, VehicleDeviceSamplingResult.class); |
| | | faceList.stream().forEach(item -> { |
| | | if (Objects.nonNull(item.getExternalIndexCode())) { |
| | | item.setNo(item.getExternalIndexCode()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(faceList); |
| | | //存放在mongo中 |
| | | mongoTemplate.insertAll(faceList); |
| | | } |
| | | //TODO:工单处理 |
| | | log.info("结束车辆设备抽检指标监测结果数据同步"); |
| | | } |
| | | |
| | |
| | | param.setPageNo(ApiConstants.PageNo); |
| | | param.setPageSize(ApiConstants.HKPageSize); |
| | | param.setDate(DateUtils.getDate()); |
| | | List<FaceDeviceSamplingResult> faceList = HkApiUtil.sendAPI("/api/dqd/service/rs/v2/data/faceSampleAmount/query", param, FaceDeviceSamplingResult.class); |
| | | List<FaceDeviceSamplingResult> faceList = HkApiUtil.sendAPI(host,appKey,appSecret,"/api/dqd/service/rs/v2/data/faceSampleAmount/query", param, FaceDeviceSamplingResult.class); |
| | | |
| | | if (!CollectionUtils.isEmpty(faceList)) { |
| | | //如果今天存在之前的数据先删除 |
| | | Query query = new Query(Criteria |
| | | .where("mongoCreateTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | DeleteResult result = mongoTemplate.remove(query, FaceDeviceSamplingResult.class); |
| | | faceList.stream().forEach(item -> { |
| | | if (Objects.nonNull(item.getExternalIndexCode())) { |
| | | item.setNo(item.getExternalIndexCode()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(faceList); |
| | | //存放在mongo中 |
| | | mongoTemplate.insertAll(faceList); |
| | | } |
| | | //TODO:工单处理 |
| | | log.info("结束人脸设备抽检指标监测结果数据同步"); |
| | | } |
| | | |
| | | //测试 |
| | | public void test() { |
| | | log.info("测试海康接口"); |
| | | HkApiUtil.sendAPI("/api/dqd/service/rs/v2/data/faceDetect/query", new FaceDeviceSamplingParam(), Object.class); |
| | | log.info("结束->{},调用成功"); |
| | | } |
| | | |
| | | //测试 |
| | | public void test1() { |
| | | log.info("测试海康接口"); |
| | | HkApiUtil.sendAPI("/api/dqd/service/rs/v1/device/coordinateExpInfo/query", new FaceDeviceSamplingParam(), Object.class); |
| | | log.info("结束->{},调用成功"); |
| | | } |
| | | |
| | | //测试 |
| | | public void test2() { |
| | | log.info("测试海康接口"); |
| | | HkApiUtil.sendAPI("/api/dqd/service/rs/v1/device/gbCodeExpInfo/query", new FaceDeviceSamplingParam(), Object.class); |
| | | log.info("结束->{},调用成功"); |
| | | } |
| | | |
| | | //测试 |
| | | public void test3() { |
| | | log.info("测试海康接口"); |
| | | HkApiUtil.sendAPI("/api/dqd/service/rs/v2/data/passDetect/query", new FaceDeviceSamplingParam(), Object.class); |
| | | log.info("结束->{},调用成功"); |
| | | } |
| | | |
| | | //解析数据 |