微调
This commit is contained in:
@@ -677,7 +677,7 @@ public class DetectionServiceImpl {
|
|||||||
if (DUR.equals(dur)) {
|
if (DUR.equals(dur)) {
|
||||||
c = rangeDURComparisonList(mag.get(typeC), magErrList, fData, channelTypeCList.get(0).getDipData().getRetainTime(), dataRule);
|
c = rangeDURComparisonList(mag.get(typeC), magErrList, fData, channelTypeCList.get(0).getDipData().getRetainTime(), dataRule);
|
||||||
}else {
|
}else {
|
||||||
c = rangeComparisonList(mag.get(typeC), magErrList, fData, channelTypeCList.get(0).getDipData().getFTransValue(), dataRule);
|
c = rangeComparisonList(mag.get(typeC), magErrList, fData, channelTypeCList.get(0).getDipData().getFTransValue(),channelTypeCList.get(0).getFAmp(), dataRule);
|
||||||
}
|
}
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
@@ -999,7 +999,41 @@ public class DetectionServiceImpl {
|
|||||||
});
|
});
|
||||||
return map;
|
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;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 处理数据是否合格
|
* 处理数据是否合格
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -937,7 +937,7 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
|
|||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
if (CollUtil.isNotEmpty(dipList)) {
|
if (CollUtil.isNotEmpty(dipList)) {
|
||||||
PqScriptDtls dip = dipList.get(0);
|
PqScriptDtls dip = dipList.get(0);
|
||||||
dipDataDTO.setFTransValue(dip.getTransValue());
|
dipDataDTO.setFTransValue(dip.getTransValue() * dtls.getValue());
|
||||||
// 1.0/频率*持续时间(周波)= 暂态持续时间(s)
|
// 1.0/频率*持续时间(周波)= 暂态持续时间(s)
|
||||||
dipDataDTO.setFRetainTime(NumberUtil.round(1.0 / fFreq * dip.getRetainTime(), 3).doubleValue());
|
dipDataDTO.setFRetainTime(NumberUtil.round(1.0 / fFreq * dip.getRetainTime(), 3).doubleValue());
|
||||||
dipDataDTO.setRetainTime(dip.getRetainTime());
|
dipDataDTO.setRetainTime(dip.getRetainTime());
|
||||||
|
|||||||
Reference in New Issue
Block a user