微调
This commit is contained in:
@@ -677,7 +677,11 @@ public class DetectionServiceImpl {
|
||||
if (DUR.equals(dur)) {
|
||||
c = rangeDURComparisonList(mag.get(typeC), magErrList, fData, channelTypeCList.get(0).getDipData().getRetainTime(), dataRule);
|
||||
}else {
|
||||
c = rangeComparisonList(mag.get(typeC), magErrList, fData, channelTypeCList.get(0).getDipData().getFTransValue(),channelTypeCList.get(0).getFAmp(), dataRule);
|
||||
List<Double> ampData = mag.get(typeC).stream()
|
||||
.filter(x->ObjectUtil.isNotNull(x))
|
||||
.map(x -> x * channelTypeCList.get(0).getFAmp() * 0.01)
|
||||
.collect(Collectors.toList());
|
||||
c = rangeComparisonList(ampData, magErrList, fData, channelTypeCList.get(0).getDipData().getFTransValue(), dataRule);
|
||||
}
|
||||
return c;
|
||||
}
|
||||
@@ -999,41 +1003,6 @@ public class DetectionServiceImpl {
|
||||
});
|
||||
return map;
|
||||
}
|
||||
/**
|
||||
* 处理数据是否合格
|
||||
*
|
||||
* @param list 原始的数据
|
||||
* @param pqErrSysDtls 误差体系
|
||||
* @param data 源下发的额定信息(额定电压,额定电流)
|
||||
* @param channelData 源下发的通道信息的值包括 {Ua, Ub, Uc, Ux, Ia, Ib, Ic, Ix ,NULL}
|
||||
* @param dataRule 数据处理原则
|
||||
* @returnd
|
||||
*/
|
||||
public DetectionData rangeComparisonList(List<Double> list, List<PqErrSysDtls> pqErrSysDtls, Double data, Double channelData,Double channelAmp, DictDataEnum dataRule) {
|
||||
DetectionData detectionData = new DetectionData();
|
||||
detectionData.setIsData(4);
|
||||
if (CollUtil.isNotEmpty(list)) {
|
||||
detectionData.setData(list.get(0)*channelAmp*0.01);
|
||||
detectionData.setResultData(channelData);
|
||||
//先根据源所下发的数据,是否在误差体系范围内在则可以进行误差体系判断
|
||||
//获得误差体系
|
||||
List<PqErrSysDtls> errSysDtls = pqErrSysDtls.stream().filter(x -> rangeComparison(startRadiusEnd(x.getStartValue(), data, channelData, x.getConditionType()),
|
||||
x.getStartFlag(),
|
||||
startRadiusEnd(x.getEndValue(), data, channelData, x.getConditionType()),
|
||||
x.getEndFlag(),
|
||||
channelData)).collect(Collectors.toList());
|
||||
if (CollUtil.isNotEmpty(errSysDtls)) {
|
||||
PqErrSysDtls errSysDtl = BeanUtil.copyProperties(errSysDtls.get(0), PqErrSysDtls.class);
|
||||
NumberFormat nf = NumberFormat.getInstance();
|
||||
nf.setMaximumFractionDigits(6);
|
||||
nf.setGroupingUsed(false);
|
||||
errSysDtl.setMaxErrorValue(maxErrorMultiply(errSysDtl.getMaxErrorValue(), data, channelData, errSysDtl.getErrorValueType()));
|
||||
detectionData.setRadius(nf.format(-errSysDtl.getMaxErrorValue()) + "~" + nf.format(errSysDtl.getMaxErrorValue()));
|
||||
setDetection(dataRule, list, errSysDtl, detectionData, channelData);
|
||||
}
|
||||
}
|
||||
return detectionData;
|
||||
}
|
||||
/**
|
||||
* 处理数据是否合格
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user