From 757501efa86f6d50f38ef8316401502cdf0db10c Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Mon, 30 Jun 2025 14:15:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8C=E6=A5=BC=E7=94=9F=E6=88=90=E6=8A=A5?= =?UTF-8?q?=E5=91=8A=E8=B0=90=E6=B3=A2=E7=94=B5=E6=B5=81=E5=80=BC=E6=9C=89?= =?UTF-8?q?=E8=AF=AFbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/PqReportServiceImpl.java | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) 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));