beta功能分析方法修改,返回内容修改
beta功能QC Result接口无法查看问题判断内容修改
This commit is contained in:
parent
e63e1903dd
commit
56322ae688
|
@ -93,6 +93,38 @@ public class FTPUtil {
|
|||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
long l = System.currentTimeMillis();
|
||||
String path = "/rn/datatest/savefile/";
|
||||
String fromPath = "Spectrum/Particulates/Samplephd/2015/11/AUP09_004-20151119_0421_S_PREL_42710.PHD";
|
||||
String fromPath2 = "Spectrum/Particulates/Samplephd/2015/11/NZP46_002-20151119_0021_S_PREL_57588.PHD";
|
||||
FTPClient ftpClient = new FTPClient();
|
||||
//连接
|
||||
ftpClient.connect("172.21.70.87", 21);
|
||||
//登录
|
||||
ftpClient.login("rmsops", "cnndc66367220");
|
||||
System.out.println("login>>>"+(System.currentTimeMillis()-l));
|
||||
// 切换为本地被动模式,可以解决FTP上传后文件为空的问题,但需要服务器将FTP服务添加至防火墙白名单
|
||||
ftpClient.enterLocalPassiveMode();
|
||||
//判断是否连接成功
|
||||
int reply = ftpClient.getReplyCode();
|
||||
ftpClient.setFileType(FTPClient.BINARY_FILE_TYPE);
|
||||
// 设置编码,当文件中存在中文且上传后文件乱码时可使用此配置项
|
||||
ftpClient.setControlEncoding("UTF-8");
|
||||
ftpClient.setFileTransferMode(FTPClient.STREAM_TRANSFER_MODE);
|
||||
InputStream inputStream = ftpClient.retrieveFileStream(path+fromPath);
|
||||
File file = new File("D:\\test1.txt");
|
||||
FileUtils.copyInputStreamToFile(inputStream, file);
|
||||
System.out.println(null == inputStream);
|
||||
System.out.println(ftpClient.printWorkingDirectory());
|
||||
ftpClient.completePendingCommand();
|
||||
InputStream inputStream2 = ftpClient.retrieveFileStream(path+fromPath2);
|
||||
File file2 = new File("D:\\test2.txt");
|
||||
FileUtils.copyInputStreamToFile(inputStream2, file2);
|
||||
System.out.println(null == inputStream2);
|
||||
System.out.println(System.currentTimeMillis() - l);
|
||||
}
|
||||
|
||||
public void downloadFTPFile(String localPath, String fileName, HttpServletResponse response) {
|
||||
InputStream in = null;
|
||||
ServletOutputStream out = null;
|
||||
|
|
|
@ -625,9 +625,13 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
bRet = false;
|
||||
return bRet;
|
||||
} else {
|
||||
//处理分析后的结果并存储
|
||||
calAnalyzeData(analyseResult, betaDataFile);
|
||||
//获取sample,gas,det的文件分析结果
|
||||
EnergySpectrumStruct sample = betaDataFile.getSampleStruct();
|
||||
EnergySpectrumStruct gas = betaDataFile.getGasStruct();
|
||||
EnergySpectrumStruct det = betaDataFile.getDetStruct();
|
||||
//获取sample文件名称,并生成对应的日志内容
|
||||
String sampleFileName = betaDataFile.getSampleFileName();
|
||||
String logName = sampleFileName.replace("PHD", "log");
|
||||
OutPutRnLog(analyseResult, sample, gas, det, logName);
|
||||
|
@ -678,7 +682,6 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
boundary.setMaxY(analyseResult.S_ROI_G_Boundary_stop.get(i));
|
||||
boundaryList.add(boundary);
|
||||
}
|
||||
betaDataFile.setSampleBoundary(boundaryList);
|
||||
map.put("SampleBoundary", boundaryList);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(analyseResult.G_ROI_B_Boundary_start)) {
|
||||
|
@ -691,7 +694,6 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
boundary.setMaxY(analyseResult.G_ROI_G_Boundary_stop.get(i));
|
||||
boundaryList.add(boundary);
|
||||
}
|
||||
betaDataFile.setGasBoundary(boundaryList);
|
||||
map.put("GasBoundary", boundaryList);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(analyseResult.D_ROI_B_Boundary_start)) {
|
||||
|
@ -704,7 +706,6 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
boundary.setMaxY(analyseResult.D_ROI_G_Boundary_stop.get(i));
|
||||
boundaryList.add(boundary);
|
||||
}
|
||||
betaDataFile.setDetBoundary(boundaryList);
|
||||
map.put("DetBoundary", boundaryList);
|
||||
}
|
||||
return bRet;
|
||||
|
@ -782,50 +783,145 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
return struct;
|
||||
}
|
||||
|
||||
|
||||
public List<GardsXeResultsSpectrum> analyzeQCResultXe(File sampleTmp, File gasTmp, File detTmp) {
|
||||
//调用动态库解析文件
|
||||
BgAnalyseResult bgAnalyseResult = EnergySpectrumHandler.bgAnalyse(sampleTmp.getAbsolutePath(), gasTmp.getAbsolutePath(), detTmp.getAbsolutePath());
|
||||
List<GardsXeResultsSpectrum> xeResultsSpectrumList = new LinkedList<>();
|
||||
GardsXeResultsSpectrum Xe131m = new GardsXeResultsSpectrum();
|
||||
Xe131m.setNuclideName(XeNuclideName.XE_131m.getType());
|
||||
Xe131m.setMdc(bgAnalyseResult.MDC_Xe131m);
|
||||
Xe131m.setConc(bgAnalyseResult.Xe131m_con);
|
||||
Xe131m.setConcErr(bgAnalyseResult.Xe131m_uncer);
|
||||
Xe131m.setLc(bgAnalyseResult.LC_Xe131m);
|
||||
xeResultsSpectrumList.add(Xe131m);
|
||||
GardsXeResultsSpectrum Xe133 = new GardsXeResultsSpectrum();
|
||||
Xe133.setNuclideName(XeNuclideName.XE_133.getType());
|
||||
Xe133.setMdc(bgAnalyseResult.MDC_Xe133);
|
||||
Xe133.setConc(bgAnalyseResult.Xe133_con);
|
||||
Xe133.setConcErr(bgAnalyseResult.Xe133_uncer);
|
||||
Xe133.setLc(bgAnalyseResult.LC_Xe133);
|
||||
xeResultsSpectrumList.add(Xe133);
|
||||
GardsXeResultsSpectrum Xe133m = new GardsXeResultsSpectrum();
|
||||
Xe133m.setNuclideName(XeNuclideName.XE_133m.getType());
|
||||
Xe133m.setMdc(bgAnalyseResult.MDC_Xe133m);
|
||||
Xe133m.setConc(bgAnalyseResult.Xe133m_con);
|
||||
Xe133m.setConcErr(bgAnalyseResult.Xe133m_uncer);
|
||||
Xe133m.setLc(bgAnalyseResult.LC_Xe133m);
|
||||
xeResultsSpectrumList.add(Xe133m);
|
||||
GardsXeResultsSpectrum Xe135 = new GardsXeResultsSpectrum();
|
||||
Xe135.setNuclideName(XeNuclideName.XE_135.getType());
|
||||
Xe135.setMdc(bgAnalyseResult.MDC_Xe135);
|
||||
Xe135.setConc(bgAnalyseResult.Xe135_con);
|
||||
Xe135.setConcErr(bgAnalyseResult.Xe135_uncer);
|
||||
Xe135.setLc(bgAnalyseResult.LC_Xe135);
|
||||
xeResultsSpectrumList.add(Xe135);
|
||||
return xeResultsSpectrumList;
|
||||
}
|
||||
|
||||
public Map<String, Object> analyze(File sampleTmp, File gasTmp, File detTmp) {
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
//调用动态库解析文件
|
||||
BgAnalyseResult bgAnalyseResult = EnergySpectrumHandler.bgAnalyse(sampleTmp.getAbsolutePath(), gasTmp.getAbsolutePath(), detTmp.getAbsolutePath());
|
||||
/* GardsROIChannelsSpectrum集合 */
|
||||
public void calAnalyzeData(BgAnalyseResult bgAnalyseResult, BetaDataFile betaDataFile) {
|
||||
//处理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(bgAnalyseResult.XE_131m_NID_FLAG);
|
||||
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(bgAnalyseResult.XE_133_NID_FLAG);
|
||||
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(bgAnalyseResult.XE_133m_NID_FLAG);
|
||||
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(bgAnalyseResult.XE_135_NID_FLAG);
|
||||
xeResultsSpectrumList.add(xe135);
|
||||
betaDataFile.setXeDataList(xeResultsSpectrumList);
|
||||
//处理GammaCalibration的数据
|
||||
List<GardsCalibrationSpectrum> gammaCalibrationSpectrumList = new LinkedList<>();
|
||||
List<String> gammaFittingPara = betaDataFile.getGammaFittingPara();
|
||||
if (betaDataFile.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 {
|
||||
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);
|
||||
}
|
||||
if (betaDataFile.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 (betaDataFile.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);
|
||||
}
|
||||
betaDataFile.setGammaCalibrationSpectrumList(gammaCalibrationSpectrumList);
|
||||
//处理BetaCalibration数据
|
||||
List<GardsCalibrationSpectrum> betaCalibrationSpectrumList = new LinkedList<>();
|
||||
List<String> betaFittingPara = betaDataFile.getBetaFittingPara();
|
||||
if (betaDataFile.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 (betaDataFile.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 (betaDataFile.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);
|
||||
}
|
||||
betaDataFile.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));
|
||||
|
@ -835,6 +931,7 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
}
|
||||
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));
|
||||
|
@ -844,6 +941,7 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
}
|
||||
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));
|
||||
|
@ -851,12 +949,14 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
roiChannels.setGChanStop(bgAnalyseResult.D_ROI_G_Boundary_stop.get(i));
|
||||
roiChannelsSpectrumList.add(roiChannels);
|
||||
}
|
||||
/* GardsROIResultsSpectrum集合 */
|
||||
betaDataFile.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);
|
||||
bgAnalyseResult.LC.add(0, 0.0);
|
||||
roiResults.setLc(bgAnalyseResult.LC.get(i));
|
||||
roiResults.setSGross(bgAnalyseResult.s_roi_cts.get(i));
|
||||
roiResults.setGGross(bgAnalyseResult.g_roi_cts.get(i));
|
||||
|
@ -867,7 +967,6 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
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));
|
||||
bgAnalyseResult.MDC.add(0, 0.0);
|
||||
roiResults.setMdc(bgAnalyseResult.MDC.get(i));
|
||||
if(bgAnalyseResult.ROI_con_uncer.get(i)>bgAnalyseResult.MDC.get(i)) {
|
||||
roiResults.setNidFlag(1);
|
||||
|
@ -876,40 +975,7 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
}
|
||||
roiResultsSpectrumList.add(roiResults);
|
||||
}
|
||||
/* GardsXeResultsSpectrum集合 */
|
||||
List<GardsXeResultsSpectrum> xeResultsSpectrumList = new LinkedList<>();
|
||||
GardsXeResultsSpectrum Xe131m = new GardsXeResultsSpectrum();
|
||||
Xe131m.setNuclideName(XeNuclideName.XE_131m.getType());
|
||||
Xe131m.setMdc(bgAnalyseResult.MDC_Xe131m);
|
||||
Xe131m.setConc(bgAnalyseResult.Xe131m_con);
|
||||
Xe131m.setConcErr(bgAnalyseResult.Xe131m_uncer);
|
||||
Xe131m.setLc(bgAnalyseResult.LC_Xe131m);
|
||||
xeResultsSpectrumList.add(Xe131m);
|
||||
GardsXeResultsSpectrum Xe133 = new GardsXeResultsSpectrum();
|
||||
Xe133.setNuclideName(XeNuclideName.XE_133.getType());
|
||||
Xe133.setMdc(bgAnalyseResult.MDC_Xe133);
|
||||
Xe133.setConc(bgAnalyseResult.Xe133_con);
|
||||
Xe133.setConcErr(bgAnalyseResult.Xe133_uncer);
|
||||
Xe133.setLc(bgAnalyseResult.LC_Xe133);
|
||||
xeResultsSpectrumList.add(Xe133);
|
||||
GardsXeResultsSpectrum Xe133m = new GardsXeResultsSpectrum();
|
||||
Xe133m.setNuclideName(XeNuclideName.XE_133m.getType());
|
||||
Xe133m.setMdc(bgAnalyseResult.MDC_Xe133m);
|
||||
Xe133m.setConc(bgAnalyseResult.Xe133m_con);
|
||||
Xe133m.setConcErr(bgAnalyseResult.Xe133m_uncer);
|
||||
Xe133m.setLc(bgAnalyseResult.LC_Xe133m);
|
||||
xeResultsSpectrumList.add(Xe133m);
|
||||
GardsXeResultsSpectrum Xe135 = new GardsXeResultsSpectrum();
|
||||
Xe135.setNuclideName(XeNuclideName.XE_135.getType());
|
||||
Xe135.setMdc(bgAnalyseResult.MDC_Xe135);
|
||||
Xe135.setConc(bgAnalyseResult.Xe135_con);
|
||||
Xe135.setConcErr(bgAnalyseResult.Xe135_uncer);
|
||||
Xe135.setLc(bgAnalyseResult.LC_Xe135);
|
||||
xeResultsSpectrumList.add(Xe135);
|
||||
result.put("roiChannels", roiChannelsSpectrumList);
|
||||
result.put("roiResults", roiResultsSpectrumList);
|
||||
result.put("xeResults", xeResultsSpectrumList);
|
||||
return result;
|
||||
betaDataFile.setRoiResultsSpectrumList(roiResultsSpectrumList);
|
||||
}
|
||||
|
||||
public List<Double> StringToDouble(List<String> datas) {
|
||||
|
@ -964,7 +1030,6 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
boundary.setMaxY(roiGBoundaryStop.get(i));
|
||||
boundaryList.add(boundary);
|
||||
}
|
||||
betaDataFile.setQcBoundary(boundaryList);
|
||||
map.put("QCBoundary", boundaryList);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
package org.jeecg.modules.entity.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import org.jeecg.modules.base.entity.rnman.GardsXeResults;
|
||||
import org.jeecg.modules.entity.GardsCalibrationSpectrum;
|
||||
import org.jeecg.modules.entity.GardsROIChannelsSpectrum;
|
||||
import org.jeecg.modules.entity.GardsROIResultsSpectrum;
|
||||
import org.jeecg.modules.entity.GardsXeResultsSpectrum;
|
||||
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||
|
||||
|
@ -89,7 +93,7 @@ public class BetaDataFile implements Serializable {
|
|||
private boolean bBetaEnergyValidDet;
|
||||
|
||||
|
||||
//存储结果用到的数组信息
|
||||
//存储页面所需要用到的结果信息
|
||||
private List<GardsXeResultsSpectrum> xeResultsSpectrumList;
|
||||
|
||||
private List<Boundary> sampleBoundary;
|
||||
|
@ -108,6 +112,16 @@ public class BetaDataFile implements Serializable {
|
|||
|
||||
private SpectrumData qcSpectrumData;
|
||||
|
||||
//存储分析结果信息
|
||||
private List<GardsXeResults> xeDataList;
|
||||
private List<GardsCalibrationSpectrum> gammaCalibrationSpectrumList;
|
||||
|
||||
private List<GardsCalibrationSpectrum> betaCalibrationSpectrumList;
|
||||
|
||||
private List<GardsROIChannelsSpectrum> roiChannelsSpectrumList;
|
||||
|
||||
private List<GardsROIResultsSpectrum> roiResultsSpectrumList;
|
||||
|
||||
public BetaDataFile() {
|
||||
sampleFilePathName = "";
|
||||
sampleFileName = "";
|
||||
|
|
|
@ -387,7 +387,9 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
betaDataFile = new BetaDataFile();
|
||||
//给公用变量赋值sampleId
|
||||
betaDataFile.setSampleId(String.valueOf(sampleId));
|
||||
|
||||
//用于记录文件路径信息
|
||||
List<String> filePaths = new LinkedList<>();
|
||||
//判断sample信息是否存在
|
||||
if (Objects.nonNull(sample)) {
|
||||
betaDataFile.setSampleFilePathName(StringPool.SLASH + ftpUtil.getFtpRootPath() + spectrumPathProperties.getSaveFilePath() + StringPool.SLASH +dbSpectrumFilePath.getSampleFilePath());
|
||||
betaDataFile.setSampleFileName(sampleFileName);
|
||||
|
@ -399,6 +401,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
resultMap.put("sample",sampleMap);
|
||||
}
|
||||
}
|
||||
//判断gas信息是否存在
|
||||
if (Objects.nonNull(gasBg)) {
|
||||
betaDataFile.setGasFilePathName(StringPool.SLASH + ftpUtil.getFtpRootPath() + spectrumPathProperties.getSaveFilePath() + StringPool.SLASH +dbSpectrumFilePath.getGasBgFilePath());
|
||||
betaDataFile.setGasFileName(gasFileName);
|
||||
|
@ -410,6 +413,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
resultMap.put("gasBg",gasBgMap);
|
||||
}
|
||||
}
|
||||
//判断det信息是否存在
|
||||
if (Objects.nonNull(detBg)) {
|
||||
betaDataFile.setDetFilePathName(StringPool.SLASH + ftpUtil.getFtpRootPath() + spectrumPathProperties.getSaveFilePath() + StringPool.SLASH +dbSpectrumFilePath.getDetBgFilePath());
|
||||
betaDataFile.setDetFileName(detFileName);
|
||||
|
@ -421,6 +425,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
resultMap.put("detBg",detBgMap);
|
||||
}
|
||||
}
|
||||
//判断qc信息是否存在
|
||||
if (Objects.nonNull(qc)) {
|
||||
betaDataFile.setQcFilePathName(StringPool.SLASH + ftpUtil.getFtpRootPath() + spectrumPathProperties.getSaveFilePath() + StringPool.SLASH +dbQcFilePath);
|
||||
betaDataFile.setQcFileName(qcFileName);
|
||||
|
@ -838,124 +843,124 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
if (Objects.nonNull(detSourceData)) {
|
||||
information.setDet_measid_name(detSourceData.measurement_id);
|
||||
}
|
||||
strBuffer.append("CNL06 GENERATED REPORT").append("\n");
|
||||
strBuffer.append("REVIEWED RADIONUCLIDE REPORT").append("\n");
|
||||
strBuffer.append("(Noble Gas Version)").append("\n");
|
||||
strBuffer.append("Creation Date "+DateUtils.formatDate(new Date(), "yyyy/MM/dd-HH:mm:ss")).append("\n");
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#FILE INFORMATION").append("\n");
|
||||
strBuffer.append(" SampleMeasID: ").append(information.getMeasurementID()).append("\n");
|
||||
strBuffer.append(" GASBKMeasID: ").append(information.getGasBkgdMeasurementID()).append("\n");
|
||||
strBuffer.append(" SRID: ").append(information.getSampleRefId()).append("\n");
|
||||
strBuffer.append(" Detector Type: ").append("3D b-g").append("\n");
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#COLLECTION INFORMATION").append("\n");
|
||||
strBuffer.append(" Station CODE: ").append(information.getSit_det_code()).append("\n");
|
||||
strBuffer.append(" Detector CODE: ").append(information.getDetect_code()).append("\n");
|
||||
strBuffer.append(" Collection Start: ").append(DateUtils.formatDate(information.getCollect_start(), "yyyy/MM/dd HH:mm:ss")).append("\n");
|
||||
strBuffer.append(" Collection Stop: ").append(DateUtils.formatDate(information.getCollect_stop(), "yyyy/MM/dd HH:mm:ss")).append("\n");
|
||||
strBuffer.append(" Collection TIME(h): ").append((information.getCollect_stop().getTime()/1000-information.getCollect_start().getTime()/1000)/3600).append("\n");
|
||||
strBuffer.append(" Air Volume[cm3]: ").append(information.getS_xe_stable_volume()).append("\n");
|
||||
strBuffer.append(" Xe Volume[cm3]: ").append(information.getS_volume_of_Xe()).append("\n");
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#ACQUISITION INFORMATION").append("\n");
|
||||
strBuffer.append(" Acquisition Start: ").append(DateUtils.formatDate(information.getAcquisition_start(), "yyyy/MM/dd HH:mm:ss")).append("\n");
|
||||
strBuffer.append(" Acq Real Time(s): ").append(information.getAcquisition_real_sec()).append("\n");
|
||||
strBuffer.append(" Acq Live Time: ").append(information.getAcquisition_live_sec()).append("\n");
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#SOFTWARE").append("\n");
|
||||
strBuffer.append(" version: ").append("1.0.1").append("\n");
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#SAMPLE Old CALIBRATION").append("\n");
|
||||
strBuffer.append(" Old Beta Old Gamma ").append("\n");
|
||||
if (rrrLogInfo.isSampleData()){
|
||||
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ").append(" CH(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
|
||||
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ").append(" E(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
|
||||
}else {
|
||||
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ").append(" CH(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
|
||||
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ").append(" E(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
|
||||
}
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#SAMPLE New CALIBRATION").append("\n");
|
||||
strBuffer.append(" New Beta New Gamma ").append("\n");
|
||||
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ").append(" CH(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
|
||||
strBuffer.append(" E(x) = ("+betaCalibrationParamS.getCoeff1()+")+("+betaCalibrationParamS.getCoeff2()+")*x+("+betaCalibrationParamS.getCoeff3()+")x*x ").append(" E(x) = ("+gammaCalibrationParamS.getCoeff1()+")+("+gammaCalibrationParamS.getCoeff2()+")*x+("+gammaCalibrationParamS.getCoeff3()+")x*x").append("\n");
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#SAMPLE: LIMITS PER ROI").append("\n");
|
||||
strBuffer.append(" Roi Beta Gamma ").append("\n");
|
||||
for (GardsROIChannelsSpectrum channelsSpectrum:channelsSpectrums) {
|
||||
strBuffer.append(StringPool.SPACE+channelsSpectrum.getRoi()+" "+channelsSpectrum.getBChanStart()+"to"+channelsSpectrum.getBChanStop()+" "+channelsSpectrum.getGChanStart()+"to"+channelsSpectrum.getGChanStop()).append("\n");
|
||||
}
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#DET Old CALIBRATION").append("\n");
|
||||
strBuffer.append(" Old Beta Old Gamma ").append("\n");
|
||||
if (rrrLogInfo.isDetBgData()){
|
||||
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ").append(" CH(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
|
||||
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ").append(" E(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
|
||||
}else {
|
||||
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ").append(" CH(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
|
||||
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ").append(" E(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
|
||||
}
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#DET New CALIBRATION").append("\n");
|
||||
strBuffer.append(" New Beta New Gamma ").append("\n");
|
||||
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ").append(" CH(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
|
||||
strBuffer.append(" E(x) = ("+gammaCalibrationParamD.getCoeff1()+")+("+gammaCalibrationParamD.getCoeff2()+")*x+("+gammaCalibrationParamD.getCoeff3()+")x*x ").append(" E(x) = ("+gammaCalibrationParamD.getCoeff1()+")+("+gammaCalibrationParamD.getCoeff2()+")*x+("+gammaCalibrationParamD.getCoeff3()+")x*x").append("\n");
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#DET: LIMITS PER ROI").append("\n");
|
||||
strBuffer.append(" Roi Beta Gamma ").append("\n");
|
||||
for (GardsROIChannelsSpectrum channelsSpectrum:channelsSpectrums) {
|
||||
strBuffer.append(StringPool.SPACE+channelsSpectrum.getRoi()+" "+channelsSpectrum.getBChanStart()+"to"+channelsSpectrum.getBChanStop()+" "+channelsSpectrum.getGChanStart()+"to"+channelsSpectrum.getGChanStop()).append("\n");
|
||||
}
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#GAS Old CALIBRATION").append("\n");
|
||||
strBuffer.append(" Old Beta Old Gamma ").append("\n");
|
||||
if (rrrLogInfo.isGasBgData()){
|
||||
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ").append(" CH(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
|
||||
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ").append(" E(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
|
||||
}else {
|
||||
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ").append(" CH(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
|
||||
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ").append(" E(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
|
||||
}
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#GAS New CALIBRATION").append("\n");
|
||||
strBuffer.append(" New Beta New Gamma ").append("\n");
|
||||
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ").append(" CH(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
|
||||
strBuffer.append(" E(x) = ("+betaCalibrationParamG.getCoeff1()+")+("+betaCalibrationParamG.getCoeff2()+")*x+("+betaCalibrationParamG.getCoeff3()+")x*x ").append(" E(x) = ("+gammaCalibrationParamG.getCoeff1()+")+("+gammaCalibrationParamG.getCoeff2()+")*x+("+gammaCalibrationParamG.getCoeff3()+")x*x").append("\n");
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#GAS: LIMITS PER ROI").append("\n");
|
||||
strBuffer.append(" Roi Beta Gamma ").append("\n");
|
||||
for (GardsROIChannelsSpectrum channelsSpectrum:channelsSpectrums) {
|
||||
strBuffer.append(StringPool.SPACE+channelsSpectrum.getRoi()+" "+channelsSpectrum.getBChanStart()+"to"+channelsSpectrum.getBChanStop()+" "+channelsSpectrum.getGChanStart()+"to"+channelsSpectrum.getGChanStop()).append("\n");
|
||||
}
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#GROSS COUNTS PER ROI").append("\n");
|
||||
strBuffer.append(" Roi Sample GasBkgnd DetBkgnd ").append("\n");
|
||||
for (GardsROIResultsSpectrum resultsSpectrum:resultsSpectrums) {
|
||||
strBuffer.append(StringPool.SPACE+resultsSpectrum.getRoi()+" "+resultsSpectrum.getSGross()+" "+resultsSpectrum.getGGross()+" "+resultsSpectrum.getBGross()+"").append("\n");
|
||||
}
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#NET COUNTS AND LC PER ROI").append("\n");
|
||||
strBuffer.append(" Roi Net count ").append("\n");
|
||||
for (GardsROIResultsSpectrum resultsSpectrum:resultsSpectrums){
|
||||
strBuffer.append(StringPool.SPACE+resultsSpectrum.getRoi()+" "+resultsSpectrum.getNet()+" +/- "+Math.sqrt(resultsSpectrum.getNetErr())).append("\n");
|
||||
}
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#CONCENTRATION AND LC PER ROI").append("\n");
|
||||
strBuffer.append(" Roi Conc(mBq/m3) LC(mBq/m3) MDC(mBq/m3): ");
|
||||
for (GardsROIResultsSpectrum resultsSpectrum:resultsSpectrums){
|
||||
strBuffer.append(StringPool.SPACE+resultsSpectrum.getRoi()+" "+resultsSpectrum.getConcErr()+" +/- "+resultsSpectrum.getConcErr()+" "+resultsSpectrum.getLc()+" "+resultsSpectrum.getMdc()).append("\n");
|
||||
}
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#RESULT SUMMARY").append("\n");
|
||||
strBuffer.append(" Nuclide Name Conc LC MDC NID Flag ").append("\n");
|
||||
for (GardsXeResultsSpectrum xeResultsSpectrum:xeResultsSpectrums) {
|
||||
strBuffer.append(StringPool.SPACE+xeResultsSpectrum.getNuclideName()+" "+xeResultsSpectrum.getConc()+" +/- "+xeResultsSpectrum.getConcErr()+" "+xeResultsSpectrum.getLc()+" "+xeResultsSpectrum.getMdc()+" "+xeResultsSpectrum.getNidFlag()).append("\n");
|
||||
}
|
||||
strBuffer.append("\n");
|
||||
} catch (ParseException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
strBuffer.append("CNL06 GENERATED REPORT").append("\n");
|
||||
strBuffer.append("REVIEWED RADIONUCLIDE REPORT").append("\n");
|
||||
strBuffer.append("(Noble Gas Version)").append("\n");
|
||||
strBuffer.append("Creation Date "+DateUtils.formatDate(new Date(), "yyyy/MM/dd-HH:mm:ss")).append("\n");
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#FILE INFORMATION").append("\n");
|
||||
strBuffer.append(" SampleMeasID: ").append(information.getMeasurementID()).append("\n");
|
||||
strBuffer.append(" GASBKMeasID: ").append(information.getGasBkgdMeasurementID()).append("\n");
|
||||
strBuffer.append(" SRID: ").append(information.getSampleRefId()).append("\n");
|
||||
strBuffer.append(" Detector Type: ").append("3D b-g").append("\n");
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#COLLECTION INFORMATION").append("\n");
|
||||
strBuffer.append(" Station CODE: ").append(information.getSit_det_code()).append("\n");
|
||||
strBuffer.append(" Detector CODE: ").append(information.getDetect_code()).append("\n");
|
||||
strBuffer.append(" Collection Start: ").append(DateUtils.formatDate(information.getCollect_start(), "yyyy/MM/dd HH:mm:ss")).append("\n");
|
||||
strBuffer.append(" Collection Stop: ").append(DateUtils.formatDate(information.getCollect_stop(), "yyyy/MM/dd HH:mm:ss")).append("\n");
|
||||
strBuffer.append(" Collection TIME(h): ").append((information.getCollect_stop().getTime()/1000-information.getCollect_start().getTime()/1000)/3600).append("\n");
|
||||
strBuffer.append(" Air Volume[cm3]: ").append(information.getS_xe_stable_volume()).append("\n");
|
||||
strBuffer.append(" Xe Volume[cm3]: ").append(information.getS_volume_of_Xe()).append("\n");
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#ACQUISITION INFORMATION").append("\n");
|
||||
strBuffer.append(" Acquisition Start: ").append(DateUtils.formatDate(information.getAcquisition_start(), "yyyy/MM/dd HH:mm:ss")).append("\n");
|
||||
strBuffer.append(" Acq Real Time(s): ").append(information.getAcquisition_real_sec()).append("\n");
|
||||
strBuffer.append(" Acq Live Time: ").append(information.getAcquisition_live_sec()).append("\n");
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#SOFTWARE").append("\n");
|
||||
strBuffer.append(" version: ").append("1.0.1").append("\n");
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#SAMPLE Old CALIBRATION").append("\n");
|
||||
strBuffer.append(" Old Beta Old Gamma ").append("\n");
|
||||
if (rrrLogInfo.isSampleData()){
|
||||
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ").append(" CH(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
|
||||
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ").append(" E(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
|
||||
}else {
|
||||
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ").append(" CH(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
|
||||
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ").append(" E(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
|
||||
}
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#SAMPLE New CALIBRATION").append("\n");
|
||||
strBuffer.append(" New Beta New Gamma ").append("\n");
|
||||
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ").append(" CH(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
|
||||
strBuffer.append(" E(x) = ("+betaCalibrationParamS.getCoeff1()+")+("+betaCalibrationParamS.getCoeff2()+")*x+("+betaCalibrationParamS.getCoeff3()+")x*x ").append(" E(x) = ("+gammaCalibrationParamS.getCoeff1()+")+("+gammaCalibrationParamS.getCoeff2()+")*x+("+gammaCalibrationParamS.getCoeff3()+")x*x").append("\n");
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#SAMPLE: LIMITS PER ROI").append("\n");
|
||||
strBuffer.append(" Roi Beta Gamma ").append("\n");
|
||||
for (GardsROIChannelsSpectrum channelsSpectrum:channelsSpectrums) {
|
||||
strBuffer.append(StringPool.SPACE+channelsSpectrum.getRoi()+" "+channelsSpectrum.getBChanStart()+"to"+channelsSpectrum.getBChanStop()+" "+channelsSpectrum.getGChanStart()+"to"+channelsSpectrum.getGChanStop()).append("\n");
|
||||
}
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#DET Old CALIBRATION").append("\n");
|
||||
strBuffer.append(" Old Beta Old Gamma ").append("\n");
|
||||
if (rrrLogInfo.isDetBgData()){
|
||||
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ").append(" CH(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
|
||||
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ").append(" E(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
|
||||
}else {
|
||||
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ").append(" CH(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
|
||||
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ").append(" E(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
|
||||
}
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#DET New CALIBRATION").append("\n");
|
||||
strBuffer.append(" New Beta New Gamma ").append("\n");
|
||||
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ").append(" CH(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
|
||||
strBuffer.append(" E(x) = ("+gammaCalibrationParamD.getCoeff1()+")+("+gammaCalibrationParamD.getCoeff2()+")*x+("+gammaCalibrationParamD.getCoeff3()+")x*x ").append(" E(x) = ("+gammaCalibrationParamD.getCoeff1()+")+("+gammaCalibrationParamD.getCoeff2()+")*x+("+gammaCalibrationParamD.getCoeff3()+")x*x").append("\n");
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#DET: LIMITS PER ROI").append("\n");
|
||||
strBuffer.append(" Roi Beta Gamma ").append("\n");
|
||||
for (GardsROIChannelsSpectrum channelsSpectrum:channelsSpectrums) {
|
||||
strBuffer.append(StringPool.SPACE+channelsSpectrum.getRoi()+" "+channelsSpectrum.getBChanStart()+"to"+channelsSpectrum.getBChanStop()+" "+channelsSpectrum.getGChanStart()+"to"+channelsSpectrum.getGChanStop()).append("\n");
|
||||
}
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#GAS Old CALIBRATION").append("\n");
|
||||
strBuffer.append(" Old Beta Old Gamma ").append("\n");
|
||||
if (rrrLogInfo.isGasBgData()){
|
||||
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ").append(" CH(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
|
||||
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ").append(" E(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
|
||||
}else {
|
||||
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ").append(" CH(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
|
||||
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ").append(" E(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
|
||||
}
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#GAS New CALIBRATION").append("\n");
|
||||
strBuffer.append(" New Beta New Gamma ").append("\n");
|
||||
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ").append(" CH(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
|
||||
strBuffer.append(" E(x) = ("+betaCalibrationParamG.getCoeff1()+")+("+betaCalibrationParamG.getCoeff2()+")*x+("+betaCalibrationParamG.getCoeff3()+")x*x ").append(" E(x) = ("+gammaCalibrationParamG.getCoeff1()+")+("+gammaCalibrationParamG.getCoeff2()+")*x+("+gammaCalibrationParamG.getCoeff3()+")x*x").append("\n");
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#GAS: LIMITS PER ROI").append("\n");
|
||||
strBuffer.append(" Roi Beta Gamma ").append("\n");
|
||||
for (GardsROIChannelsSpectrum channelsSpectrum:channelsSpectrums) {
|
||||
strBuffer.append(StringPool.SPACE+channelsSpectrum.getRoi()+" "+channelsSpectrum.getBChanStart()+"to"+channelsSpectrum.getBChanStop()+" "+channelsSpectrum.getGChanStart()+"to"+channelsSpectrum.getGChanStop()).append("\n");
|
||||
}
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#GROSS COUNTS PER ROI").append("\n");
|
||||
strBuffer.append(" Roi Sample GasBkgnd DetBkgnd ").append("\n");
|
||||
for (GardsROIResultsSpectrum resultsSpectrum:resultsSpectrums) {
|
||||
strBuffer.append(StringPool.SPACE+resultsSpectrum.getRoi()+" "+resultsSpectrum.getSGross()+" "+resultsSpectrum.getGGross()+" "+resultsSpectrum.getBGross()+"").append("\n");
|
||||
}
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#NET COUNTS AND LC PER ROI").append("\n");
|
||||
strBuffer.append(" Roi Net count ").append("\n");
|
||||
for (GardsROIResultsSpectrum resultsSpectrum:resultsSpectrums){
|
||||
strBuffer.append(StringPool.SPACE+resultsSpectrum.getRoi()+" "+resultsSpectrum.getNet()+" +/- "+Math.sqrt(resultsSpectrum.getNetErr())).append("\n");
|
||||
}
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#CONCENTRATION AND LC PER ROI").append("\n");
|
||||
strBuffer.append(" Roi Conc(mBq/m3) LC(mBq/m3) MDC(mBq/m3): ");
|
||||
for (GardsROIResultsSpectrum resultsSpectrum:resultsSpectrums){
|
||||
strBuffer.append(StringPool.SPACE+resultsSpectrum.getRoi()+" "+resultsSpectrum.getConcErr()+" +/- "+resultsSpectrum.getConcErr()+" "+resultsSpectrum.getLc()+" "+resultsSpectrum.getMdc()).append("\n");
|
||||
}
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#RESULT SUMMARY").append("\n");
|
||||
strBuffer.append(" Nuclide Name Conc LC MDC NID Flag ").append("\n");
|
||||
for (GardsXeResultsSpectrum xeResultsSpectrum:xeResultsSpectrums) {
|
||||
strBuffer.append(StringPool.SPACE+xeResultsSpectrum.getNuclideName()+" "+xeResultsSpectrum.getConc()+" +/- "+xeResultsSpectrum.getConcErr()+" "+xeResultsSpectrum.getLc()+" "+xeResultsSpectrum.getMdc()+" "+xeResultsSpectrum.getNidFlag()).append("\n");
|
||||
}
|
||||
strBuffer.append("\n");
|
||||
}
|
||||
result.setSuccess(true);
|
||||
result.setResult(strBuffer.toString());
|
||||
|
@ -1351,7 +1356,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
gardsXeResults = xeDataList.get(0);
|
||||
}
|
||||
//解析sample,gas,det文件并判断数据状态
|
||||
if (StringUtils.isNotBlank(sampleFileName) && StringUtils.isNotBlank(gasFileName) && StringUtils.isNotBlank(detFileName)) {
|
||||
if (Objects.nonNull(betaDataFile)) {
|
||||
EnergySpectrumStruct sampleSourceData = betaDataFile.getSampleStruct();
|
||||
EnergySpectrumStruct gasSourceData = betaDataFile.getGasStruct();
|
||||
EnergySpectrumStruct detSourceData = betaDataFile.getDetStruct();
|
||||
|
@ -2643,30 +2648,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
result.error500("请先加载文件基础信息!");
|
||||
return result;
|
||||
}
|
||||
List<GardsXeResultsSpectrum> analyseResult = BetaGammaAnalyzeCurrentProcess(analyseData, betaDataFile);
|
||||
if (CollectionUtils.isNotEmpty(analyseResult)){
|
||||
for (GardsXeResultsSpectrum xeData:analyseResult) {
|
||||
Double conc = xeData.getConc();
|
||||
Double mdc = xeData.getMdc();
|
||||
if (conc < 0){
|
||||
xeData.setColor("red");
|
||||
xeData.setNidFlag(0);
|
||||
} else if (0<conc && conc < mdc) {
|
||||
xeData.setColor("#ffcc30");
|
||||
xeData.setNidFlag(0);
|
||||
} else if (conc > mdc) {
|
||||
xeData.setColor("green");
|
||||
xeData.setNidFlag(1);
|
||||
}
|
||||
xeData.setMdc(Double.valueOf(String.format("%."+(6 - String.valueOf(Math.abs(xeData.getMdc())).substring(0, String.valueOf(Math.abs(xeData.getMdc())).lastIndexOf(StringPool.DOT)).length())+"f", xeData.getMdc())));
|
||||
xeData.setConc(Double.valueOf(String.format("%."+(6 - String.valueOf(Math.abs(xeData.getConc())).substring(0, String.valueOf(Math.abs(xeData.getConc())).lastIndexOf(StringPool.DOT)).length())+"f", xeData.getConc())));
|
||||
xeData.setConcErr(Double.valueOf(String.format("%."+((6 - String.valueOf(Math.abs(xeData.getConcErr())).substring(0, String.valueOf(Math.abs(xeData.getConcErr())).lastIndexOf(StringPool.DOT)).length()))+"f", xeData.getConcErr())));
|
||||
}
|
||||
betaDataFile.setXeResultsSpectrumList(analyseResult);
|
||||
betaDataFile.setBProcessed(true);
|
||||
betaDataFile.setSaveAnalysisResult(true);
|
||||
}
|
||||
map.put("XeData", analyseResult);
|
||||
map = BetaGammaAnalyzeCurrentProcess(analyseData, betaDataFile);
|
||||
map.put("bProcessed", true);
|
||||
map.put("savedAnalysisResult", true);
|
||||
result.setSuccess(true);
|
||||
|
@ -2675,9 +2657,8 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
//获取当前选中的文件名称
|
||||
String currentFileName = analyseData.getCurrentFileName();
|
||||
String currentQCFileName = analyseData.getCurrentQCFileName();
|
||||
List<GardsXeResultsSpectrum> analyseResultList = BetaGammaAnalyzeAllProcess(analyseData, userName, currentFileName, currentQCFileName);
|
||||
if (CollectionUtils.isNotEmpty(analyseResultList)) {
|
||||
map.put("XeData", analyseResultList);
|
||||
map = BetaGammaAnalyzeAllProcess(analyseData, userName, currentFileName, currentQCFileName);
|
||||
if (CollectionUtils.isNotEmpty(map)) {
|
||||
map.put("bProcessed", true);
|
||||
map.put("savedAnalysisResult", true);
|
||||
}
|
||||
|
@ -2687,20 +2668,16 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
return result;
|
||||
}
|
||||
|
||||
private List<GardsXeResultsSpectrum> BetaGammaAnalyzeCurrentProcess(AnalyseData analyseData, BetaDataFile betaDataFile) {
|
||||
private Map<String, Object> BetaGammaAnalyzeCurrentProcess(AnalyseData analyseData, BetaDataFile betaDataFile) {
|
||||
//根据文件路径 文件名称获取对应的临时文件
|
||||
File sampleTmp = null;
|
||||
File gasTmp = null;
|
||||
File detTmp = null;
|
||||
//需要返回到前端的XeData数据
|
||||
List<GardsXeResultsSpectrum> xeResultsSpectrumList = new LinkedList<>();
|
||||
//声明一个map 缓存xeData计算后的结果
|
||||
Map<String, Object> xeMap = new HashMap<>();
|
||||
try {
|
||||
//存储重新分析字段的实体类
|
||||
SpectrumGroup spectrum_group = new SpectrumGroup();
|
||||
//声明一个map 缓存重新分析用到的数据
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
//声明一个map 缓存xeData计算后的结果
|
||||
Map<String, Object> xeMap = new HashMap<>();
|
||||
//获取计算参数
|
||||
List<SeriseData> betaList = new LinkedList<>();
|
||||
List<String> betaFittingPara = new LinkedList<>();
|
||||
|
@ -2775,92 +2752,11 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
gasTmp = ftpUtil.downloadFile(betaDataFile.getGasFilePathName(), "betaGamma");
|
||||
//获取det文件
|
||||
detTmp = ftpUtil.downloadFile(betaDataFile.getDetFilePathName(), "betaGamma");
|
||||
|
||||
if (Objects.nonNull(sampleTmp) && Objects.nonNull(gasTmp) && Objects.nonNull(detTmp)) {
|
||||
//调用重新分析算法 获取算法结果
|
||||
BgAnalyseResult analyseResult = EnergySpectrumHandler.bgReAnalyse(sampleTmp.getAbsolutePath(), gasTmp.getAbsolutePath(), detTmp.getAbsolutePath(), spectrum_group.BgCalPara);
|
||||
if (StringUtils.isNotBlank(analyseResult.error_log) && !analyseResult.error_log.equalsIgnoreCase("no error.")) {
|
||||
return Collections.EMPTY_LIST;
|
||||
} else {
|
||||
//生成分析操作日志
|
||||
EnergySpectrumStruct sample = betaDataFile.getSampleStruct();
|
||||
EnergySpectrumStruct gas = betaDataFile.getGasStruct();
|
||||
EnergySpectrumStruct det = betaDataFile.getDetStruct();
|
||||
String logName = betaDataFile.getSampleFileName().replace("PHD", "log");
|
||||
phdFileUtil.OutPutRnLog(analyseResult, sample, gas, det, logName);
|
||||
//存入计算后得到的xeData数据
|
||||
GardsXeResultsSpectrum xe131m = new GardsXeResultsSpectrum();
|
||||
xe131m.setNuclideName(XeNuclideName.XE_131m.getType());
|
||||
xe131m.setConc(analyseResult.Xe131m_con);
|
||||
xe131m.setConcErr(analyseResult.Xe131m_uncer);
|
||||
xe131m.setLc(analyseResult.LC_Xe131m);
|
||||
xe131m.setMdc(analyseResult.MDC_Xe131m);
|
||||
xe131m.setNidFlag(analyseResult.XE_131m_NID_FLAG);
|
||||
xeResultsSpectrumList.add(xe131m);
|
||||
GardsXeResultsSpectrum xe133 = new GardsXeResultsSpectrum();
|
||||
xe133.setNuclideName(XeNuclideName.XE_133.getType());
|
||||
xe133.setConc(analyseResult.Xe133_con);
|
||||
xe133.setConcErr(analyseResult.Xe133_uncer);
|
||||
xe133.setLc(analyseResult.LC_Xe133);
|
||||
xe133.setMdc(analyseResult.MDC_Xe133);
|
||||
xe133.setNidFlag(analyseResult.XE_133_NID_FLAG);
|
||||
xeResultsSpectrumList.add(xe133);
|
||||
GardsXeResultsSpectrum xe133m = new GardsXeResultsSpectrum();
|
||||
xe133m.setNuclideName(XeNuclideName.XE_133m.getType());
|
||||
xe133m.setConc(analyseResult.Xe133m_con);
|
||||
xe133m.setConcErr(analyseResult.Xe133m_uncer);
|
||||
xe133m.setLc(analyseResult.LC_Xe133m);
|
||||
xe133m.setMdc(analyseResult.MDC_Xe133m);
|
||||
xe133m.setNidFlag(analyseResult.XE_133m_NID_FLAG);
|
||||
xeResultsSpectrumList.add(xe133m);
|
||||
GardsXeResultsSpectrum xe135 = new GardsXeResultsSpectrum();
|
||||
xe135.setNuclideName(XeNuclideName.XE_135.getType());
|
||||
xe135.setConc(analyseResult.Xe135_con);
|
||||
xe135.setConcErr(analyseResult.Xe135_uncer);
|
||||
xe135.setLc(analyseResult.LC_Xe135);
|
||||
xe135.setMdc(analyseResult.MDC_Xe135);
|
||||
xe135.setNidFlag(analyseResult.XE_135_NID_FLAG);
|
||||
xeResultsSpectrumList.add(xe135);
|
||||
xeMap.put("XeData", xeResultsSpectrumList);
|
||||
//新计算得到的边界值
|
||||
if (CollectionUtils.isNotEmpty(analyseResult.S_ROI_B_Boundary_start)) {
|
||||
List<Boundary> boundaryList = new LinkedList<>();
|
||||
for (int i=0; i<analyseResult.S_ROI_B_Boundary_start.size(); i++) {
|
||||
Boundary boundary = new Boundary();
|
||||
boundary.setMinX(analyseResult.S_ROI_B_Boundary_start.get(i));
|
||||
boundary.setMaxX(analyseResult.S_ROI_B_Boundary_stop.get(i));
|
||||
boundary.setMinY(analyseResult.S_ROI_G_Boundary_start.get(i));
|
||||
boundary.setMaxY(analyseResult.S_ROI_G_Boundary_stop.get(i));
|
||||
boundaryList.add(boundary);
|
||||
}
|
||||
betaDataFile.setSampleBoundary(boundaryList);
|
||||
xeMap.put("SampleBoundary", boundaryList);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(analyseResult.G_ROI_B_Boundary_start)) {
|
||||
List<Boundary> boundaryList = new LinkedList<>();
|
||||
for (int i=0; i<analyseResult.G_ROI_B_Boundary_start.size(); i++) {
|
||||
Boundary boundary = new Boundary();
|
||||
boundary.setMinX(analyseResult.G_ROI_B_Boundary_start.get(i));
|
||||
boundary.setMaxX(analyseResult.G_ROI_B_Boundary_stop.get(i));
|
||||
boundary.setMinY(analyseResult.G_ROI_G_Boundary_start.get(i));
|
||||
boundary.setMaxY(analyseResult.G_ROI_G_Boundary_stop.get(i));
|
||||
boundaryList.add(boundary);
|
||||
}
|
||||
betaDataFile.setGasBoundary(boundaryList);
|
||||
xeMap.put("GasBoundary", boundaryList);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(analyseResult.D_ROI_B_Boundary_start)) {
|
||||
List<Boundary> boundaryList = new LinkedList<>();
|
||||
for (int i=0; i<analyseResult.D_ROI_B_Boundary_start.size(); i++) {
|
||||
Boundary boundary = new Boundary();
|
||||
boundary.setMinX(analyseResult.D_ROI_B_Boundary_start.get(i));
|
||||
boundary.setMaxX(analyseResult.D_ROI_B_Boundary_stop.get(i));
|
||||
boundary.setMinY(analyseResult.D_ROI_G_Boundary_start.get(i));
|
||||
boundary.setMaxY(analyseResult.D_ROI_G_Boundary_stop.get(i));
|
||||
boundaryList.add(boundary);
|
||||
}
|
||||
betaDataFile.setDetBoundary(boundaryList);
|
||||
xeMap.put("DetBoundary", boundaryList);
|
||||
}
|
||||
//调用分析方法进行分析操作
|
||||
boolean bRet = phdFileUtil.analyzeSpectrum(sampleTmp, gasTmp, detTmp, spectrum_group.BgCalPara, xeMap, betaDataFile);
|
||||
if (bRet) {
|
||||
if (analyseData.isQcData()) {
|
||||
if (StringUtils.isNotBlank(betaDataFile.getQcFilePathName())) {
|
||||
EnergySpectrumStruct struct = betaDataFile.getQcStruct();
|
||||
|
@ -2869,7 +2765,140 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
}
|
||||
}
|
||||
}
|
||||
List<Boundary> sampleBoundary = (List<Boundary>) xeMap.get("SampleBoundary");
|
||||
if(CollectionUtils.isNotEmpty(sampleBoundary)) {
|
||||
betaDataFile.setSampleBoundary(sampleBoundary);
|
||||
}
|
||||
List<Boundary> gasBoundary = (List<Boundary>) xeMap.get("GasBoundary");
|
||||
if(CollectionUtils.isNotEmpty(gasBoundary)) {
|
||||
betaDataFile.setGasBoundary(gasBoundary);
|
||||
}
|
||||
List<Boundary> detBoundary = (List<Boundary>) xeMap.get("DetBoundary");
|
||||
if(CollectionUtils.isNotEmpty(detBoundary)) {
|
||||
betaDataFile.setDetBoundary(detBoundary);
|
||||
}
|
||||
List<Boundary> qcBoundary = (List<Boundary>) xeMap.get("QCBoundary");
|
||||
if(CollectionUtils.isNotEmpty(qcBoundary)) {
|
||||
betaDataFile.setQcBoundary(qcBoundary);
|
||||
}
|
||||
List<GardsXeResultsSpectrum> xeResultsSpectrumList = (List<GardsXeResultsSpectrum>) xeMap.get("XeData");
|
||||
if (CollectionUtils.isNotEmpty(xeResultsSpectrumList)){
|
||||
for (GardsXeResultsSpectrum xeData: xeResultsSpectrumList) {
|
||||
Double conc = xeData.getConc();
|
||||
Double mdc = xeData.getMdc();
|
||||
if (conc < 0){
|
||||
xeData.setColor("red");
|
||||
xeData.setNidFlag(0);
|
||||
} else if (0<conc && conc < mdc) {
|
||||
xeData.setColor("#ffcc30");
|
||||
xeData.setNidFlag(0);
|
||||
} else if (conc > mdc) {
|
||||
xeData.setColor("green");
|
||||
xeData.setNidFlag(1);
|
||||
}
|
||||
xeData.setMdc(Double.valueOf(String.format("%."+(6 - String.valueOf(Math.abs(xeData.getMdc())).substring(0, String.valueOf(Math.abs(xeData.getMdc())).lastIndexOf(StringPool.DOT)).length())+"f", xeData.getMdc())));
|
||||
xeData.setConc(Double.valueOf(String.format("%."+(6 - String.valueOf(Math.abs(xeData.getConc())).substring(0, String.valueOf(Math.abs(xeData.getConc())).lastIndexOf(StringPool.DOT)).length())+"f", xeData.getConc())));
|
||||
xeData.setConcErr(Double.valueOf(String.format("%."+((6 - String.valueOf(Math.abs(xeData.getConcErr())).substring(0, String.valueOf(Math.abs(xeData.getConcErr())).lastIndexOf(StringPool.DOT)).length()))+"f", xeData.getConcErr())));
|
||||
}
|
||||
betaDataFile.setXeResultsSpectrumList(xeResultsSpectrumList);
|
||||
betaDataFile.setBProcessed(true);
|
||||
betaDataFile.setSaveAnalysisResult(true);
|
||||
}
|
||||
} else {
|
||||
xeMap.put("XeData", Collections.EMPTY_LIST);
|
||||
}
|
||||
// if (StringUtils.isNotBlank(analyseResult.error_log) && !analyseResult.error_log.equalsIgnoreCase("no error.")) {
|
||||
// return Collections.EMPTY_LIST;
|
||||
// } else {
|
||||
// //生成分析操作日志
|
||||
// EnergySpectrumStruct sample = betaDataFile.getSampleStruct();
|
||||
// EnergySpectrumStruct gas = betaDataFile.getGasStruct();
|
||||
// EnergySpectrumStruct det = betaDataFile.getDetStruct();
|
||||
// String logName = betaDataFile.getSampleFileName().replace("PHD", "log");
|
||||
// phdFileUtil.OutPutRnLog(analyseResult, sample, gas, det, logName);
|
||||
// //存入计算后得到的xeData数据
|
||||
// GardsXeResultsSpectrum xe131m = new GardsXeResultsSpectrum();
|
||||
// xe131m.setNuclideName(XeNuclideName.XE_131m.getType());
|
||||
// xe131m.setConc(analyseResult.Xe131m_con);
|
||||
// xe131m.setConcErr(analyseResult.Xe131m_uncer);
|
||||
// xe131m.setLc(analyseResult.LC_Xe131m);
|
||||
// xe131m.setMdc(analyseResult.MDC_Xe131m);
|
||||
// xe131m.setNidFlag(analyseResult.XE_131m_NID_FLAG);
|
||||
// xeResultsSpectrumList.add(xe131m);
|
||||
// GardsXeResultsSpectrum xe133 = new GardsXeResultsSpectrum();
|
||||
// xe133.setNuclideName(XeNuclideName.XE_133.getType());
|
||||
// xe133.setConc(analyseResult.Xe133_con);
|
||||
// xe133.setConcErr(analyseResult.Xe133_uncer);
|
||||
// xe133.setLc(analyseResult.LC_Xe133);
|
||||
// xe133.setMdc(analyseResult.MDC_Xe133);
|
||||
// xe133.setNidFlag(analyseResult.XE_133_NID_FLAG);
|
||||
// xeResultsSpectrumList.add(xe133);
|
||||
// GardsXeResultsSpectrum xe133m = new GardsXeResultsSpectrum();
|
||||
// xe133m.setNuclideName(XeNuclideName.XE_133m.getType());
|
||||
// xe133m.setConc(analyseResult.Xe133m_con);
|
||||
// xe133m.setConcErr(analyseResult.Xe133m_uncer);
|
||||
// xe133m.setLc(analyseResult.LC_Xe133m);
|
||||
// xe133m.setMdc(analyseResult.MDC_Xe133m);
|
||||
// xe133m.setNidFlag(analyseResult.XE_133m_NID_FLAG);
|
||||
// xeResultsSpectrumList.add(xe133m);
|
||||
// GardsXeResultsSpectrum xe135 = new GardsXeResultsSpectrum();
|
||||
// xe135.setNuclideName(XeNuclideName.XE_135.getType());
|
||||
// xe135.setConc(analyseResult.Xe135_con);
|
||||
// xe135.setConcErr(analyseResult.Xe135_uncer);
|
||||
// xe135.setLc(analyseResult.LC_Xe135);
|
||||
// xe135.setMdc(analyseResult.MDC_Xe135);
|
||||
// xe135.setNidFlag(analyseResult.XE_135_NID_FLAG);
|
||||
// xeResultsSpectrumList.add(xe135);
|
||||
// xeMap.put("XeData", xeResultsSpectrumList);
|
||||
// //新计算得到的边界值
|
||||
// if (CollectionUtils.isNotEmpty(analyseResult.S_ROI_B_Boundary_start)) {
|
||||
// List<Boundary> boundaryList = new LinkedList<>();
|
||||
// for (int i=0; i<analyseResult.S_ROI_B_Boundary_start.size(); i++) {
|
||||
// Boundary boundary = new Boundary();
|
||||
// boundary.setMinX(analyseResult.S_ROI_B_Boundary_start.get(i));
|
||||
// boundary.setMaxX(analyseResult.S_ROI_B_Boundary_stop.get(i));
|
||||
// boundary.setMinY(analyseResult.S_ROI_G_Boundary_start.get(i));
|
||||
// boundary.setMaxY(analyseResult.S_ROI_G_Boundary_stop.get(i));
|
||||
// boundaryList.add(boundary);
|
||||
// }
|
||||
// betaDataFile.setSampleBoundary(boundaryList);
|
||||
// xeMap.put("SampleBoundary", boundaryList);
|
||||
// }
|
||||
// if (CollectionUtils.isNotEmpty(analyseResult.G_ROI_B_Boundary_start)) {
|
||||
// List<Boundary> boundaryList = new LinkedList<>();
|
||||
// for (int i=0; i<analyseResult.G_ROI_B_Boundary_start.size(); i++) {
|
||||
// Boundary boundary = new Boundary();
|
||||
// boundary.setMinX(analyseResult.G_ROI_B_Boundary_start.get(i));
|
||||
// boundary.setMaxX(analyseResult.G_ROI_B_Boundary_stop.get(i));
|
||||
// boundary.setMinY(analyseResult.G_ROI_G_Boundary_start.get(i));
|
||||
// boundary.setMaxY(analyseResult.G_ROI_G_Boundary_stop.get(i));
|
||||
// boundaryList.add(boundary);
|
||||
// }
|
||||
// betaDataFile.setGasBoundary(boundaryList);
|
||||
// xeMap.put("GasBoundary", boundaryList);
|
||||
// }
|
||||
// if (CollectionUtils.isNotEmpty(analyseResult.D_ROI_B_Boundary_start)) {
|
||||
// List<Boundary> boundaryList = new LinkedList<>();
|
||||
// for (int i=0; i<analyseResult.D_ROI_B_Boundary_start.size(); i++) {
|
||||
// Boundary boundary = new Boundary();
|
||||
// boundary.setMinX(analyseResult.D_ROI_B_Boundary_start.get(i));
|
||||
// boundary.setMaxX(analyseResult.D_ROI_B_Boundary_stop.get(i));
|
||||
// boundary.setMinY(analyseResult.D_ROI_G_Boundary_start.get(i));
|
||||
// boundary.setMaxY(analyseResult.D_ROI_G_Boundary_stop.get(i));
|
||||
// boundaryList.add(boundary);
|
||||
// }
|
||||
// betaDataFile.setDetBoundary(boundaryList);
|
||||
// xeMap.put("DetBoundary", boundaryList);
|
||||
// }
|
||||
// if (analyseData.isQcData()) {
|
||||
// if (StringUtils.isNotBlank(betaDataFile.getQcFilePathName())) {
|
||||
// EnergySpectrumStruct struct = betaDataFile.getQcStruct();
|
||||
// if (Objects.nonNull(struct)) {
|
||||
// phdFileUtil.CalQCBoundary(betaList, gammaList, betaFittingParaToUi, gammaFittingParaToUi, struct, xeMap, betaDataFile);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
@ -2884,14 +2913,14 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
detTmp.delete();
|
||||
}
|
||||
}
|
||||
return xeResultsSpectrumList;
|
||||
return xeMap;
|
||||
}
|
||||
|
||||
private List<GardsXeResultsSpectrum> BetaGammaAnalyzeAllProcess(AnalyseData analyseData, String userName, String currentFileName, String currentQCFileName){
|
||||
private Map<String, Object> BetaGammaAnalyzeAllProcess(AnalyseData analyseData, String userName, String currentFileName, String currentQCFileName){
|
||||
//从本地缓存获取beta gamma的数组
|
||||
Cache<String, BetaDataFile> cache = betaCache.getBetaCache();
|
||||
//返回最终结果用的map
|
||||
Map<String, List<GardsXeResultsSpectrum>> analyseResultMap = new HashMap<>();
|
||||
Map<String, Map<String, Object>> analyseResultMap = new HashMap<>();
|
||||
File sampleTmp = null;
|
||||
File gasTmp = null;
|
||||
File detTmp = null;
|
||||
|
@ -2926,8 +2955,6 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
sampleBetaData.setGammaFittingParaToUi(gammaFittingParaToUi);
|
||||
//存储重新分析字段的实体类
|
||||
SpectrumGroup spectrum_group = new SpectrumGroup();
|
||||
//声明一个map 缓存重新分析用到的数据
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
//声明一个map 缓存xeData计算后的结果
|
||||
Map<String, Object> xeMap = new HashMap<>();
|
||||
if (analyseData.isBetaEnergyValid()) {
|
||||
|
@ -2981,91 +3008,9 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
gasTmp = ftpUtil.downloadFile(sampleBetaData.getGasFilePathName(), "betaGamma");
|
||||
detTmp = ftpUtil.downloadFile(sampleBetaData.getDetFilePathName(), "betaGamma");
|
||||
if (Objects.nonNull(sampleTmp) && Objects.nonNull(gasTmp) && Objects.nonNull(detTmp)) {
|
||||
BgAnalyseResult analyseResult = EnergySpectrumHandler.bgReAnalyse(sampleTmp.getAbsolutePath(), gasTmp.getAbsolutePath(), detTmp.getAbsolutePath(), spectrum_group.BgCalPara);
|
||||
if (StringUtils.isNotBlank(analyseResult.error_log) && !analyseResult.error_log.equalsIgnoreCase("no error.")) {
|
||||
analyseResultMap.put(sampleFileName, Collections.EMPTY_LIST);
|
||||
} else {
|
||||
//生成分析操作日志
|
||||
EnergySpectrumStruct sample = phdFileUtil.analyzeFileSourceData(sampleTmp);
|
||||
EnergySpectrumStruct gas = phdFileUtil.analyzeFileSourceData(gasTmp);
|
||||
EnergySpectrumStruct det = phdFileUtil.analyzeFileSourceData(detTmp);
|
||||
String logName = sampleFileName.replace("PHD", "log");
|
||||
phdFileUtil.OutPutRnLog(analyseResult, sample, gas, det, logName);
|
||||
//存入xeData数据
|
||||
List<GardsXeResultsSpectrum> xeResultsSpectrumList = new LinkedList<>();
|
||||
GardsXeResultsSpectrum xe131m = new GardsXeResultsSpectrum();
|
||||
xe131m.setNuclideName(XeNuclideName.XE_131m.getType());
|
||||
xe131m.setConc(analyseResult.Xe131m_con);
|
||||
xe131m.setConcErr(analyseResult.Xe131m_uncer);
|
||||
xe131m.setLc(analyseResult.LC_Xe131m);
|
||||
xe131m.setMdc(analyseResult.MDC_Xe131m);
|
||||
xe131m.setNidFlag(analyseResult.XE_131m_NID_FLAG);
|
||||
xeResultsSpectrumList.add(xe131m);
|
||||
GardsXeResultsSpectrum xe133 = new GardsXeResultsSpectrum();
|
||||
xe133.setNuclideName(XeNuclideName.XE_133.getType());
|
||||
xe133.setConc(analyseResult.Xe133_con);
|
||||
xe133.setConcErr(analyseResult.Xe133_uncer);
|
||||
xe133.setLc(analyseResult.LC_Xe133);
|
||||
xe133.setMdc(analyseResult.MDC_Xe133);
|
||||
xe133.setNidFlag(analyseResult.XE_133_NID_FLAG);
|
||||
xeResultsSpectrumList.add(xe133);
|
||||
GardsXeResultsSpectrum xe133m = new GardsXeResultsSpectrum();
|
||||
xe133m.setNuclideName(XeNuclideName.XE_133m.getType());
|
||||
xe133m.setConc(analyseResult.Xe133m_con);
|
||||
xe133m.setConcErr(analyseResult.Xe133m_uncer);
|
||||
xe133m.setLc(analyseResult.LC_Xe133m);
|
||||
xe133m.setMdc(analyseResult.MDC_Xe133m);
|
||||
xe133m.setNidFlag(analyseResult.XE_133m_NID_FLAG);
|
||||
xeResultsSpectrumList.add(xe133m);
|
||||
GardsXeResultsSpectrum xe135 = new GardsXeResultsSpectrum();
|
||||
xe135.setNuclideName(XeNuclideName.XE_135.getType());
|
||||
xe135.setConc(analyseResult.Xe135_con);
|
||||
xe135.setConcErr(analyseResult.Xe135_uncer);
|
||||
xe135.setLc(analyseResult.LC_Xe135);
|
||||
xe135.setMdc(analyseResult.MDC_Xe135);
|
||||
xe135.setNidFlag(analyseResult.XE_135_NID_FLAG);
|
||||
xeResultsSpectrumList.add(xe135);
|
||||
xeMap.put("XeData", xeResultsSpectrumList);
|
||||
//新计算得到的边界值
|
||||
if (CollectionUtils.isNotEmpty(analyseResult.S_ROI_B_Boundary_start)) {
|
||||
List<Boundary> boundaryList = new LinkedList<>();
|
||||
for (int i=0; i<analyseResult.S_ROI_B_Boundary_start.size(); i++) {
|
||||
Boundary boundary = new Boundary();
|
||||
boundary.setMinX(analyseResult.S_ROI_B_Boundary_start.get(i));
|
||||
boundary.setMaxX(analyseResult.S_ROI_B_Boundary_stop.get(i));
|
||||
boundary.setMinY(analyseResult.S_ROI_G_Boundary_start.get(i));
|
||||
boundary.setMaxY(analyseResult.S_ROI_G_Boundary_stop.get(i));
|
||||
boundaryList.add(boundary);
|
||||
}
|
||||
sampleBetaData.setSampleBoundary(boundaryList);
|
||||
xeMap.put("SampleBoundary", boundaryList);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(analyseResult.G_ROI_B_Boundary_start)) {
|
||||
List<Boundary> boundaryList = new LinkedList<>();
|
||||
for (int i=0; i<analyseResult.G_ROI_B_Boundary_start.size(); i++) {
|
||||
Boundary boundary = new Boundary();
|
||||
boundary.setMinX(analyseResult.G_ROI_B_Boundary_start.get(i));
|
||||
boundary.setMaxX(analyseResult.G_ROI_B_Boundary_stop.get(i));
|
||||
boundary.setMinY(analyseResult.G_ROI_G_Boundary_start.get(i));
|
||||
boundary.setMaxY(analyseResult.G_ROI_G_Boundary_stop.get(i));
|
||||
boundaryList.add(boundary);
|
||||
}
|
||||
sampleBetaData.setGasBoundary(boundaryList);
|
||||
xeMap.put("GasBoundary", boundaryList);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(analyseResult.D_ROI_B_Boundary_start)) {
|
||||
List<Boundary> boundaryList = new LinkedList<>();
|
||||
for (int i=0; i<analyseResult.D_ROI_B_Boundary_start.size(); i++) {
|
||||
Boundary boundary = new Boundary();
|
||||
boundary.setMinX(analyseResult.D_ROI_B_Boundary_start.get(i));
|
||||
boundary.setMaxX(analyseResult.D_ROI_B_Boundary_stop.get(i));
|
||||
boundary.setMinY(analyseResult.D_ROI_G_Boundary_start.get(i));
|
||||
boundary.setMaxY(analyseResult.D_ROI_G_Boundary_stop.get(i));
|
||||
boundaryList.add(boundary);
|
||||
}
|
||||
sampleBetaData.setDetBoundary(boundaryList);
|
||||
xeMap.put("DetBoundary", boundaryList);
|
||||
}
|
||||
//调用分析方法进行分析操作
|
||||
boolean bRet = phdFileUtil.analyzeSpectrum(sampleTmp, gasTmp, detTmp, spectrum_group.BgCalPara, xeMap, sampleBetaData);
|
||||
if (bRet) {
|
||||
if (analyseData.isQcData()) {
|
||||
if (StringUtils.isNotBlank(sampleBetaData.getQcFilePathName())) {
|
||||
EnergySpectrumStruct struct = sampleBetaData.getQcStruct();
|
||||
|
@ -3074,6 +3019,23 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
}
|
||||
}
|
||||
}
|
||||
List<Boundary> sampleBoundary = (List<Boundary>) xeMap.get("SampleBoundary");
|
||||
if(CollectionUtils.isNotEmpty(sampleBoundary)) {
|
||||
betaDataFile.setSampleBoundary(sampleBoundary);
|
||||
}
|
||||
List<Boundary> gasBoundary = (List<Boundary>) xeMap.get("GasBoundary");
|
||||
if(CollectionUtils.isNotEmpty(gasBoundary)) {
|
||||
betaDataFile.setGasBoundary(gasBoundary);
|
||||
}
|
||||
List<Boundary> detBoundary = (List<Boundary>) xeMap.get("DetBoundary");
|
||||
if(CollectionUtils.isNotEmpty(detBoundary)) {
|
||||
betaDataFile.setDetBoundary(detBoundary);
|
||||
}
|
||||
List<Boundary> qcBoundary = (List<Boundary>) xeMap.get("QCBoundary");
|
||||
if(CollectionUtils.isNotEmpty(qcBoundary)) {
|
||||
betaDataFile.setQcBoundary(qcBoundary);
|
||||
}
|
||||
List<GardsXeResultsSpectrum> xeResultsSpectrumList = (List<GardsXeResultsSpectrum>) xeMap.get("XeData");
|
||||
if (CollectionUtils.isNotEmpty(xeResultsSpectrumList)){
|
||||
for (GardsXeResultsSpectrum xeData:xeResultsSpectrumList) {
|
||||
Double conc = xeData.getConc();
|
||||
|
@ -3096,8 +3058,129 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
sampleBetaData.setBProcessed(true);
|
||||
sampleBetaData.setSaveAnalysisResult(true);
|
||||
}
|
||||
analyseResultMap.put(sampleFileName, xeResultsSpectrumList);
|
||||
analyseResultMap.put(sampleFileName, xeMap);
|
||||
} else {
|
||||
xeMap.clear();
|
||||
xeMap.put("XeData", Collections.EMPTY_LIST);
|
||||
analyseResultMap.put(sampleFileName, xeMap);
|
||||
}
|
||||
// BgAnalyseResult analyseResult = EnergySpectrumHandler.bgReAnalyse(sampleTmp.getAbsolutePath(), gasTmp.getAbsolutePath(), detTmp.getAbsolutePath(), spectrum_group.BgCalPara);
|
||||
// if (StringUtils.isNotBlank(analyseResult.error_log) && !analyseResult.error_log.equalsIgnoreCase("no error.")) {
|
||||
// analyseResultMap.put(sampleFileName, Collections.EMPTY_LIST);
|
||||
// } else {
|
||||
// //生成分析操作日志
|
||||
// EnergySpectrumStruct sample = phdFileUtil.analyzeFileSourceData(sampleTmp);
|
||||
// EnergySpectrumStruct gas = phdFileUtil.analyzeFileSourceData(gasTmp);
|
||||
// EnergySpectrumStruct det = phdFileUtil.analyzeFileSourceData(detTmp);
|
||||
// String logName = sampleFileName.replace("PHD", "log");
|
||||
// phdFileUtil.OutPutRnLog(analyseResult, sample, gas, det, logName);
|
||||
// //存入xeData数据
|
||||
// List<GardsXeResultsSpectrum> xeResultsSpectrumList = new LinkedList<>();
|
||||
// GardsXeResultsSpectrum xe131m = new GardsXeResultsSpectrum();
|
||||
// xe131m.setNuclideName(XeNuclideName.XE_131m.getType());
|
||||
// xe131m.setConc(analyseResult.Xe131m_con);
|
||||
// xe131m.setConcErr(analyseResult.Xe131m_uncer);
|
||||
// xe131m.setLc(analyseResult.LC_Xe131m);
|
||||
// xe131m.setMdc(analyseResult.MDC_Xe131m);
|
||||
// xe131m.setNidFlag(analyseResult.XE_131m_NID_FLAG);
|
||||
// xeResultsSpectrumList.add(xe131m);
|
||||
// GardsXeResultsSpectrum xe133 = new GardsXeResultsSpectrum();
|
||||
// xe133.setNuclideName(XeNuclideName.XE_133.getType());
|
||||
// xe133.setConc(analyseResult.Xe133_con);
|
||||
// xe133.setConcErr(analyseResult.Xe133_uncer);
|
||||
// xe133.setLc(analyseResult.LC_Xe133);
|
||||
// xe133.setMdc(analyseResult.MDC_Xe133);
|
||||
// xe133.setNidFlag(analyseResult.XE_133_NID_FLAG);
|
||||
// xeResultsSpectrumList.add(xe133);
|
||||
// GardsXeResultsSpectrum xe133m = new GardsXeResultsSpectrum();
|
||||
// xe133m.setNuclideName(XeNuclideName.XE_133m.getType());
|
||||
// xe133m.setConc(analyseResult.Xe133m_con);
|
||||
// xe133m.setConcErr(analyseResult.Xe133m_uncer);
|
||||
// xe133m.setLc(analyseResult.LC_Xe133m);
|
||||
// xe133m.setMdc(analyseResult.MDC_Xe133m);
|
||||
// xe133m.setNidFlag(analyseResult.XE_133m_NID_FLAG);
|
||||
// xeResultsSpectrumList.add(xe133m);
|
||||
// GardsXeResultsSpectrum xe135 = new GardsXeResultsSpectrum();
|
||||
// xe135.setNuclideName(XeNuclideName.XE_135.getType());
|
||||
// xe135.setConc(analyseResult.Xe135_con);
|
||||
// xe135.setConcErr(analyseResult.Xe135_uncer);
|
||||
// xe135.setLc(analyseResult.LC_Xe135);
|
||||
// xe135.setMdc(analyseResult.MDC_Xe135);
|
||||
// xe135.setNidFlag(analyseResult.XE_135_NID_FLAG);
|
||||
// xeResultsSpectrumList.add(xe135);
|
||||
// xeMap.put("XeData", xeResultsSpectrumList);
|
||||
// //新计算得到的边界值
|
||||
// if (CollectionUtils.isNotEmpty(analyseResult.S_ROI_B_Boundary_start)) {
|
||||
// List<Boundary> boundaryList = new LinkedList<>();
|
||||
// for (int i=0; i<analyseResult.S_ROI_B_Boundary_start.size(); i++) {
|
||||
// Boundary boundary = new Boundary();
|
||||
// boundary.setMinX(analyseResult.S_ROI_B_Boundary_start.get(i));
|
||||
// boundary.setMaxX(analyseResult.S_ROI_B_Boundary_stop.get(i));
|
||||
// boundary.setMinY(analyseResult.S_ROI_G_Boundary_start.get(i));
|
||||
// boundary.setMaxY(analyseResult.S_ROI_G_Boundary_stop.get(i));
|
||||
// boundaryList.add(boundary);
|
||||
// }
|
||||
// sampleBetaData.setSampleBoundary(boundaryList);
|
||||
// xeMap.put("SampleBoundary", boundaryList);
|
||||
// }
|
||||
// if (CollectionUtils.isNotEmpty(analyseResult.G_ROI_B_Boundary_start)) {
|
||||
// List<Boundary> boundaryList = new LinkedList<>();
|
||||
// for (int i=0; i<analyseResult.G_ROI_B_Boundary_start.size(); i++) {
|
||||
// Boundary boundary = new Boundary();
|
||||
// boundary.setMinX(analyseResult.G_ROI_B_Boundary_start.get(i));
|
||||
// boundary.setMaxX(analyseResult.G_ROI_B_Boundary_stop.get(i));
|
||||
// boundary.setMinY(analyseResult.G_ROI_G_Boundary_start.get(i));
|
||||
// boundary.setMaxY(analyseResult.G_ROI_G_Boundary_stop.get(i));
|
||||
// boundaryList.add(boundary);
|
||||
// }
|
||||
// sampleBetaData.setGasBoundary(boundaryList);
|
||||
// xeMap.put("GasBoundary", boundaryList);
|
||||
// }
|
||||
// if (CollectionUtils.isNotEmpty(analyseResult.D_ROI_B_Boundary_start)) {
|
||||
// List<Boundary> boundaryList = new LinkedList<>();
|
||||
// for (int i=0; i<analyseResult.D_ROI_B_Boundary_start.size(); i++) {
|
||||
// Boundary boundary = new Boundary();
|
||||
// boundary.setMinX(analyseResult.D_ROI_B_Boundary_start.get(i));
|
||||
// boundary.setMaxX(analyseResult.D_ROI_B_Boundary_stop.get(i));
|
||||
// boundary.setMinY(analyseResult.D_ROI_G_Boundary_start.get(i));
|
||||
// boundary.setMaxY(analyseResult.D_ROI_G_Boundary_stop.get(i));
|
||||
// boundaryList.add(boundary);
|
||||
// }
|
||||
// sampleBetaData.setDetBoundary(boundaryList);
|
||||
// xeMap.put("DetBoundary", boundaryList);
|
||||
// }
|
||||
// if (analyseData.isQcData()) {
|
||||
// if (StringUtils.isNotBlank(sampleBetaData.getQcFilePathName())) {
|
||||
// EnergySpectrumStruct struct = sampleBetaData.getQcStruct();
|
||||
// if (Objects.nonNull(struct)) {
|
||||
// phdFileUtil.CalQCBoundary(betaList, gammaList, betaFittingParaToUi, gammaFittingParaToUi, struct, xeMap, sampleBetaData);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// if (CollectionUtils.isNotEmpty(xeResultsSpectrumList)){
|
||||
// for (GardsXeResultsSpectrum xeData:xeResultsSpectrumList) {
|
||||
// Double conc = xeData.getConc();
|
||||
// Double mdc = xeData.getMdc();
|
||||
// if (conc < 0){
|
||||
// xeData.setColor("red");
|
||||
// xeData.setNidFlag(0);
|
||||
// } else if (0<conc && conc < mdc) {
|
||||
// xeData.setColor("#ffcc30");
|
||||
// xeData.setNidFlag(0);
|
||||
// } else if (conc > mdc) {
|
||||
// xeData.setColor("green");
|
||||
// xeData.setNidFlag(1);
|
||||
// }
|
||||
// xeData.setMdc(Double.valueOf(String.format("%."+(6 - String.valueOf(Math.abs(xeData.getMdc())).substring(0, String.valueOf(Math.abs(xeData.getMdc())).lastIndexOf(StringPool.DOT)).length())+"f", xeData.getMdc())));
|
||||
// xeData.setConc(Double.valueOf(String.format("%."+(6 - String.valueOf(Math.abs(xeData.getConc())).substring(0, String.valueOf(Math.abs(xeData.getConc())).lastIndexOf(StringPool.DOT)).length())+"f", xeData.getConc())));
|
||||
// xeData.setConcErr(Double.valueOf(String.format("%."+((6 - String.valueOf(Math.abs(xeData.getConcErr())).substring(0, String.valueOf(Math.abs(xeData.getConcErr())).lastIndexOf(StringPool.DOT)).length()))+"f", xeData.getConcErr())));
|
||||
// }
|
||||
// sampleBetaData.setXeResultsSpectrumList(xeResultsSpectrumList);
|
||||
// sampleBetaData.setBProcessed(true);
|
||||
// sampleBetaData.setSaveAnalysisResult(true);
|
||||
// }
|
||||
// analyseResultMap.put(sampleFileName, xeResultsSpectrumList);
|
||||
// }
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
@ -3165,6 +3248,22 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
phdFileUtil.CalQCBoundary(betaList, gammaList, betaFittingParaToUi, gammaFittingParaToUi, struct, map, betaDataFile);
|
||||
}
|
||||
}
|
||||
List<Boundary> sampleBoundary = (List<Boundary>) map.get("SampleBoundary");
|
||||
if(CollectionUtils.isNotEmpty(sampleBoundary)) {
|
||||
betaDataFile.setSampleBoundary(sampleBoundary);
|
||||
}
|
||||
List<Boundary> gasBoundary = (List<Boundary>) map.get("GasBoundary");
|
||||
if(CollectionUtils.isNotEmpty(gasBoundary)) {
|
||||
betaDataFile.setGasBoundary(gasBoundary);
|
||||
}
|
||||
List<Boundary> detBoundary = (List<Boundary>) map.get("DetBoundary");
|
||||
if(CollectionUtils.isNotEmpty(detBoundary)) {
|
||||
betaDataFile.setDetBoundary(detBoundary);
|
||||
}
|
||||
List<Boundary> qcBoundary = (List<Boundary>) map.get("QCBoundary");
|
||||
if(CollectionUtils.isNotEmpty(qcBoundary)) {
|
||||
betaDataFile.setQcBoundary(qcBoundary);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(map)) {
|
||||
List<GardsXeResultsSpectrum> xeDataList = (List<GardsXeResultsSpectrum>) map.get("XeData");
|
||||
if (CollectionUtils.isNotEmpty(xeDataList)){
|
||||
|
@ -3229,9 +3328,6 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
if (CollectionUtils.isNotEmpty(sampleFileNames)) {
|
||||
for (int i=0; i<sampleFileNames.size(); i++) {
|
||||
String sampleFileName = sampleFileNames.get(i);
|
||||
String gasFileName = gasFileNames.get(i);
|
||||
String detFileName = detFileNames.get(i);
|
||||
String qcFileName = qcFileNames.get(i);
|
||||
BgCalibratePara BgCalPara = null;
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
//获取缓存数据
|
||||
|
@ -3263,6 +3359,22 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
phdFileUtil.CalQCBoundary(betaList, gammaList, betaFittingParaToUi, gammaFittingParaToUi, struct, map, betaDataFile);
|
||||
}
|
||||
}
|
||||
List<Boundary> sampleBoundary = (List<Boundary>) map.get("SampleBoundary");
|
||||
if(CollectionUtils.isNotEmpty(sampleBoundary)) {
|
||||
betaDataFile.setSampleBoundary(sampleBoundary);
|
||||
}
|
||||
List<Boundary> gasBoundary = (List<Boundary>) map.get("GasBoundary");
|
||||
if(CollectionUtils.isNotEmpty(gasBoundary)) {
|
||||
betaDataFile.setGasBoundary(gasBoundary);
|
||||
}
|
||||
List<Boundary> detBoundary = (List<Boundary>) map.get("DetBoundary");
|
||||
if(CollectionUtils.isNotEmpty(detBoundary)) {
|
||||
betaDataFile.setDetBoundary(detBoundary);
|
||||
}
|
||||
List<Boundary> qcBoundary = (List<Boundary>) map.get("QCBoundary");
|
||||
if(CollectionUtils.isNotEmpty(qcBoundary)) {
|
||||
betaDataFile.setQcBoundary(qcBoundary);
|
||||
}
|
||||
List<GardsXeResultsSpectrum> xeDataList = (List<GardsXeResultsSpectrum>) map.get("XeData");
|
||||
if (CollectionUtils.isNotEmpty(xeDataList)){
|
||||
for (GardsXeResultsSpectrum xeData:xeDataList) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user