自动处理增加逻辑判断,没有到调用分析步骤导致空指针问题修改

自动处理增加逻辑,调用dll分析后如果失败了,将分析失败的内容添加到errorLog中
This commit is contained in:
qiaoqinzheng 2024-01-02 14:42:59 +08:00
parent 11f942072b
commit 6b545ab96c
2 changed files with 2 additions and 1 deletions

View File

@ -172,7 +172,7 @@ public class ParsingProcessLog extends AbstractAutoLogOrReport{
this.setDetAndGasIdLog(); this.setDetAndGasIdLog();
//获取analyseResult //获取analyseResult
BgAnalyseResult analyseResult = sample_B_Analysis.analyseResult; BgAnalyseResult analyseResult = sample_B_Analysis.analyseResult;
if (StringUtils.isNotBlank(analyseResult.error_log) && !analyseResult.error_log.equalsIgnoreCase("no error.")) { if (Objects.nonNull(analyseResult) && !analyseResult.analyse_flag) {
analysisResultFlag = true; analysisResultFlag = true;
} }
//如果分析结果错误 //如果分析结果错误

View File

@ -227,6 +227,7 @@ public class Sample_B_Analysis implements BlockConstant {
System.out.println(analyseResult); System.out.println(analyseResult);
this.analyseResult = analyseResult; this.analyseResult = analyseResult;
if(Objects.isNull(analyseResult) || !analyseResult.analyse_flag){ if(Objects.isNull(analyseResult) || !analyseResult.analyse_flag){
ErrorLogManager.getInstance().write(new SpectrumErrorEvent(new Date(), analyseResult.error_log, this.phdFileName));
throw new BAnalyseException("THE PHD file cannot be parsed:"+this.sampleFileFinalPath+","+this.gasFileFinalPath+","+this.detFileFinalPath); throw new BAnalyseException("THE PHD file cannot be parsed:"+this.sampleFileFinalPath+","+this.gasFileFinalPath+","+this.detFileFinalPath);
} }
} }