| | |
| | | package com.ycl.task; |
| | | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.mongodb.client.result.DeleteResult; |
| | | import com.ycl.feign.HKClient; |
| | | import com.ycl.feign.HkApiUtil; |
| | | import com.ycl.feign.UYClient; |
| | | import com.ycl.platform.domain.entity.CheckIndexCar; |
| | | import com.ycl.platform.domain.entity.CheckIndexFace; |
| | | import com.ycl.platform.domain.entity.TMonitor; |
| | | import com.ycl.platform.domain.param.HK.*; |
| | | import com.ycl.platform.domain.result.BaseResult; |
| | | 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.domain.result.UY.MonitorQualifyResult; |
| | | import com.ycl.platform.domain.result.UY.VideoOnlineResult; |
| | | import com.ycl.platform.domain.vo.UpdateOnlineVO; |
| | | import com.ycl.platform.mapper.CheckIndexCarMapper; |
| | | import com.ycl.platform.mapper.CheckIndexFaceMapper; |
| | | import com.ycl.platform.mapper.TMonitorMapper; |
| | | import com.ycl.platform.mapper.WorkOrderMapper; |
| | | import com.ycl.platform.service.*; |
| | | import com.ycl.utils.DateUtils; |
| | | import constant.ApiConstants; |
| | | import com.ycl.feign.HKClient; |
| | | import constant.CheckConstants; |
| | | import enumeration.general.AreaDeptEnum; |
| | | import enumeration.general.PublishType; |
| | | 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 org.springframework.stereotype.Component; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.math.BigDecimal; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.function.Function; |
| | | import java.util.stream.Collectors; |
| | | |
| | | |
| | | //海康对接数据任务 |
| | | @Slf4j |
| | | @Component("HKTask") |
| | | public class HKTask { |
| | | |
| | | @Value("${HK.host}") |
| | | public String host; |
| | | @Value("${HK.appKey}") |
| | | public String appKey; |
| | | @Value("${HK.appSecret}") |
| | | public String appSecret; |
| | | @Value("${HK.carCode}") |
| | | public String carCode; |
| | | @Value("${HK.faceCode}") |
| | | public String faceCode; |
| | | @Value("${HK.carProvinceCode}") |
| | | public String carProvinceCode; |
| | | @Value("${HK.faceProvinceCode}") |
| | | public String faceProvinceCode; |
| | | @Autowired |
| | | private MongoTemplate mongoTemplate; |
| | | @Autowired |
| | | private HKClient hkClient; |
| | | @Autowired |
| | | private IYwThresholdService ywThresholdService; |
| | | @Autowired |
| | | private ICheckIndexFaceService checkIndexFaceService; |
| | | private YwPointService pointService; |
| | | @Autowired |
| | | private ICheckIndexCarService checkIndexCarService; |
| | | private TMonitorMapper monitorMapper; |
| | | @Autowired |
| | | private ICheckIndexVideoService checkIndexVideoService; |
| | | private UYErrorTypeCheckService uyErrorTypeCheckService; |
| | | @Autowired |
| | | private HKClient hkClient; |
| | | @Autowired |
| | | private ICheckIndexCarService carService; |
| | | @Autowired |
| | | private CheckIndexCarMapper carMapper; |
| | | @Autowired |
| | | private ICheckIndexFaceService faceService; |
| | | @Autowired |
| | | private CheckIndexFaceMapper faceMapper; |
| | | |
| | | //车辆设备全检指标监测结果 |
| | | public void vehicleDeviceInspectionTask() { |
| | | log.info("开始执行车辆设备全检指标监测结果数据同步"); |
| | | VehicleDeviceInspectionParam param = new VehicleDeviceInspectionParam(); |
| | | param.setPageNO(ApiConstants.pageNo).setPageSize(ApiConstants.pageSize).setDate(DateUtils.getDate()); |
| | | JSONObject jsonObject = hkClient.VehicleDeviceInspection(param); |
| | | List<VehicleDeviceInspectionResult> list = getDataList(jsonObject, VehicleDeviceInspectionResult.class, "车辆设备全检指标监测结果数据为空"); |
| | | 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("createTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | 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, CheckConstants.Rule_Category_Car); |
| | | //存放在mongo中 |
| | | mongoTemplate.insert(list); |
| | | 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).setPageSize(ApiConstants.pageSize).setDate(DateUtils.getDate()); |
| | | JSONObject jsonObject = hkClient.FaceDeviceInspection(param); |
| | | List<FaceDeviceInspectionResult> list = getDataList(jsonObject, FaceDeviceInspectionResult.class, "人脸设备全检指标监测结果数据为空"); |
| | | 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("createTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | 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, CheckConstants.Rule_Category_Face); |
| | | //存放在mongo中 |
| | | mongoTemplate.insert(list); |
| | | 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)); |
| | | log.info("结束人脸设备全检指标监测结果数据同步"); |
| | | } |
| | | |
| | | |
| | | //抓拍数据量监测结果 |
| | | // 抓拍数据量监测结果 |
| | | public void snapshotDataMonitorTask() { |
| | | log.info("开始执行抓拍数据量检测结果数据同步"); |
| | | /** 车辆数据 */ |
| | | SnapshotDataMonitorParam carParam = new SnapshotDataMonitorParam(); |
| | | carParam.setPageNO(ApiConstants.pageNo).setPageSize(ApiConstants.pageSize).setDate(DateUtils.getDate()).setDataType(ApiConstants.HK_DATATYPE_CAR); |
| | | JSONObject carJsonObject = hkClient.SnapshotDataMonitor(carParam); |
| | | List<SnapshotDataMonitorResult> carList = getDataList(carJsonObject, SnapshotDataMonitorResult.class, "车辆抓拍数据量检测结果数据"); |
| | | carParam.setPageNo(ApiConstants.PageNo); |
| | | carParam.setPageSize(ApiConstants.HKPageSize); |
| | | carParam.setDate(DateUtils.getDate()); |
| | | carParam.setDataType(ApiConstants.HK_DataType_CAR); |
| | | 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("createTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date())) |
| | | .and("dataType").is(ApiConstants.HK_DATATYPE_CAR)); |
| | | .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, CheckConstants.Rule_Category_Car); |
| | | //存放在mongo中 |
| | | carList.forEach(item -> item.setDataType(ApiConstants.HK_DATATYPE_CAR)); |
| | | mongoTemplate.insert(carList); |
| | | carList.forEach(item -> item.setDataType(ApiConstants.HK_DataType_CAR)); |
| | | mongoTemplate.insertAll(carList); |
| | | } |
| | | |
| | | /** 人脸数据 */ |
| | | SnapshotDataMonitorParam faceParam = new SnapshotDataMonitorParam(); |
| | | faceParam.setPageNO(ApiConstants.pageNo).setPageSize(ApiConstants.pageSize).setDate(DateUtils.getDate()).setDataType(ApiConstants.HK_DATATYPE_FACE); |
| | | JSONObject faceJsonObject = hkClient.SnapshotDataMonitor(carParam); |
| | | List<SnapshotDataMonitorResult> faceList = getDataList(faceJsonObject, SnapshotDataMonitorResult.class, "人脸抓拍数据量检测结果数据为空"); |
| | | faceParam.setPageNo(ApiConstants.PageNo); |
| | | faceParam.setPageSize(ApiConstants.HKPageSize); |
| | | faceParam.setDate(DateUtils.getDate()); |
| | | 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("createTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date())) |
| | | .and("dataType").is(ApiConstants.HK_DATATYPE_FACE)); |
| | | .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, CheckConstants.Rule_Category_Face); |
| | | //存放在mongo中 |
| | | carList.forEach(item -> item.setDataType(ApiConstants.HK_DATATYPE_FACE)); |
| | | mongoTemplate.insert(faceList); |
| | | faceList.forEach(item -> item.setDataType(ApiConstants.HK_DataType_FACE)); |
| | | mongoTemplate.insertAll(faceList); |
| | | } |
| | | //TODO:工单 |
| | | //修改online状态以及生成工单 |
| | | List<SnapshotDataMonitorResult> totalResult = new ArrayList<>(); |
| | | totalResult.addAll(carList); |
| | | totalResult.addAll(faceList); |
| | | if (!CollectionUtils.isEmpty(totalResult)) { |
| | | List<String> numbers = totalResult.stream().map(SnapshotDataMonitorResult::getExternalIndexCode).collect(Collectors.toList()); |
| | | Map<String, TMonitor> map = monitorMapper.selectList(new QueryWrapper<TMonitor>().in("serial_number", numbers)) |
| | | .stream().collect(Collectors.toMap(TMonitor::getSerialNumber, Function.identity())); |
| | | Date now = new Date(); |
| | | //过滤 |
| | | totalResult = totalResult.stream().filter(item -> map.get(item.getExternalIndexCode()) != null).collect(Collectors.toList()); |
| | | totalResult.forEach(item -> { |
| | | TMonitor monitor = map.get(item.getExternalIndexCode()); |
| | | item.setIp(monitor.getIp()); |
| | | }); |
| | | List<UpdateOnlineVO> willUpdateList = totalResult.stream().map(item -> { |
| | | UpdateOnlineVO vo = new UpdateOnlineVO(); |
| | | vo.setOnline(item.getDataCount() > 0 ? 1 : -1); |
| | | vo.setIp(map.get(item.getExternalIndexCode()).getIp()); |
| | | vo.setUpdateTime(now); |
| | | return vo; |
| | | }).collect(Collectors.toList()); |
| | | monitorMapper.updateOnlineFromUyOrHk(willUpdateList); |
| | | //离线生成工单,一个ip只生成一个工单 |
| | | List<SnapshotDataMonitorResult> workOrders = new ArrayList<>(totalResult.stream() |
| | | .filter(item -> ApiConstants.UY_OnlineSite_Offline.equals(item.getDataCount() > 0 ? 1 : -1)) |
| | | .collect(Collectors.toMap( |
| | | SnapshotDataMonitorResult::getIp, |
| | | Function.identity(), |
| | | (existing, replacement) -> existing // 如果遇到相同的 IP,保留第一个(existing) |
| | | )).values()); |
| | | uyErrorTypeCheckService.hkOnlineCheck(workOrders); |
| | | } |
| | | log.info("结束抓拍数据量检测结果数据同步"); |
| | | } |
| | | |
| | |
| | | log.info("开始执行采集设备属性监测结果数据同步"); |
| | | //人脸卡口信息采集准确率 |
| | | MonitoringDetailParam param = new MonitoringDetailParam(); |
| | | param.setPageNO(ApiConstants.pageNo).setPageSize(ApiConstants.pageSize).setDate(DateUtils.getDate()); |
| | | JSONObject jsonObject = hkClient.monitorDetail(param); |
| | | List<MonitoringDetailResult> faceList = getDataList(jsonObject, MonitoringDetailResult.class, "采集设备属性监测结果数据为空"); |
| | | param.setPageNo(ApiConstants.PageNo); |
| | | param.setPageSize(ApiConstants.HKPageSize); |
| | | param.setDate(DateUtils.getDate()); |
| | | 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("createTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | .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, CheckConstants.Rule_Category_Face); |
| | | //存放在mongo中 |
| | | mongoTemplate.insert(faceList); |
| | | mongoTemplate.insertAll(faceList); |
| | | } |
| | | //TODO:工单处理 |
| | | log.info("结束采集设备属性监测结果数据同步"); |
| | | } |
| | | |
| | |
| | | log.info("开始执行卡口属性监测结果数据同步"); |
| | | //车辆卡口信息采集准确率 |
| | | CrossDetailParam param = new CrossDetailParam(); |
| | | param.setPageNO(ApiConstants.pageNo).setPageSize(ApiConstants.pageSize).setDate(DateUtils.getDate()); |
| | | JSONObject jsonObject = hkClient.crossDetail(param); |
| | | List<CrossDetailResult> faceList = getDataList(jsonObject, CrossDetailResult.class, "卡口属性监测结果数据为空"); |
| | | if (!CollectionUtils.isEmpty(faceList)) { |
| | | param.setPageNo(ApiConstants.PageNo); |
| | | param.setPageSize(ApiConstants.HKPageSize); |
| | | param.setDate(DateUtils.getDate()); |
| | | List<CrossDetailResult> carList = HkApiUtil.sendAPI(host, appKey, appSecret, "/api/dqd/service/rs/v1/device/crossExpDetailInfo/query", param, CrossDetailResult.class); |
| | | if (!CollectionUtils.isEmpty(carList)) { |
| | | //如果今天存在之前的数据先删除 |
| | | Query query = new Query(Criteria |
| | | .where("createTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | .where("mongoCreateTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | DeleteResult result = mongoTemplate.remove(query, CrossDetailResult.class); |
| | | carList.stream().forEach(item -> { |
| | | if (Objects.nonNull(item.getExternalIndexCode())) { |
| | | item.setNo(item.getExternalIndexCode()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(carList, CheckConstants.Rule_Category_Car); |
| | | //存放在mongo中 |
| | | mongoTemplate.insert(faceList); |
| | | mongoTemplate.insertAll(carList); |
| | | } |
| | | //TODO:工单处理 |
| | | log.info("结束卡口属性监测结果数据同步"); |
| | | } |
| | | |
| | |
| | | log.info("开始执行数据完整性监测结果数据同步"); |
| | | //车辆卡口设备抓拍数据完整性 |
| | | DataIntegrityMonitoringParam param = new DataIntegrityMonitoringParam(); |
| | | param.setPageNO(ApiConstants.pageNo).setPageSize(ApiConstants.pageSize).setDate(DateUtils.getDate()).setDataType(ApiConstants.HK_DATATYPE_CAR); |
| | | JSONObject jsonObject = hkClient.DataIntegrityMonitoring(param); |
| | | List<DataIntegrityMonitoringResult> faceList = getDataList(jsonObject, DataIntegrityMonitoringResult.class, "数据完整性监测结果数据为空"); |
| | | if (!CollectionUtils.isEmpty(faceList)) { |
| | | param.setPageNo(ApiConstants.PageNo); |
| | | param.setPageSize(ApiConstants.HKPageSize); |
| | | param.setDate(DateUtils.getDate()); |
| | | param.setDataType(ApiConstants.HK_DataType_CAR); |
| | | List<DataIntegrityMonitoringResult> carList = HkApiUtil.sendAPI(host, appKey, appSecret, "/api/dqd/service/rs/v1/data/attributeIntegrity/query", param, DataIntegrityMonitoringResult.class); |
| | | |
| | | if (!CollectionUtils.isEmpty(carList)) { |
| | | //如果今天存在之前的数据先删除 |
| | | Query query = new Query(Criteria |
| | | .where("createTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | .where("mongoCreateTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | DeleteResult result = mongoTemplate.remove(query, DataIntegrityMonitoringResult.class); |
| | | carList.stream().forEach(item -> { |
| | | if (Objects.nonNull(item.getExternalIndexCode())) { |
| | | item.setNo(item.getExternalIndexCode()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(carList, CheckConstants.Rule_Category_Car); |
| | | //存放在mongo中 |
| | | mongoTemplate.insert(faceList); |
| | | mongoTemplate.insertAll(carList); |
| | | } |
| | | //TODO:工单处理 |
| | | log.info("结束数据完整性监测结果数据同步"); |
| | | } |
| | | |
| | |
| | | log.info("开始执行属性识别准确监测结果数据同步"); |
| | | //车辆卡口设备抓拍数据准确性 |
| | | AttrRecognitionParam param = new AttrRecognitionParam(); |
| | | param.setPageNO(ApiConstants.pageNo).setPageSize(ApiConstants.pageSize).setDate(DateUtils.getDate()).setDataType(ApiConstants.HK_DATATYPE_CAR); |
| | | JSONObject jsonObject = hkClient.AttrRecognitionMonitor(param); |
| | | List<AttrRecognitionMonitorResult> faceList = getDataList(jsonObject, AttrRecognitionMonitorResult.class, "属性识别准确监测结果数据为空"); |
| | | if (!CollectionUtils.isEmpty(faceList)) { |
| | | param.setPageNo(ApiConstants.PageNo); |
| | | param.setPageSize(ApiConstants.HKPageSize); |
| | | param.setDate(DateUtils.getDate()); |
| | | param.setDataType(ApiConstants.HK_DataType_CAR); |
| | | List<AttrRecognitionMonitorResult> carList = HkApiUtil.sendAPI(host, appKey, appSecret, "/api/dqd/service/rs/v1/data/attributeRecognition/query", param, AttrRecognitionMonitorResult.class); |
| | | |
| | | if (!CollectionUtils.isEmpty(carList)) { |
| | | //如果今天存在之前的数据先删除 |
| | | Query query = new Query(Criteria |
| | | .where("createTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | .where("mongoCreateTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | DeleteResult result = mongoTemplate.remove(query, AttrRecognitionMonitorResult.class); |
| | | carList.stream().forEach(item -> { |
| | | if (Objects.nonNull(item.getExternalIndexCode())) { |
| | | item.setNo(item.getExternalIndexCode()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(carList, CheckConstants.Rule_Category_Car); |
| | | //存放在mongo中 |
| | | mongoTemplate.insert(faceList); |
| | | mongoTemplate.insertAll(carList); |
| | | } |
| | | //TODO:工单处理 |
| | | log.info("结束属性识别准确监测结果数据同步"); |
| | | |
| | | } |
| | |
| | | //车辆卡口设备抓拍数据上传及时性 |
| | | /** 车辆数据 */ |
| | | SnapshotDelayMonitorParam carParam = new SnapshotDelayMonitorParam(); |
| | | carParam.setPageNO(ApiConstants.pageNo).setPageSize(ApiConstants.pageSize).setDate(DateUtils.getDate()).setDataType(ApiConstants.HK_DATATYPE_CAR); |
| | | JSONObject carJsonObject = hkClient.SnapshotDelayMonitor(carParam); |
| | | List<SnapshotDelayMonitorResult> carList = getDataList(carJsonObject, SnapshotDelayMonitorResult.class, "车辆抓拍数据量检测结果数据"); |
| | | carParam.setPageNo(ApiConstants.PageNo); |
| | | carParam.setPageSize(ApiConstants.HKPageSize); |
| | | carParam.setDate(DateUtils.getDate()); |
| | | carParam.setDataType(ApiConstants.HK_DataType_CAR); |
| | | List<SnapshotDelayMonitorResult> carList = HkApiUtil.sendAPI(host, appKey, appSecret, "/api/dqd/service/rs/v1/data/snapAgingDetail/query", carParam, SnapshotDelayMonitorResult.class); |
| | | |
| | | if (!CollectionUtils.isEmpty(carList)) { |
| | | //如果今天存在之前的数据先删除 |
| | | Query query = new Query(Criteria |
| | | .where("createTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date())) |
| | | .and("dataType").is(ApiConstants.HK_DATATYPE_CAR)); |
| | | DeleteResult result = mongoTemplate.remove(query, SnapshotDataMonitorResult.class); |
| | | .where("mongoCreateTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date())) |
| | | .and("dataType").is(ApiConstants.HK_DataType_CAR)); |
| | | DeleteResult result = mongoTemplate.remove(query, SnapshotDelayMonitorResult.class); |
| | | //存放在mongo中 |
| | | carList.forEach(item -> item.setDataType(ApiConstants.HK_DATATYPE_CAR)); |
| | | mongoTemplate.insert(carList); |
| | | carList.stream().forEach(item -> { |
| | | item.setDataType(ApiConstants.HK_DataType_CAR); |
| | | if (Objects.nonNull(item.getExternalIndexCode())) { |
| | | item.setNo(item.getExternalIndexCode()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(carList, CheckConstants.Rule_Category_Car); |
| | | mongoTemplate.insertAll(carList); |
| | | } |
| | | |
| | | /** 人脸数据 */ |
| | | SnapshotDelayMonitorParam faceParam = new SnapshotDelayMonitorParam(); |
| | | faceParam.setPageNO(ApiConstants.pageNo).setPageSize(ApiConstants.pageSize).setDate(DateUtils.getDate()).setDataType(ApiConstants.HK_DATATYPE_FACE); |
| | | JSONObject faceJsonObject = hkClient.SnapshotDelayMonitor(faceParam); |
| | | List<SnapshotDelayMonitorParam> faceList = getDataList(faceJsonObject, SnapshotDelayMonitorParam.class, "人脸抓拍数据量检测结果数据为空"); |
| | | faceParam.setPageNo(ApiConstants.PageNo); |
| | | faceParam.setPageSize(ApiConstants.HKPageSize); |
| | | faceParam.setDate(DateUtils.getDate()); |
| | | faceParam.setDataType(ApiConstants.HK_DataType_FACE); |
| | | List<SnapshotDelayMonitorResult> faceList = HkApiUtil.sendAPI(host, appKey, appSecret, "/api/dqd/service/rs/v1/data/snapAgingDetail/query", faceParam, SnapshotDelayMonitorResult.class); |
| | | |
| | | if (!CollectionUtils.isEmpty(faceList)) { |
| | | //如果今天存在之前的数据先删除 |
| | | Query query = new Query(Criteria |
| | | .where("createTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date())) |
| | | .and("dataType").is(ApiConstants.HK_DATATYPE_FACE)); |
| | | DeleteResult result = mongoTemplate.remove(query, SnapshotDataMonitorResult.class); |
| | | .where("mongoCreateTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date())) |
| | | .and("dataType").is(ApiConstants.HK_DataType_FACE)); |
| | | DeleteResult result = mongoTemplate.remove(query, SnapshotDelayMonitorResult.class); |
| | | //存放在mongo中 |
| | | carList.forEach(item -> item.setDataType(ApiConstants.HK_DATATYPE_FACE)); |
| | | mongoTemplate.insert(faceList); |
| | | faceList.forEach(item -> { |
| | | item.setDataType(ApiConstants.HK_DataType_FACE); |
| | | if (Objects.nonNull(item.getExternalIndexCode())) { |
| | | item.setNo(item.getExternalIndexCode()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(faceList, CheckConstants.Rule_Category_Face); |
| | | mongoTemplate.insertAll(faceList); |
| | | } |
| | | //TODO:工单 |
| | | log.info("结束抓拍数据时延监测结果数据同步"); |
| | | } |
| | | |
| | | //图片访问监测结果 |
| | | public void PicAccessTask() { |
| | | public void picAccessTask() { |
| | | log.info("开始执行图片访问监测结果数据同步"); |
| | | //车辆卡口信息采集准确率、车辆卡口设备url可用性 |
| | | PicAccessParam param = new PicAccessParam(); |
| | | param.setPageNO(ApiConstants.pageNo).setPageSize(ApiConstants.pageSize).setDate(DateUtils.getDate()).setDataType(ApiConstants.HK_DATATYPE_CAR); |
| | | JSONObject jsonObject = hkClient.PicAccessMonitor(param); |
| | | List<PicAccessResult> faceList = getDataList(jsonObject, PicAccessResult.class, "图片访问监测结果数据为空"); |
| | | if (!CollectionUtils.isEmpty(faceList)) { |
| | | param.setPageNo(ApiConstants.PageNo); |
| | | param.setPageSize(ApiConstants.HKPageSize); |
| | | param.setDate(DateUtils.getDate()); |
| | | param.setDataType(ApiConstants.HK_DataType_CAR); |
| | | List<PicAccessResult> carList = HkApiUtil.sendAPI(host, appKey, appSecret, "/api/dqd/service/rs/v1/data/picAccessDetail/query", param, PicAccessResult.class); |
| | | |
| | | if (!CollectionUtils.isEmpty(carList)) { |
| | | //如果今天存在之前的数据先删除 |
| | | Query query = new Query(Criteria |
| | | .where("createTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | .where("mongoCreateTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | DeleteResult result = mongoTemplate.remove(query, PicAccessResult.class); |
| | | carList.stream().forEach(item -> { |
| | | if (Objects.nonNull(item.getExternalIndexCode())) { |
| | | item.setNo(item.getExternalIndexCode()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(carList, CheckConstants.Rule_Category_Car); |
| | | //存放在mongo中 |
| | | mongoTemplate.insert(faceList); |
| | | mongoTemplate.insertAll(carList); |
| | | } |
| | | //TODO:工单处理 |
| | | log.info("结束图片访问监测结果数据同步"); |
| | | } |
| | | |
| | | //人脸设备抽检指标监测结果 |
| | | public void Face() { |
| | | log.info("开始执行人脸设备抽检指标监测结果数据同步"); |
| | | //车辆设备抽检指标监测结果 |
| | | public void vehicleDeviceSamplingTask() { |
| | | log.info("开始执行车辆设备抽检指标监测结果数据同步"); |
| | | //车辆卡口信息采集准确率、车辆卡口设备url可用性 |
| | | VehicleDeviceSamplingParam param = new VehicleDeviceSamplingParam(); |
| | | param.setPageNo(ApiConstants.PageNo); |
| | | param.setPageSize(ApiConstants.HKPageSize); |
| | | param.setDate(DateUtils.getDate()); |
| | | param.setDataType(ApiConstants.HK_DataType_CAR); |
| | | List<VehicleDeviceSamplingResult> carList = HkApiUtil.sendAPI(host, appKey, appSecret, "/api/dqd/service/rs/v2/data/vehSampleAmount/query", param, VehicleDeviceSamplingResult.class); |
| | | |
| | | if (!CollectionUtils.isEmpty(carList)) { |
| | | //如果今天存在之前的数据先删除 |
| | | Query query = new Query(Criteria |
| | | .where("mongoCreateTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | DeleteResult result = mongoTemplate.remove(query, VehicleDeviceSamplingResult.class); |
| | | carList.stream().forEach(item -> { |
| | | if (Objects.nonNull(item.getExternalIndexCode())) { |
| | | item.setNo(item.getExternalIndexCode()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(carList, CheckConstants.Rule_Category_Car); |
| | | //存放在mongo中 |
| | | mongoTemplate.insertAll(carList); |
| | | } |
| | | log.info("结束车辆设备抽检指标监测结果数据同步"); |
| | | } |
| | | |
| | | |
| | | //人脸设备抽检指标监测结果 |
| | | public void faceDeviceSamplingTask() { |
| | | log.info("开始执行人脸设备抽检指标监测结果数据同步"); |
| | | FaceDeviceSamplingParam param = new FaceDeviceSamplingParam(); |
| | | param.setPageNO(ApiConstants.pageNo).setPageSize(ApiConstants.pageSize).setDate(DateUtils.getDate()); |
| | | JSONObject jsonObject = hkClient.FaceDeviceSampling(param); |
| | | List<FaceDeviceSamplingResult> faceList = getDataList(jsonObject, FaceDeviceSamplingResult.class, "人脸设备抽检指标监测结果数据为空"); |
| | | param.setPageNo(ApiConstants.PageNo); |
| | | param.setPageSize(ApiConstants.HKPageSize); |
| | | param.setDate(DateUtils.getDate()); |
| | | 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("createTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | DeleteResult result = mongoTemplate.remove(query, PicAccessResult.class); |
| | | .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, CheckConstants.Rule_Category_Face); |
| | | //存放在mongo中 |
| | | mongoTemplate.insert(faceList); |
| | | mongoTemplate.insertAll(faceList); |
| | | } |
| | | //TODO:工单处理 |
| | | log.info("结束人脸设备抽检指标监测结果数据同步"); |
| | | } |
| | | |
| | | //车辆设备抽检指标监测结果 |
| | | public void FaceDeviceSamplingTask() { |
| | | log.info("开始执行车辆设备抽检指标监测结果数据同步"); |
| | | //车辆卡口信息采集准确率、车辆卡口设备url可用性 |
| | | FaceDeviceSamplingParam param = new FaceDeviceSamplingParam(); |
| | | param.setPageNO(ApiConstants.pageNo).setPageSize(ApiConstants.pageSize).setDate(DateUtils.getDate()); |
| | | JSONObject jsonObject = hkClient.FaceDeviceSampling(param); |
| | | List<FaceDeviceSamplingResult> faceList = getDataList(jsonObject, FaceDeviceSamplingResult.class, "人脸设备抽检指标监测结果数据为空"); |
| | | if (!CollectionUtils.isEmpty(faceList)) { |
| | | //如果今天存在之前的数据先删除 |
| | | Query query = new Query(Criteria |
| | | .where("createTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | DeleteResult result = mongoTemplate.remove(query, PicAccessResult.class); |
| | | //存放在mongo中 |
| | | mongoTemplate.insert(faceList); |
| | | //考核成绩 |
| | | public void HkScoreTask() { |
| | | log.info("开始执行海康考核成绩数据"); |
| | | //准备新增或修改的数据 |
| | | List<CheckIndexCar> cars = new ArrayList<>(); |
| | | List<CheckIndexFace> faces = new ArrayList<>(); |
| | | // 查询是否index表已经存在今日数据 |
| | | List<CheckIndexFace> checkIndexFaceList = faceMapper.selectToday(utils.DateUtils.getDate()); |
| | | List<CheckIndexCar> checkIndexCarList = carMapper.selectToday(utils.DateUtils.getDate()); |
| | | |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
| | | // 获取当前时间的Calendar实例 |
| | | Calendar calendar = Calendar.getInstance(); |
| | | // 设置时间为前一天 |
| | | calendar.add(Calendar.DATE, -1); |
| | | // 获取前一天的Date对象 |
| | | Date yesterday = calendar.getTime(); |
| | | //先请求全量数据 |
| | | ScoreParam param = new ScoreParam(); |
| | | param.setStartDate(format.format(yesterday)); |
| | | param.setEndDate(format.format(yesterday)); |
| | | param.setFocusFlag(ApiConstants.HK_FOCUS_FLAG_ALL); |
| | | param.setCarTree(carCode); |
| | | param.setFaceTree(faceCode); |
| | | JSONObject scoreJson = hkClient.getScore(param); |
| | | if (scoreJson != null) { |
| | | String code = scoreJson.getString("code"); |
| | | if (ApiConstants.HKSuccessCode.equals(code)) { |
| | | List<HKScoreResult> data = scoreJson.getList("data", HKScoreResult.class); |
| | | //根据数据转换为index对象 |
| | | data.forEach(score -> { |
| | | CheckIndexCar car = new CheckIndexCar(); |
| | | CheckIndexFace face = new CheckIndexFace(); |
| | | score2Index(score, car, face); |
| | | car.setExamineTag(CheckConstants.Examine_Tag_County); |
| | | face.setExamineTag(CheckConstants.Examine_Tag_County); |
| | | Optional<CheckIndexCar> carFirst = checkIndexCarList.stream() |
| | | .filter(index -> CheckConstants.Examine_Tag_County.equals(index.getExamineTag()) && car.getDeptId().equals(index.getDeptId())) |
| | | .findFirst(); |
| | | Optional<CheckIndexFace> faceFirst = checkIndexFaceList.stream() |
| | | .filter(index -> CheckConstants.Examine_Tag_County.equals(index.getExamineTag()) && face.getDeptId().equals(index.getDeptId())) |
| | | .findFirst(); |
| | | if (carFirst.isPresent()) { |
| | | car.setId(carFirst.get().getId()); |
| | | } |
| | | if (faceFirst.isPresent()) { |
| | | face.setId(faceFirst.get().getId()); |
| | | } |
| | | cars.add(car); |
| | | faces.add(face); |
| | | }); |
| | | } |
| | | } |
| | | //TODO:工单处理 |
| | | log.info("结束人脸设备抽检指标监测结果数据同步"); |
| | | |
| | | //先请求省厅数据 |
| | | ScoreParam provinceParam = new ScoreParam(); |
| | | provinceParam.setStartDate(format.format(yesterday)); |
| | | provinceParam.setEndDate(format.format(yesterday)); |
| | | provinceParam.setFocusFlag(ApiConstants.HK_FOCUS_FLAG_ALL); |
| | | provinceParam.setCarTree(carProvinceCode); |
| | | provinceParam.setFaceTree(faceProvinceCode); |
| | | JSONObject scoreProvinceJson = hkClient.getScore(provinceParam); |
| | | if (scoreProvinceJson != null) { |
| | | String code = scoreProvinceJson.getString("code"); |
| | | if (ApiConstants.HKSuccessCode.equals(code)) { |
| | | List<HKScoreResult> data = scoreProvinceJson.getList("data", HKScoreResult.class); |
| | | |
| | | //根据数据转换为index对象 |
| | | data.forEach(score -> { |
| | | CheckIndexCar car = new CheckIndexCar(); |
| | | CheckIndexFace face = new CheckIndexFace(); |
| | | score2Index(score, car, face); |
| | | car.setExamineTag(CheckConstants.Examine_Tag_Province); |
| | | face.setExamineTag(CheckConstants.Examine_Tag_Province); |
| | | Optional<CheckIndexCar> carFirst = checkIndexCarList.stream() |
| | | .filter(index -> CheckConstants.Examine_Tag_Province.equals(index.getExamineTag()) && car.getDeptId().equals(index.getDeptId())) |
| | | .findFirst(); |
| | | Optional<CheckIndexFace> faceFirst = checkIndexFaceList.stream() |
| | | .filter(index -> CheckConstants.Examine_Tag_Province.equals(index.getExamineTag()) && face.getDeptId().equals(index.getDeptId())) |
| | | .findFirst(); |
| | | if (carFirst.isPresent()) { |
| | | car.setId(carFirst.get().getId()); |
| | | } |
| | | if (faceFirst.isPresent()) { |
| | | face.setId(faceFirst.get().getId()); |
| | | } |
| | | cars.add(car); |
| | | faces.add(face); |
| | | }); |
| | | } |
| | | } |
| | | //存放成绩到mysql,如果存在则替换不存在就新增。 |
| | | if (!CollectionUtils.isEmpty(cars)) carService.saveOrUpdateBatch(cars); |
| | | if (!CollectionUtils.isEmpty(faces)) faceService.saveOrUpdateBatch(faces); |
| | | log.info("结束海康考核成绩数据"); |
| | | } |
| | | |
| | | private void score2Index(HKScoreResult score, CheckIndexCar car, CheckIndexFace face) { |
| | | car.setDeptId(Long.parseLong(AreaDeptEnum.fromCode(score.getAreaCode()).getDeptId() + "")); |
| | | car.setCreateTime(new Date()); |
| | | car.setPublish(PublishType.PUBLISHED.getCode()); |
| | | face.setDeptId(Long.parseLong(AreaDeptEnum.fromCode(score.getAreaCode()).getDeptId() + "")); |
| | | face.setCreateTime(new Date()); |
| | | face.setPublish(PublishType.PUBLISHED.getCode()); |
| | | |
| | | car.setViewConnectStability(new BigDecimal(score.getDownCarDataUploadScoreString() == null ? "1" : score.getDownCarDataUploadScoreString())); |
| | | car.setSiteOnline(new BigDecimal(score.getDownCrossQualityCarScoreString() == null ? "1" : score.getDownCrossQualityCarScoreString())); |
| | | car.setDeviceDirectoryConsistent(new BigDecimal(score.getDownCrossNumPushCarScoreString() == null ? "1" : score.getDownCrossNumPushCarScoreString())); |
| | | //TODO:没找到考核项 |
| | | car.setVehicleInformationCollectionAccuracy(new BigDecimal("1")); |
| | | car.setVehicleCaptureIntegrity(new BigDecimal(score.getDownCrossAllCarDataIntegrityScoreString() == null ? "1" : score.getDownCrossAllCarDataIntegrityScoreString())); |
| | | //海康是设为1的,但是接口推的原始数据 |
| | | car.setVehicleCaptureAccuracy(new BigDecimal("1")); |
| | | car.setVehicleTimingAccuracy(new BigDecimal(score.getDownCrossCarInvertScoreString() == null ? "1" : score.getDownCrossCarInvertScoreString())); |
| | | car.setVehicleUploadTimeliness(new BigDecimal(score.getDownCrossAllCarDelayScoreString() == null ? "1" : score.getDownCrossAllCarDelayScoreString())); |
| | | //TODO:没找到考核项 |
| | | car.setVehicleUrlAvailability(new BigDecimal("1")); |
| | | car.setVehiclePictureAvailability(new BigDecimal(score.getDownCrossPictureQualityCarScoreString() == null ? "1" : score.getDownCrossPictureQualityCarScoreString())); |
| | | |
| | | face.setViewConnectStability(new BigDecimal(score.getDownFaceDataUploadScoreString() == null ? "1" : score.getDownFaceDataUploadScoreString())); |
| | | face.setSiteOnline(new BigDecimal(score.getDownFaceDataUploadScoreString() == null ? "1" : score.getDownFaceDataUploadScoreString())); |
| | | face.setDeviceDirectoryConsistent(new BigDecimal(score.getDownCrossNumPushFaceScoreString() == null ? "1" : score.getDownCrossNumPushFaceScoreString())); |
| | | //TODO:没找到考核项 |
| | | face.setFaceInformationCollectionAccuracy(new BigDecimal("1")); |
| | | //TODO:没找到考核项 |
| | | face.setFacePictureQualification(new BigDecimal("1")); |
| | | face.setFaceTimingAccuracy(new BigDecimal(score.getDownCrossFaceInvertScoreString() == null ? "1" : score.getDownCrossFaceInvertScoreString())); |
| | | face.setFaceUploadTimeliness(new BigDecimal(score.getDownCrossAllFaceDelayScoreString() == null ? "1" : score.getDownCrossAllFaceDelayScoreString())); |
| | | face.setFacePictureAvailability(new BigDecimal(score.getDownCrossPictureQualityFaceScoreString() == null ? "1" : score.getDownCrossPictureQualityFaceScoreString())); |
| | | } |
| | | |
| | | //解析数据 |
| | | private <T> List<T> getDataList(JSONObject faceJsonObject, Class<T> resultClass, String message) { |
| | | if (faceJsonObject != null && ApiConstants.successCode.equals(faceJsonObject.getString("code"))) { |
| | | JSONObject data = faceJsonObject.getJSONObject("data"); |
| | | private <T> List<T> getDataList(JSONObject jsonObject, Class<T> resultClass, String message) { |
| | | if (jsonObject != null && ApiConstants.HKSuccessCode.equals(jsonObject.getString("code"))) { |
| | | log.info("数据格式" + jsonObject); |
| | | JSONObject data = jsonObject.getJSONObject("data"); |
| | | if (data == null) { |
| | | log.error(message, faceJsonObject); |
| | | log.error(message, jsonObject); |
| | | return null; |
| | | } |
| | | List<T> list = data.getList("list", resultClass); |
| | | if (CollectionUtils.isEmpty(list)) { |
| | | log.error(message, data); |
| | | return null; |
| | | } |
| | | for (T t : list) { |
| | | if (t instanceof BaseResult) { |
| | | ((BaseResult) t).setCreateTime(new Date()); |
| | | } |
| | | } |
| | | return list; |
| | | } else { |