This commit is contained in:
wr
2025-01-06 10:34:53 +08:00
parent 6b6ec07be2
commit 6040dee569

View File

@@ -786,6 +786,9 @@ public class ResultServiceImpl implements IResultService {
storage.setDevId(param.getDevId());
storage.setDevNum(param.getDevNum());
storage.setCode(param.getCode());
DictTree dictTree = dictTreeService.getById(param.getScriptType());
List<Double> harmNum = new ArrayList<>();
if (HARMONIC_TYPE_CODE.contains(dictTree.getCode())) {
List<PqScriptCheckData> list = pqScriptCheckDataService.list(new MPJLambdaWrapper<PqScriptCheckData>()
.distinct()
.select(PqScriptCheckData::getHarmNum)
@@ -793,7 +796,9 @@ public class ResultServiceImpl implements IResultService {
.isNotNull(PqScriptCheckData::getHarmNum)
.eq(PqScriptCheckData::getIndex, param.getIndex())
);
List<Double> harmNum = list.stream().map(PqScriptCheckData::getHarmNum).distinct().collect(Collectors.toList());
harmNum = list.stream().sorted(Comparator.comparing(PqScriptCheckData::getHarmNum))
.map(PqScriptCheckData::getHarmNum).distinct().collect(Collectors.toList());
}
ResultVO resultVO = new ResultVO();
if (CollUtil.isEmpty(harmNum)) {
resultVO.setRawData(adNonHarmonicService.listNonHarmData(storage));