| | |
| | | log.info("结束业务树数据"); |
| | | } |
| | | |
| | | //考核成绩 |
| | | public void HkScoreTask() { |
| | | log.info("开始执行海康考核成绩数据"); |
| | | ScoreParam param = new ScoreParam(); |
| | | param.setStartDate("2024-12-06"); |
| | | param.setEndDate("2024-12-06"); |
| | | List<HKScoreResult> dataList = HkApiUtil.sendGetAPI(host,appKey,appSecret,"/api/third/score/get", param, HKScoreResult.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,CheckConstants.Rule_Category_Face); |
| | | // //存放在mongo中 |
| | | // mongoTemplate.insertAll(faceList); |
| | | // } |
| | | log.info("结束海康考核成绩数据"); |
| | | } |
| | | |
| | | //解析数据 |
| | | private <T> List<T> getDataList(JSONObject jsonObject, Class<T> resultClass, String message) { |
| | | if (jsonObject != null && ApiConstants.HKSuccessCode.equals(jsonObject.getString("code"))) { |