解决间谐波检测脚本问题

This commit is contained in:
wr
2025-03-10 18:44:47 +08:00
parent 1b518e508e
commit 9bef1331f2
2 changed files with 4 additions and 4 deletions

View File

@@ -772,7 +772,7 @@ public class DetectionServiceImpl {
dataMap.forEach((key, value) -> {
try {
// 设置 id 字段;
Field idField = AdHarmonicResult.class.getDeclaredField(phase + "Value" + (num == 1 ? (int) (key + 0.5) : key.intValue()));
Field idField = AdHarmonicResult.class.getDeclaredField(phase + "Value" + (num == 1 ? (int) (key + 1.5) : key.intValue()));
idField.setAccessible(true);
if (ObjectUtil.isNull(value.getIsData())) {
idField.set(harmonicResult, value.getData());
@@ -1220,7 +1220,7 @@ public class DetectionServiceImpl {
if (i.equals(1.0)) {
integerListMap.get(1.0).add(multiply(fund, fund));
} else {
double v = num == 1 ? num : (i - num);
double v = (num == 1 ? num : (i - num));
if (type.equals("A")) {
integerListMap.get(i).add(multiply(harm.getList().getA().get((int) v), fund));
}
@@ -1241,7 +1241,7 @@ public class DetectionServiceImpl {
integerList.add(multiply(fund, fund));
integerListMap.put(1.0, integerList);
} else {
double v = num == 1 ? num : (i - num);
double v = (num == 1 ? num : (i - num));
if (type.equals("A")) {
integerList.add(multiply(harm.getList().getA().get((int) v), fund));
}