Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
12fd1ec9
Commit
12fd1ec9
authored
May 27, 2025
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huych-工行回单下载
parent
492b6c4f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
6 deletions
+19
-6
IcbcTransactionFlowIssueService.java
.../plus/v1/ekp/service/IcbcTransactionFlowIssueService.java
+3
-1
IcbcTransactionFlowIssueServiceImpl.java
...ekp/service/impl/IcbcTransactionFlowIssueServiceImpl.java
+16
-5
No files found.
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/IcbcTransactionFlowIssueService.java
View file @
12fd1ec9
...
@@ -8,6 +8,8 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
...
@@ -8,6 +8,8 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.net.URISyntaxException
;
/**
/**
* 聚富通代发工资相关
* 聚富通代发工资相关
...
@@ -75,6 +77,6 @@ public interface IcbcTransactionFlowIssueService extends IService<EkpSocialInfo>
...
@@ -75,6 +77,6 @@ public interface IcbcTransactionFlowIssueService extends IService<EkpSocialInfo>
**/
**/
R
<
String
>
doGetEkpBankStatus
();
R
<
String
>
doGetEkpBankStatus
();
R
getPdfFile
();
R
getPdfFile
()
throws
IOException
,
URISyntaxException
;
}
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/impl/IcbcTransactionFlowIssueServiceImpl.java
View file @
12fd1ec9
...
@@ -33,6 +33,7 @@ import lombok.extern.log4j.Log4j2;
...
@@ -33,6 +33,7 @@ import lombok.extern.log4j.Log4j2;
import
org.apache.commons.io.FileUtils
;
import
org.apache.commons.io.FileUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.core.io.ClassPathResource
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -42,6 +43,7 @@ import javax.servlet.http.HttpServletResponse;
...
@@ -42,6 +43,7 @@ import javax.servlet.http.HttpServletResponse;
import
java.io.*
;
import
java.io.*
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.math.BigInteger
;
import
java.math.BigInteger
;
import
java.net.URISyntaxException
;
import
java.net.URL
;
import
java.net.URL
;
import
java.net.URLDecoder
;
import
java.net.URLDecoder
;
import
java.net.URLEncoder
;
import
java.net.URLEncoder
;
...
@@ -1049,7 +1051,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
...
@@ -1049,7 +1051,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
* @Date: 2025/5/19 17:36
* @Date: 2025/5/19 17:36
**/
**/
@Override
@Override
public
R
getPdfFile
()
{
public
R
getPdfFile
()
throws
IOException
,
URISyntaxException
{
// 工商银行SFTP服务器地址
// 工商银行SFTP服务器地址
String
host
=
"gw.open.icbc.com.cn"
;
String
host
=
"gw.open.icbc.com.cn"
;
// 工商银行SFTP服务器端口
// 工商银行SFTP服务器端口
...
@@ -1060,10 +1062,19 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
...
@@ -1060,10 +1062,19 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
//String privateKeyPath = "D:/icbcFile/icbc"; // 替换为你的私钥路径
//String privateKeyPath = "D:/icbcFile/icbc"; // 替换为你的私钥路径
//usr/lib/java/yifu-ekp-biz/yifu-ekp/yifu-ekp-biz/src/main/resources/icbc/icbc
//usr/lib/java/yifu-ekp-biz/yifu-ekp/yifu-ekp-biz/src/main/resources/icbc/icbc
//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
=
"/data/yifu/crm/code/yifu_mvp/yifu/yifu-ekp/yifu-ekp-biz/src/main/resources/icbc/icbc"
;
String
privateKeyPath
=
""
;
String
privateKeyPath1
=
""
;
//System.getProperty("user.dir") + "/yifu-ekp/yifu-ekp-biz/src/main/resources/icbc/icbc"; // 远程目录路径
ClassPathResource
resource
=
new
ClassPathResource
(
"icbc/icbc"
);
URL
url
=
resource
.
getURL
();
// 如果是在IDE或文件系统中运行,转换为文件路径
if
(
url
.
getProtocol
().
equals
(
"file"
))
{
privateKeyPath
=
new
File
(
url
.
toURI
()).
getAbsolutePath
();
}
//System.getProperty("icbc.config.path", "/data/yifu/crm/code/yifu_mvp/yifu/yifu-ekp/yifu-ekp-biz/src/main/resources/icbc/icbc");
privateKeyPath1
=
System
.
getProperty
(
"user.dir"
)
+
"/yifu-ekp/yifu-ekp-biz/src/main/resources/icbc/icbc"
;
// 远程目录路径
log
.
info
(
"秘钥文件目录: "
+
privateKeyPath
);
log
.
info
(
"秘钥文件目录: "
+
privateKeyPath
);
log
.
info
(
"秘钥文件目录1: "
+
privateKeyPath1
);
// 远程目录路径
// 远程目录路径
String
remoteDir
=
"/JFTStatementDownload/download"
;
String
remoteDir
=
"/JFTStatementDownload/download"
;
Session
session
=
null
;
Session
session
=
null
;
...
@@ -1125,7 +1136,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
...
@@ -1125,7 +1136,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
}
}
// 3. 创建临时目录
// 3. 创建临时目录
String
tempDir
=
"/
data/yifu/crm/code/yifu_mvp/yifu/yifu-ekp/yifu-ekp-biz/src/main/
resources/tem/sftp_processing/"
+
System
.
currentTimeMillis
()
+
"/"
;
String
tempDir
=
"/resources/tem/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() + "/";
//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
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment