解决间谐波检测脚本问题
This commit is contained in:
@@ -772,7 +772,7 @@ public class DetectionServiceImpl {
|
|||||||
dataMap.forEach((key, value) -> {
|
dataMap.forEach((key, value) -> {
|
||||||
try {
|
try {
|
||||||
// 设置 id 字段;
|
// 设置 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);
|
idField.setAccessible(true);
|
||||||
if (ObjectUtil.isNull(value.getIsData())) {
|
if (ObjectUtil.isNull(value.getIsData())) {
|
||||||
idField.set(harmonicResult, value.getData());
|
idField.set(harmonicResult, value.getData());
|
||||||
@@ -1220,7 +1220,7 @@ public class DetectionServiceImpl {
|
|||||||
if (i.equals(1.0)) {
|
if (i.equals(1.0)) {
|
||||||
integerListMap.get(1.0).add(multiply(fund, fund));
|
integerListMap.get(1.0).add(multiply(fund, fund));
|
||||||
} else {
|
} else {
|
||||||
double v = num == 1 ? num : (i - num);
|
double v = (num == 1 ? num : (i - num));
|
||||||
if (type.equals("A")) {
|
if (type.equals("A")) {
|
||||||
integerListMap.get(i).add(multiply(harm.getList().getA().get((int) v), fund));
|
integerListMap.get(i).add(multiply(harm.getList().getA().get((int) v), fund));
|
||||||
}
|
}
|
||||||
@@ -1241,7 +1241,7 @@ public class DetectionServiceImpl {
|
|||||||
integerList.add(multiply(fund, fund));
|
integerList.add(multiply(fund, fund));
|
||||||
integerListMap.put(1.0, integerList);
|
integerListMap.put(1.0, integerList);
|
||||||
} else {
|
} else {
|
||||||
double v = num == 1 ? num : (i - num);
|
double v = (num == 1 ? num : (i - num));
|
||||||
if (type.equals("A")) {
|
if (type.equals("A")) {
|
||||||
integerList.add(multiply(harm.getList().getA().get((int) v), fund));
|
integerList.add(multiply(harm.getList().getA().get((int) v), fund));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ public class AdHarmonicServiceImpl extends ServiceImpl<AdHarmonicMappper, AdHarm
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Integer setResultFlag(List<RawResultDataVO.DetectionData> numbers) {
|
private Integer setResultFlag(List<RawResultDataVO.DetectionData> numbers) {
|
||||||
List<Integer> isData = numbers.stream().filter(x -> ObjectUtil.isNotNull(x.getData())).filter(x -> 4 != x.getIsData()).map(RawResultDataVO.DetectionData::getIsData).distinct().collect(Collectors.toList());
|
List<Integer> isData = numbers.stream().filter(Objects::nonNull).filter(x -> ObjectUtil.isNotNull(x.getData())).filter(x -> 4 != x.getIsData()).map(RawResultDataVO.DetectionData::getIsData).distinct().collect(Collectors.toList());
|
||||||
return getInteger(isData);
|
return getInteger(isData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user