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
58f90fe2
Commit
58f90fe2
authored
Jun 14, 2024
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实缴修改
parent
a4fcbaba
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
470 additions
and
470 deletions
+470
-470
IcbcTransactionFlowIssueController.java
...v1/ekp/controller/IcbcTransactionFlowIssueController.java
+51
-51
IcbcTransactionFlowQueryController.java
...v1/ekp/controller/IcbcTransactionFlowQueryController.java
+49
-49
IcbcTransactionFlowIssueService.java
.../plus/v1/ekp/service/IcbcTransactionFlowIssueService.java
+19
-19
IcbcTransactionFlowQueryService.java
.../plus/v1/ekp/service/IcbcTransactionFlowQueryService.java
+19
-19
IcbcTransactionFlowIssueServiceImpl.java
...ekp/service/impl/IcbcTransactionFlowIssueServiceImpl.java
+139
-139
IcbcTransactionFlowQueryServiceImpl.java
...ekp/service/impl/IcbcTransactionFlowQueryServiceImpl.java
+193
-193
No files found.
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/controller/IcbcTransactionFlowIssueController.java
View file @
58f90fe2
package
com
.
yifu
.
cloud
.
plus
.
v1
.
ekp
.
controller
;
import
com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowIssueService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* 聚富通代发工资相关
*
* @author huyc
* @date 2024-05-23 10:24:12
*/
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/icbcIssue"
)
@Tag
(
name
=
"聚富通代发工资相关"
)
public
class
IcbcTransactionFlowIssueController
{
private
final
IcbcTransactionFlowIssueService
icbcTransactionFlowIssueService
;
/**
* 聚富通代发工资确认提交
*
* @param
* @param
* @return
*/
@Operation
(
summary
=
"聚富通代发工资确认提交接口"
,
description
=
"聚富通代发工资确认提交接口"
)
@PostMapping
(
"/submit"
)
public
R
submitIcbcTransactionFlow
()
{
return
icbcTransactionFlowIssueService
.
submitIcbcTransactionFlow
();
}
/**
* 代发工资明细查询
*
* @param
* @param
* @return
*/
@Operation
(
summary
=
"代发工资明细查询"
,
description
=
"代发工资明细查询"
)
@PostMapping
(
"/page"
)
public
R
selectIcbcTransactionFlowInfo
()
{
return
icbcTransactionFlowIssueService
.
selectIcbcTransactionFlowInfo
();
}
}
//
package com.yifu.cloud.plus.v1.ekp.controller;
//
//
import com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowIssueService;
//
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
//
import io.swagger.v3.oas.annotations.Operation;
//
import io.swagger.v3.oas.annotations.tags.Tag;
//
import lombok.RequiredArgsConstructor;
//
import org.springframework.web.bind.annotation.PostMapping;
//
import org.springframework.web.bind.annotation.RequestMapping;
//
import org.springframework.web.bind.annotation.RestController;
//
/
//
**
//
* 聚富通代发工资相关
//
*
//
* @author huyc
//
* @date 2024-05-23 10:24:12
//
*/
//
@RestController
//
@RequiredArgsConstructor
//
@RequestMapping("/icbcIssue" )
//
@Tag(name = "聚富通代发工资相关")
//
public class IcbcTransactionFlowIssueController {
//
//
private final IcbcTransactionFlowIssueService icbcTransactionFlowIssueService;
//
//
/**
//
* 聚富通代发工资确认提交
//
*
//
* @param
//
* @param
//
* @return
//
*/
//
@Operation(summary = "聚富通代发工资确认提交接口", description = "聚富通代发工资确认提交接口")
//
@PostMapping("/submit")
//
public R submitIcbcTransactionFlow() {
//
return icbcTransactionFlowIssueService.submitIcbcTransactionFlow();
//
}
//
//
/**
//
* 代发工资明细查询
//
*
//
* @param
//
* @param
//
* @return
//
*/
//
@Operation(summary = "代发工资明细查询", description = "代发工资明细查询")
//
@PostMapping("/page")
//
public R selectIcbcTransactionFlowInfo() {
//
return icbcTransactionFlowIssueService.selectIcbcTransactionFlowInfo();
//
}
//
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/controller/IcbcTransactionFlowQueryController.java
View file @
58f90fe2
package
com
.
yifu
.
cloud
.
plus
.
v1
.
ekp
.
controller
;
import
com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowQueryService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* 聚富通到账通知交易流水查询
*
* @author huyc
* @date 2024-05-23 10:24:12
*/
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/icbcQuery"
)
@Tag
(
name
=
"聚富通到账通知交易流水查询"
)
public
class
IcbcTransactionFlowQueryController
{
private
final
IcbcTransactionFlowQueryService
icbcTransactionFlowQueryService
;
/**
* 交易流水查询
*
* @param
* @return
*/
@Operation
(
summary
=
"交易流水查询"
,
description
=
"交易流水查询"
)
@PostMapping
(
"/page"
)
public
R
getIcbcTransactionFlow
()
{
return
icbcTransactionFlowQueryService
.
getIcbcTransactionFlow
();
}
/**
* 预订单接口
*
* @param
* @return
*/
@Operation
(
summary
=
"预订单接口"
,
description
=
"预订单接口"
)
@PostMapping
(
"/save"
)
public
R
saveIcbcManagerCard
()
{
return
icbcTransactionFlowQueryService
.
saveIcbcManagerCard
();
}
}
//
package com.yifu.cloud.plus.v1.ekp.controller;
//
//
import com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowQueryService;
//
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
//
import io.swagger.v3.oas.annotations.Operation;
//
import io.swagger.v3.oas.annotations.tags.Tag;
//
import lombok.RequiredArgsConstructor;
//
import org.springframework.web.bind.annotation.PostMapping;
//
import org.springframework.web.bind.annotation.RequestMapping;
//
import org.springframework.web.bind.annotation.RestController;
//
/
//
**
//
* 聚富通到账通知交易流水查询
//
*
//
* @author huyc
//
* @date 2024-05-23 10:24:12
//
*/
//
@RestController
//
@RequiredArgsConstructor
//
@RequestMapping("/icbcQuery" )
//
@Tag(name = "聚富通到账通知交易流水查询")
//
public class IcbcTransactionFlowQueryController {
//
//
private final IcbcTransactionFlowQueryService icbcTransactionFlowQueryService;
//
//
/**
//
* 交易流水查询
//
*
//
* @param
//
* @return
//
*/
//
@Operation(summary = "交易流水查询", description = "交易流水查询")
//
@PostMapping("/page")
//
public R getIcbcTransactionFlow() {
//
return icbcTransactionFlowQueryService.getIcbcTransactionFlow();
//
}
//
//
/**
//
* 预订单接口
//
*
//
* @param
//
* @return
//
*/
//
@Operation(summary = "预订单接口", description = "预订单接口")
//
@PostMapping("/save")
//
public R saveIcbcManagerCard() {
//
return icbcTransactionFlowQueryService.saveIcbcManagerCard();
//
}
//
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/IcbcTransactionFlowIssueService.java
View file @
58f90fe2
package
com
.
yifu
.
cloud
.
plus
.
v1
.
ekp
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
/**
* 聚富通代发工资相关
*
* @author huyc
* @date 2024-05-24 10:55:24
*/
public
interface
IcbcTransactionFlowIssueService
extends
IService
<
EkpSocialInfo
>
{
R
submitIcbcTransactionFlow
();
R
selectIcbcTransactionFlowInfo
();
}
//
package com.yifu.cloud.plus.v1.ekp.service;
//
//
import com.baomidou.mybatisplus.extension.service.IService;
//
import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo;
//
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
//
/
//
**
//
* 聚富通代发工资相关
//
*
//
* @author huyc
//
* @date 2024-05-24 10:55:24
//
*/
//
public interface IcbcTransactionFlowIssueService extends IService<EkpSocialInfo> {
//
//
R submitIcbcTransactionFlow();
//
//
R selectIcbcTransactionFlowInfo();
//
//
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/IcbcTransactionFlowQueryService.java
View file @
58f90fe2
package
com
.
yifu
.
cloud
.
plus
.
v1
.
ekp
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
/**
* 聚富通到账通知交易流水查询
*
* @author huyc
* @date 2024-05-23 11:21:56
*/
public
interface
IcbcTransactionFlowQueryService
extends
IService
<
EkpSocialInfo
>
{
R
getIcbcTransactionFlow
();
R
saveIcbcManagerCard
();
}
//
package com.yifu.cloud.plus.v1.ekp.service;
//
//
import com.baomidou.mybatisplus.extension.service.IService;
//
import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo;
//
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
//
/
//
**
//
* 聚富通到账通知交易流水查询
//
*
//
* @author huyc
//
* @date 2024-05-23 11:21:56
//
*/
//
public interface IcbcTransactionFlowQueryService extends IService<EkpSocialInfo> {
//
//
R getIcbcTransactionFlow();
//
//
R saveIcbcManagerCard();
//
//
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/impl/IcbcTransactionFlowIssueServiceImpl.java
View file @
58f90fe2
package
com
.
yifu
.
cloud
.
plus
.
v1
.
ekp
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.icbc.api.DefaultIcbcClient
;
import
com.icbc.api.IcbcApiException
;
import
com.icbc.api.IcbcConstants
;
import
com.icbc.api.UiIcbcClient
;
import
com.icbc.api.request.JftApiPayrollQueryDetailRequestV1
;
import
com.icbc.api.request.JftUiPayrollComfirmSubmitRequestV1
;
import
com.icbc.api.response.JftApiPayrollQueryDetailResponseV1
;
import
com.yifu.cloud.plus.v1.ekp.config.IcbcConfigProperties
;
import
com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo
;
import
com.yifu.cloud.plus.v1.ekp.mapper.EkpSocialInfoMapper
;
import
com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowIssueService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.stereotype.Service
;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.security.MessageDigest
;
import
java.security.NoSuchAlgorithmException
;
/**
* 聚富通到账通知交易流水查询
*
* @author huyc
* @date 2024-05-23 11:21:56
*/
@Log4j2
@Service
@RequiredArgsConstructor
@EnableConfigurationProperties
(
IcbcConfigProperties
.
class
)
public
class
IcbcTransactionFlowIssueServiceImpl
extends
ServiceImpl
<
EkpSocialInfoMapper
,
EkpSocialInfo
>
implements
IcbcTransactionFlowIssueService
{
@Autowired
private
IcbcConfigProperties
icbcConfigProperties
;
public
R
submitIcbcTransactionFlow
()
{
UiIcbcClient
client
=
new
UiIcbcClient
(
icbcConfigProperties
.
getAppId
(),
IcbcConstants
.
SIGN_TYPE_RSA2
,
icbcConfigProperties
.
getAppPrivateKey
(),
IcbcConstants
.
CHARSET_UTF8
);
JftUiPayrollComfirmSubmitRequestV1
request
=
new
JftUiPayrollComfirmSubmitRequestV1
();
request
.
setServiceUrl
(
"https://apipcs3.dccnet.com.cn/ui/jft/ui/payroll/comfirmsubmit/V1"
);
JftUiPayrollComfirmSubmitRequestV1
.
JjftUiPayrolComfirmSubmitRequestV1BizV1
bizContent
=
new
JftUiPayrollComfirmSubmitRequestV1
.
JjftUiPayrolComfirmSubmitRequestV1BizV1
();
bizContent
.
setAppId
(
icbcConfigProperties
.
getAppId
());
//HR系统名称
bizContent
.
setAppName
(
"HRO"
);
//企业编号
bizContent
.
setOutVendorId
(
icbcConfigProperties
.
getCompanyNo
());
//操作类型:1-受理 2-审核
bizContent
.
setOprType
(
"1"
);
bizContent
.
setTotalAmt
(
"1000"
);
bizContent
.
setTotalCount
(
"1"
);
bizContent
.
setAppSerialno
(
"21900"
);
bizContent
.
setLocalFilepath
(
"D:/icbcFile/955888_21900_0_20240524.xls"
);
bizContent
.
setFileMdcode
(
getMdCode
(
"D:/icbcFile/955888_21900_0_20240524.xls"
));
bizContent
.
setFileType
(
"1"
);
bizContent
.
setNotifyUrl
(
null
);
bizContent
.
setAppRemark
(
"备注"
);
bizContent
.
setBusinessType
(
null
);
bizContent
.
setFileCheckSign
(
null
);
request
.
setBizContent
(
bizContent
);
try
{
String
result
=
client
.
buildPostForm
(
request
);
if
(
Common
.
isNotNull
(
result
))
{
return
R
.
ok
();
}
}
catch
(
IcbcApiException
e
)
{
e
.
printStackTrace
();
return
R
.
failed
();
}
return
R
.
ok
();
}
public
R
selectIcbcTransactionFlowInfo
()
{
DefaultIcbcClient
client
=
new
DefaultIcbcClient
(
icbcConfigProperties
.
getAppId
(),
IcbcConstants
.
SIGN_TYPE_RSA2
,
icbcConfigProperties
.
getAppPrivateKey
(),
IcbcConstants
.
CHARSET_UTF8
,
IcbcConstants
.
FORMAT_JSON
,
icbcConfigProperties
.
getApigwPublicKey
(),
IcbcConstants
.
ENCRYPT_TYPE_AES
,
icbcConfigProperties
.
getAesKey
(),
null
,
null
);
JftApiPayrollQueryDetailRequestV1
request
=
new
JftApiPayrollQueryDetailRequestV1
();
request
.
setServiceUrl
(
"https://apipcs3.dccnet.com.cn/api/jft/api/payroll/querydetail/V1"
);
JftApiPayrollQueryDetailRequestV1
.
JftApiPayrollQueryDetailRequestV1Biz
bizContent
=
new
JftApiPayrollQueryDetailRequestV1
.
JftApiPayrollQueryDetailRequestV1Biz
();
bizContent
.
setAppId
(
icbcConfigProperties
.
getAppId
());
bizContent
.
setOutVendorId
(
icbcConfigProperties
.
getCompanyNo
());
bizContent
.
setType
(
"2"
);
//批次号,appSerialno为空时,必输
bizContent
.
setAppBatserialno
(
"21900"
);
//内部批次号,组成规则:批次号-顺序号,appBatserialno为空时必输
// bizContent.setAppSerialno("230921");
bizContent
.
setStartId
(
"0"
);
bizContent
.
setEndId
(
"10"
);
request
.
setBizContent
(
bizContent
);
try
{
JftApiPayrollQueryDetailResponseV1
responseV1
=
client
.
execute
(
request
);
if
(
Common
.
isNotNull
(
responseV1
))
{
return
R
.
ok
();
}
}
catch
(
IcbcApiException
e
)
{
e
.
printStackTrace
();
return
R
.
failed
();
}
return
R
.
ok
();
}
public
String
getMdCode
(
String
filePath
)
{
try
{
MessageDigest
md5Digest
=
MessageDigest
.
getInstance
(
"MD5"
);
byte
[]
buffer
=
new
byte
[
8192
];
try
(
FileInputStream
fis
=
new
FileInputStream
(
filePath
))
{
int
bytesRead
;
while
((
bytesRead
=
fis
.
read
(
buffer
))
!=
-
1
)
{
md5Digest
.
update
(
buffer
,
0
,
bytesRead
);
}
}
byte
[]
md5Bytes
=
md5Digest
.
digest
();
// Convert the byte to hex format
StringBuilder
result
=
new
StringBuilder
();
for
(
byte
md5Byte
:
md5Bytes
)
{
result
.
append
(
Integer
.
toString
((
md5Byte
&
0xff
)
+
0x100
,
16
).
substring
(
1
));
}
return
result
.
toString
();
}
catch
(
NoSuchAlgorithmException
|
IOException
e
)
{
//Handle the exception according to your requirements
e
.
printStackTrace
();
return
null
;
}
}
}
//
package com.yifu.cloud.plus.v1.ekp.service.impl;
//
//
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
//
import com.icbc.api.DefaultIcbcClient;
//
import com.icbc.api.IcbcApiException;
//
import com.icbc.api.IcbcConstants;
//
import com.icbc.api.UiIcbcClient;
//
import com.icbc.api.request.JftApiPayrollQueryDetailRequestV1;
//
import com.icbc.api.request.JftUiPayrollComfirmSubmitRequestV1;
//
import com.icbc.api.response.JftApiPayrollQueryDetailResponseV1;
//
import com.yifu.cloud.plus.v1.ekp.config.IcbcConfigProperties;
//
import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo;
//
import com.yifu.cloud.plus.v1.ekp.mapper.EkpSocialInfoMapper;
//
import com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowIssueService;
//
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
//
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
//
import lombok.RequiredArgsConstructor;
//
import lombok.extern.log4j.Log4j2;
//
import org.springframework.beans.factory.annotation.Autowired;
//
import org.springframework.boot.context.properties.EnableConfigurationProperties;
//
import org.springframework.stereotype.Service;
//
//
import java.io.FileInputStream;
//
import java.io.IOException;
//
import java.security.MessageDigest;
//
import java.security.NoSuchAlgorithmException;
//
/
//
**
//
* 聚富通到账通知交易流水查询
//
*
//
* @author huyc
//
* @date 2024-05-23 11:21:56
//
*/
//
@Log4j2
//
@Service
//
@RequiredArgsConstructor
//
@EnableConfigurationProperties(IcbcConfigProperties.class)
//
public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialInfoMapper, EkpSocialInfo> implements IcbcTransactionFlowIssueService {
//
//
@Autowired
//
private IcbcConfigProperties icbcConfigProperties;
//
//
public R submitIcbcTransactionFlow() {
//
//
UiIcbcClient client = new UiIcbcClient(icbcConfigProperties.getAppId(), IcbcConstants.SIGN_TYPE_RSA2, icbcConfigProperties.getAppPrivateKey(),
//
IcbcConstants.CHARSET_UTF8);
//
JftUiPayrollComfirmSubmitRequestV1 request = new JftUiPayrollComfirmSubmitRequestV1();
//
request.setServiceUrl("https://apipcs3.dccnet.com.cn/ui/jft/ui/payroll/comfirmsubmit/V1");
//
JftUiPayrollComfirmSubmitRequestV1.JjftUiPayrolComfirmSubmitRequestV1BizV1 bizContent =
//
new JftUiPayrollComfirmSubmitRequestV1.JjftUiPayrolComfirmSubmitRequestV1BizV1();
//
bizContent.setAppId(icbcConfigProperties.getAppId());
//
//HR系统名称
//
bizContent.setAppName("HRO");
//
//企业编号
//
bizContent.setOutVendorId(icbcConfigProperties.getCompanyNo());
//
//操作类型:1-受理 2-审核
//
bizContent.setOprType("1");
//
bizContent.setTotalAmt("1000");
//
bizContent.setTotalCount("1");
//
bizContent.setAppSerialno("21900");
//
bizContent.setLocalFilepath("D:/icbcFile/955888_21900_0_20240524.xls");
//
bizContent.setFileMdcode(getMdCode("D:/icbcFile/955888_21900_0_20240524.xls"));
//
bizContent.setFileType("1");
//
bizContent.setNotifyUrl(null);
//
bizContent.setAppRemark("备注");
//
bizContent.setBusinessType(null);
//
bizContent.setFileCheckSign(null);
//
request.setBizContent(bizContent);
//
try {
//
String result = client.buildPostForm(request);
//
if (Common.isNotNull(result)) {
//
return R.ok();
//
}
//
} catch (IcbcApiException e) {
//
e.printStackTrace();
//
return R.failed();
//
}
//
return R.ok();
//
}
//
//
public R selectIcbcTransactionFlowInfo() {
//
//
DefaultIcbcClient client = new DefaultIcbcClient(icbcConfigProperties.getAppId(), IcbcConstants.SIGN_TYPE_RSA2,
//
icbcConfigProperties.getAppPrivateKey(), IcbcConstants.CHARSET_UTF8, IcbcConstants.FORMAT_JSON,
//
icbcConfigProperties.getApigwPublicKey(), IcbcConstants.ENCRYPT_TYPE_AES, icbcConfigProperties.getAesKey(), null, null);
//
JftApiPayrollQueryDetailRequestV1 request = new JftApiPayrollQueryDetailRequestV1();
//
request.setServiceUrl("https://apipcs3.dccnet.com.cn/api/jft/api/payroll/querydetail/V1");
//
JftApiPayrollQueryDetailRequestV1.JftApiPayrollQueryDetailRequestV1Biz bizContent = new
//
JftApiPayrollQueryDetailRequestV1.JftApiPayrollQueryDetailRequestV1Biz();
//
bizContent.setAppId(icbcConfigProperties.getAppId());
//
bizContent.setOutVendorId(icbcConfigProperties.getCompanyNo());
//
bizContent.setType("2");
//
//批次号,appSerialno为空时,必输
//
bizContent.setAppBatserialno("21900");
//
//内部批次号,组成规则:批次号-顺序号,appBatserialno为空时必输
//
//
bizContent.setAppSerialno("230921");
//
bizContent.setStartId("0");
//
bizContent.setEndId("10");
//
request.setBizContent(bizContent);
//
try {
//
JftApiPayrollQueryDetailResponseV1 responseV1 = client.execute(request);
//
if (Common.isNotNull(responseV1)) {
//
return R.ok();
//
}
//
} catch (IcbcApiException e) {
//
e.printStackTrace();
//
return R.failed();
//
}
//
return R.ok();
//
}
//
//
public String getMdCode(String filePath) {
//
try {
//
MessageDigest md5Digest = MessageDigest.getInstance("MD5");
//
byte[] buffer = new byte[8192];
//
//
try (FileInputStream fis = new FileInputStream(filePath)) {
//
int bytesRead;
//
while ((bytesRead = fis.read(buffer)) != -1) {
//
md5Digest.update(buffer, 0, bytesRead);
//
}
//
}
//
byte[] md5Bytes = md5Digest.digest();
//
//
// Convert the byte to hex format
//
StringBuilder result = new StringBuilder();
//
for (byte md5Byte : md5Bytes) {
//
result.append(Integer.toString((md5Byte & 0xff) + 0x100, 16).substring(1));
//
}
//
//
return result.toString();
//
} catch (NoSuchAlgorithmException | IOException e) {
//
//Handle the exception according to your requirements
//
e.printStackTrace();
//
return null;
//
}
//
}
//
//
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/impl/IcbcTransactionFlowQueryServiceImpl.java
View file @
58f90fe2
package
com
.
yifu
.
cloud
.
plus
.
v1
.
ekp
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.icbc.api.DefaultIcbcClient
;
import
com.icbc.api.IcbcApiException
;
import
com.icbc.api.IcbcConstants
;
import
com.icbc.api.request.JftApiB2bpayTransqueryRequestV1
;
import
com.icbc.api.request.JftApiPayB2bpayGenpreorderRequestV1
;
import
com.icbc.api.response.JftApiB2bpayTransqueryResponseV1
;
import
com.icbc.api.response.JftApiPayB2bpayGenpreorderResponseV1
;
import
com.yifu.cloud.plus.v1.ekp.config.IcbcConfigProperties
;
import
com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo
;
import
com.yifu.cloud.plus.v1.ekp.mapper.EkpSocialInfoMapper
;
import
com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowQueryService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* 聚富通到账通知交易流水查询
*
* @author huyc
* @date 2024-05-23 11:21:56
*/
@Log4j2
@Service
@RequiredArgsConstructor
@EnableConfigurationProperties
(
IcbcConfigProperties
.
class
)
public
class
IcbcTransactionFlowQueryServiceImpl
extends
ServiceImpl
<
EkpSocialInfoMapper
,
EkpSocialInfo
>
implements
IcbcTransactionFlowQueryService
{
@Autowired
private
IcbcConfigProperties
icbcConfigProperties
;
public
R
getIcbcTransactionFlow
()
{
//应用id 应用方私钥 网关公钥 应用方加密串
String
APP_ID
=
"11000000000000015602"
;
//应用方私钥
String
MY_PRIVATE_KEY
=
"MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCudy1tOyVTSCjJD9ej/IXmIKHTBLJ3FPYyhUnAt65hXgTD7OJso3+1cc+AakLGTLrSm9pxxd2AsUkVbdYFsXyq0rQOkG71ULPrzYI/XfbIcjf8dleFkTlEi+bVNN3J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ioawmt83NE7hFWC0lA7rCwLAlGFQQKBgBmpf03hpMEP6xfuWR6banW8ZR/MRUKTteOcPbGn0cIf06JZUV9K7StWkznAnerotcLtMO3LiJrv8GdKsfqquFg+SHyNIgAoa79c6/lZexcfGdPFezehHf48Sf0b632ONRF+kY8VTZ2/PHkRz6G2A8v1Eq4USlJkZi/s1/E+sWQBAoGAMU8mm9SGWka1hPYOI3ONCzeBbRBNulcS7B7luGcEbhPwi0p77xciSUy64GSVjZboD/DX9n3m7rU2GIqr50gkpQuTW9N9PNr7z74Tk36bCp5MpEeybMOgv8hovEQBa5PoTbAm9qMf9Xm1whQXUzhjcWR7vT4qAg1A+QXX58G9EkA="
;
//网关公钥
String
APIGW_PUBLIC_KEY
=
"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwFgHD4kzEVPdOj03ctKM7KV+16bWZ5BMNgvEeuEQwfQYkRVwI9HFOGkwNTMn5hiJXHnlXYCX+zp5r6R52MY0O7BsTCLT7aHaxsANsvI9ABGx3OaTVlPB59M6GPbJh0uXvio0m1r/lTW3Z60RU6Q3oid/rNhP3CiNgg0W6O3AGqwIDAQAB"
;
//应用方加密串
String
AES_Key
=
"5xGJdh7qb+B95SUoxDlatg=="
;
DefaultIcbcClient
client
=
new
DefaultIcbcClient
(
APP_ID
,
IcbcConstants
.
SIGN_TYPE_RSA2
,
MY_PRIVATE_KEY
,
IcbcConstants
.
CHARSET_UTF8
,
IcbcConstants
.
FORMAT_JSON
,
APIGW_PUBLIC_KEY
,
AES_Key
,
icbcConfigProperties
.
getAesKey
(),
""
,
""
);
JftApiB2bpayTransqueryRequestV1
request
=
new
JftApiB2bpayTransqueryRequestV1
();
request
.
setServiceUrl
(
"https://apipcs3.dccnet.com.cn/api/jft/api/b2bpay/transquery/V1"
);
JftApiB2bpayTransqueryRequestV1
.
JftApiB2bpayTransqueryRequestV1Biz
bizContent
=
new
JftApiB2bpayTransqueryRequestV1
.
JftApiB2bpayTransqueryRequestV1Biz
();
bizContent
.
setAppId
(
APP_ID
);
// bizContent.setOutVendorId("955888");
// bizContent.setOutUserId("874");
bizContent
.
setCardNo
(
"9558830200003786563"
);
// bizContent.setPayAccount("0200000309200211917");
bizContent
.
setStartTrxDate
(
"20240401"
);
bizContent
.
setEndTrxDate
(
"20240730"
);
bizContent
.
setStartId
(
"1"
);
bizContent
.
setEndId
(
"50"
);
request
.
setBizContent
(
bizContent
);
JftApiB2bpayTransqueryResponseV1
response
;
try
{
//到账通知交易流水查询
response
=
client
.
execute
(
request
);
log
.
info
(
request
.
toString
());
log
.
info
(
response
.
toString
());
if
(
"00"
.
equals
(
response
.
getStatus
()))
{
return
R
.
ok
();
}
else
{
return
R
.
failed
();
}
}
catch
(
IcbcApiException
e
)
{
e
.
printStackTrace
();
return
R
.
ok
();
}
}
public
R
saveIcbcManagerCard
()
{
//应用id 应用方私钥 网关公钥 应用方加密串
String
APP_ID
=
"11000000000000015602"
;
//应用方私钥
String
MY_PRIVATE_KEY
=
"MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCudy1tOyVTSCjJD9ej/IXmIKHTBLJ3FPYyhUnAt65hXgTD7OJso3+1cc+AakLGTLrSm9pxxd2AsUkVbdYFsXyq0rQOkG71ULPrzYI/XfbIcjf8dleFkTlEi+bVNN3J3LzbY4uPhPztDbkcwBoawl1jhcGTkFdIUCfJ8s9zXAAKgHjeNLXwrdnfvlTn8sfJX3JvrQ9W1Ji2NhCzAg7/fgJ9wAmS+aWKKBuc3ge5DQYcTtIe8hBeKSh6WZkjdUOja6ytOwEGCA3KiCVTw42rP/njrMAR3rh2ptXQtlLekMIEtiN3QAnIWp8IDg8uBEKr0aye6m/IfKMNpbbyaKqaeBUhAgMBAAECggEAOp0rk+ElHx/FJBfAeQWj7rbT51NSqhNOy5ZgOvD7ExdFPpXdVGZxx4HfFuOcX4bz1UIrV8IEMvJc/WgTWYJRwgpcF/CKdryQVg6LTcLB4IIPMTCJIwSxWsgt2z+R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kA="
;
//网关公钥
String
APIGW_PUBLIC_KEY
=
"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwFgHD4kzEVPdOj03ctKM7KV+16bWZ5BMNgvEeuEQwfQYkRVwI9HFOGkwNTMn5hiJXHnlXYCX+zp5r6R52MY0O7BsTCLT7aHaxsANsvI9ABGx3OaTVlPB59M6GPbJh0uXvio0m1r/lTW3Z60RU6Q3oid/rNhP3CiNgg0W6O3AGqwIDAQAB"
;
//应用方加密串
String
AES_Key
=
"5xGJdh7qb+B95SUoxDlatg=="
;
DefaultIcbcClient
client
=
new
DefaultIcbcClient
(
APP_ID
,
IcbcConstants
.
SIGN_TYPE_RSA2
,
MY_PRIVATE_KEY
,
IcbcConstants
.
CHARSET_UTF8
,
IcbcConstants
.
FORMAT_JSON
,
APIGW_PUBLIC_KEY
,
IcbcConstants
.
ENCRYPT_TYPE_AES
,
AES_Key
,
null
,
null
);
JftApiPayB2bpayGenpreorderRequestV1
request
=
new
JftApiPayB2bpayGenpreorderRequestV1
();
request
.
setServiceUrl
(
"https://apipcs3.dccnet.com.cn/api/jft/api/pay/b2bpay/genpreorder/V1"
);
JftApiPayB2bpayGenpreorderRequestV1
.
JftApiPayB2bpayGenpreorderRequestV1Biz
bizContent
=
new
JftApiPayB2bpayGenpreorderRequestV1
.
JftApiPayB2bpayGenpreorderRequestV1Biz
();
bizContent
.
setAppId
(
APP_ID
);
bizContent
.
setOutOrderId
(
"202406200000066688"
);
bizContent
.
setPayMethod
(
"05"
);
bizContent
.
setMultiRecFlag
(
"0"
);
bizContent
.
setStlFlag
(
"0"
);
bizContent
.
setAsynFlag
(
"0"
);
bizContent
.
setOutVendorId
(
"158742714"
);
bizContent
.
setOutUserId
(
"0202401200000000039"
);
// bizContent.setRecAcctId("123654123");
// bizContent.setPayerAcctId("1001765234");
bizContent
.
setTradeTime
(
"2024-06-21 10:41:56"
);
bizContent
.
setTrxChannel
(
"01"
);
bizContent
.
setTrxIp
(
"172.16.24.98"
);
bizContent
.
setPayModeTool
(
"5"
);
bizContent
.
setPayPhoneno
(
"18856151558"
);
bizContent
.
setPayerType
(
"1"
);
bizContent
.
setOrderAmount
(
"2.00"
);
bizContent
.
setPayAmount
(
"2.00"
);
bizContent
.
setFloatRate
(
"888"
);
bizContent
.
setProvince
(
"安徽"
);
bizContent
.
setCity
(
"合肥市"
);
bizContent
.
setCounty
(
"包河区"
);
bizContent
.
setEmail
(
"123456@icbc.com"
);
bizContent
.
setPhone
(
"1388888888"
);
bizContent
.
setAddress
(
"安徽"
);
bizContent
.
setPost
(
"5168845"
);
bizContent
.
setPayRem
(
"试一下"
);
bizContent
.
setOrderRem
(
"食品"
);
bizContent
.
setAddRemark
(
"食品"
);
bizContent
.
setPayerName
(
"aigc科技集团"
);
bizContent
.
setPayerAcctNum
(
"0200062009212528888"
);
bizContent
.
setCurrency
(
"001"
);
bizContent
.
setPayerWalletId
(
"1234567890123456789012"
);
bizContent
.
setPayerWalletName
(
"XXXXX有限公司"
);
bizContent
.
setNotifyUrl
(
"http://www.xxx.com"
);
bizContent
.
setJumpUrl
(
"http://www.xxx.com"
);
JftApiPayB2bpayGenpreorderRequestV1
.
JftApiPayB2bpayGenpreorderRequestV1Biz
.
Good
goodsInfo
=
new
JftApiPayB2bpayGenpreorderRequestV1
.
JftApiPayB2bpayGenpreorderRequestV1Biz
.
Good
();
goodsInfo
.
setGoodsSeqno
(
"1"
);
goodsInfo
.
setGoodsName
(
"牛肉干"
);
goodsInfo
.
setGoodsNum
(
"10"
);
goodsInfo
.
setGoodsAmt
(
"10"
);
goodsInfo
.
setWeight
(
"肉干"
);
goodsInfo
.
setPrice
(
"50"
);
goodsInfo
.
setSellerAddress
(
"13866668"
);
goodsInfo
.
setSellerName
(
"牛大"
);
goodsInfo
.
setUnits
(
"斤"
);
goodsInfo
.
setOutVendorId
(
"158742714"
);
//package com.yifu.cloud.plus.v1.ekp.service.impl;
//
//import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
//import com.icbc.api.DefaultIcbcClient;
//import com.icbc.api.IcbcApiException;
//import com.icbc.api.IcbcConstants;
//import com.icbc.api.request.JftApiB2bpayTransqueryRequestV1;
//import com.icbc.api.request.JftApiPayB2bpayGenpreorderRequestV1;
//import com.icbc.api.response.JftApiB2bpayTransqueryResponseV1;
//import com.icbc.api.response.JftApiPayB2bpayGenpreorderResponseV1;
//import com.yifu.cloud.plus.v1.ekp.config.IcbcConfigProperties;
//import com.yifu.cloud.plus.v1.ekp.entity.EkpSocialInfo;
//import com.yifu.cloud.plus.v1.ekp.mapper.EkpSocialInfoMapper;
//import com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowQueryService;
//import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
//import lombok.RequiredArgsConstructor;
//import lombok.extern.log4j.Log4j2;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.context.properties.EnableConfigurationProperties;
//import org.springframework.stereotype.Service;
//
//import java.util.ArrayList;
//import java.util.List;
//
///**
// * 聚富通到账通知交易流水查询
// *
// * @author huyc
// * @date 2024-05-23 11:21:56
// */
//@Log4j2
//@Service
//@RequiredArgsConstructor
//@EnableConfigurationProperties(IcbcConfigProperties.class)
//public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialInfoMapper, EkpSocialInfo> implements IcbcTransactionFlowQueryService {
//
// @Autowired
// private IcbcConfigProperties icbcConfigProperties;
//
// public R getIcbcTransactionFlow() {
// //应用id 应用方私钥 网关公钥 应用方加密串
// String APP_ID = "11000000000000015602";
// //应用方私钥
// String MY_PRIVATE_KEY = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCudy1tOyVTSCjJD9ej/IXmIKHTBLJ3FPYyhUnAt65hXgTD7OJso3+1cc+AakLGTLrSm9pxxd2AsUkVbdYFsXyq0rQOkG71ULPrzYI/XfbIcjf8dleFkTlEi+bVNN3J3LzbY4uPhPztDbkcwBoawl1jhcGTkFdIUCfJ8s9z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6xfuWR6banW8ZR/MRUKTteOcPbGn0cIf06JZUV9K7StWkznAnerotcLtMO3LiJrv8GdKsfqquFg+SHyNIgAoa79c6/lZexcfGdPFezehHf48Sf0b632ONRF+kY8VTZ2/PHkRz6G2A8v1Eq4USlJkZi/s1/E+sWQBAoGAMU8mm9SGWka1hPYOI3ONCzeBbRBNulcS7B7luGcEbhPwi0p77xciSUy64GSVjZboD/DX9n3m7rU2GIqr50gkpQuTW9N9PNr7z74Tk36bCp5MpEeybMOgv8hovEQBa5PoTbAm9qMf9Xm1whQXUzhjcWR7vT4qAg1A+QXX58G9EkA=";
// //网关公钥
// String APIGW_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwFgHD4kzEVPdOj03ctKM7KV+16bWZ5BMNgvEeuEQwfQYkRVwI9HFOGkwNTMn5hiJXHnlXYCX+zp5r6R52MY0O7BsTCLT7aHaxsANsvI9ABGx3OaTVlPB59M6GPbJh0uXvio0m1r/lTW3Z60RU6Q3oid/rNhP3CiNgg0W6O3AGqwIDAQAB";
// //应用方加密串
// String AES_Key = "5xGJdh7qb+B95SUoxDlatg==";
// DefaultIcbcClient client = new DefaultIcbcClient(APP_ID, IcbcConstants.SIGN_TYPE_RSA2,
// MY_PRIVATE_KEY, IcbcConstants.CHARSET_UTF8, IcbcConstants.FORMAT_JSON, APIGW_PUBLIC_KEY,
// AES_Key, icbcConfigProperties.getAesKey(), "", "");
// JftApiB2bpayTransqueryRequestV1 request = new JftApiB2bpayTransqueryRequestV1();
// request.setServiceUrl("https://apipcs3.dccnet.com.cn/api/jft/api/b2bpay/transquery/V1");
//
// JftApiB2bpayTransqueryRequestV1.JftApiB2bpayTransqueryRequestV1Biz bizContent = new
// JftApiB2bpayTransqueryRequestV1.JftApiB2bpayTransqueryRequestV1Biz();
// bizContent.setAppId(APP_ID);
//// bizContent.setOutVendorId("955888");
//// bizContent.setOutUserId("874");
// bizContent.setCardNo("9558830200003786563");
//// bizContent.setPayAccount("0200000309200211917");
// bizContent.setStartTrxDate("20240401");
// bizContent.setEndTrxDate("20240730");
// bizContent.setStartId("1");
// bizContent.setEndId("50");
// request.setBizContent(bizContent);
// JftApiB2bpayTransqueryResponseV1 response;
// try {
// //到账通知交易流水查询
// response = client.execute(request);
// log.info(request.toString());
// log.info(response.toString());
// if ("00".equals(response.getStatus())) {
// return R.ok();
// } else {
// return R.failed();
// }
// } catch (IcbcApiException e) {
// e.printStackTrace();
// return R.ok();
// }
// }
//
// public R saveIcbcManagerCard() {
// //应用id 应用方私钥 网关公钥 应用方加密串
// String APP_ID = "11000000000000015602";
// //应用方私钥
// String MY_PRIVATE_KEY = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCudy1tOyVTSCjJD9ej/IXmIKHTBLJ3FPYyhUnAt65hXgTD7OJso3+1cc+AakLGTLrSm9pxxd2AsUkVbdYFsXyq0rQOkG71ULPrzYI/XfbIcjf8dleFkTlEi+bVNN3J3LzbY4uPhPztDbkcwBoawl1jhcGTkFdIUCfJ8s9zXAAKgHjeNLXwrdnfvlTn8sfJX3JvrQ9W1Ji2NhCzAg7/fgJ9wAmS+aWKKBuc3ge5DQYcTtIe8hBeKSh6WZkjdUOja6ytOwEGCA3KiCVTw42rP/njrMAR3rh2ptXQtlLekMIEtiN3QAnIWp8IDg8uBEKr0aye6m/IfKMNpbbyaKqaeBUhAgMBAAECggEAOp0rk+ElHx/FJBfAeQWj7rbT51NSqhNOy5ZgOvD7ExdFPpXdVGZxx4HfFuOcX4bz1UIrV8IEMvJc/WgTWYJRwgpcF/CKdryQVg6LTcLB4IIPMTCJIwSxWsgt2z+Rq/oPMR32i1dAqlvL707S9l6KhZ8wc+UwjcjwNTbwX29vTBdiTsFS6QJBaUytu+nHoHvVrpg4botifiokHR1JX0hWjxP/Dh29aooaIbSu80A2sRPLIvRtCzxGjfcZP+H1ZtE439SCguuI+pOqWWLmzUV743PkGPpYPnYXadajrYBz8R5Uysm0tRwV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vI9ABGx3OaTVlPB59M6GPbJh0uXvio0m1r/lTW3Z60RU6Q3oid/rNhP3CiNgg0W6O3AGqwIDAQAB";
// //应用方加密串
// String AES_Key = "5xGJdh7qb+B95SUoxDlatg==";
// DefaultIcbcClient client = new DefaultIcbcClient(APP_ID, IcbcConstants.SIGN_TYPE_RSA2,
// MY_PRIVATE_KEY, IcbcConstants.CHARSET_UTF8, IcbcConstants.FORMAT_JSON,
// APIGW_PUBLIC_KEY, IcbcConstants.ENCRYPT_TYPE_AES, AES_Key, null, null);
// JftApiPayB2bpayGenpreorderRequestV1 request = new JftApiPayB2bpayGenpreorderRequestV1();
// request.setServiceUrl("https://apipcs3.dccnet.com.cn/api/jft/api/pay/b2bpay/genpreorder/V1");
// JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz bizContent =
// new JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz();
// bizContent.setAppId(APP_ID);
// bizContent.setOutOrderId("202406200000066688");
// bizContent.setPayMethod("05");
// bizContent.setMultiRecFlag("0");
// bizContent.setStlFlag("0");
// bizContent.setAsynFlag("0");
// bizContent.setOutVendorId("158742714");
// bizContent.setOutUserId("0202401200000000039");
//// bizContent.setRecAcctId("123654123");
//// bizContent.setPayerAcctId("1001765234");
// bizContent.setTradeTime("2024-06-21 10:41:56");
// bizContent.setTrxChannel("01");
// bizContent.setTrxIp("172.16.24.98");
// bizContent.setPayModeTool("5");
// bizContent.setPayPhoneno("18856151558");
// bizContent.setPayerType("1");
// bizContent.setOrderAmount("2.00");
// bizContent.setPayAmount("2.00");
// bizContent.setFloatRate("888");
// bizContent.setProvince("安徽");
// bizContent.setCity("合肥市");
// bizContent.setCounty("包河区");
// bizContent.setEmail("123456@icbc.com");
// bizContent.setPhone("1388888888");
// bizContent.setAddress("安徽");
// bizContent.setPost("5168845");
// bizContent.setPayRem("试一下");
// bizContent.setOrderRem("食品");
// bizContent.setAddRemark("食品");
// bizContent.setPayerName("aigc科技集团");
// bizContent.setPayerAcctNum("0200062009212528888");
// bizContent.setCurrency("001");
// bizContent.setPayerWalletId("1234567890123456789012");
// bizContent.setPayerWalletName("XXXXX有限公司");
// bizContent.setNotifyUrl("http://www.xxx.com");
// bizContent.setJumpUrl("http://www.xxx.com");
// JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz.Good
// goodsInfo2 = new JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz.Good();
// goodsInfo2.setGoodsSeqno("2");
// goodsInfo2.setGoodsName("商品");
// goodsInfo2.setGoodsNum("10");
// goodsInfo2.setGoodsAmt("10");
// goodsInfo2.setWeight("商品规格");
// goodsInfo2.setPrice("50");
// goodsInfo2.setSellerAddress("13866668");
// goodsInfo2.setSellerName("张三");
// goodsInfo2.setUnits("斤");
// goodsInfo2.setOutVendorId("158742714");
List
<
JftApiPayB2bpayGenpreorderRequestV1
.
JftApiPayB2bpayGenpreorderRequestV1Biz
.
Good
>
goodList
=
new
ArrayList
<>();
goodList
.
add
(
goodsInfo
);
// goodList.add(goodsInfo2);
bizContent
.
setGoodsInfo
(
goodList
);
JftApiPayB2bpayGenpreorderRequestV1
.
JftApiPayB2bpayGenpreorderRequestV1Biz
.
RecInfo
recInfo1
=
new
JftApiPayB2bpayGenpreorderRequestV1
.
JftApiPayB2bpayGenpreorderRequestV1Biz
.
RecInfo
();
recInfo1
.
setOutVendorId
(
"158742714"
);
recInfo1
.
setRecAcctId
(
"123654123"
);
recInfo1
.
setTrxAmount
(
"2.00"
);
recInfo1
.
setOrderAmount
(
"2.00"
);
// goodsInfo = new JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz.Good();
// goodsInfo.setGoodsSeqno("1");
// goodsInfo.setGoodsName("牛肉干");
// goodsInfo.setGoodsNum("10");
// goodsInfo.setGoodsAmt("10");
// goodsInfo.setWeight("肉干");
// goodsInfo.setPrice("50");
// goodsInfo.setSellerAddress("13866668");
// goodsInfo.setSellerName("牛大");
// goodsInfo.setUnits("斤");
// goodsInfo.setOutVendorId("158742714");
//// JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz.Good
//// goodsInfo2 = new JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz.Good();
//// goodsInfo2.setGoodsSeqno("2");
//// goodsInfo2.setGoodsName("商品");
//// goodsInfo2.setGoodsNum("10");
//// goodsInfo2.setGoodsAmt("10");
//// goodsInfo2.setWeight("商品规格");
//// goodsInfo2.setPrice("50");
//// goodsInfo2.setSellerAddress("13866668");
//// goodsInfo2.setSellerName("张三");
//// goodsInfo2.setUnits("斤");
//// goodsInfo2.setOutVendorId("158742714");
// List<JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz.Good> goodList = new ArrayList<>();
// goodList.add(goodsInfo);
//// goodList.add(goodsInfo2);
// bizContent.setGoodsInfo(goodList);
// JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz.RecInfo
// recInfo2 = new JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz.RecInfo();
// recInfo2.setOutVendorId("158742714");
// recInfo2.setRecAcctId("04187335");
// recInfo2.setTrxAmount("1.00");
// recInfo2.setOrderAmount("1.00");
List
<
JftApiPayB2bpayGenpreorderRequestV1
.
JftApiPayB2bpayGenpreorderRequestV1Biz
.
RecInfo
>
recList
=
new
ArrayList
<>();
recList
.
add
(
recInfo1
);
// recList.add(recInfo2);
bizContent
.
setRecList
(
recList
);
bizContent
.
setSummary
(
"测试一下"
);
bizContent
.
setPurpose
(
"测试一下"
);
request
.
setBizContent
(
bizContent
);
try
{
JftApiPayB2bpayGenpreorderResponseV1
responseV1
=
client
.
execute
(
request
);
if
(
"00"
.
equals
(
responseV1
.
getStatus
()))
{
return
R
.
ok
();
}
else
{
return
R
.
failed
();
}
}
catch
(
IcbcApiException
e
)
{
e
.
printStackTrace
();
return
R
.
ok
();
}
}
}
// recInfo1 = new JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz.RecInfo();
// recInfo1.setOutVendorId("158742714");
// recInfo1.setRecAcctId("123654123");
// recInfo1.setTrxAmount("2.00");
// recInfo1.setOrderAmount("2.00");
//// JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz.RecInfo
//// recInfo2 = new JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz.RecInfo();
//// recInfo2.setOutVendorId("158742714");
//// recInfo2.setRecAcctId("04187335");
//// recInfo2.setTrxAmount("1.00");
//// recInfo2.setOrderAmount("1.00");
// List<JftApiPayB2bpayGenpreorderRequestV1.JftApiPayB2bpayGenpreorderRequestV1Biz.RecInfo> recList = new ArrayList<>();
// recList.add(recInfo1);
//// recList.add(recInfo2);
// bizContent.setRecList(recList);
// bizContent.setSummary("测试一下");
// bizContent.setPurpose("测试一下");
// request.setBizContent(bizContent);
// try {
// JftApiPayB2bpayGenpreorderResponseV1 responseV1 = client.execute(request);
// if ("00".equals(responseV1.getStatus())) {
// return R.ok();
// } else {
// return R.failed();
// }
// } catch (IcbcApiException e) {
// e.printStackTrace();
// return R.ok();
// }
// }
//}
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