From f7fe56ce449509db99381d0473064c76663ed730 Mon Sep 17 00:00:00 2001 From: nieziyan Date: Mon, 30 Oct 2023 16:23:02 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9Apath?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jeecg/modules/service/impl/SpectrumFileServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/SpectrumFileServiceImpl.java b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/SpectrumFileServiceImpl.java index bec0bf81..92f79084 100644 --- a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/SpectrumFileServiceImpl.java +++ b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/SpectrumFileServiceImpl.java @@ -99,6 +99,7 @@ public class SpectrumFileServiceImpl implements ISpectrumFileService { if (!created) return Result.error(Prompt.DIR_CREATE_FAIL + filePath); // 上传所有文件 System.out.println("filelist>>>>"+fileList.size()); + String rootPath = spectrumPathProperties.getRootPath(); for (File oneFile : fileList) { String fileName = oneFile.getName(); // 判断能谱文件名称是否符合规则,不符合则进行重命名 @@ -107,7 +108,7 @@ public class SpectrumFileServiceImpl implements ISpectrumFileService { String suffix = nameStandUtil.GetSuffix(struct.data_type, struct.spectrum_quantity, String.valueOf(struct.acquisition_live_time)); fileName = oneFile.getName().substring(0, 23)+suffix; } - String fullFilePath = filePath + slash + fileName; + String fullFilePath = rootPath + filePath + slash + fileName; System.out.println("fullFilePath>>>>"+fullFilePath); FileInputStream local = new FileInputStream(oneFile); ftpClient.storeFile(fullFilePath, local);