fix:1.修改Sample分析异常时针对违反唯一性约束的逻辑

This commit is contained in:
panbaolin 2024-01-12 15:07:39 +08:00
parent ba810df5d2
commit 00a61f60c6

View File

@ -75,21 +75,20 @@ public class SamplephdSpectrum extends AbstractS_D_Q_G_SpectrumHandler {
//异常返回文件名称用于报错日志
super.returnFileName.append(super.spectrumFile.getName());
//修改状态为解析失败
super.status = SampleStatus.FAIL.getValue();
if (e instanceof AnalyseException) {
AnalyseException exception = (AnalyseException) e;
if (exception.isDuplicateKeyException()) {
ErrorLogManager.getInstance().write(new SpectrumErrorEvent(new Date(), ErrorType.INSERT_ERROR, super.spectrumFile.getName(), String.valueOf(this.sampleData.getSampleId())));
}else{
super.updateStatus();
}
//处理解析失败的文件
super.handleParseingFailFile(e);
} else {
//修改状态为解析失败
super.status = SampleStatus.FAIL.getValue();
super.updateStatus();
//处理解析失败的文件
super.handleParseingFailFile(e);
}
//处理解析失败的文件
super.handleParseingFailFile(e);
throw e;
}finally {
if(Objects.nonNull(this.parsingProcessLog)){