Commit 2e753bfd authored by huyuchen's avatar huyuchen

huych-工行回单下载

parent 7889ff38
......@@ -1059,7 +1059,6 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
// 私钥路径(用于身份验证)
//E:\IdeaProjects\yifu_mvp\yifu-ekp\yifu-ekp-biz\src\main\resources\icbc\icbc
String privateKeyPath = "";
// URL url = getClass().getClassLoader().getResource("icbc");
InputStream inputStream = getClass().getClassLoader().getResourceAsStream("icbc");
if (inputStream == null) {
throw new FileNotFoundException("资源未找到");
......@@ -1076,7 +1075,6 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
}
}
privateKeyPath = tempFile.getAbsolutePath();
// privateKeyPath = url.getPath();
// 远程目录路径
log.info("秘钥文件目录: " + privateKeyPath);
......@@ -1141,14 +1139,9 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
}
String tempDir = System.getProperty("java.io.tmpdir") + "sftp_processing/" + System.currentTimeMillis() + "/";
File dir = new File(tempDir);
if (!dir.exists()) {
if (!dir.mkdirs()) {
throw new IOException("Failed to create directory: " + tempDir);
}
if (!dir.exists() && !dir.mkdirs()) {
throw new IOException("Failed to create directory: " + tempDir);
}
// 3. 创建临时目录 System.getProperty("user.dir") + "/yifu-ekp/yifu-ekp-biz/src/main/resources/tem/sftp_processing/" + System.currentTimeMillis() + "/";
// String tempDir = privateKeyPath + "/temp/sftp_processing/" + System.currentTimeMillis() + "/";
// String tempDir = System.getProperty("user.dir") + "/yifu-ekp/yifu-ekp-biz/src/main/resources/temp/sftp_processing/" + System.currentTimeMillis() + "/";
log.info("临时目录: " + tempDir);
// 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