From 06ba735009e490de27620ec5782ba4b1a40715c1 Mon Sep 17 00:00:00 2001 From: qiaoqinzheng Date: Wed, 8 Nov 2023 19:08:43 +0800 Subject: [PATCH] =?UTF-8?q?beta=E5=88=86=E6=9E=90=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E4=B8=8B=E6=A0=87=E8=B6=8A=E7=95=8C=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/jeecg/common/util/PHDFileUtil.java | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/common/util/PHDFileUtil.java b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/common/util/PHDFileUtil.java index 1e3a98c0..5285b5fe 100644 --- a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/common/util/PHDFileUtil.java +++ b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/common/util/PHDFileUtil.java @@ -623,6 +623,7 @@ public class PHDFileUtil extends AbstractLogOrReport { public boolean analyzeSpectrum(File sampleTmp, File gasTmp, File detTmp, BgCalibratePara BgCalPara, Map map, BetaDataFile betaDataFile) { boolean bRet = true; + long start = System.currentTimeMillis(); //调用动态库解析文件 BgAnalyseResult analyseResult = null; if (Objects.isNull(BgCalPara)) { @@ -630,6 +631,7 @@ public class PHDFileUtil extends AbstractLogOrReport { } else { analyseResult = EnergySpectrumHandler.bgReAnalyse(sampleTmp.getAbsolutePath(), gasTmp.getAbsolutePath(), detTmp.getAbsolutePath(), BgCalPara); } + System.out.println("beta分析总耗时:"+ (System.currentTimeMillis() - start)); if (StringUtils.isNotBlank(analyseResult.error_log) && !analyseResult.error_log.equalsIgnoreCase("no error.")) { bRet = false; return bRet; @@ -840,7 +842,7 @@ public class PHDFileUtil extends AbstractLogOrReport { gammaCalibrationSpectrumList.add(gammaCalibrationS); } else { GardsCalibrationSpectrum gammaCalibrationS = new GardsCalibrationSpectrum(); - if (bgAnalyseResult.s_g_fitting_c_e.size() < 0) { + if (bgAnalyseResult.s_g_fitting_c_e.size() <= 0) { gammaCalibrationS.setDataType(DataTypeAbbr.SAMPLEPHD.getType()); gammaCalibrationS.setCoeff1(Double.valueOf(gammaFittingPara.get(0))); gammaCalibrationS.setCoeff2(Double.valueOf(gammaFittingPara.get(1))); @@ -862,7 +864,7 @@ public class PHDFileUtil extends AbstractLogOrReport { gammaCalibrationSpectrumList.add(gammaCalibrationG); } else { GardsCalibrationSpectrum gammaCalibrationG = new GardsCalibrationSpectrum(); - if (bgAnalyseResult.g_g_fitting_c_e.size() < 0) { + if (bgAnalyseResult.g_g_fitting_c_e.size() <= 0) { gammaCalibrationG.setDataType(DataTypeAbbr.GASBKPHD.getType()); gammaCalibrationG.setCoeff1(Double.valueOf(gammaFittingPara.get(0))); gammaCalibrationG.setCoeff2(Double.valueOf(gammaFittingPara.get(1))); @@ -885,7 +887,7 @@ public class PHDFileUtil extends AbstractLogOrReport { gammaCalibrationSpectrumList.add(gammaCalibrationD); } else { GardsCalibrationSpectrum gammaCalibrationD = new GardsCalibrationSpectrum(); - if (bgAnalyseResult.d_g_fitting_c_e.size() < 0) { + if (bgAnalyseResult.d_g_fitting_c_e.size() <= 0) { gammaCalibrationD.setDataType(DataTypeAbbr.DETBKPHD.getType()); gammaCalibrationD.setCoeff1(Double.valueOf(gammaFittingPara.get(0))); gammaCalibrationD.setCoeff2(Double.valueOf(gammaFittingPara.get(1))); @@ -912,7 +914,7 @@ public class PHDFileUtil extends AbstractLogOrReport { gammaCalibrationSpectrumEList.add(gammaCalibrationS); } else { GardsCalibrationSpectrum gammaCalibrationS = new GardsCalibrationSpectrum(); - if (bgAnalyseResult.s_g_fitting_e_c.size() < 0) { + if (bgAnalyseResult.s_g_fitting_e_c.size() <= 0) { gammaCalibrationS.setDataType(DataTypeAbbr.SAMPLEPHD.getType()); gammaCalibrationS.setCoeff1(Double.valueOf(gammaFittingParaToUi.get(0))); gammaCalibrationS.setCoeff2(Double.valueOf(gammaFittingParaToUi.get(1))); @@ -934,7 +936,7 @@ public class PHDFileUtil extends AbstractLogOrReport { gammaCalibrationSpectrumEList.add(gammaCalibrationG); } else { GardsCalibrationSpectrum gammaCalibrationG = new GardsCalibrationSpectrum(); - if (bgAnalyseResult.g_g_fitting_e_c.size() < 0) { + if (bgAnalyseResult.g_g_fitting_e_c.size() <= 0) { gammaCalibrationG.setDataType(DataTypeAbbr.GASBKPHD.getType()); gammaCalibrationG.setCoeff1(Double.valueOf(gammaFittingParaToUi.get(0))); gammaCalibrationG.setCoeff2(Double.valueOf(gammaFittingParaToUi.get(1))); @@ -957,7 +959,7 @@ public class PHDFileUtil extends AbstractLogOrReport { gammaCalibrationSpectrumEList.add(gammaCalibrationD); } else { GardsCalibrationSpectrum gammaCalibrationD = new GardsCalibrationSpectrum(); - if (bgAnalyseResult.d_g_fitting_e_c.size() < 0) { + if (bgAnalyseResult.d_g_fitting_e_c.size() <= 0) { gammaCalibrationD.setDataType(DataTypeAbbr.DETBKPHD.getType()); gammaCalibrationD.setCoeff1(Double.valueOf(gammaFittingParaToUi.get(0))); gammaCalibrationD.setCoeff2(Double.valueOf(gammaFittingParaToUi.get(1))); @@ -985,7 +987,7 @@ public class PHDFileUtil extends AbstractLogOrReport { betaCalibrationSpectrumList.add(betaCalibrationS); } else { GardsCalibrationSpectrum betaCalibrationS = new GardsCalibrationSpectrum(); - if (bgAnalyseResult.s_b_fitting_c_e.size() < 0) { + if (bgAnalyseResult.s_b_fitting_c_e.size() <= 0) { betaCalibrationS.setDataType(DataTypeAbbr.SAMPLEPHD.getType()); betaCalibrationS.setCoeff1(Double.valueOf(betaFittingPara.get(0))); betaCalibrationS.setCoeff2(Double.valueOf(betaFittingPara.get(1))); @@ -1007,7 +1009,7 @@ public class PHDFileUtil extends AbstractLogOrReport { betaCalibrationSpectrumList.add(betaCalibrationG); } else { GardsCalibrationSpectrum betaCalibrationG = new GardsCalibrationSpectrum(); - if (bgAnalyseResult.g_b_fitting_c_e.size() < 0) { + if (bgAnalyseResult.g_b_fitting_c_e.size() <= 0) { betaCalibrationG.setDataType(DataTypeAbbr.GASBKPHD.getType()); betaCalibrationG.setCoeff1(Double.valueOf(betaFittingPara.get(0))); betaCalibrationG.setCoeff2(Double.valueOf(betaFittingPara.get(1))); @@ -1029,7 +1031,7 @@ public class PHDFileUtil extends AbstractLogOrReport { betaCalibrationSpectrumList.add(betaCalibrationD); } else { GardsCalibrationSpectrum betaCalibrationD = new GardsCalibrationSpectrum(); - if (bgAnalyseResult.d_b_fitting_c_e.size() < 0) { + if (bgAnalyseResult.d_b_fitting_c_e.size() <= 0) { betaCalibrationD.setDataType(DataTypeAbbr.DETBKPHD.getType()); betaCalibrationD.setCoeff1(Double.valueOf(betaFittingPara.get(0))); betaCalibrationD.setCoeff2(Double.valueOf(betaFittingPara.get(1))); @@ -1056,7 +1058,7 @@ public class PHDFileUtil extends AbstractLogOrReport { betaCalibrationSpectrumEList.add(betaCalibrationS); } else { GardsCalibrationSpectrum betaCalibrationS = new GardsCalibrationSpectrum(); - if (bgAnalyseResult.s_b_fitting_e_c.size() < 0) { + if (bgAnalyseResult.s_b_fitting_e_c.size() <= 0) { betaCalibrationS.setDataType(DataTypeAbbr.SAMPLEPHD.getType()); betaCalibrationS.setCoeff1(Double.valueOf(betaFittingParaToUi.get(0))); betaCalibrationS.setCoeff2(Double.valueOf(betaFittingParaToUi.get(1))); @@ -1078,7 +1080,7 @@ public class PHDFileUtil extends AbstractLogOrReport { betaCalibrationSpectrumEList.add(betaCalibrationG); } else { GardsCalibrationSpectrum betaCalibrationG = new GardsCalibrationSpectrum(); - if (bgAnalyseResult.g_b_fitting_e_c.size() < 0) { + if (bgAnalyseResult.g_b_fitting_e_c.size() <= 0) { betaCalibrationG.setDataType(DataTypeAbbr.GASBKPHD.getType()); betaCalibrationG.setCoeff1(Double.valueOf(betaFittingParaToUi.get(0))); betaCalibrationG.setCoeff2(Double.valueOf(betaFittingParaToUi.get(1))); @@ -1100,7 +1102,7 @@ public class PHDFileUtil extends AbstractLogOrReport { betaCalibrationSpectrumEList.add(betaCalibrationD); } else { GardsCalibrationSpectrum betaCalibrationD = new GardsCalibrationSpectrum(); - if (bgAnalyseResult.d_b_fitting_e_c.size() < 0) { + if (bgAnalyseResult.d_b_fitting_e_c.size() <= 0) { betaCalibrationD.setDataType(DataTypeAbbr.DETBKPHD.getType()); betaCalibrationD.setCoeff1(Double.valueOf(betaFittingParaToUi.get(0))); betaCalibrationD.setCoeff2(Double.valueOf(betaFittingParaToUi.get(1)));