Commit ca4723f6 authored by 陈宏杰's avatar 陈宏杰

重命名

parent ca643a87
...@@ -148,7 +148,7 @@ public class BaiHangFileReportService { ...@@ -148,7 +148,7 @@ public class BaiHangFileReportService {
} }
} }
if (!CollectionUtils.isEmpty(encryptFileNameList)) { if (!CollectionUtils.isEmpty(encryptFileNameList)) {
File file = new File(HOST_PATH+"存量报送加密文件名称集合_"+type+"_"+DateUtils.formatDate(new Date(),"yyyyMMdd")+".txt"); File file = new File(HOST_PATH + type + "_" + DateUtils.formatDate(new Date(),"yyyyMMdd") + ".txt");
FileUtils.writeLines(file,encryptFileNameList,Boolean.TRUE); FileUtils.writeLines(file,encryptFileNameList,Boolean.TRUE);
} }
} catch (Exception e) { } catch (Exception e) {
...@@ -829,15 +829,20 @@ public class BaiHangFileReportService { ...@@ -829,15 +829,20 @@ public class BaiHangFileReportService {
subFile = new File(HOST_PATH + fileName); subFile = new File(HOST_PATH + fileName);
if (subFile.exists()) { if (subFile.exists()) {
log.info("开始上传文件 {} 到百行ftp服务器...",fileName); log.info("开始上传文件 {} 到百行ftp服务器...",fileName);
try {
SftpUtil.uploadFile(sftp,baiHangFtpDataDirectory,HOST_PATH + fileName); SftpUtil.uploadFile(sftp,baiHangFtpDataDirectory,HOST_PATH + fileName);
log.info("文件 {} 已上传到百行ftp服务器",fileName); log.info("文件 {} 已上传到百行ftp服务器",fileName);
} catch (Exception e) {
log.error("文件 {} 上传百行ftp服务器失败,错误信息: {}",fileName,e);
}
} else { } else {
log.error("文件 {} 不存在...",fileName); log.error("文件 {} 不存在",fileName);
} }
} }
} }
sftp.logout();
} else { } else {
log.error("文件 {} 不存在...",collectFileName); log.error("文件 {} 不存在",collectFileName);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment