fix:1.修改保存临时文件名称以UUID命名

This commit is contained in:
panbaolin 2023-10-25 10:36:49 +08:00
parent bbf2c3a05c
commit 25ae2e18a9
2 changed files with 3 additions and 1 deletions

View File

@ -161,6 +161,7 @@ public abstract class AbstractS_D_Q_G_SpectrumHandler extends AbstractSpectrumHa
final GardsSampleData query = spectrumServiceQuotes.getSampleDataService().findByInputFileName(super.spectrumFileRelativePath);
if(Objects.nonNull(query)){
this.sampleData = query;
this.endIntoDatabaseTime = new Date();
//设置文件重复标记为true
this.parsingProcessLog.setFileRepeat(true);
throw new FileRepeatException("file repeat");

View File

@ -13,6 +13,7 @@ import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.List;
import java.util.Objects;
import java.util.UUID;
/**
* 能谱处理模版
@ -143,7 +144,7 @@ public abstract class AbstractSpectrumHandler extends AbstractChain {
StringBuilder localPath = new StringBuilder();
localPath.append(this.spectrumServiceQuotes.getTaskProperties().getTemporaryStoragePath());
localPath.append(File.separator);
localPath.append(System.currentTimeMillis()+StringConstant.UNDER_LINE+RandomUtils.nextInt());
localPath.append(UUID.randomUUID());
localPath.append(value.getSuffix());
this.spectrumFile = FileUtil.writeString(this.mailContent, localPath.toString(), "UTF-8");
// 能谱数据类型如果是 SPHDP 或者 SPHDF 统一改为 SAMPLEPHD