谐波、间谐波对电压的影响

调用数据校验接口调整
This commit is contained in:
caozehui
2026-06-24 09:15:20 +08:00
parent 9990183c5d
commit 9dfb42f917
10 changed files with 16 additions and 183 deletions

View File

@@ -849,7 +849,17 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
checkData.setValue(0.0);
} else {
// 在这里重新根据谐波、间谐波含有率计算新的幅值
checkData.setValue(listDTO.getFAmp());
Double fAmp = listDTO.getFAmp();
if (listDTO.getHarmFlag()) {
double thd = listDTO.getHarmList().stream().map(harmModel -> harmModel.getFAmp() * harmModel.getFAmp() / 10000).mapToDouble(x -> x).sum();
fAmp = Math.sqrt(1 + thd) * fAmp;
}
if (listDTO.getInHarmFlag()) {
double thd = listDTO.getInharmList().stream().map(harmModel -> harmModel.getFAmp() * harmModel.getFAmp() / 10000).mapToDouble(x -> x).sum();
fAmp = Math.sqrt(1 + thd) * fAmp;
}
checkData.setValue(fAmp);
}
}
info.add(checkData);