fix:path
This commit is contained in:
parent
010f06f695
commit
f7fe56ce44
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user