From 67dba4c0bc380bc9c02bb31ff4edc86838a6e0f1 Mon Sep 17 00:00:00 2001 From: qiaoqinzheng Date: Thu, 16 Nov 2023 09:23:14 +0800 Subject: [PATCH] =?UTF-8?q?beta=E6=9F=A5=E7=9C=8BRRR=E6=8A=A5=E5=91=8A?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E7=BB=93=E6=9E=9Cresult=E4=B8=8D=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/SpectrumAnalysisServiceImpl.java | 64 ++++++++++--------- 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/SpectrumAnalysisServiceImpl.java b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/SpectrumAnalysisServiceImpl.java index b90fb98b..fea65e37 100644 --- a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/SpectrumAnalysisServiceImpl.java +++ b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/SpectrumAnalysisServiceImpl.java @@ -1201,42 +1201,46 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements strBuffer.append(System.lineSeparator()); String netRoi = "%s%-51s%-51s%-13s"; if (betaDataFile.isBProcessed()) { - if (Objects.isNull(resultsSpectrums.get(0).getLcCts())) { - strBuffer.append(rowFormat(netRoi, StringPool.SPACE, "Roi", "Net count", StringPool.SPACE)); - strBuffer.append(System.lineSeparator()); - if (CollectionUtils.isNotEmpty(resultsSpectrums)) { - for (GardsROIResultsSpectrum resultsSpectrum:resultsSpectrums){ - strBuffer.append(rowFormat(netRoi, StringPool.SPACE, String.valueOf(resultsSpectrum.getRoi()), NumberFormatUtil.numberSixLen(String.valueOf(resultsSpectrum.getNet()))+" +/- "+NumberFormatUtil.numberSixLen(String.valueOf(resultsSpectrum.getNetErr())), StringPool.SPACE)); - strBuffer.append(System.lineSeparator()); + if (CollectionUtils.isNotEmpty(resultsSpectrums)) { + if (Objects.isNull(resultsSpectrums.get(0).getLcCts())) { + strBuffer.append(rowFormat(netRoi, StringPool.SPACE, "Roi", "Net count", StringPool.SPACE)); + strBuffer.append(System.lineSeparator()); + if (CollectionUtils.isNotEmpty(resultsSpectrums)) { + for (GardsROIResultsSpectrum resultsSpectrum:resultsSpectrums){ + strBuffer.append(rowFormat(netRoi, StringPool.SPACE, String.valueOf(resultsSpectrum.getRoi()), NumberFormatUtil.numberSixLen(String.valueOf(resultsSpectrum.getNet()))+" +/- "+NumberFormatUtil.numberSixLen(String.valueOf(resultsSpectrum.getNetErr())), StringPool.SPACE)); + strBuffer.append(System.lineSeparator()); + } } - } - } else { - strBuffer.append(rowFormat(netRoi, StringPool.SPACE, "Roi", "Net count", "LC")); - strBuffer.append(System.lineSeparator()); - if (CollectionUtils.isNotEmpty(resultsSpectrums)) { - for (GardsROIResultsSpectrum resultsSpectrum:resultsSpectrums){ - strBuffer.append(rowFormat(netRoi, StringPool.SPACE, String.valueOf(resultsSpectrum.getRoi()), NumberFormatUtil.numberSixLen(String.valueOf(resultsSpectrum.getNet()))+" +/- "+NumberFormatUtil.numberSixLen(String.valueOf(resultsSpectrum.getNetErr())), NumberFormatUtil.numberSixLen(String.valueOf(resultsSpectrum.getLcCts())))); - strBuffer.append(System.lineSeparator()); + } else { + strBuffer.append(rowFormat(netRoi, StringPool.SPACE, "Roi", "Net count", "LC")); + strBuffer.append(System.lineSeparator()); + if (CollectionUtils.isNotEmpty(resultsSpectrums)) { + for (GardsROIResultsSpectrum resultsSpectrum:resultsSpectrums){ + strBuffer.append(rowFormat(netRoi, StringPool.SPACE, String.valueOf(resultsSpectrum.getRoi()), NumberFormatUtil.numberSixLen(String.valueOf(resultsSpectrum.getNet()))+" +/- "+NumberFormatUtil.numberSixLen(String.valueOf(resultsSpectrum.getNetErr())), NumberFormatUtil.numberSixLen(String.valueOf(resultsSpectrum.getLcCts())))); + strBuffer.append(System.lineSeparator()); + } } } } } else { - if (Objects.isNull(resultsSpectrums.get(0).getLcCts())) { - strBuffer.append(rowFormat(netRoi, StringPool.SPACE, "Roi", "Net count", StringPool.SPACE)); - strBuffer.append(System.lineSeparator()); - if (CollectionUtils.isNotEmpty(resultsSpectrums)) { - for (GardsROIResultsSpectrum resultsSpectrum:resultsSpectrums){ - strBuffer.append(rowFormat(netRoi, StringPool.SPACE, String.valueOf(resultsSpectrum.getRoi()), NumberFormatUtil.numberSixLen(String.valueOf(resultsSpectrum.getNet()))+" +/- "+NumberFormatUtil.numberSixLen(String.valueOf(Math.sqrt(resultsSpectrum.getNetErr()))), StringPool.SPACE)); - strBuffer.append(System.lineSeparator()); + if (CollectionUtils.isNotEmpty(resultsSpectrums)) { + if (Objects.isNull(resultsSpectrums.get(0).getLcCts())) { + strBuffer.append(rowFormat(netRoi, StringPool.SPACE, "Roi", "Net count", StringPool.SPACE)); + strBuffer.append(System.lineSeparator()); + if (CollectionUtils.isNotEmpty(resultsSpectrums)) { + for (GardsROIResultsSpectrum resultsSpectrum:resultsSpectrums){ + strBuffer.append(rowFormat(netRoi, StringPool.SPACE, String.valueOf(resultsSpectrum.getRoi()), NumberFormatUtil.numberSixLen(String.valueOf(resultsSpectrum.getNet()))+" +/- "+NumberFormatUtil.numberSixLen(String.valueOf(Math.sqrt(resultsSpectrum.getNetErr()))), StringPool.SPACE)); + strBuffer.append(System.lineSeparator()); + } } - } - } else { - strBuffer.append(rowFormat(netRoi, StringPool.SPACE, "Roi", "Net count", "LC")); - strBuffer.append(System.lineSeparator()); - if (CollectionUtils.isNotEmpty(resultsSpectrums)) { - for (GardsROIResultsSpectrum resultsSpectrum:resultsSpectrums){ - strBuffer.append(rowFormat(netRoi, StringPool.SPACE, String.valueOf(resultsSpectrum.getRoi()), NumberFormatUtil.numberSixLen(String.valueOf(resultsSpectrum.getNet()))+" +/- "+NumberFormatUtil.numberSixLen(String.valueOf(Math.sqrt(resultsSpectrum.getNetErr()))), NumberFormatUtil.numberSixLen(String.valueOf(resultsSpectrum.getLcCts())))); - strBuffer.append(System.lineSeparator()); + } else { + strBuffer.append(rowFormat(netRoi, StringPool.SPACE, "Roi", "Net count", "LC")); + strBuffer.append(System.lineSeparator()); + if (CollectionUtils.isNotEmpty(resultsSpectrums)) { + for (GardsROIResultsSpectrum resultsSpectrum:resultsSpectrums){ + strBuffer.append(rowFormat(netRoi, StringPool.SPACE, String.valueOf(resultsSpectrum.getRoi()), NumberFormatUtil.numberSixLen(String.valueOf(resultsSpectrum.getNet()))+" +/- "+NumberFormatUtil.numberSixLen(String.valueOf(Math.sqrt(resultsSpectrum.getNetErr()))), NumberFormatUtil.numberSixLen(String.valueOf(resultsSpectrum.getLcCts())))); + strBuffer.append(System.lineSeparator()); + } } } }