微调
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user