|
|
|
@ -35,20 +35,19 @@ public class FileServiceImpl implements FileService {
|
|
|
|
|
throw new BaseException("未找到产品条码"+sfc);
|
|
|
|
|
}
|
|
|
|
|
String itemBo = sfcServiceById.getItemBo();
|
|
|
|
|
String path="/"+ StringUtil.trimHandle(itemBo)+"_"+StringUtil.trimRevision(itemBo)+"/";
|
|
|
|
|
String path="/"+ StringUtil.trimHandle(itemBo)+"_"+StringUtil.trimRevision(itemBo);
|
|
|
|
|
FTPClient connect = null;
|
|
|
|
|
Map<String,String> pathMap = new HashMap<>();
|
|
|
|
|
try {
|
|
|
|
|
connect = cappFtpClient.connect();
|
|
|
|
|
String directory = path;
|
|
|
|
|
//更换目录到当前目录
|
|
|
|
|
connect.changeWorkingDirectory(directory);
|
|
|
|
|
connect.changeWorkingDirectory(path);
|
|
|
|
|
FTPFile[] files = connect.listFiles();
|
|
|
|
|
if(files!=null){
|
|
|
|
|
for (int i = 0; i < files.length; i++) {
|
|
|
|
|
if(files[i].isFile()){
|
|
|
|
|
String filename=files[i].getName();
|
|
|
|
|
pathMap.put(filename,address+filename);
|
|
|
|
|
pathMap.put(filename,address+path+"/"+filename);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|