Merge remote-tracking branch 'origin/station' into station

This commit is contained in:
qiaoqinzheng 2023-10-26 11:57:30 +08:00
commit f6f540cef6
5 changed files with 15 additions and 6 deletions

View File

@ -5,6 +5,7 @@ import com.google.common.collect.Lists;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.properties.SpectrumPathProperties;
import org.jeecg.modules.base.enums.DataType;
import org.jeecg.modules.exception.FileRepeatException;
import org.jeecg.modules.file.FileOperation;
import java.io.File;
import java.io.FileNotFoundException;
@ -186,8 +187,8 @@ public abstract class AbstractSpectrumHandler extends AbstractChain {
* 处理解析失败的文件上传到undeal目录
* @throws FileNotFoundException
*/
protected void handleParseingFailFile() throws FileNotFoundException {
if(!fromUndel){
protected void handleParseingFailFile(Exception e) throws FileNotFoundException {
if(!fromUndel && !(e instanceof FileRepeatException)){
try {
//解析失败会把文件移动到undeal目录
final String rootPath = spectrumServiceQuotes.getSpectrumPathProperties().getRootPath();

View File

@ -2,6 +2,8 @@ package org.jeecg.modules.spectrum;
import org.jeecg.modules.base.enums.DataType;
import org.jeecg.modules.base.enums.SampleStatus;
import org.jeecg.modules.exception.FileRepeatException;
import java.util.Objects;
/**
@ -55,7 +57,7 @@ public class DetbkphdSpectrum extends AbstractS_D_Q_G_SpectrumHandler {
super.updateStatus();
//处理解析失败的文件上传到undeal目录
super.handleParseingFailFile();
super.handleParseingFailFile(e);
throw e;
}finally {
if(Objects.nonNull(this.parsingProcessLog)){

View File

@ -3,6 +3,8 @@ package org.jeecg.modules.spectrum;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.base.enums.DataType;
import org.jeecg.modules.base.enums.SampleStatus;
import org.jeecg.modules.exception.FileRepeatException;
import java.util.Objects;
/**
@ -57,7 +59,7 @@ public class GasbkphdSpectrum extends AbstractS_D_Q_G_SpectrumHandler {
super.updateStatus();
//处理解析失败的文件上传到undeal目录
super.handleParseingFailFile();
super.handleParseingFailFile(e);
throw e;
}finally {
if(Objects.nonNull(this.parsingProcessLog)){

View File

@ -2,6 +2,8 @@ package org.jeecg.modules.spectrum;
import org.jeecg.modules.base.enums.DataType;
import org.jeecg.modules.base.enums.SampleStatus;
import org.jeecg.modules.exception.FileRepeatException;
import java.util.Objects;
/**
@ -56,7 +58,7 @@ public class QcphdSpectrum extends AbstractS_D_Q_G_SpectrumHandler {
super.updateStatus();
//处理解析失败的文件上传到undeal目录
super.handleParseingFailFile();
super.handleParseingFailFile(e);
throw e;
}finally {
if(Objects.nonNull(this.parsingProcessLog)){

View File

@ -3,6 +3,8 @@ package org.jeecg.modules.spectrum;
import org.jeecg.modules.base.enums.DataType;
import org.jeecg.modules.base.enums.SampleStatus;
import org.jeecg.modules.base.enums.SystemType;
import org.jeecg.modules.exception.FileRepeatException;
import java.util.Objects;
/**
@ -59,7 +61,7 @@ public class SamplephdSpectrum extends AbstractS_D_Q_G_SpectrumHandler {
super.updateStatus();
//处理解析失败的文件上传到undeal目录
super.handleParseingFailFile();
super.handleParseingFailFile(e);
throw e;
}finally {
if(Objects.nonNull(this.parsingProcessLog)){