Commit b1f989e0 authored by huyuchen's avatar huyuchen

huych-工行回单下载

parent cedf78ce
......@@ -1059,24 +1059,11 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
// 私钥路径(用于身份验证)
//E:\IdeaProjects\yifu_mvp\yifu-ekp\yifu-ekp-biz\src\main\resources\icbc\icbc
String privateKeyPath = "";
String privateKeyPath1 = "";
String privateKeyPath2 = "";
String privateKeyPath3 = "";
String privateKeyPath4 = "";
String privateKeyPath5 = "";
privateKeyPath = System.getProperty("user.dir") + "/yifu-ekp/yifu-ekp-biz/src/main/resources/icbc/icbc";
privateKeyPath1 = this.getClass().getResource("/icbc/icbc").getPath();
privateKeyPath2 = System.getProperty("icbc.dir");
privateKeyPath3 = System.getProperty("classpath:/icbc/icbc");
privateKeyPath4 = System.getProperty("classpath:/icbc/icbc/");
privateKeyPath5 = System.getProperty("classpath:/icbc/");
URL url = getClass().getClassLoader().getResource("icbc");
privateKeyPath = url.getPath();
// 远程目录路径
log.info("秘钥文件目录: " + privateKeyPath);
log.info("秘钥文件目录1: " + privateKeyPath1);
log.info("秘钥文件目录1: " + privateKeyPath2);
log.info("秘钥文件目录1: " + privateKeyPath3);
log.info("秘钥文件目录1: " + privateKeyPath4);
log.info("秘钥文件目录1: " + privateKeyPath5);
// 远程目录路径
String remoteDir = "/JFTStatementDownload/download";
Session session = null;
......@@ -1091,7 +1078,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
try {
JSch jsch = new JSch();
// 添加私钥(注意:需要是没有密码保护的私钥)
jsch.addIdentity(privateKeyPath2);
jsch.addIdentity(privateKeyPath);
// 创建会话
session = jsch.getSession(username, host, port);
......@@ -1137,10 +1124,9 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
continue;
}
// 3. 创建临时目录
String tempDir = "/resources/tem/sftp_processing/" + System.currentTimeMillis() + "/";
// 3. 创建临时目录 System.getProperty("user.dir") + "/yifu-ekp/yifu-ekp-biz/src/main/resources/tem/sftp_processing/" + System.currentTimeMillis() + "/";
String tempDir = privateKeyPath.replace("/icbc","") + "/temp/sftp_processing/" + System.currentTimeMillis() + "/";
log.info("临时目录: " + privateKeyPath);
//System.getProperty("user.dir") + "/yifu-ekp/yifu-ekp-biz/src/main/resources/tem/sftp_processing/" + System.currentTimeMillis() + "/";
new File(tempDir).mkdirs();
// 4. 下载并解压压缩包
......
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