From ebf432cf9c064911bb75fd71a8838fa0749d7c29 Mon Sep 17 00:00:00 2001 From: qiaoqinzheng Date: Fri, 8 Dec 2023 17:43:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=B7=A5=E4=BA=A4=E4=BA=92=E5=88=86?= =?UTF-8?q?=E6=9E=90beta=E9=83=A8=E5=88=86saveToDB=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=9B=B8=E5=85=B3=E6=96=87=E4=BB=B6=E4=B8=8D?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E6=83=85=E5=86=B5=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/SpectrumAnalysisServiceImpl.java | 420 +++++++++--------- 1 file changed, 221 insertions(+), 199 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 f19683e5..a4719579 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 @@ -3682,15 +3682,35 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements //获取ROI Limit数据 // getROILimit(anlyseResultIn); //根据sample文件名称模糊查询sampleId - anlyseResultIn.setSampleFilePath(betaDataFile.getSampleFilePathName().substring(0, betaDataFile.getSampleFilePathName().lastIndexOf(StringPool.SLASH))); - anlyseResultIn.setGasFilePath(betaDataFile.getGasFilePathName().substring(0, betaDataFile.getGasFilePathName().lastIndexOf(StringPool.SLASH))); - anlyseResultIn.setDetFilePath(betaDataFile.getDetFilePathName().substring(0, betaDataFile.getDetFilePathName().lastIndexOf(StringPool.SLASH))); - anlyseResultIn.setQcFilePath(betaDataFile.getQcFilePathName().substring(0, betaDataFile.getQcFilePathName().lastIndexOf(StringPool.SLASH))); + if (StringUtils.isNotBlank(betaDataFile.getSampleFilePathName())) { + anlyseResultIn.setSampleFilePath(betaDataFile.getSampleFilePathName().substring(0, betaDataFile.getSampleFilePathName().lastIndexOf(StringPool.SLASH))); + } + if (StringUtils.isNotBlank(betaDataFile.getGasFilePathName())) { + anlyseResultIn.setGasFilePath(betaDataFile.getGasFilePathName().substring(0, betaDataFile.getGasFilePathName().lastIndexOf(StringPool.SLASH))); + } + if (StringUtils.isNotBlank(betaDataFile.getDetFilePathName())) { + anlyseResultIn.setDetFilePath(betaDataFile.getDetFilePathName().substring(0, betaDataFile.getDetFilePathName().lastIndexOf(StringPool.SLASH))); + } + if (StringUtils.isNotBlank(betaDataFile.getQcFilePathName())) { + anlyseResultIn.setQcFilePath(betaDataFile.getQcFilePathName().substring(0, betaDataFile.getQcFilePathName().lastIndexOf(StringPool.SLASH))); + } //处理文件名称 - String sampleFilePathName = phdFileUtil.NameStandardBy(anlyseResultIn.getSampleFilePath(), anlyseResultIn.getSampleFileName()); - String gasFilePathName = phdFileUtil.NameStandardBy(anlyseResultIn.getGasFilePath(), anlyseResultIn.getGasFileName()); - String detFilePathName = phdFileUtil.NameStandardBy(anlyseResultIn.getDetFilePath(), anlyseResultIn.getDetFileName()); - String qcFilePathName = phdFileUtil.NameStandardBy(anlyseResultIn.getQcFilePath(), anlyseResultIn.getQcFileName()); + String sampleFilePathName = ""; + String gasFilePathName = ""; + String detFilePathName = ""; + String qcFilePathName = ""; + if (StringUtils.isNotBlank(anlyseResultIn.getSampleFilePath()) && StringUtils.isNotBlank(anlyseResultIn.getSampleFileName())) { + sampleFilePathName = phdFileUtil.NameStandardBy(anlyseResultIn.getSampleFilePath(), anlyseResultIn.getSampleFileName()); + } + if (StringUtils.isNotBlank(anlyseResultIn.getGasFilePath()) && StringUtils.isNotBlank(anlyseResultIn.getGasFileName())) { + gasFilePathName = phdFileUtil.NameStandardBy(anlyseResultIn.getGasFilePath(), anlyseResultIn.getGasFileName()); + } + if (StringUtils.isNotBlank(anlyseResultIn.getDetFilePath()) && StringUtils.isNotBlank(anlyseResultIn.getDetFileName())) { + detFilePathName = phdFileUtil.NameStandardBy(anlyseResultIn.getDetFilePath(), anlyseResultIn.getDetFileName()); + } + if (StringUtils.isNotBlank(anlyseResultIn.getQcFilePath()) && StringUtils.isNotBlank(anlyseResultIn.getQcFileName())) { + qcFilePathName = phdFileUtil.NameStandardBy(anlyseResultIn.getQcFilePath(), anlyseResultIn.getQcFileName()); + } //判断当前分析员是否有过历史分析当前文件 Integer isExist = spectrumAnalysisMapper.SampleIsExist(sampleFilePathName, anlyseResultIn.getUserName()); //如果当前分析员在当天没有排班任务 并且 没有历史分析过当前文件 则不允许进行保存操作 @@ -5109,202 +5129,204 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements //Gamma Energy Calibration页面 如果点击过fitting使BGammaEnergyValid并且有勾选 //如果三个sampleData,GasData,DetData数据都是被勾选状态 则需要传递新的参数重新分析 否则不需要改变数据分析当前文件内容 BgAnalyseResult bgAnalyseResult = null; - if (Objects.isNull(BgCalPara)) { - bgAnalyseResult = EnergySpectrumHandler.bgAnalyse(sampleTmp.getAbsolutePath(), gasTmp.getAbsolutePath(), detTmp.getAbsolutePath()); - } else { - bgAnalyseResult = EnergySpectrumHandler.bgReAnalyse(sampleTmp.getAbsolutePath(), gasTmp.getAbsolutePath(), detTmp.getAbsolutePath(), BgCalPara); - } - if (StringUtils.isBlank(bgAnalyseResult.error_log) || bgAnalyseResult.error_log.equalsIgnoreCase("no error.")) { - //处理XeData的数据 - List xeResultsSpectrumList = new LinkedList<>(); - GardsXeResults xe131m = new GardsXeResults(); - xe131m.setNuclideName(XeNuclideName.XE_131m.getType()); - xe131m.setConc(bgAnalyseResult.Xe131m_con); - xe131m.setConcErr(bgAnalyseResult.Xe131m_uncer); - xe131m.setLc(bgAnalyseResult.LC_Xe131m); - xe131m.setMdc(bgAnalyseResult.MDC_Xe131m); - xe131m.setNidFlag(anlyseResultIn.getXe131mFlag()); - xeResultsSpectrumList.add(xe131m); - GardsXeResults xe133 = new GardsXeResults(); - xe133.setNuclideName(XeNuclideName.XE_133.getType()); - xe133.setConc(bgAnalyseResult.Xe133_con); - xe133.setConcErr(bgAnalyseResult.Xe133_uncer); - xe133.setLc(bgAnalyseResult.LC_Xe133); - xe133.setMdc(bgAnalyseResult.MDC_Xe133); - xe133.setNidFlag(anlyseResultIn.getXe133Flag()); - xeResultsSpectrumList.add(xe133); - GardsXeResults xe133m = new GardsXeResults(); - xe133m.setNuclideName(XeNuclideName.XE_133m.getType()); - xe133m.setConc(bgAnalyseResult.Xe133m_con); - xe133m.setConcErr(bgAnalyseResult.Xe133m_uncer); - xe133m.setLc(bgAnalyseResult.LC_Xe133m); - xe133m.setMdc(bgAnalyseResult.MDC_Xe133m); - xe133m.setNidFlag(anlyseResultIn.getXe133mFlag()); - xeResultsSpectrumList.add(xe133m); - GardsXeResults xe135 = new GardsXeResults(); - xe135.setNuclideName(XeNuclideName.XE_135.getType()); - xe135.setConc(bgAnalyseResult.Xe135_con); - xe135.setConcErr(bgAnalyseResult.Xe135_uncer); - xe135.setLc(bgAnalyseResult.LC_Xe135); - xe135.setMdc(bgAnalyseResult.MDC_Xe135); - xe135.setNidFlag(anlyseResultIn.getXe135Flag()); - xeResultsSpectrumList.add(xe135); - anlyseResultIn.setXeData(xeResultsSpectrumList); - //处理GammaCalibration的数据 - List gammaCalibrationSpectrumList = new LinkedList<>(); - if (anlyseResultIn.isBGammaEnergyValidSample()) { - GardsCalibrationSpectrum gammaCalibrationS = new GardsCalibrationSpectrum(); - gammaCalibrationS.setDataType(DataTypeAbbr.SAMPLEPHD.getType()); - gammaCalibrationS.setCoeff1(Double.valueOf(gammaFittingPara.get(0))); - gammaCalibrationS.setCoeff2(Double.valueOf(gammaFittingPara.get(1))); - gammaCalibrationS.setCoeff3(Double.valueOf(gammaFittingPara.get(2))); - gammaCalibrationSpectrumList.add(gammaCalibrationS); + if (Objects.nonNull(sampleTmp) && Objects.nonNull(gasTmp) && Objects.nonNull(detTmp)) { + if (Objects.isNull(BgCalPara)) { + bgAnalyseResult = EnergySpectrumHandler.bgAnalyse(sampleTmp.getAbsolutePath(), gasTmp.getAbsolutePath(), detTmp.getAbsolutePath()); } else { - GardsCalibrationSpectrum gammaCalibrationS = new GardsCalibrationSpectrum(); - gammaCalibrationS.setDataType(DataTypeAbbr.SAMPLEPHD.getType()); - gammaCalibrationS.setCoeff1(bgAnalyseResult.s_g_fitting_c_e.get(0)); - gammaCalibrationS.setCoeff2(bgAnalyseResult.s_g_fitting_c_e.get(1)); - gammaCalibrationS.setCoeff3(bgAnalyseResult.s_g_fitting_c_e.get(2)); - gammaCalibrationSpectrumList.add(gammaCalibrationS); + bgAnalyseResult = EnergySpectrumHandler.bgReAnalyse(sampleTmp.getAbsolutePath(), gasTmp.getAbsolutePath(), detTmp.getAbsolutePath(), BgCalPara); } - if (anlyseResultIn.isBGammaEnergyValidGas()) { - GardsCalibrationSpectrum gammaCalibrationG = new GardsCalibrationSpectrum(); - gammaCalibrationG.setDataType(DataTypeAbbr.GASBKPHD.getType()); - gammaCalibrationG.setCoeff1(Double.valueOf(gammaFittingPara.get(0))); - gammaCalibrationG.setCoeff2(Double.valueOf(gammaFittingPara.get(1))); - gammaCalibrationG.setCoeff3(Double.valueOf(gammaFittingPara.get(2))); - gammaCalibrationSpectrumList.add(gammaCalibrationG); - } else { - GardsCalibrationSpectrum gammaCalibrationG = new GardsCalibrationSpectrum(); - gammaCalibrationG.setDataType(DataTypeAbbr.GASBKPHD.getType()); - gammaCalibrationG.setCoeff1(bgAnalyseResult.g_g_fitting_c_e.get(0)); - gammaCalibrationG.setCoeff2(bgAnalyseResult.g_g_fitting_c_e.get(1)); - gammaCalibrationG.setCoeff3(bgAnalyseResult.g_g_fitting_c_e.get(2)); - gammaCalibrationSpectrumList.add(gammaCalibrationG); - } - if (anlyseResultIn.isBGammaEnergyValidDet()) { - GardsCalibrationSpectrum gammaCalibrationD = new GardsCalibrationSpectrum(); - gammaCalibrationD.setDataType(DataTypeAbbr.DETBKPHD.getType()); - gammaCalibrationD.setCoeff1(Double.valueOf(gammaFittingPara.get(0))); - gammaCalibrationD.setCoeff2(Double.valueOf(gammaFittingPara.get(1))); - gammaCalibrationD.setCoeff3(Double.valueOf(gammaFittingPara.get(2))); - gammaCalibrationSpectrumList.add(gammaCalibrationD); - } else { - GardsCalibrationSpectrum gammaCalibrationD = new GardsCalibrationSpectrum(); - gammaCalibrationD.setDataType(DataTypeAbbr.DETBKPHD.getType()); - gammaCalibrationD.setCoeff1(bgAnalyseResult.d_g_fitting_c_e.get(0)); - gammaCalibrationD.setCoeff2(bgAnalyseResult.d_g_fitting_c_e.get(1)); - gammaCalibrationD.setCoeff3(bgAnalyseResult.d_g_fitting_c_e.get(2)); - gammaCalibrationSpectrumList.add(gammaCalibrationD); - } - anlyseResultIn.setGammaCalibrationSpectrumList(gammaCalibrationSpectrumList); - //处理BetaCalibration数据 - List betaCalibrationSpectrumList = new LinkedList<>(); - if (anlyseResultIn.isBBetaEnergyValidSample()) { - GardsCalibrationSpectrum betaCalibrationS = new GardsCalibrationSpectrum(); - betaCalibrationS.setDataType(DataTypeAbbr.SAMPLEPHD.getType()); - betaCalibrationS.setCoeff1(Double.valueOf(betaFittingPara.get(0))); - betaCalibrationS.setCoeff2(Double.valueOf(betaFittingPara.get(1))); - betaCalibrationS.setCoeff3(Double.valueOf(betaFittingPara.get(2))); - betaCalibrationSpectrumList.add(betaCalibrationS); - } else { - GardsCalibrationSpectrum betaCalibrationS = new GardsCalibrationSpectrum(); - betaCalibrationS.setDataType(DataTypeAbbr.SAMPLEPHD.getType()); - betaCalibrationS.setCoeff1(bgAnalyseResult.s_b_fitting_c_e.get(0)); - betaCalibrationS.setCoeff2(bgAnalyseResult.s_b_fitting_c_e.get(1)); - betaCalibrationS.setCoeff3(bgAnalyseResult.s_b_fitting_c_e.get(2)); - betaCalibrationSpectrumList.add(betaCalibrationS); - } - if (anlyseResultIn.isBBetaEnergyValidGas()) { - GardsCalibrationSpectrum betaCalibrationG = new GardsCalibrationSpectrum(); - betaCalibrationG.setDataType(DataTypeAbbr.GASBKPHD.getType()); - betaCalibrationG.setCoeff1(Double.valueOf(betaFittingPara.get(0))); - betaCalibrationG.setCoeff2(Double.valueOf(betaFittingPara.get(1))); - betaCalibrationG.setCoeff3(Double.valueOf(betaFittingPara.get(2))); - betaCalibrationSpectrumList.add(betaCalibrationG); - } else { - GardsCalibrationSpectrum betaCalibrationG = new GardsCalibrationSpectrum(); - betaCalibrationG.setDataType(DataTypeAbbr.GASBKPHD.getType()); - betaCalibrationG.setCoeff1(bgAnalyseResult.g_b_fitting_c_e.get(0)); - betaCalibrationG.setCoeff2(bgAnalyseResult.g_b_fitting_c_e.get(1)); - betaCalibrationG.setCoeff3(bgAnalyseResult.g_b_fitting_c_e.get(2)); - betaCalibrationSpectrumList.add(betaCalibrationG); - } - if (anlyseResultIn.isBBetaEnergyValidDet()) { - GardsCalibrationSpectrum betaCalibrationD = new GardsCalibrationSpectrum(); - betaCalibrationD.setDataType(DataTypeAbbr.DETBKPHD.getType()); - betaCalibrationD.setCoeff1(Double.valueOf(betaFittingPara.get(0))); - betaCalibrationD.setCoeff2(Double.valueOf(betaFittingPara.get(1))); - betaCalibrationD.setCoeff3(Double.valueOf(betaFittingPara.get(2))); - betaCalibrationSpectrumList.add(betaCalibrationD); - } else { - GardsCalibrationSpectrum betaCalibrationD = new GardsCalibrationSpectrum(); - betaCalibrationD.setDataType(DataTypeAbbr.DETBKPHD.getType()); - betaCalibrationD.setCoeff1(bgAnalyseResult.d_b_fitting_c_e.get(0)); - betaCalibrationD.setCoeff2(bgAnalyseResult.d_b_fitting_c_e.get(1)); - betaCalibrationD.setCoeff3(bgAnalyseResult.d_b_fitting_c_e.get(2)); - betaCalibrationSpectrumList.add(betaCalibrationD); - } - anlyseResultIn.setBetaCalibrationSpectrumList(betaCalibrationSpectrumList); - //存储roiChannel数据 - List roiChannelsSpectrumList = new LinkedList<>(); - for (int i=0; i roiResultsSpectrumList = new LinkedList<>(); - for (int i=0; ibgAnalyseResult.MDC.get(i)) { - roiResults.setNidFlag(1); + if (StringUtils.isBlank(bgAnalyseResult.error_log) || bgAnalyseResult.error_log.equalsIgnoreCase("no error.")) { + //处理XeData的数据 + List xeResultsSpectrumList = new LinkedList<>(); + GardsXeResults xe131m = new GardsXeResults(); + xe131m.setNuclideName(XeNuclideName.XE_131m.getType()); + xe131m.setConc(bgAnalyseResult.Xe131m_con); + xe131m.setConcErr(bgAnalyseResult.Xe131m_uncer); + xe131m.setLc(bgAnalyseResult.LC_Xe131m); + xe131m.setMdc(bgAnalyseResult.MDC_Xe131m); + xe131m.setNidFlag(anlyseResultIn.getXe131mFlag()); + xeResultsSpectrumList.add(xe131m); + GardsXeResults xe133 = new GardsXeResults(); + xe133.setNuclideName(XeNuclideName.XE_133.getType()); + xe133.setConc(bgAnalyseResult.Xe133_con); + xe133.setConcErr(bgAnalyseResult.Xe133_uncer); + xe133.setLc(bgAnalyseResult.LC_Xe133); + xe133.setMdc(bgAnalyseResult.MDC_Xe133); + xe133.setNidFlag(anlyseResultIn.getXe133Flag()); + xeResultsSpectrumList.add(xe133); + GardsXeResults xe133m = new GardsXeResults(); + xe133m.setNuclideName(XeNuclideName.XE_133m.getType()); + xe133m.setConc(bgAnalyseResult.Xe133m_con); + xe133m.setConcErr(bgAnalyseResult.Xe133m_uncer); + xe133m.setLc(bgAnalyseResult.LC_Xe133m); + xe133m.setMdc(bgAnalyseResult.MDC_Xe133m); + xe133m.setNidFlag(anlyseResultIn.getXe133mFlag()); + xeResultsSpectrumList.add(xe133m); + GardsXeResults xe135 = new GardsXeResults(); + xe135.setNuclideName(XeNuclideName.XE_135.getType()); + xe135.setConc(bgAnalyseResult.Xe135_con); + xe135.setConcErr(bgAnalyseResult.Xe135_uncer); + xe135.setLc(bgAnalyseResult.LC_Xe135); + xe135.setMdc(bgAnalyseResult.MDC_Xe135); + xe135.setNidFlag(anlyseResultIn.getXe135Flag()); + xeResultsSpectrumList.add(xe135); + anlyseResultIn.setXeData(xeResultsSpectrumList); + //处理GammaCalibration的数据 + List gammaCalibrationSpectrumList = new LinkedList<>(); + if (anlyseResultIn.isBGammaEnergyValidSample()) { + GardsCalibrationSpectrum gammaCalibrationS = new GardsCalibrationSpectrum(); + gammaCalibrationS.setDataType(DataTypeAbbr.SAMPLEPHD.getType()); + gammaCalibrationS.setCoeff1(Double.valueOf(gammaFittingPara.get(0))); + gammaCalibrationS.setCoeff2(Double.valueOf(gammaFittingPara.get(1))); + gammaCalibrationS.setCoeff3(Double.valueOf(gammaFittingPara.get(2))); + gammaCalibrationSpectrumList.add(gammaCalibrationS); } else { - roiResults.setNidFlag(0); + GardsCalibrationSpectrum gammaCalibrationS = new GardsCalibrationSpectrum(); + gammaCalibrationS.setDataType(DataTypeAbbr.SAMPLEPHD.getType()); + gammaCalibrationS.setCoeff1(bgAnalyseResult.s_g_fitting_c_e.get(0)); + gammaCalibrationS.setCoeff2(bgAnalyseResult.s_g_fitting_c_e.get(1)); + gammaCalibrationS.setCoeff3(bgAnalyseResult.s_g_fitting_c_e.get(2)); + gammaCalibrationSpectrumList.add(gammaCalibrationS); } - roiResultsSpectrumList.add(roiResults); + if (anlyseResultIn.isBGammaEnergyValidGas()) { + GardsCalibrationSpectrum gammaCalibrationG = new GardsCalibrationSpectrum(); + gammaCalibrationG.setDataType(DataTypeAbbr.GASBKPHD.getType()); + gammaCalibrationG.setCoeff1(Double.valueOf(gammaFittingPara.get(0))); + gammaCalibrationG.setCoeff2(Double.valueOf(gammaFittingPara.get(1))); + gammaCalibrationG.setCoeff3(Double.valueOf(gammaFittingPara.get(2))); + gammaCalibrationSpectrumList.add(gammaCalibrationG); + } else { + GardsCalibrationSpectrum gammaCalibrationG = new GardsCalibrationSpectrum(); + gammaCalibrationG.setDataType(DataTypeAbbr.GASBKPHD.getType()); + gammaCalibrationG.setCoeff1(bgAnalyseResult.g_g_fitting_c_e.get(0)); + gammaCalibrationG.setCoeff2(bgAnalyseResult.g_g_fitting_c_e.get(1)); + gammaCalibrationG.setCoeff3(bgAnalyseResult.g_g_fitting_c_e.get(2)); + gammaCalibrationSpectrumList.add(gammaCalibrationG); + } + if (anlyseResultIn.isBGammaEnergyValidDet()) { + GardsCalibrationSpectrum gammaCalibrationD = new GardsCalibrationSpectrum(); + gammaCalibrationD.setDataType(DataTypeAbbr.DETBKPHD.getType()); + gammaCalibrationD.setCoeff1(Double.valueOf(gammaFittingPara.get(0))); + gammaCalibrationD.setCoeff2(Double.valueOf(gammaFittingPara.get(1))); + gammaCalibrationD.setCoeff3(Double.valueOf(gammaFittingPara.get(2))); + gammaCalibrationSpectrumList.add(gammaCalibrationD); + } else { + GardsCalibrationSpectrum gammaCalibrationD = new GardsCalibrationSpectrum(); + gammaCalibrationD.setDataType(DataTypeAbbr.DETBKPHD.getType()); + gammaCalibrationD.setCoeff1(bgAnalyseResult.d_g_fitting_c_e.get(0)); + gammaCalibrationD.setCoeff2(bgAnalyseResult.d_g_fitting_c_e.get(1)); + gammaCalibrationD.setCoeff3(bgAnalyseResult.d_g_fitting_c_e.get(2)); + gammaCalibrationSpectrumList.add(gammaCalibrationD); + } + anlyseResultIn.setGammaCalibrationSpectrumList(gammaCalibrationSpectrumList); + //处理BetaCalibration数据 + List betaCalibrationSpectrumList = new LinkedList<>(); + if (anlyseResultIn.isBBetaEnergyValidSample()) { + GardsCalibrationSpectrum betaCalibrationS = new GardsCalibrationSpectrum(); + betaCalibrationS.setDataType(DataTypeAbbr.SAMPLEPHD.getType()); + betaCalibrationS.setCoeff1(Double.valueOf(betaFittingPara.get(0))); + betaCalibrationS.setCoeff2(Double.valueOf(betaFittingPara.get(1))); + betaCalibrationS.setCoeff3(Double.valueOf(betaFittingPara.get(2))); + betaCalibrationSpectrumList.add(betaCalibrationS); + } else { + GardsCalibrationSpectrum betaCalibrationS = new GardsCalibrationSpectrum(); + betaCalibrationS.setDataType(DataTypeAbbr.SAMPLEPHD.getType()); + betaCalibrationS.setCoeff1(bgAnalyseResult.s_b_fitting_c_e.get(0)); + betaCalibrationS.setCoeff2(bgAnalyseResult.s_b_fitting_c_e.get(1)); + betaCalibrationS.setCoeff3(bgAnalyseResult.s_b_fitting_c_e.get(2)); + betaCalibrationSpectrumList.add(betaCalibrationS); + } + if (anlyseResultIn.isBBetaEnergyValidGas()) { + GardsCalibrationSpectrum betaCalibrationG = new GardsCalibrationSpectrum(); + betaCalibrationG.setDataType(DataTypeAbbr.GASBKPHD.getType()); + betaCalibrationG.setCoeff1(Double.valueOf(betaFittingPara.get(0))); + betaCalibrationG.setCoeff2(Double.valueOf(betaFittingPara.get(1))); + betaCalibrationG.setCoeff3(Double.valueOf(betaFittingPara.get(2))); + betaCalibrationSpectrumList.add(betaCalibrationG); + } else { + GardsCalibrationSpectrum betaCalibrationG = new GardsCalibrationSpectrum(); + betaCalibrationG.setDataType(DataTypeAbbr.GASBKPHD.getType()); + betaCalibrationG.setCoeff1(bgAnalyseResult.g_b_fitting_c_e.get(0)); + betaCalibrationG.setCoeff2(bgAnalyseResult.g_b_fitting_c_e.get(1)); + betaCalibrationG.setCoeff3(bgAnalyseResult.g_b_fitting_c_e.get(2)); + betaCalibrationSpectrumList.add(betaCalibrationG); + } + if (anlyseResultIn.isBBetaEnergyValidDet()) { + GardsCalibrationSpectrum betaCalibrationD = new GardsCalibrationSpectrum(); + betaCalibrationD.setDataType(DataTypeAbbr.DETBKPHD.getType()); + betaCalibrationD.setCoeff1(Double.valueOf(betaFittingPara.get(0))); + betaCalibrationD.setCoeff2(Double.valueOf(betaFittingPara.get(1))); + betaCalibrationD.setCoeff3(Double.valueOf(betaFittingPara.get(2))); + betaCalibrationSpectrumList.add(betaCalibrationD); + } else { + GardsCalibrationSpectrum betaCalibrationD = new GardsCalibrationSpectrum(); + betaCalibrationD.setDataType(DataTypeAbbr.DETBKPHD.getType()); + betaCalibrationD.setCoeff1(bgAnalyseResult.d_b_fitting_c_e.get(0)); + betaCalibrationD.setCoeff2(bgAnalyseResult.d_b_fitting_c_e.get(1)); + betaCalibrationD.setCoeff3(bgAnalyseResult.d_b_fitting_c_e.get(2)); + betaCalibrationSpectrumList.add(betaCalibrationD); + } + anlyseResultIn.setBetaCalibrationSpectrumList(betaCalibrationSpectrumList); + //存储roiChannel数据 + List roiChannelsSpectrumList = new LinkedList<>(); + for (int i=0; i roiResultsSpectrumList = new LinkedList<>(); + for (int i=0; ibgAnalyseResult.MDC.get(i)) { + roiResults.setNidFlag(1); + } else { + roiResults.setNidFlag(0); + } + roiResultsSpectrumList.add(roiResults); + } + anlyseResultIn.setRoiResultsSpectrumList(roiResultsSpectrumList); } - anlyseResultIn.setRoiResultsSpectrumList(roiResultsSpectrumList); } } catch (Exception e) { e.printStackTrace();