diff --git a/detection/src/main/java/com/njcn/gather/plan/service/impl/AdPlanServiceImpl.java b/detection/src/main/java/com/njcn/gather/plan/service/impl/AdPlanServiceImpl.java index 29721344..8069f33a 100644 --- a/detection/src/main/java/com/njcn/gather/plan/service/impl/AdPlanServiceImpl.java +++ b/detection/src/main/java/com/njcn/gather/plan/service/impl/AdPlanServiceImpl.java @@ -37,6 +37,7 @@ import com.njcn.gather.script.service.IPqScriptDtlsService; import com.njcn.gather.script.service.IPqScriptService; import com.njcn.gather.source.pojo.po.PqSource; import com.njcn.gather.source.service.IPqSourceService; +import com.njcn.gather.storage.pojo.param.StorageParam; import com.njcn.gather.storage.pojo.po.AdBaseResult; import com.njcn.gather.storage.service.AdHarmonicService; import com.njcn.gather.storage.service.AdNonHarmonicService; @@ -368,16 +369,21 @@ public class AdPlanServiceImpl extends ServiceImpl impleme // 不合格项复检 if (reCheckType == 0) { - List allResultList = new ArrayList<>(); - allResultList.addAll(adHarmonicService.get(scriptId, null, devId, "-1", adPlan.getCode())); - allResultList.addAll(adNonHarmonicService.get(scriptId, null, devId, "-1", adPlan.getCode())); - - if (ObjectUtil.isNotEmpty(allResultList)) { - List passList = allResultList.stream().filter(obj -> obj.getResultFlag() == 1).collect(Collectors.toList()); - TreeSet sortSet = passList.stream().map(AdBaseResult::getSort).collect(Collectors.toCollection(TreeSet::new)); - - scriptDtlsList = scriptDtlsList.stream().filter(obj -> !sortSet.contains(obj.getScriptIndex())).collect(Collectors.toList()); - } +// List allResultList = new ArrayList<>(); +// allResultList.addAll(adHarmonicService.get(scriptId, null, devId, "-1", adPlan.getCode())); +// allResultList.addAll(adNonHarmonicService.get(scriptId, null, devId, "-1", adPlan.getCode())); +// +// if (ObjectUtil.isNotEmpty(allResultList)) { +// List passList = allResultList.stream().filter(obj -> obj.getResultFlag() == 1).collect(Collectors.toList()); +// TreeSet sortSet = passList.stream().map(AdBaseResult::getSort).collect(Collectors.toCollection(TreeSet::new)); +// +// scriptDtlsList = scriptDtlsList.stream().filter(obj -> !sortSet.contains(obj.getScriptIndex())).collect(Collectors.toList()); +// } + StorageParam storageParam = new StorageParam(); + storageParam.setCode(Integer.valueOf(adPlan.getCode())); + storageParam.setScriptId(adPlan.getScriptId()); + List indexes = adHarmonicService.getIndex(storageParam); + scriptDtlsList = scriptDtlsList.stream().filter(obj -> indexes.contains(obj.getScriptIndex())).collect(Collectors.toList()); } Map> collect = scriptDtlsList.stream()