This commit is contained in:
caozehui
2025-05-16 16:12:47 +08:00
parent e725cd8a60
commit 95c564595f
5 changed files with 4 additions and 33 deletions

View File

@@ -856,8 +856,6 @@ public class SocketDevResponseService {
storageParam.setDevId(devId);
indexes.addAll(adHarmonicService.getIndex(storageParam));
});
List<Integer> notErrorCheckIndex = pqScriptCheckDataService.listNotErrorCheckIndex(param.getScriptId());
indexes.removeAll(notErrorCheckIndex);
issueParam.setIndexList(indexes.stream().collect(Collectors.toList()));
issueParam.setIsPhaseSequence(SourceOperateCodeEnum.RE_ERROR_TEST.getValue());
} else {

View File

@@ -332,7 +332,6 @@ public class AdPlanServiceImpl extends ServiceImpl<AdPlanMapper, AdPlan> impleme
//
// scriptDtlsList = scriptDtlsList.stream().filter(obj -> !sortSet.contains(obj.getScriptIndex())).collect(Collectors.toList());
// }
List<Integer> notErrorCheckIndex = pqScriptCheckDataService.listNotErrorCheckIndex(scriptId);
Set<Integer> indexes = new HashSet<>();
StorageParam storageParam = new StorageParam();
storageParam.setCode(adPlan.getCode() + "");
@@ -341,7 +340,6 @@ public class AdPlanServiceImpl extends ServiceImpl<AdPlanMapper, AdPlan> impleme
storageParam.setDevId(devId);
indexes.addAll(adHarmonicService.getIndex(storageParam));
});
indexes.removeAll(notErrorCheckIndex);
scriptDtlsList = scriptDtlsList.stream().filter(obj -> indexes.contains(obj.getScriptIndex())).collect(Collectors.toList());
}

View File

@@ -51,12 +51,4 @@ public interface IPqScriptCheckDataService extends IService<PqScriptCheckData> {
* @return
*/
boolean deleteByScriptIds(List<String> ids);
/**
* 根据脚本id查询出不参与误差比较的检查项对应的index
*
* @param scriptId
* @return
*/
List<Integer> listNotErrorCheckIndex(String scriptId);
}

View File

@@ -145,25 +145,4 @@ public class PqScriptCheckDataServiceImpl extends ServiceImpl<PqScriptCheckDataM
public boolean deleteByScriptIds(List<String> ids) {
return this.remove(new LambdaQueryWrapper<PqScriptCheckData>().in(PqScriptCheckData::getScriptId, ids));
}
@Override
public List<Integer> listNotErrorCheckIndex(String scriptId) {
LambdaQueryWrapper<PqScriptCheckData> wrapper = new LambdaQueryWrapper<>();
wrapper.select(PqScriptCheckData::getScriptIndex)
.eq(PqScriptCheckData::getScriptId, scriptId)
.eq(PqScriptCheckData::getErrorFlag, 0);
List<Integer> list1 = this.list(wrapper).stream().map(PqScriptCheckData::getScriptIndex).distinct().collect(Collectors.toList());
for (int i = list1.size() - 1; i >= 0; i--) {
wrapper.clear();
wrapper.eq(PqScriptCheckData::getScriptId, scriptId);
wrapper.eq(PqScriptCheckData::getScriptIndex, list1.get(i));
List<PqScriptCheckData> list = this.list(wrapper);
long count = list.stream().filter(x -> x.getErrorFlag() == 1).count();
if (count != 0) {
list1.remove(i);
}
}
return list1;
}
}