| | |
| | | import com.ycl.platform.domain.entity.TMonitor; |
| | | import com.ycl.platform.domain.param.HK.*; |
| | | import com.ycl.platform.domain.result.HK.*; |
| | | 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; |
| | |
| | | JSONObject labelJson = hkClient.getGetLabel(); |
| | | Integer faceLabelId = null; |
| | | Integer carLabelId = null; |
| | | Integer allLabelId = null; |
| | | if (labelJson != null) { |
| | | String code = labelJson.getString("code"); |
| | | if (ApiConstants.HKSuccessCode.equals(code)){ |
| | |
| | | faceLabelId = label.getId(); |
| | | }else if ("省厅车辆".equals(label.getLabelName())){ |
| | | carLabelId = label.getId(); |
| | | }else if ("全量".equals(label.getLabelName())){ |
| | | allLabelId = label.getId(); |
| | | } |
| | | } |
| | | log.error("打印hkResultLabels:{}",hkResultLabels); |
| | | |
| | | } |
| | | } |
| | | if (faceLabelId == null || carLabelId == null){ |
| | |
| | | // param.setLabelId(); |
| | | |
| | | //------------默认参数为null请求全量数据 |
| | | if (allLabelId == null){ |
| | | allLabelId = -1; |
| | | } |
| | | param.setLabelId(allLabelId); |
| | | JSONObject scoreJson = hkClient.getScoreNew(param); |
| | | log.error("全量数据"); |
| | | if (scoreJson != null) { |
| | |
| | | //以批次id为key 放入 JSONObject对象 |
| | | map.put(Integer.valueOf(batchIdKey),batch); |
| | | //批次id 下 各区信息集合 |
| | | log.error("打印出data内容中批次id:{},以及对应的结果info:{}",batchIdKey,batch); |
| | | } |
| | | //获得最大的键值 |
| | | Optional<Integer> maxKey = map.keySet().stream() |
| | |
| | | cars.add(car); |
| | | faces.add(face); |
| | | } |
| | | //请求省厅数据 |
| | | }else { |
| | | log.error("调用海康全量数据api失败"); |
| | | } |
| | |
| | | JSONObject faceJson = hkClient.getScoreNew(faceParam); |
| | | log.error("省厅人脸数据"); |
| | | if (faceJson != null) { |
| | | String code = scoreJson.getString("code"); |
| | | String code = faceJson.getString("code"); |
| | | if (ApiConstants.HKSuccessCode.equals(code)){ |
| | | JSONObject data = scoreJson.getJSONObject("data"); |
| | | JSONObject data = faceJson.getJSONObject("data"); |
| | | |
| | | Map<Integer,JSONObject> map = new HashMap<>(); |
| | | //获得data 下 batchId 的批次id对象 放入map中 |
| | |
| | | //批次id 下 各区信息集合 |
| | | log.error("打印出省厅人脸data内容中批次id:{},以及对应的结果info:{}",batchIdKey,batch); |
| | | } |
| | | //获得最大的键值 |
| | | //获得最大的键值 |
| | | Optional<Integer> maxKey = map.keySet().stream() |
| | | .max(Integer::compareTo); |
| | | if (maxKey.isPresent()) { |
| | |
| | | JSONObject carJson = hkClient.getScoreNew(carParam); |
| | | log.error("省厅车辆数据"); |
| | | if (carJson != null) { |
| | | String code = scoreJson.getString("code"); |
| | | String code = carJson.getString("code"); |
| | | if (ApiConstants.HKSuccessCode.equals(code)){ |
| | | JSONObject data = scoreJson.getJSONObject("data"); |
| | | JSONObject data = carJson.getJSONObject("data"); |
| | | |
| | | Map<Integer,JSONObject> map = new HashMap<>(); |
| | | //获得data 下 batchId 的批次id对象 放入map中 |
| | |
| | | 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()); |
| | |
| | | face.setFaceInformationCollectionAccuracy(new BigDecimal("1")); |
| | | //TODO:没找到考核项 设备目录一致率 |
| | | face.setDeviceDirectoryConsistent(new BigDecimal("1")); |
| | | |
| | | |
| | | //TODO:没找到考核项 车辆卡口信息采集准确率 |
| | | car.setVehicleInformationCollectionAccuracy(new BigDecimal("1")); |
| | | //TODO:没找到考核项 联网卡口设备目录一致率 |