fix:1.修改Sample分析异常时针对违反唯一性约束的逻辑
This commit is contained in:
parent
ba810df5d2
commit
00a61f60c6
|
@ -75,21 +75,20 @@ public class SamplephdSpectrum extends AbstractS_D_Q_G_SpectrumHandler {
|
||||||
//异常返回文件名称用于报错日志
|
//异常返回文件名称用于报错日志
|
||||||
super.returnFileName.append(super.spectrumFile.getName());
|
super.returnFileName.append(super.spectrumFile.getName());
|
||||||
|
|
||||||
|
//修改状态为解析失败
|
||||||
|
super.status = SampleStatus.FAIL.getValue();
|
||||||
if (e instanceof AnalyseException) {
|
if (e instanceof AnalyseException) {
|
||||||
AnalyseException exception = (AnalyseException) e;
|
AnalyseException exception = (AnalyseException) e;
|
||||||
if (exception.isDuplicateKeyException()) {
|
if (exception.isDuplicateKeyException()) {
|
||||||
ErrorLogManager.getInstance().write(new SpectrumErrorEvent(new Date(), ErrorType.INSERT_ERROR, super.spectrumFile.getName(), String.valueOf(this.sampleData.getSampleId())));
|
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 {
|
} else {
|
||||||
//修改状态为解析失败
|
|
||||||
super.status = SampleStatus.FAIL.getValue();
|
|
||||||
super.updateStatus();
|
super.updateStatus();
|
||||||
|
|
||||||
//处理解析失败的文件
|
|
||||||
super.handleParseingFailFile(e);
|
|
||||||
}
|
}
|
||||||
|
//处理解析失败的文件
|
||||||
|
super.handleParseingFailFile(e);
|
||||||
throw e;
|
throw e;
|
||||||
}finally {
|
}finally {
|
||||||
if(Objects.nonNull(this.parsingProcessLog)){
|
if(Objects.nonNull(this.parsingProcessLog)){
|
||||||
|
|
Loading…
Reference in New Issue
Block a user