Commit b1f989e0 authored by huyuchen's avatar huyuchen

huych-工行回单下载

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