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);