| | |
| | | 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.feign.*; |
| | | import com.ycl.platform.domain.entity.CheckIndexCar; |
| | | import com.ycl.platform.domain.entity.CheckIndexFace; |
| | | import com.ycl.platform.domain.entity.TMonitor; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.cloud.client.loadbalancer.LoadBalancerRequestFactory; |
| | | 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.http.converter.StringHttpMessageConverter; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | |
| | | private ICheckIndexFaceService faceService; |
| | | @Autowired |
| | | private CheckIndexFaceMapper faceMapper; |
| | | @Autowired |
| | | private StringHttpMessageConverter stringHttpMessageConverter; |
| | | @Autowired |
| | | private LoadBalancerRequestFactory loadBalancerRequestFactory; |
| | | |
| | | //车辆设备全检指标监测结果 |
| | | public void vehicleDeviceInspectionTask() { |
| | |
| | | } |
| | | |
| | | //考核成绩 |
| | | public void HkScoreTask() { |
| | | // 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); |
| | | // }); |
| | | // } |
| | | // } |
| | | // |
| | | // //先请求省厅数据 |
| | | // 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("结束海康考核成绩数据"); |
| | | // } |
| | | |
| | | public void HkScoreTask(){ |
| | | log.info("开始执行海康考核成绩数据"); |
| | | //先执行获得标签 因为全量默认传参为null,但是省厅数据需要获得标签 |
| | | JSONObject labelJson = hkClient.getGetLabel(); |
| | | Integer faceLabelId = null; |
| | | Integer carLabelId = null; |
| | | if (labelJson != null) { |
| | | String code = labelJson.getString("code"); |
| | | if (ApiConstants.HKSuccessCode.equals(code)){ |
| | | //获得label考核标签对象 |
| | | List<HKResultLabel> hkResultLabels = labelJson.getList("data",HKResultLabel.class); |
| | | for (HKResultLabel label : hkResultLabels) { |
| | | if ("省厅人脸".equals(label.getLabelName())){ |
| | | faceLabelId = label.getId(); |
| | | }else if ("省厅车辆".equals(label.getLabelName())){ |
| | | carLabelId = label.getId(); |
| | | } |
| | | } |
| | | log.error("打印hkResultLabels:{}",hkResultLabels); |
| | | |
| | | } |
| | | } |
| | | if (faceLabelId == null || carLabelId == null){ |
| | | log.error("海康获取省厅考核标签为null"); |
| | | } |
| | | |
| | | //准备新增或修改的数据 |
| | | 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); |
| | | // param.setStartDate(format.format(yesterday)); |
| | | // param.setEndDate(format.format(yesterday)); |
| | | // param.setLabelId(); |
| | | |
| | | //------------默认参数为null请求全量数据 |
| | | JSONObject scoreJson = hkClient.getScoreNew(param); |
| | | log.error("全量数据"); |
| | | if (scoreJson != null) { |
| | | List<HkResultInfo> allInfo = new ArrayList<>(); |
| | | String code = scoreJson.getString("code"); |
| | | if (ApiConstants.HKSuccessCode.equals(code)) { |
| | | List<HKScoreResult> data = scoreJson.getList("data", HKScoreResult.class); |
| | | //根据数据转换为index对象 |
| | | data.forEach(score -> { |
| | | if (ApiConstants.HKSuccessCode.equals(code)){ |
| | | JSONObject data = scoreJson.getJSONObject("data"); |
| | | |
| | | Map<Integer,JSONObject> map = new HashMap<>(); |
| | | //获得data 下 batchId 的批次id对象 放入map中 |
| | | for (String batchIdKey :data.keySet() ) { |
| | | JSONObject batch = data.getJSONObject(batchIdKey); |
| | | //以批次id为key 放入 JSONObject对象 |
| | | map.put(Integer.valueOf(batchIdKey),batch); |
| | | //批次id 下 各区信息集合 |
| | | log.error("打印出data内容中批次id:{},以及对应的结果info:{}",batchIdKey,batch); |
| | | } |
| | | //获得最大的键值 |
| | | Optional<Integer> maxKey = map.keySet().stream() |
| | | .max(Integer::compareTo); |
| | | if (maxKey.isPresent()) { |
| | | //获取最大的key 接口返回内容中最新的批次 |
| | | Integer id = maxKey.get(); |
| | | //这一层为获得 data -> 中 批次数组中 -> 区域code数组的key |
| | | for (String areaCodeKey : map.get(id).keySet()) { |
| | | //存放最新批次的内容到allInfo集合中 |
| | | allInfo.addAll(map.get(id).getList(areaCodeKey,HkResultInfo.class)); |
| | | } |
| | | } |
| | | //对allInfo进行分组 分组按区域id |
| | | Map<String, List<HkResultInfo>> groupedByAreaName = allInfo.stream() |
| | | .collect(Collectors.groupingBy(HkResultInfo::getAreaCode)); |
| | | for (Map.Entry<String, List<HkResultInfo>> entry : groupedByAreaName.entrySet()) { |
| | | log.error("最新批次内数据:{}",groupedByAreaName.get(entry.getKey()).size()); |
| | | log.error("最新批次内size:{}",groupedByAreaName.get(entry.getKey())); |
| | | CheckIndexCar car = new CheckIndexCar(); |
| | | CheckIndexFace face = new CheckIndexFace(); |
| | | score2Index(score, car, face); |
| | | score3Index(groupedByAreaName.get(entry.getKey()), car, face,entry.getKey()); |
| | | car.setExamineTag(CheckConstants.Examine_Tag_County); |
| | | face.setExamineTag(CheckConstants.Examine_Tag_County); |
| | | Optional<CheckIndexCar> carFirst = checkIndexCarList.stream() |
| | |
| | | } |
| | | cars.add(car); |
| | | faces.add(face); |
| | | }); |
| | | } |
| | | //请求省厅数据 |
| | | |
| | | |
| | | }else { |
| | | log.error("调用海康全量数据api失败"); |
| | | } |
| | | |
| | | } |
| | | |
| | | //先请求省厅数据 |
| | | 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); |
| | | //------------获取省厅数据 |
| | | List<HkResultInfo> provincialList = new ArrayList<>(); |
| | | |
| | | //根据数据转换为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 (faceLabelId != null){ |
| | | log.error("faceLabelId:{}",faceLabelId); |
| | | param.setLabelId(faceLabelId); |
| | | JSONObject faceJson = hkClient.getScoreNew(param); |
| | | log.error("省厅人脸数据"); |
| | | if (faceJson != null) { |
| | | String code = scoreJson.getString("code"); |
| | | if (ApiConstants.HKSuccessCode.equals(code)){ |
| | | JSONObject data = scoreJson.getJSONObject("data"); |
| | | |
| | | Map<Integer,JSONObject> map = new HashMap<>(); |
| | | //获得data 下 batchId 的批次id对象 放入map中 |
| | | for (String batchIdKey :data.keySet() ) { |
| | | JSONObject batch = data.getJSONObject(batchIdKey); |
| | | //以批次id为key 放入 JSONObject对象 |
| | | map.put(Integer.valueOf(batchIdKey),batch); |
| | | //批次id 下 各区信息集合 |
| | | log.error("打印出省厅人脸data内容中批次id:{},以及对应的结果info:{}",batchIdKey,batch); |
| | | } |
| | | if (faceFirst.isPresent()) { |
| | | face.setId(faceFirst.get().getId()); |
| | | //获得最大的键值 |
| | | Optional<Integer> maxKey = map.keySet().stream() |
| | | .max(Integer::compareTo); |
| | | if (maxKey.isPresent()) { |
| | | //获取最大的key 接口返回内容中最新的批次 |
| | | Integer id = maxKey.get(); |
| | | //这一层为获得 data -> 中 批次数组中 -> 区域code数组的key |
| | | for (String areaCodeKey : map.get(id).keySet()) { |
| | | //存放最新批次的内容到allInfo集合中 |
| | | provincialList.addAll(map.get(id).getList(areaCodeKey,HkResultInfo.class)); |
| | | } |
| | | } |
| | | cars.add(car); |
| | | faces.add(face); |
| | | }); |
| | | |
| | | }else { |
| | | log.error("调用海康省厅人脸数据api失败"); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | }else { |
| | | log.error("faceLabelId:为空不执行获得省厅数据"); |
| | | } |
| | | //获取省厅车辆数据 |
| | | if (carLabelId != null){ |
| | | log.error("carLabelId:{}",carLabelId); |
| | | param.setLabelId(carLabelId); |
| | | JSONObject carJson = hkClient.getScoreNew(param); |
| | | log.error("省厅车辆数据"); |
| | | if (carJson != null) { |
| | | String code = scoreJson.getString("code"); |
| | | if (ApiConstants.HKSuccessCode.equals(code)){ |
| | | JSONObject data = scoreJson.getJSONObject("data"); |
| | | |
| | | Map<Integer,JSONObject> map = new HashMap<>(); |
| | | //获得data 下 batchId 的批次id对象 放入map中 |
| | | for (String batchIdKey :data.keySet() ) { |
| | | JSONObject batch = data.getJSONObject(batchIdKey); |
| | | //以批次id为key 放入 JSONObject对象 |
| | | map.put(Integer.valueOf(batchIdKey),batch); |
| | | //批次id 下 各区信息集合 |
| | | log.error("打印出省厅成辆data内容中批次id:{},以及对应的结果info:{}",batchIdKey,batch); |
| | | } |
| | | //获得最大的键值 |
| | | Optional<Integer> maxKey = map.keySet().stream() |
| | | .max(Integer::compareTo); |
| | | if (maxKey.isPresent()) { |
| | | //获取最大的key 接口返回内容中最新的批次 |
| | | Integer id = maxKey.get(); |
| | | //这一层为获得 data -> 中 批次数组中 -> 区域code数组的key |
| | | for (String areaCodeKey : map.get(id).keySet()) { |
| | | //存放最新批次的内容到allInfo集合中 |
| | | provincialList.addAll(map.get(id).getList(areaCodeKey,HkResultInfo.class)); |
| | | } |
| | | } |
| | | }else { |
| | | log.error("调用海康省厅车辆数据api失败"); |
| | | } |
| | | } |
| | | }else { |
| | | log.error("carLabelId:为空不执行获得省厅数据"); |
| | | } |
| | | //获取完数据开始分组 |
| | | Map<String,List<HkResultInfo>> provincialGroupedByAreaName = provincialList.stream() |
| | | .collect(Collectors.groupingBy(HkResultInfo::getAreaCode)); |
| | | for (Map.Entry<String, List<HkResultInfo>> entry : provincialGroupedByAreaName.entrySet()) { |
| | | log.error("最新批次内省厅数据:{}",provincialGroupedByAreaName.get(entry.getKey()).size()); |
| | | log.error("最新批次内省厅size:{}",provincialGroupedByAreaName.get(entry.getKey())); |
| | | CheckIndexCar car = new CheckIndexCar(); |
| | | CheckIndexFace face = new CheckIndexFace(); |
| | | score3Index(provincialGroupedByAreaName.get(entry.getKey()), car, face,entry.getKey()); |
| | | 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); |
| | |
| | | face.setFacePictureAvailability(new BigDecimal(score.getDownCrossPictureQualityFaceScoreString() == null ? "1" : score.getDownCrossPictureQualityFaceScoreString())); |
| | | } |
| | | |
| | | private void score3Index(List<HkResultInfo> score, CheckIndexCar car, CheckIndexFace face,String areaCode){ |
| | | car.setCreateTime(new Date()); |
| | | car.setPublish(PublishType.PUBLISHED.getCode()); |
| | | face.setCreateTime(new Date()); |
| | | face.setPublish(PublishType.PUBLISHED.getCode()); |
| | | car.setDeptId(Long.parseLong(AreaDeptEnum.fromCode(areaCode).getDeptId() + "")); |
| | | face.setDeptId(Long.parseLong(AreaDeptEnum.fromCode(areaCode).getDeptId() + "")); |
| | | |
| | | for(HkResultInfo hkResultInfo : score){ |
| | | if (HKLabelName.carDelay.getCode().equals(hkResultInfo.getIndexCode())){ |
| | | //车辆卡口设备抓拍数据上传及时性 |
| | | car.setVehicleUploadTimeliness(new BigDecimal(hkResultInfo.getScore() == null ? "1" : String.valueOf(hkResultInfo.getScore()))); |
| | | }else if (HKLabelName.carOnlineRate2023.getCode().equals(hkResultInfo.getIndexCode())){ |
| | | //车辆点位在线率 |
| | | car.setSiteOnline(new BigDecimal(hkResultInfo.getScore() == null ? "1" : String.valueOf(hkResultInfo.getScore()))); |
| | | }else if (HKLabelName.carButtStability2023.getCode().equals(hkResultInfo.getIndexCode())){ |
| | | //车辆视图库对接稳定性 |
| | | car.setViewConnectStability(new BigDecimal(hkResultInfo.getScore() == null ? "1" : String.valueOf(hkResultInfo.getScore()))); |
| | | }else if (HKLabelName.carQualifiedRate.getCode().equals(hkResultInfo.getIndexCode())){ |
| | | //车辆卡口设备抓拍数据完整性 |
| | | car.setVehicleCaptureIntegrity(new BigDecimal(hkResultInfo.getScore() == null ? "1" : String.valueOf(hkResultInfo.getScore()))); |
| | | }else if (HKLabelName.carCorrectRate.getCode().equals(hkResultInfo.getIndexCode())){ |
| | | //车辆卡口设备抓拍数据准确性 |
| | | car.setVehicleCaptureAccuracy(new BigDecimal(hkResultInfo.getScore() == null ? "1" : String.valueOf(hkResultInfo.getScore()))); |
| | | }else if (HKLabelName.carClockAccuracy.getCode().equals(hkResultInfo.getIndexCode())){ |
| | | //车辆卡口设备时钟准确性 |
| | | car.setVehicleTimingAccuracy(new BigDecimal(hkResultInfo.getScore() == null ? "1" : String.valueOf(hkResultInfo.getScore()))); |
| | | }else if (HKLabelName.carBigPictureAccess.getCode().equals(hkResultInfo.getIndexCode())){ |
| | | //车辆卡口设备抓拍数据大图可用性 |
| | | car.setVehiclePictureAvailability(new BigDecimal(hkResultInfo.getScore() == null ? "1" : String.valueOf(hkResultInfo.getScore()))); |
| | | }else if (HKLabelName.carUrlOkRate.getCode().equals(hkResultInfo.getIndexCode())){ |
| | | //车辆卡口设备url可用性 |
| | | car.setVehicleUrlAvailability(new BigDecimal(hkResultInfo.getScore() == null ? "1" : String.valueOf(hkResultInfo.getScore()))); |
| | | }else if(HKLabelName.faceButtStability2023.getCode().equals(hkResultInfo.getIndexCode())){ |
| | | //人脸视图库对接稳定性 |
| | | face.setViewConnectStability(new BigDecimal(hkResultInfo.getScore() == null ? "1" : String.valueOf(hkResultInfo.getScore()))); |
| | | }else if (HKLabelName.faceOnlineRate.getCode().equals(hkResultInfo.getIndexCode())){ |
| | | //人脸点位在线率 |
| | | face.setSiteOnline(new BigDecimal(hkResultInfo.getScore() == null ? "1" : String.valueOf(hkResultInfo.getScore()))); |
| | | }else if (HKLabelName.faceCapturedPicturesEligibility.getCode().equals(hkResultInfo.getIndexCode())){ |
| | | //人脸设备抓拍图片合格性 |
| | | face.setFacePictureQualification(new BigDecimal(hkResultInfo.getScore() == null ? "1" : String.valueOf(hkResultInfo.getScore()))); |
| | | }else if (HKLabelName.faceClockAccuracy.getCode().equals(hkResultInfo.getIndexCode())){ |
| | | //人脸设备抓拍图片时钟准确性 |
| | | face.setFaceTimingAccuracy(new BigDecimal(hkResultInfo.getScore() == null ? "1" : String.valueOf(hkResultInfo.getScore()))); |
| | | }else if (HKLabelName.faceDelay.getCode().equals(hkResultInfo.getIndexCode())){ |
| | | //设备抓拍人脸数据上传及时性 |
| | | face.setFaceUploadTimeliness(new BigDecimal(hkResultInfo.getScore() == null ? "1" : String.valueOf(hkResultInfo.getScore()))); |
| | | }else if (HKLabelName.faceBigPictureAccess.getCode().equals(hkResultInfo.getIndexCode())){ |
| | | //人脸卡口设备抓拍数据大图可用性 |
| | | face.setFacePictureAvailability(new BigDecimal(hkResultInfo.getScore() == null ? "1" : String.valueOf(hkResultInfo.getScore()))); |
| | | } |
| | | } |
| | | //TODO:没找到考核项 人脸卡口信息采集准确率 |
| | | face.setFaceInformationCollectionAccuracy(new BigDecimal("1")); |
| | | //TODO:没找到考核项 设备目录一致率 |
| | | face.setDeviceDirectoryConsistent(new BigDecimal("1")); |
| | | //TODO:没找到考核项 车辆卡口信息采集准确率 |
| | | car.setVehicleInformationCollectionAccuracy(new BigDecimal("1")); |
| | | //TODO:没找到考核项 联网卡口设备目录一致率 |
| | | car.setDeviceDirectoryConsistent(new BigDecimal("1")); |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | //解析数据 |
| | | private <T> List<T> getDataList(JSONObject jsonObject, Class<T> resultClass, String message) { |
| | | if (jsonObject != null && ApiConstants.HKSuccessCode.equals(jsonObject.getString("code"))) { |