|
|
|
@ -620,8 +620,18 @@ public class ResultAnalysisController extends BaseController { |
|
|
|
logger.info("LIST_V2_EX listV2Ex param: {}", patrolTaskStatus); |
|
|
|
ResultAnalysis resultAnalysis = new ResultAnalysis(); |
|
|
|
resultAnalysis.setTaskPatrolId(patrolTaskStatus.getTaskPatrolledId()); |
|
|
|
resultAnalysis.setResultType("0"); // 0缺陷 |
|
|
|
List<PatrolData> filterList = patrolResultService.selectPatrolDataResultByTaskCodeV2(resultAnalysis); |
|
|
|
// 查出全部数据 |
|
|
|
List<PatrolData> allList = patrolResultService.selectPatrolDataResultByTaskCodeV2(resultAnalysis); |
|
|
|
|
|
|
|
Map<String, String> imageNormalMap = allList.parallelStream() |
|
|
|
.filter(patrolData -> StringUtils.isNotEmpty(patrolData.getImageNormalUrlPath())) |
|
|
|
.collect(Collectors.toMap( |
|
|
|
patrolData -> patrolData.getObjectId() + "_" + patrolData.getAlgType(), |
|
|
|
PatrolData::getImageNormalUrlPath, |
|
|
|
(existing, replacement) -> existing |
|
|
|
)); |
|
|
|
// 筛出缺陷数据 |
|
|
|
List<PatrolData> filterList = allList.parallelStream().filter(patrolData -> "0".equals(patrolData.getWarnStatus())).collect(Collectors.toList()); |
|
|
|
List<AlgInfo> algInfos = patrolResultService.selectAlgInfo(new PatrolResult()); |
|
|
|
filterList.forEach((item) -> { |
|
|
|
item.setAlgName((algInfos.stream().anyMatch((alg) -> { |
|
|
|
@ -666,7 +676,8 @@ public class ResultAnalysisController extends BaseController { |
|
|
|
patrolData.setImg(data.getImg()); |
|
|
|
} |
|
|
|
} |
|
|
|
patrolData.setImageNormalUrlPath(value.stream().map(item -> item.getImageNormalUrlPath() != null ? item.getImageNormalUrlPath() : "").distinct().findFirst().orElse("")); |
|
|
|
String imageNormalPath = imageNormalMap.getOrDefault(key.objectId + "_" + key.algType, ""); |
|
|
|
patrolData.setImageNormalUrlPath(imageNormalPath); |
|
|
|
patrolData.setAlgName(value.stream().map(item -> item.getAlgName() != null ? item.getAlgName() : "").distinct().findFirst().orElse("")); |
|
|
|
patrolData.setAreaName(value.stream().map(item -> item.getAreaName() != null ? item.getAreaName() : "").distinct().findFirst().orElse("")); |
|
|
|
patrolData.setBrightDesc(value.stream().map(item -> item.getBrightDesc() != null ? item.getBrightDesc() : "").distinct().findFirst().orElse("")); |
|
|
|
|