This commit is contained in:
wr
2025-01-06 10:28:04 +08:00
parent 83f5c10532
commit 6b6ec07be2
2 changed files with 7 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
package com.njcn.gather.detection.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.ObjectUtil;
@@ -653,12 +654,13 @@ public class DetectionServiceImpl {
data.setData(harmDataList.get(0));
if (ObjectUtil.isNotNull(errSysDtl)) {
if (0 == errSysDtl.getErrorValueType()) {
errSysDtl.setMaxErrorValue(multiply(errSysDtl.getMaxErrorValue(), fData, 0));
PqErrSysDtls errSys = BeanUtil.copyProperties(errSysDtl, PqErrSysDtls.class);
if (0 == errSys.getErrorValueType()) {
errSys.setMaxErrorValue(multiply(errSys.getMaxErrorValue(), fData, 0));
}
Double v = issueHarmMap.get(harm);
data.setResultData(v);
setDetection(dataRule, harmDataList, errSysDtl, data, v);
setDetection(dataRule, harmDataList, errSys, data, v);
}
info.add(data);
});
@@ -781,7 +783,7 @@ public class DetectionServiceImpl {
x.getEndFlag(),
channelData)).collect(Collectors.toList());
if (CollUtil.isNotEmpty(errSysDtls)) {
PqErrSysDtls errSysDtl = errSysDtls.get(0);
PqErrSysDtls errSysDtl = BeanUtil.copyProperties(errSysDtls.get(0), PqErrSysDtls.class);
if (DUR.equals(errSysDtl.getScriptType())) {
List<Double> qualifiedList = list.stream()
.filter(x -> NumberUtil.isIn(BigDecimal.valueOf(x.doubleValue()),

View File

@@ -790,6 +790,7 @@ public class ResultServiceImpl implements IResultService {
.distinct()
.select(PqScriptCheckData::getHarmNum)
.eq(PqScriptCheckData::getScriptId, param.getScriptId())
.isNotNull(PqScriptCheckData::getHarmNum)
.eq(PqScriptCheckData::getIndex, param.getIndex())
);
List<Double> harmNum = list.stream().map(PqScriptCheckData::getHarmNum).distinct().collect(Collectors.toList());