diff --git a/detection/src/main/java/com/njcn/gather/report/service/impl/PqReportServiceImpl.java b/detection/src/main/java/com/njcn/gather/report/service/impl/PqReportServiceImpl.java index 29ad2ab4..286eef2d 100644 --- a/detection/src/main/java/com/njcn/gather/report/service/impl/PqReportServiceImpl.java +++ b/detection/src/main/java/com/njcn/gather/report/service/impl/PqReportServiceImpl.java @@ -98,9 +98,11 @@ import java.math.RoundingMode; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import java.util.*; import java.util.List; -import java.util.concurrent.*; +import java.util.*; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; import java.util.regex.Pattern; import java.util.stream.Collectors; @@ -615,7 +617,6 @@ public class PqReportServiceImpl extends ServiceImpl i } - /** * 处理检测报告上传云服务器并生成二维码下装到装置 * 做成异步执行 @@ -1506,7 +1507,7 @@ public class PqReportServiceImpl extends ServiceImpl i fillHarm(dataModelMap, adHarmonicResult, index, key, 57.74, 100); } if (DetectionCodeEnum.I2_50.getCode().equals(key) || DetectionCodeEnum.SI_1_49.getCode().equals(key)) { - fillHarm(dataModelMap, adHarmonicResult, index, key, 1, 100); + fillHarm(dataModelMap, adHarmonicResult, index, key, 1, 1); } } } @@ -1525,7 +1526,7 @@ public class PqReportServiceImpl extends ServiceImpl i */ private void fillHarm(Map dataModelMap, AdHarmonicResult adHarmonicResult, String index, String key, double baseValue, int percent) { // 要处理 2 5 7 11 23 35 43 50 - // 基波 + String aBase = devValue(adHarmonicResult.getAValue1(), 1, 1); String bBase = devValue(adHarmonicResult.getBValue1(), 1, 1); String cBase = devValue(adHarmonicResult.getCValue1(), 1, 1); @@ -1533,18 +1534,20 @@ public class PqReportServiceImpl extends ServiceImpl i dataModelMap.put("${" + index + "#" + key + "#B#1}", bBase); dataModelMap.put("${" + index + "#" + key + "#C#1}", cBase); + // 基波 double aBaseValue = baseValue; double bBaseValue = baseValue; double cBaseValue = baseValue; - - if (!aBase.equals(StrPool.SLASH)) { - aBaseValue = Double.parseDouble(aBase); - } - if (!bBase.equals(StrPool.SLASH)) { - bBaseValue = Double.parseDouble(bBase); - } - if (!cBase.equals(StrPool.SLASH)) { - cBaseValue = Double.parseDouble(cBase); + if (!DetectionCodeEnum.I2_50.getCode().equals(adHarmonicResult.getAdType())) { + if (!aBase.equals(StrPool.SLASH)) { + aBaseValue = Double.parseDouble(aBase); + } + if (!bBase.equals(StrPool.SLASH)) { + bBaseValue = Double.parseDouble(bBase); + } + if (!cBase.equals(StrPool.SLASH)) { + cBaseValue = Double.parseDouble(cBase); + } } dataModelMap.put("${" + index + "#" + key + "#A#2}", devValue(adHarmonicResult.getAValue2(), aBaseValue, percent));