微调
This commit is contained in:
@@ -51,4 +51,12 @@ public interface IPqScriptCheckDataService extends IService<PqScriptCheckData> {
|
||||
* @return
|
||||
*/
|
||||
boolean deleteByScriptIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 根据脚本id查询出不参与误差比较的检查项对应的index
|
||||
*
|
||||
* @param scriptId
|
||||
* @return
|
||||
*/
|
||||
List<Integer> listNotErrorCheckIndex(String scriptId);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,9 @@ import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@@ -34,14 +36,14 @@ import java.util.stream.Collectors;
|
||||
@RequiredArgsConstructor
|
||||
public class PqScriptCheckDataServiceImpl extends ServiceImpl<PqScriptCheckDataMapper, PqScriptCheckData> implements IPqScriptCheckDataService {
|
||||
|
||||
private final String SYMBOL="$";
|
||||
private final String SYMBOL = "$";
|
||||
|
||||
private final DictTreeMapper dictTreeMapper;
|
||||
|
||||
@Override
|
||||
public List<String> getValueType(PqScriptCheckDataParam param) {
|
||||
String dataType = param.getDataType();
|
||||
if(StrUtil.isNotBlank(dataType)){
|
||||
if (StrUtil.isNotBlank(dataType)) {
|
||||
String[] split = dataType.split(",");
|
||||
if (split.length > 1) {
|
||||
dataType = split[0];
|
||||
@@ -60,7 +62,7 @@ public class PqScriptCheckDataServiceImpl extends ServiceImpl<PqScriptCheckDataM
|
||||
if (param.getIsValueTypeName()) {
|
||||
final String finalDataType = dataType;
|
||||
List<String> checkData = pqScriptCheckData.stream().map(x -> finalDataType + SYMBOL + x.getValueType()).distinct().collect(Collectors.toList());
|
||||
String U = finalDataType + SYMBOL+ DetectionCodeEnum.U1.getCode();
|
||||
String U = finalDataType + SYMBOL + DetectionCodeEnum.U1.getCode();
|
||||
if (!checkData.contains(U)) {
|
||||
if (checkData.contains(finalDataType + SYMBOL + DetectionCodeEnum.V2_50.getCode())) {
|
||||
checkData.add(U);
|
||||
@@ -143,4 +145,13 @@ 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);
|
||||
return this.list(wrapper).stream().map(PqScriptCheckData::getScriptIndex).distinct().collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user