人工交互分析beta部分saveToDB接口增加相关文件不存在情况判断
This commit is contained in:
parent
7a39ca87ce
commit
ebf432cf9c
|
@ -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<GardsXeResults> 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<GardsCalibrationSpectrum> 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<GardsCalibrationSpectrum> 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<GardsROIChannelsSpectrum> roiChannelsSpectrumList = new LinkedList<>();
|
||||
for (int i=0; i<bgAnalyseResult.S_ROI_B_Boundary_start.size(); i++) {
|
||||
GardsROIChannelsSpectrum roiChannels = new GardsROIChannelsSpectrum();
|
||||
roiChannels.setDataType(DataTypeAbbr.SAMPLEPHD.getType());
|
||||
roiChannels.setRoi(i+1);
|
||||
roiChannels.setBChanStart(bgAnalyseResult.S_ROI_B_Boundary_start.get(i));
|
||||
roiChannels.setBChanStop(bgAnalyseResult.S_ROI_B_Boundary_stop.get(i));
|
||||
roiChannels.setGChanStart(bgAnalyseResult.S_ROI_G_Boundary_start.get(i));
|
||||
roiChannels.setGChanStop(bgAnalyseResult.S_ROI_G_Boundary_stop.get(i));
|
||||
roiChannelsSpectrumList.add(roiChannels);
|
||||
}
|
||||
for (int i=0; i<bgAnalyseResult.G_ROI_B_Boundary_start.size(); i++) {
|
||||
GardsROIChannelsSpectrum roiChannels = new GardsROIChannelsSpectrum();
|
||||
roiChannels.setDataType(DataTypeAbbr.GASBKPHD.getType());
|
||||
roiChannels.setRoi(i+1);
|
||||
roiChannels.setBChanStart(bgAnalyseResult.G_ROI_B_Boundary_start.get(i));
|
||||
roiChannels.setBChanStop(bgAnalyseResult.G_ROI_B_Boundary_stop.get(i));
|
||||
roiChannels.setGChanStart(bgAnalyseResult.G_ROI_G_Boundary_start.get(i));
|
||||
roiChannels.setGChanStop(bgAnalyseResult.G_ROI_G_Boundary_stop.get(i));
|
||||
roiChannelsSpectrumList.add(roiChannels);
|
||||
}
|
||||
for (int i=0; i<bgAnalyseResult.D_ROI_B_Boundary_start.size(); i++) {
|
||||
GardsROIChannelsSpectrum roiChannels = new GardsROIChannelsSpectrum();
|
||||
roiChannels.setDataType(DataTypeAbbr.DETBKPHD.getType());
|
||||
roiChannels.setRoi(i+1);
|
||||
roiChannels.setBChanStart(bgAnalyseResult.D_ROI_B_Boundary_start.get(i));
|
||||
roiChannels.setBChanStop(bgAnalyseResult.D_ROI_B_Boundary_stop.get(i));
|
||||
roiChannels.setGChanStart(bgAnalyseResult.D_ROI_G_Boundary_start.get(i));
|
||||
roiChannels.setGChanStop(bgAnalyseResult.D_ROI_G_Boundary_stop.get(i));
|
||||
roiChannelsSpectrumList.add(roiChannels);
|
||||
}
|
||||
anlyseResultIn.setRoiChannelsSpectrumList(roiChannelsSpectrumList);
|
||||
bgAnalyseResult.LC.add(0, 0.0);
|
||||
bgAnalyseResult.MDC.add(0, 0.0);
|
||||
//存储roiResult的数据
|
||||
List<GardsROIResultsSpectrum> roiResultsSpectrumList = new LinkedList<>();
|
||||
for (int i=0; i<bgAnalyseResult.s_roi_cts.size(); i++) {
|
||||
GardsROIResultsSpectrum roiResults = new GardsROIResultsSpectrum();
|
||||
roiResults.setRoi(i+1);
|
||||
roiResults.setLc(bgAnalyseResult.LC.get(i));
|
||||
roiResults.setSGross(bgAnalyseResult.s_roi_cts.get(i));
|
||||
roiResults.setGGross(bgAnalyseResult.g_roi_cts.get(i));
|
||||
roiResults.setBGross(bgAnalyseResult.d_roi_cts.get(i));
|
||||
roiResults.setSNet(bgAnalyseResult.s_deduct_d_cts.get((i+1)*3));
|
||||
roiResults.setGNet(bgAnalyseResult.g_deduct_d_cts.get((i+1)*3));
|
||||
roiResults.setNet(bgAnalyseResult.ROI_net_coutns.get(i));
|
||||
roiResults.setNetErr(bgAnalyseResult.ROI_net_coutns_err.get(i));
|
||||
roiResults.setConc(bgAnalyseResult.ROI_con_uncer.get(i));
|
||||
roiResults.setConcErr(bgAnalyseResult.ROI_con_uncer_err.get(i));
|
||||
roiResults.setMdc(bgAnalyseResult.MDC.get(i));
|
||||
if(bgAnalyseResult.ROI_con_uncer.get(i)>bgAnalyseResult.MDC.get(i)) {
|
||||
roiResults.setNidFlag(1);
|
||||
if (StringUtils.isBlank(bgAnalyseResult.error_log) || bgAnalyseResult.error_log.equalsIgnoreCase("no error.")) {
|
||||
//处理XeData的数据
|
||||
List<GardsXeResults> 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<GardsCalibrationSpectrum> 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<GardsCalibrationSpectrum> 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<GardsROIChannelsSpectrum> roiChannelsSpectrumList = new LinkedList<>();
|
||||
for (int i=0; i<bgAnalyseResult.S_ROI_B_Boundary_start.size(); i++) {
|
||||
GardsROIChannelsSpectrum roiChannels = new GardsROIChannelsSpectrum();
|
||||
roiChannels.setDataType(DataTypeAbbr.SAMPLEPHD.getType());
|
||||
roiChannels.setRoi(i+1);
|
||||
roiChannels.setBChanStart(bgAnalyseResult.S_ROI_B_Boundary_start.get(i));
|
||||
roiChannels.setBChanStop(bgAnalyseResult.S_ROI_B_Boundary_stop.get(i));
|
||||
roiChannels.setGChanStart(bgAnalyseResult.S_ROI_G_Boundary_start.get(i));
|
||||
roiChannels.setGChanStop(bgAnalyseResult.S_ROI_G_Boundary_stop.get(i));
|
||||
roiChannelsSpectrumList.add(roiChannels);
|
||||
}
|
||||
for (int i=0; i<bgAnalyseResult.G_ROI_B_Boundary_start.size(); i++) {
|
||||
GardsROIChannelsSpectrum roiChannels = new GardsROIChannelsSpectrum();
|
||||
roiChannels.setDataType(DataTypeAbbr.GASBKPHD.getType());
|
||||
roiChannels.setRoi(i+1);
|
||||
roiChannels.setBChanStart(bgAnalyseResult.G_ROI_B_Boundary_start.get(i));
|
||||
roiChannels.setBChanStop(bgAnalyseResult.G_ROI_B_Boundary_stop.get(i));
|
||||
roiChannels.setGChanStart(bgAnalyseResult.G_ROI_G_Boundary_start.get(i));
|
||||
roiChannels.setGChanStop(bgAnalyseResult.G_ROI_G_Boundary_stop.get(i));
|
||||
roiChannelsSpectrumList.add(roiChannels);
|
||||
}
|
||||
for (int i=0; i<bgAnalyseResult.D_ROI_B_Boundary_start.size(); i++) {
|
||||
GardsROIChannelsSpectrum roiChannels = new GardsROIChannelsSpectrum();
|
||||
roiChannels.setDataType(DataTypeAbbr.DETBKPHD.getType());
|
||||
roiChannels.setRoi(i+1);
|
||||
roiChannels.setBChanStart(bgAnalyseResult.D_ROI_B_Boundary_start.get(i));
|
||||
roiChannels.setBChanStop(bgAnalyseResult.D_ROI_B_Boundary_stop.get(i));
|
||||
roiChannels.setGChanStart(bgAnalyseResult.D_ROI_G_Boundary_start.get(i));
|
||||
roiChannels.setGChanStop(bgAnalyseResult.D_ROI_G_Boundary_stop.get(i));
|
||||
roiChannelsSpectrumList.add(roiChannels);
|
||||
}
|
||||
anlyseResultIn.setRoiChannelsSpectrumList(roiChannelsSpectrumList);
|
||||
bgAnalyseResult.LC.add(0, 0.0);
|
||||
bgAnalyseResult.MDC.add(0, 0.0);
|
||||
//存储roiResult的数据
|
||||
List<GardsROIResultsSpectrum> roiResultsSpectrumList = new LinkedList<>();
|
||||
for (int i=0; i<bgAnalyseResult.s_roi_cts.size(); i++) {
|
||||
GardsROIResultsSpectrum roiResults = new GardsROIResultsSpectrum();
|
||||
roiResults.setRoi(i+1);
|
||||
roiResults.setLc(bgAnalyseResult.LC.get(i));
|
||||
roiResults.setSGross(bgAnalyseResult.s_roi_cts.get(i));
|
||||
roiResults.setGGross(bgAnalyseResult.g_roi_cts.get(i));
|
||||
roiResults.setBGross(bgAnalyseResult.d_roi_cts.get(i));
|
||||
roiResults.setSNet(bgAnalyseResult.s_deduct_d_cts.get((i+1)*3));
|
||||
roiResults.setGNet(bgAnalyseResult.g_deduct_d_cts.get((i+1)*3));
|
||||
roiResults.setNet(bgAnalyseResult.ROI_net_coutns.get(i));
|
||||
roiResults.setNetErr(bgAnalyseResult.ROI_net_coutns_err.get(i));
|
||||
roiResults.setConc(bgAnalyseResult.ROI_con_uncer.get(i));
|
||||
roiResults.setConcErr(bgAnalyseResult.ROI_con_uncer_err.get(i));
|
||||
roiResults.setMdc(bgAnalyseResult.MDC.get(i));
|
||||
if(bgAnalyseResult.ROI_con_uncer.get(i)>bgAnalyseResult.MDC.get(i)) {
|
||||
roiResults.setNidFlag(1);
|
||||
} else {
|
||||
roiResults.setNidFlag(0);
|
||||
}
|
||||
roiResultsSpectrumList.add(roiResults);
|
||||
}
|
||||
anlyseResultIn.setRoiResultsSpectrumList(roiResultsSpectrumList);
|
||||
}
|
||||
anlyseResultIn.setRoiResultsSpectrumList(roiResultsSpectrumList);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
|
Loading…
Reference in New Issue
Block a user