This commit is contained in:
caozehui
2025-03-04 09:23:09 +08:00
parent f34a996705
commit 98dd7894b8

View File

@@ -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<AdPlanMapper, AdPlan> impleme
// 不合格项复检
if (reCheckType == 0) {
List<AdBaseResult> 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<AdBaseResult> passList = allResultList.stream().filter(obj -> obj.getResultFlag() == 1).collect(Collectors.toList());
TreeSet<Integer> sortSet = passList.stream().map(AdBaseResult::getSort).collect(Collectors.toCollection(TreeSet::new));
scriptDtlsList = scriptDtlsList.stream().filter(obj -> !sortSet.contains(obj.getScriptIndex())).collect(Collectors.toList());
}
// List<AdBaseResult> 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<AdBaseResult> passList = allResultList.stream().filter(obj -> obj.getResultFlag() == 1).collect(Collectors.toList());
// TreeSet<Integer> 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<Integer> indexes = adHarmonicService.getIndex(storageParam);
scriptDtlsList = scriptDtlsList.stream().filter(obj -> indexes.contains(obj.getScriptIndex())).collect(Collectors.toList());
}
Map<String, List<PqScriptDtls>> collect = scriptDtlsList.stream()