beta分析错误的情况下更新边界值,不更新XeData

This commit is contained in:
qiaoqinzheng 2023-11-16 18:15:08 +08:00
parent 44b9917336
commit 781d289262
2 changed files with 44 additions and 8 deletions

View File

@ -679,7 +679,43 @@ public class PHDFileUtil extends AbstractLogOrReport {
analyseResult = EnergySpectrumHandler.bgReAnalyse(sampleTmp.getAbsolutePath(), gasTmp.getAbsolutePath(), detTmp.getAbsolutePath(), BgCalPara);
}
if (StringUtils.isNotBlank(analyseResult.error_log) && !analyseResult.error_log.equalsIgnoreCase("no error.")) {
System.out.println(analyseResult.error_log);
//新计算得到的边界值
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);
}
map.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);
}
map.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);
}
map.put("DetBoundary", boundaryList);
}
bRet = false;
return bRet;
} else {

View File

@ -2942,7 +2942,6 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
if (Objects.nonNull(sampleTmp) && Objects.nonNull(gasTmp) && Objects.nonNull(detTmp)) {
//调用分析方法进行分析操作
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();
@ -2951,6 +2950,7 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
}
}
}
if (bRet) {
List<Boundary> sampleBoundary = (List<Boundary>) xeMap.get("SampleBoundary");
if(CollectionUtils.isNotEmpty(sampleBoundary)) {
betaDataFile.setSampleBoundary(sampleBoundary);