重采方案
This commit is contained in:
@@ -1418,27 +1418,27 @@ public class SocketContrastResponseService {
|
||||
});
|
||||
FormalTestManager.isTesting = false;
|
||||
|
||||
// if (CollUtil.isNotEmpty(DetectionServiceImpl.vAndIResultMap)) {
|
||||
// // 是否进行系数校准
|
||||
// //万一录波了这里就进不来了,但是在误差处理的时候DetectionServiceImpl.vAndIResultMap该集合会保留不符合的结果
|
||||
//
|
||||
// XiNumberManager.xiDevList.clear();
|
||||
// XiNumberManager.devXiNumDataMap.clear();
|
||||
// List<String> stdIpList = DetectionServiceImpl.vAndIResultMap.values().stream().map(DetectionServiceImpl.VAndIResult::getIp).collect(Collectors.toList());
|
||||
// XiNumberManager.xiDevList = FormalTestManager.standardDevList.stream().filter(d -> stdIpList.contains(d.getDevIP())).collect(Collectors.toList());
|
||||
// // 逐一设备向通讯模块要原始系数
|
||||
// SocketMsg<String> socketMsg = new SocketMsg<>();
|
||||
// socketMsg.setRequestId(SourceOperateCodeEnum.Coefficient_Check.getValue());
|
||||
// socketMsg.setOperateCode(SourceOperateCodeEnum.DATA_CHNFACTOR$01.getValue());
|
||||
// PreDetection preDetection = XiNumberManager.xiDevList.get(0);
|
||||
// Map<String, Object> map = new HashMap<>();
|
||||
// map.put("devIP", preDetection.getDevIP());
|
||||
// map.put("chnNum", preDetection.getDevChns());
|
||||
// socketMsg.setData(JSON.toJSONString(map));
|
||||
// SocketManager.sendMsg(param.getUserPageId() + CnSocketUtil.CONTRAST_DEV_TAG, JSON.toJSONString(socketMsg));
|
||||
//
|
||||
// FormalTestManager.currentStep = SourceOperateCodeEnum.Coefficient_Check;
|
||||
// }
|
||||
if (CollUtil.isNotEmpty(DetectionServiceImpl.vAndIResultMap)) {
|
||||
// 是否进行系数校准
|
||||
//万一录波了这里就进不来了,但是在误差处理的时候DetectionServiceImpl.vAndIResultMap该集合会保留不符合的结果
|
||||
|
||||
XiNumberManager.xiDevList.clear();
|
||||
XiNumberManager.devXiNumDataMap.clear();
|
||||
List<String> stdIpList = DetectionServiceImpl.vAndIResultMap.values().stream().map(DetectionServiceImpl.VAndIResult::getIp).collect(Collectors.toList());
|
||||
XiNumberManager.xiDevList = FormalTestManager.standardDevList.stream().filter(d -> stdIpList.contains(d.getDevIP())).collect(Collectors.toList());
|
||||
// 逐一设备向通讯模块要原始系数
|
||||
SocketMsg<String> socketMsg = new SocketMsg<>();
|
||||
socketMsg.setRequestId(SourceOperateCodeEnum.Coefficient_Check.getValue());
|
||||
socketMsg.setOperateCode(SourceOperateCodeEnum.DATA_CHNFACTOR$01.getValue());
|
||||
PreDetection preDetection = XiNumberManager.xiDevList.get(0);
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("devIP", preDetection.getDevIP());
|
||||
map.put("chnNum", preDetection.getDevChns());
|
||||
socketMsg.setData(JSON.toJSONString(map));
|
||||
SocketManager.sendMsg(param.getUserPageId() + CnSocketUtil.CONTRAST_DEV_TAG, JSON.toJSONString(socketMsg));
|
||||
|
||||
FormalTestManager.currentStep = SourceOperateCodeEnum.Coefficient_Check;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 配对关系入库
|
||||
@@ -2044,13 +2044,13 @@ public class SocketContrastResponseService {
|
||||
*/
|
||||
private Integer getTargetCount() {
|
||||
if (FormalTestManager.isPstData) {
|
||||
return FormalTestManager.curretntTestPlanConfig.getFlicker();
|
||||
return FormalTestManager.curretntTestPlanConfig.getFlicker() * 2;
|
||||
}
|
||||
if (ObjectUtil.isNotNull(FormalTestManager.nonWaveDataSourceEnum)) {
|
||||
if (FormalTestManager.nonWaveDataSourceEnum == DataSourceEnum.REAL_DATA) {
|
||||
return FormalTestManager.curretntTestPlanConfig.getRealTime();
|
||||
return FormalTestManager.curretntTestPlanConfig.getRealTime() * 2;
|
||||
} else {
|
||||
return FormalTestManager.curretntTestPlanConfig.getStatistics();
|
||||
return FormalTestManager.curretntTestPlanConfig.getStatistics() * 2;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
|
||||
@@ -1616,21 +1616,21 @@ public class DetectionServiceImpl {
|
||||
devDataList = devDataList.stream().sorted(Comparator.comparing(DevData::getTime)).collect(Collectors.toList());
|
||||
standardDevDataList = standardDevDataList.stream().sorted(Comparator.comparing(DevData::getTime)).collect(Collectors.toList());
|
||||
|
||||
List<Double> freqStdDevData = standardDevDataList.stream().flatMap(standardDevData -> standardDevData.getSqlData().stream())
|
||||
.filter(sqlDataDTO -> DetectionCodeEnum.FREQ.getCode().equals(sqlDataDTO.getDesc()))
|
||||
.map(sqlDataDTO -> sqlDataDTO.getList().getT()).collect(Collectors.toList());
|
||||
boolean isRemoveMaxElement = ObjectUtil.isNotNull(waveNum) ? false : true;
|
||||
// List<Double> freqStdDevData = standardDevDataList.stream().flatMap(standardDevData -> standardDevData.getSqlData().stream())
|
||||
// .filter(sqlDataDTO -> DetectionCodeEnum.FREQ.getCode().equals(sqlDataDTO.getDesc()))
|
||||
// .map(sqlDataDTO -> sqlDataDTO.getList().getT()).collect(Collectors.toList());
|
||||
|
||||
Double maxFreq = CollUtil.isNotEmpty(freqStdDevData) ? CollUtil.max(freqStdDevData) : null;
|
||||
Double minFreq = CollUtil.isNotEmpty(freqStdDevData) ? CollUtil.min(freqStdDevData) : null;
|
||||
// Double maxFreq = CollUtil.isNotEmpty(freqStdDevData) ? CollUtil.max(freqStdDevData) : null;
|
||||
// Double minFreq = CollUtil.isNotEmpty(freqStdDevData) ? CollUtil.min(freqStdDevData) : null;
|
||||
|
||||
boolean isRemoveMaxElement = false;
|
||||
if (maxFreq != null && minFreq != null) {
|
||||
isRemoveMaxElement = DictDataEnum.AVG_VALUE.equals(dataRule);
|
||||
double freqErrorValue = maxFreq - minFreq;
|
||||
if (NumberUtil.isGreaterOrEqual(BigDecimal.valueOf(freqErrorValue), BigDecimal.valueOf(0.02))) {
|
||||
isRemoveMaxElement = isRemoveMaxElement && true;
|
||||
}
|
||||
}
|
||||
// if (maxFreq != null && minFreq != null) {
|
||||
// isRemoveMaxElement = DictDataEnum.AVG_VALUE.equals(dataRule);
|
||||
// double freqErrorValue = maxFreq - minFreq;
|
||||
// if (NumberUtil.isGreaterOrEqual(BigDecimal.valueOf(freqErrorValue), BigDecimal.valueOf(0.02))) {
|
||||
// isRemoveMaxElement = isRemoveMaxElement && true;
|
||||
// }
|
||||
// }
|
||||
|
||||
// 处理谐波数据
|
||||
SysTestConfig oneConfig = sysTestConfigService.getOneConfig();
|
||||
@@ -1678,12 +1678,12 @@ public class DetectionServiceImpl {
|
||||
// sqlData.setList(listDTO);
|
||||
// }));
|
||||
// }
|
||||
resultMap.put(PowerIndexEnum.FREQ.getKey(), isQualified(devDataList, standardDevDataList, devIdMapComm, pqErrSysDtls, true, fHz, DetectionCodeEnum.FREQ.getCode(), dataRule, num, code, oneConfig.getScale(), waveNum, dataSourceEnum));
|
||||
resultMap.put(PowerIndexEnum.FREQ.getKey(), isQualified(devDataList, standardDevDataList, devIdMapComm, pqErrSysDtls, true, fHz, DetectionCodeEnum.FREQ.getCode(), dataRule, num, code, oneConfig.getScale(), waveNum, dataSourceEnum, isRemoveMaxElement));
|
||||
break;
|
||||
case VRMS:
|
||||
case PVRMS:
|
||||
// 如果是角型接法且存在角型接法的一些指标,则不进行使用角型接线的指标。反之,则使用相别的指标。
|
||||
resultMap.put(PowerIndexEnum.V.getKey(), isQualified(devDataList, standardDevDataList, devIdMapComm, pqErrSysDtls, true, fUn, (isDelta && isExitDelta ? DetectionCodeEnum.PVRMS.getCode() : DetectionCodeEnum.VRMS.getCode()), dataRule, num, code, oneConfig.getScale(), waveNum, dataSourceEnum));
|
||||
resultMap.put(PowerIndexEnum.V.getKey(), isQualified(devDataList, standardDevDataList, devIdMapComm, pqErrSysDtls, true, fUn, (isDelta && isExitDelta ? DetectionCodeEnum.PVRMS.getCode() : DetectionCodeEnum.VRMS.getCode()), dataRule, num, code, oneConfig.getScale(), waveNum, dataSourceEnum, isRemoveMaxElement));
|
||||
break;
|
||||
case IRMS:
|
||||
// if (ObjectUtil.isNotNull(waveNum) && (waveNum.equals(2) || waveNum.equals(5))) {
|
||||
@@ -1694,13 +1694,13 @@ public class DetectionServiceImpl {
|
||||
// sqlData.setList(listDTO);
|
||||
// }));
|
||||
// }
|
||||
resultMap.put(PowerIndexEnum.I.getKey(), isQualified(devDataList, standardDevDataList, devIdMapComm, pqErrSysDtls, true, fIn, DetectionCodeEnum.IRMS.getCode(), dataRule, num, code, oneConfig.getScale(), waveNum, dataSourceEnum));
|
||||
resultMap.put(PowerIndexEnum.I.getKey(), isQualified(devDataList, standardDevDataList, devIdMapComm, pqErrSysDtls, true, fIn, DetectionCodeEnum.IRMS.getCode(), dataRule, num, code, oneConfig.getScale(), waveNum, dataSourceEnum, isRemoveMaxElement));
|
||||
break;
|
||||
case V_UNBAN:
|
||||
resultMap.put(PowerIndexEnum.IMBV.getKey(), isQualified(devDataList, standardDevDataList, devIdMapComm, pqErrSysDtls, false, fUn, DetectionCodeEnum.V_UNBAN.getCode(), dataRule, num, code, oneConfig.getScale(), waveNum, dataSourceEnum));
|
||||
resultMap.put(PowerIndexEnum.IMBV.getKey(), isQualified(devDataList, standardDevDataList, devIdMapComm, pqErrSysDtls, false, fUn, DetectionCodeEnum.V_UNBAN.getCode(), dataRule, num, code, oneConfig.getScale(), waveNum, dataSourceEnum, isRemoveMaxElement));
|
||||
break;
|
||||
case I_UNBAN:
|
||||
resultMap.put(PowerIndexEnum.IMBA.getKey(), isQualified(devDataList, standardDevDataList, devIdMapComm, pqErrSysDtls, false, fIn, DetectionCodeEnum.I_UNBAN.getCode(), dataRule, num, code, oneConfig.getScale(), waveNum, dataSourceEnum));
|
||||
resultMap.put(PowerIndexEnum.IMBA.getKey(), isQualified(devDataList, standardDevDataList, devIdMapComm, pqErrSysDtls, false, fIn, DetectionCodeEnum.I_UNBAN.getCode(), dataRule, num, code, oneConfig.getScale(), waveNum, dataSourceEnum, isRemoveMaxElement));
|
||||
break;
|
||||
case V2_50:
|
||||
case PV2_50:
|
||||
@@ -1720,7 +1720,7 @@ public class DetectionServiceImpl {
|
||||
resultMap.put(PowerIndexEnum.HSI.getKey(), isHarmQualified(devDataList, standardDevDataList, devIdMapComm, pqErrSysDtls, I, fIn, INHARMONIC_FLAG, isDelta && isExitDelta, dataRule, num, code, oneConfig.getScale(), waveNum, dataSourceEnum, isRemoveMaxElement));
|
||||
break;
|
||||
case PST:
|
||||
resultMap.put(PowerIndexEnum.F.getKey(), isQualified(devDataList, standardDevDataList, devIdMapComm, pqErrSysDtls, true, fUn, DetectionCodeEnum.PST.getCode(), dataRule, num, code, oneConfig.getScale(), waveNum, DataSourceEnum.MINUTE_STATISTICS_AVG));
|
||||
resultMap.put(PowerIndexEnum.F.getKey(), isQualified(devDataList, standardDevDataList, devIdMapComm, pqErrSysDtls, true, fUn, DetectionCodeEnum.PST.getCode(), dataRule, num, code, oneConfig.getScale(), waveNum, DataSourceEnum.MINUTE_STATISTICS_AVG, isRemoveMaxElement));
|
||||
break;
|
||||
case UNKNOWN_ERROR:
|
||||
break;
|
||||
@@ -1794,12 +1794,13 @@ public class DetectionServiceImpl {
|
||||
String code,
|
||||
Integer scale,
|
||||
Integer waveNum,
|
||||
DataSourceEnum dataSourceEnum) {
|
||||
DataSourceEnum dataSourceEnum,
|
||||
boolean isRemoveMaxElement) {
|
||||
List<ContrastNonHarmonicResult> info = new ArrayList<>();
|
||||
if (CollUtil.isNotEmpty(devDataList) && CollUtil.isNotEmpty(standardDevDataList) && CollUtil.isNotEmpty(errSysDtls)) {
|
||||
|
||||
Map<String, List<List<Double>>> phaseValueList = this.getPhaseValueList(devDataList, standardDevDataList, desc);
|
||||
Map<String, List<List<Double>>> map = devListMap(phaseValueList, dataRule);
|
||||
Map<String, List<List<Double>>> map = devListMap(phaseValueList, dataRule, isRemoveMaxElement);
|
||||
if (ObjectUtil.isNull(map)) {
|
||||
return 4;
|
||||
}
|
||||
@@ -2167,12 +2168,10 @@ public class DetectionServiceImpl {
|
||||
} else {
|
||||
harmCode = DetectionCodeEnum.I2_50.getCode();
|
||||
}
|
||||
isRemoveMaxElement = false;
|
||||
}
|
||||
if (HP.equals(type)) {
|
||||
// fData = fData * 0.01;
|
||||
harmCode = DetectionCodeEnum.P2_50.getCode();
|
||||
isRemoveMaxElement = false;
|
||||
}
|
||||
|
||||
Map<String, List<Map<Double, List<Double>>>> devMap = devHarmListMap(devDataList, standardDevDataList, fundCode, harmCode, harmonicFlag, dataRule, isRemoveMaxElement);
|
||||
@@ -2284,7 +2283,7 @@ public class DetectionServiceImpl {
|
||||
*
|
||||
* @param dataRule 数据处理原则
|
||||
*/
|
||||
public Map<String, List<List<Double>>> devListMap(Map<String, List<List<Double>>> phaseValueList, DictDataEnum dataRule) {
|
||||
public Map<String, List<List<Double>>> devListMap(Map<String, List<List<Double>>> phaseValueList, DictDataEnum dataRule, boolean isRemoveMaxElement) {
|
||||
Map<String, List<List<Double>>> resultMap = new HashMap<>(3);
|
||||
|
||||
List<Double> aDev = BeanUtil.copyToList(phaseValueList.get(TYPE_A).get(0), Double.class);
|
||||
@@ -2296,57 +2295,60 @@ public class DetectionServiceImpl {
|
||||
List<Double> tDev = BeanUtil.copyToList(phaseValueList.get(TYPE_T).get(0), Double.class);
|
||||
List<Double> tStandardDev = BeanUtil.copyToList(phaseValueList.get(TYPE_T).get(1), Double.class);
|
||||
|
||||
if (isRemoveMaxElement) {
|
||||
List<Double> aErrorValueList = new ArrayList<>();
|
||||
List<Double> bErrorValueList = new ArrayList<>();
|
||||
List<Double> cErrorValueList = new ArrayList<>();
|
||||
List<Double> tErrorValueList = new ArrayList<>();
|
||||
for (int i = 0; i < aStandardDev.size(); i++) {
|
||||
aErrorValueList.add(Math.abs(aStandardDev.get(i) - aDev.get(i)));
|
||||
}
|
||||
for (int i = 0; i < bStandardDev.size(); i++) {
|
||||
bErrorValueList.add(Math.abs(bStandardDev.get(i) - bDev.get(i)));
|
||||
}
|
||||
for (int i = 0; i < cStandardDev.size(); i++) {
|
||||
cErrorValueList.add(Math.abs(cStandardDev.get(i) - cDev.get(i)));
|
||||
}
|
||||
for (int i = 0; i < tStandardDev.size(); i++) {
|
||||
tErrorValueList.add(Math.abs(tStandardDev.get(i) - tDev.get(i)));
|
||||
}
|
||||
List<Integer> aErrorValueIdxs = DetectionUtil.sort(aErrorValueList, false);
|
||||
List<Integer> bErrorValueIdxs = DetectionUtil.sort(bErrorValueList, false);
|
||||
List<Integer> cErrorValueIdxs = DetectionUtil.sort(cErrorValueList, false);
|
||||
List<Integer> tErrorValueIdxs = DetectionUtil.sort(tErrorValueList, false);
|
||||
|
||||
// if (isRemoveMaxElement) {
|
||||
// List<Double> aErrorValueList = new ArrayList<>();
|
||||
// List<Double> bErrorValueList = new ArrayList<>();
|
||||
// List<Double> cErrorValueList = new ArrayList<>();
|
||||
// List<Double> tErrorValueList = new ArrayList<>();
|
||||
// for (int i = 0; i < aStandardDev.size(); i++) {
|
||||
// aErrorValueList.add(Math.abs(aStandardDev.get(i) - aDev.get(i)));
|
||||
// bErrorValueList.add(Math.abs(bStandardDev.get(i) - bDev.get(i)));
|
||||
// cErrorValueList.add(Math.abs(cStandardDev.get(i) - cDev.get(i)));
|
||||
// }
|
||||
// for (int i = 0; i < tStandardDev.size(); i++) {
|
||||
// tErrorValueList.add(Math.abs(tStandardDev.get(i) - tDev.get(i)));
|
||||
// }
|
||||
// List<Integer> aErrorValueIdxs = DetectionUtil.sort(aErrorValueList, false);
|
||||
// List<Integer> bErrorValueIdxs = DetectionUtil.sort(bErrorValueList, false);
|
||||
// List<Integer> cErrorValueIdxs = DetectionUtil.sort(cErrorValueList, false);
|
||||
// List<Integer> tErrorValueIdxs = DetectionUtil.sort(tErrorValueList, false);
|
||||
//
|
||||
// int removeCount = aErrorValueIdxs.size() > 2 ? 2 : aErrorValueIdxs.size();
|
||||
// List<Double> newArray = DetectionUtil.getNewArray(aStandardDev, aErrorValueIdxs.subList(removeCount, aErrorValueIdxs.size()));
|
||||
// aStandardDev.clear();
|
||||
// aStandardDev.addAll(newArray);
|
||||
// newArray = DetectionUtil.getNewArray(aDev, aErrorValueIdxs.subList(removeCount, aErrorValueIdxs.size()));
|
||||
// aDev.clear();
|
||||
// aDev.addAll(newArray);
|
||||
//
|
||||
//
|
||||
// newArray = DetectionUtil.getNewArray(bStandardDev, bErrorValueIdxs.subList(removeCount, bErrorValueIdxs.size()));
|
||||
// bStandardDev.clear();
|
||||
// bStandardDev.addAll(newArray);
|
||||
// newArray = DetectionUtil.getNewArray(bDev, bErrorValueIdxs.subList(removeCount, bErrorValueIdxs.size()));
|
||||
// bDev.clear();
|
||||
// bDev.addAll(newArray);
|
||||
//
|
||||
//
|
||||
// newArray = DetectionUtil.getNewArray(cStandardDev, cErrorValueIdxs.subList(removeCount, cErrorValueIdxs.size()));
|
||||
// cStandardDev.clear();
|
||||
// cStandardDev.addAll(newArray);
|
||||
// newArray = DetectionUtil.getNewArray(cDev, cErrorValueIdxs.subList(removeCount, cErrorValueIdxs.size()));
|
||||
// cDev.clear();
|
||||
// cDev.addAll(newArray);
|
||||
//
|
||||
// int tRemoveCount = tErrorValueIdxs.size() > 10 ? 10 : tErrorValueIdxs.size();
|
||||
// newArray = DetectionUtil.getNewArray(tStandardDev, tErrorValueIdxs.subList(tRemoveCount, tErrorValueIdxs.size()));
|
||||
// tStandardDev.clear();
|
||||
// tStandardDev.addAll(newArray);
|
||||
// newArray = DetectionUtil.getNewArray(tDev, tErrorValueIdxs.subList(tRemoveCount, tErrorValueIdxs.size()));
|
||||
// tDev.clear();
|
||||
// tDev.addAll(newArray);
|
||||
// }
|
||||
int removeCount = aErrorValueIdxs.size() / 2;
|
||||
List<Double> newArray = DetectionUtil.getNewArray(aStandardDev, aErrorValueIdxs.subList(removeCount, aErrorValueIdxs.size()));
|
||||
aStandardDev.clear();
|
||||
aStandardDev.addAll(newArray);
|
||||
newArray = DetectionUtil.getNewArray(aDev, aErrorValueIdxs.subList(removeCount, aErrorValueIdxs.size()));
|
||||
aDev.clear();
|
||||
aDev.addAll(newArray);
|
||||
|
||||
removeCount = bErrorValueIdxs.size() / 2;
|
||||
newArray = DetectionUtil.getNewArray(bStandardDev, bErrorValueIdxs.subList(removeCount, bErrorValueIdxs.size()));
|
||||
bStandardDev.clear();
|
||||
bStandardDev.addAll(newArray);
|
||||
newArray = DetectionUtil.getNewArray(bDev, bErrorValueIdxs.subList(removeCount, bErrorValueIdxs.size()));
|
||||
bDev.clear();
|
||||
bDev.addAll(newArray);
|
||||
|
||||
removeCount = cErrorValueIdxs.size() / 2;
|
||||
newArray = DetectionUtil.getNewArray(cStandardDev, cErrorValueIdxs.subList(removeCount, cErrorValueIdxs.size()));
|
||||
cStandardDev.clear();
|
||||
cStandardDev.addAll(newArray);
|
||||
newArray = DetectionUtil.getNewArray(cDev, cErrorValueIdxs.subList(removeCount, cErrorValueIdxs.size()));
|
||||
cDev.clear();
|
||||
cDev.addAll(newArray);
|
||||
|
||||
removeCount = tErrorValueIdxs.size() / 2;
|
||||
newArray = DetectionUtil.getNewArray(tStandardDev, tErrorValueIdxs.subList(removeCount, tErrorValueIdxs.size()));
|
||||
tStandardDev.clear();
|
||||
tStandardDev.addAll(newArray);
|
||||
newArray = DetectionUtil.getNewArray(tDev, tErrorValueIdxs.subList(removeCount, tErrorValueIdxs.size()));
|
||||
tDev.clear();
|
||||
tDev.addAll(newArray);
|
||||
}
|
||||
|
||||
List<Integer> aIdxs = DetectionUtil.sort(aStandardDev, false);
|
||||
List<Integer> bIdxs = DetectionUtil.sort(bStandardDev, false);
|
||||
@@ -2422,6 +2424,57 @@ public class DetectionServiceImpl {
|
||||
cStandardDev = DetectionUtil.getAvgDoubles(cStandardDev);
|
||||
tStandardDev = DetectionUtil.getAvgDoubles(tStandardDev);
|
||||
break;
|
||||
case Own_value:
|
||||
List<Double> newArray = DetectionUtil.getNewArray(aDev, aIdxs);
|
||||
aDev.clear();
|
||||
aDev.addAll(newArray);
|
||||
|
||||
newArray = DetectionUtil.getNewArray(bDev, bIdxs);
|
||||
bDev.clear();
|
||||
bDev.addAll(newArray);
|
||||
|
||||
newArray = DetectionUtil.getNewArray(cDev, cIdxs);
|
||||
cDev.clear();
|
||||
cDev.addAll(newArray);
|
||||
|
||||
newArray = DetectionUtil.getNewArray(tDev, tIdxs);
|
||||
tDev.clear();
|
||||
tDev.addAll(newArray);
|
||||
break;
|
||||
case AT_WILL_VALUE:
|
||||
if (CollUtil.isNotEmpty(aStandardDev)) {
|
||||
aStandardDev = aStandardDev.subList(0, 1);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(aDev)) {
|
||||
Double v = aDev.get(aIdxs.get(0));
|
||||
aDev.clear();
|
||||
aDev.add(v);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(bStandardDev)) {
|
||||
bStandardDev = bStandardDev.subList(0, 1);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(bDev)) {
|
||||
Double v = bDev.get(bIdxs.get(0));
|
||||
bDev.clear();
|
||||
bDev.add(v);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(cStandardDev)) {
|
||||
cStandardDev = cStandardDev.subList(0, 1);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(cDev)) {
|
||||
Double v = cDev.get(cIdxs.get(0));
|
||||
cDev.clear();
|
||||
cDev.add(v);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(tStandardDev)) {
|
||||
tStandardDev = tStandardDev.subList(0, 1);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(tDev)) {
|
||||
Double v = tDev.get(tIdxs.get(0));
|
||||
tDev.clear();
|
||||
tDev.add(v);
|
||||
}
|
||||
break;
|
||||
}
|
||||
resultMap.put(TYPE_A, Arrays.asList(aDev, aStandardDev));
|
||||
resultMap.put(TYPE_B, Arrays.asList(bDev, bStandardDev));
|
||||
@@ -2584,7 +2637,7 @@ public class DetectionServiceImpl {
|
||||
}
|
||||
|
||||
List<Integer> idxErrorValueList = DetectionUtil.sort(errorValueList, false);
|
||||
int removeCount = idxErrorValueList.size() > 20 ? (idxErrorValueList.size() / 20) * 7 : (idxErrorValueList.size() / 5) * 3;
|
||||
int removeCount = idxErrorValueList.size() / 2;
|
||||
List<Double> newArray = DetectionUtil.getNewArray(value, idxErrorValueList.subList(removeCount, idxErrorValueList.size()));
|
||||
value.clear();
|
||||
value.addAll(newArray);
|
||||
@@ -2624,6 +2677,23 @@ public class DetectionServiceImpl {
|
||||
devPhaseHarmData.clear();
|
||||
devPhaseHarmData.addAll(devAvgData);
|
||||
break;
|
||||
case Own_value:
|
||||
List<Double> newArray = DetectionUtil.getNewArray(devPhaseHarmData, idx);
|
||||
devPhaseHarmData.clear();
|
||||
devPhaseHarmData.addAll(newArray);
|
||||
break;
|
||||
case AT_WILL_VALUE:
|
||||
if (CollUtil.isNotEmpty(value)) {
|
||||
Double v = value.get(0);
|
||||
value.clear();
|
||||
value.add(v);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(devPhaseHarmData)) {
|
||||
Double v = devPhaseHarmData.get(idx.get(0));
|
||||
devPhaseHarmData.clear();
|
||||
devPhaseHarmData.add(v);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -123,6 +123,3 @@ power-quality:
|
||||
activate:
|
||||
private-key: "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCcUyYhVqczGxblL+o/xZzF/8nf+LjrfUE/dS1aRHM7uMDD0cgCArhjtfneFePrMxt+Z7W8yNBzSarub8qsfhaVNikV7Es7oaeTygfjQXTi2n4AFkir3fM07J08RpWhl5M8f8uWTCuvFUYAw00gq55typqmnbkmJa2VIUy/iQf+cMCP7abz4/jNhUzUR3qA7TV4oMRgTdIEDUp63YF8dOC+JH8XxYrCVeHXV6fLCwmesdMzl0lB2VTEKMfLbXhOmF5g7P9y/16VCcN8UBuZlbyYfn+GAxJOSbeHi5HshOKfoSuD7Jz+3WQZpNavOWjIFExKIU38/CvnJCOP7XBCqpSTAgMBAAECggEAYeWokWRE3TpvwiOZnUpR/aVMdVi75a3ROL5XIpqPV61B+t/bU3cEpl0GF9C5pUeiRi0IoStZb3mI9D1KPW/REKyUWkhabQO1gFYbTnRlkNOn6MILzKX4cwJjDaZeeo4EBPU7N+qHyOOXrU6hdH5FfxhMdV983ajm5eeuupxER1C2kAcIklTeVpTX6EKOgZb5LBp5ssOVm2P42pOauvcRozRcvZmqnErXmukv0H4l3EVNt4rHpTn9riHUC63e8JfiYzVaF6zuNUxv6nHEft0/SRMw11XSTnNfDzcKqgjz6ksFBS/6eQQYKESk+ONC53HUuYHFAknkwsPupDCT2W8FIQKBgQDLHT/xCU3nxGr4vFKBDNaO2D5oK20ECbBO4oDvLWWmQG7f+6TsMy8PgVdMnoL4RfqGlwFAKEpS6KVFHnBVqnNEhcdy9uCI7x7Xx8UnyUtxj1EDTm76uta9Ki9OrlqB6tImDM9+Ya3vGktW37ht4WOx2OsJRhG1dbf6RLwFlH7DWwKBgQDFBxvi5I1BR6hg6Tj7xd2SqOT2Y+BED3xuSYENhWbmMhLJDResaB7mjztbxlYaY2mOE0holWm2uDmVFFhMh4jYXik4hYH8nmDzq9mDpZCZ9pyjYqnAP8THoAa8EbgrUWB8A6BPH4iL3KbMnBfBKY0pIr2xrvnjQjNBAgta7KDRKQKBgCe6oe4wxrdF2TKsC2tIqpMoQxS3Icy/ZGgZr+SYuaBKTCWtoDW/UT40K3JGMxIDBhzbXphBCUCsVt9tM8Xd4EwP6tJW7dZ7B0pnve2pVwNwaAVAiz6p2yUHIle+jN+Koe5lZRSwYIg7WW81tWpwwsJfzqFyvjYDP6hJV4mz4ROvAoGAaRcdnKvjXApomShMqJ4lTPChD3q+SA8qg3jZSOj6tZXHx00gb2kp8jg7pPvpOTIFPy6x1Ha9aCRjMk0ju84fA6lVuzwa1S907wOehUVuF3Eeo1cgy9Y3k3KbpPyeixxgpkUY4JslLdSHc2NemD0dee951qhJyRmqVOZOQDUuoeECgYEAqBw2cAFk3vM97WY06TSldGA8ajVHx3BYRjj+zl62NTQthy8fw3tqxb3c5e8toOmZWKjZvDhg2TRLhsDDQWEYg3LZG87REqVIjgEPcpjNLidjygGX8n3JF2o0O5I/EMvl0s/+LVQONfduOBvhwDqr8QNisbLsyneiAq7umewMolo="
|
||||
public-key: "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnFMmIVanMxsW5S/qP8Wcxf/J3/i4631BP3UtWkRzO7jAw9HIAgK4Y7X53hXj6zMbfme1vMjQc0mq7m/KrH4WlTYpFexLO6Gnk8oH40F04tp+ABZIq93zNOydPEaVoZeTPH/LlkwrrxVGAMNNIKuebcqapp25JiWtlSFMv4kH/nDAj+2m8+P4zYVM1Ed6gO01eKDEYE3SBA1Ket2BfHTgviR/F8WKwlXh11enywsJnrHTM5dJQdlUxCjHy214TpheYOz/cv9elQnDfFAbmZW8mH5/hgMSTkm3h4uR7ITin6Erg+yc/t1kGaTWrzloyBRMSiFN/Pwr5yQjj+1wQqqUkwIDAQAB"
|
||||
|
||||
error:
|
||||
removeCount: 14
|
||||
Reference in New Issue
Block a user