Commit f6590425 authored by huyuchen's avatar huyuchen

huych-配置修改

parent f240803c
package com.yifu.cloud.plus.v1.ekp.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
/**
* @auther huyc
* @date 2024/5/24
* 聚富通基本配置
*/
@RefreshScope
@ConfigurationProperties(prefix = "icbcissue")
@Data
public class IcbcIssueConfigProperties {
/**
* @Description: 聚富通分配的接入id
**/
private String appId;
/**
* @Description: 聚富通分配的应用方私钥
**/
private String appPrivateKey;
/**
* @Description: 网关公钥
**/
private String apigwPublicKey;
/**
* @Description: 企业编号
**/
private String companyNo;
/**
* @Description: 应用方加密串
**/
private String aesKey;
private String caSm;
private String caSmIcbc;
}
......@@ -52,28 +52,28 @@ public class IcbcTransactionFlowIssueController {
}
/**
* 企业会员用户绑定管家卡
* 代发工资发放成功异步通知功能
*
* @param
* @param
* @return
*/
@Operation(summary = "企业会员用户绑定管家卡", description = "企业会员用户绑定管家卡")
@PostMapping("/business")
public R businessOpen() {
return icbcTransactionFlowIssueService.businessOpen();
@Operation(summary = "代发工资发放成功异步通知功能", description = "代发工资发放成功异步通知功能")
@PostMapping("/notifyUrl")
public R asyncNotice(HttpServletRequest request) throws Exception {
return icbcTransactionFlowIssueService.asyncNotice(request);
}
/**
* 代发工资发放成功异步通知功能
* 行名行号查询接口
*
* @param
* @param
* @return
*/
@Operation(summary = "代发工资发放成功异步通知功能", description = "代发工资发放成功异步通知功能")
@PostMapping("/notifyUrl")
public R asyncNotice(HttpServletRequest request) throws Exception {
return icbcTransactionFlowIssueService.asyncNotice(request);
@Operation(summary = "行名行号查询接口", description = "行名行号查询接口")
@PostMapping("/querybankinfo")
public R querybankinfo() {
return icbcTransactionFlowIssueService.querybankinfo();
}
}
......@@ -90,7 +90,6 @@ public class IcbcTransactionFlowQueryController {
return icbcTransactionFlowQueryService.saveIcbcManagerCard();
}
/**
* 行名行号查询接口
*
......
......@@ -14,12 +14,30 @@ import javax.servlet.http.HttpServletRequest;
*/
public interface IcbcTransactionFlowIssueService extends IService<EkpSocialInfo> {
/**
* @Description: 代发任务确认提交
* @Author: huyc
* @Date: 2024-11-12
* @return: R
**/
R submitIcbcTransactionFlow();
/**
* @Description: 代发任务批次明细查询
* @Author: huyc
* @Date: 2024-11-12
* @return: R
**/
R selectIcbcTransactionFlowInfo();
R businessOpen();
R asyncNotice(HttpServletRequest request) throws Exception;
/**
* @Description: 根据银行卡号查询银行信息
* @Author: huyc
* @Date: 2024-11-12
* @return: R
**/
R querybankinfo();
}
......@@ -21,6 +21,12 @@ public interface IcbcTransactionFlowQueryService extends IService<EkpSocialInfo>
R saveIcbcManagerCard();
/**
* @Description: 根据银行卡号查询银行信息
* @Author: huyc
* @Date: 2024-11-12
* @return: R
**/
R querybankinfo();
}
package com.yifu.cloud.plus.v1.ekp.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.icbc.api.DefaultIcbcClient;
......@@ -9,17 +7,18 @@ 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.JftApiVendorSeparateAccountsBusinessOpenRequestV1;
import com.icbc.api.request.JftUiPayrollComfirmSubmitRequestV1;
import com.icbc.api.request.MybankEnterpriseAccountQuerybankinfoRequestV1;
import com.icbc.api.response.JftApiPayrollQueryDetailResponseV1;
import com.icbc.api.response.JftApiVendorSeparateAccountsBusinessOpenResponseV1;
import com.icbc.api.response.MybankEnterpriseAccountQuerybankinfoResponseV1;
import com.icbc.api.utils.IcbcSignature;
import com.icbc.api.utils.WebUtils;
import com.yifu.cloud.plus.v1.ekp.config.IcbcConfigProperties;
import com.yifu.cloud.plus.v1.ekp.config.IcbcIssueConfigProperties;
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.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
......@@ -49,48 +48,60 @@ import java.util.Map;
@Log4j2
@Service
@RequiredArgsConstructor
@EnableConfigurationProperties(IcbcConfigProperties.class)
@EnableConfigurationProperties(IcbcIssueConfigProperties.class)
public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialInfoMapper, EkpSocialInfo> implements IcbcTransactionFlowIssueService {
@Autowired
private IcbcConfigProperties icbcConfigProperties;
private IcbcIssueConfigProperties icbcConfigProperties;
//1、网关公钥
private static final String APIGW_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCMpjaWjngB4E3ATh+G1DVAmQnIpiPEFAEDqRfNGAVvvH35yDetqewKi0l7OEceTMN1C6NPym3zStvSoQayjYV+eIcZERkx31KhtFu9clZKgRTyPjdKMIth/wBtPKjL/5+PYalLdomM4ONthrPgnkN4x4R0+D4+EBpXo8gNiAFsNwIDAQAB";
//private static final String APIGW_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCMpjaWjngB4E3ATh+G1DVAmQnIpiPEFAEDqRfNGAVvvH35yDetqewKi0l7OEceTMN1C6NPym3zStvSoQayjYV+eIcZERkx31KhtFu9clZKgRTyPjdKMIth/wBtPKjL/5+PYalLdomM4ONthrPgnkN4x4R0+D4+EBpXo8gNiAFsNwIDAQAB";
//2、appid
private static final String APP_ID = "11000000000000028685";
//private static final String APP_ID = "11000000000000028685";
//3、密钥对认证方式,公钥在API平台登记,此处为私钥
private static final String MY_PRIVATE_KEY = "MIIEvQIBADANBgkqhkiG9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0M=";
/**
* @Description: 代发任务确认提交
* @Author: huyc
* @Date: 2024-11-12
* @return: R
**/
public R submitIcbcTransactionFlow() {
//应用方加密串
UiIcbcClient client = new UiIcbcClient(APP_ID, IcbcConstants.SIGN_TYPE_RSA2, MY_PRIVATE_KEY,
IcbcConstants.CHARSET_UTF8);
UiIcbcClient client = new UiIcbcClient(icbcConfigProperties.getAppId(), IcbcConstants.SIGN_TYPE_RSA2,
icbcConfigProperties.getAppPrivateKey(), IcbcConstants.CHARSET_UTF8);
JftUiPayrollComfirmSubmitRequestV1 request = new JftUiPayrollComfirmSubmitRequestV1();
request.setServiceUrl("https://gw.open.icbc.com.cn/ui/jft/ui/payroll/comfirmsubmit/V1");
JftUiPayrollComfirmSubmitRequestV1.JjftUiPayrolComfirmSubmitRequestV1BizV1 bizContent =
new JftUiPayrollComfirmSubmitRequestV1.JjftUiPayrolComfirmSubmitRequestV1BizV1();
bizContent.setAppId(APP_ID);
//appid
bizContent.setAppId(icbcConfigProperties.getAppId());
//HR系统名称
bizContent.setAppName("HRO");
//企业编号
bizContent.setOutVendorId("020101190");
bizContent.setOutVendorId(icbcConfigProperties.getCompanyNo());
//操作类型:1-受理 2-审核
bizContent.setOprType("1");
//总金额 oprType 为2时,非必输,金额单位分
bizContent.setTotalAmt("2");
//总笔数 oprType 为2时,非必输
bizContent.setTotalCount("2");
bizContent.setAppSerialno("WX104");
//批次号--每日批号不能重复,系统生成批次号
bizContent.setAppSerialno("WX203");
//文件校验方式 1:sha256校验、2:sm3校验;上送为空默认按照sha256校验
bizContent.setFileCheckSign("1");
bizContent.setLocalFilepath("D:/icbcFile/020101190_WX104_0_20240909.xls");
bizContent.setFileMdcode(getMdCode("D:/icbcFile/020101190_WX104_0_20240909.xls"));
//客户本地文件路径 {企业编号}_{批次号}_{代发方式}_yyyyMMdd.xls 拼接起来总长不能超过36位
//{平台编号}_{企业编号}_{批次号}_{代发方式}_yyyyMMdd .zip 压缩文件中,包含代发工资指令文件信息,为xls格式,xls文件名称同zip包文件名称
bizContent.setLocalFilepath("D:/icbcFile/020101190_WX203_0_20241112.xls");
//文件md码
bizContent.setFileMdcode(getMdCode("D:/icbcFile/020101190_WX203_0_20241112.xls"));
//文件类型:1-代发工资 2-报销
bizContent.setFileType("1");
bizContent.setNotifyUrl(null);
bizContent.setAppRemark("备注");
JSONObject jsonObject = new JSONObject();
jsonObject.put("key",request);
request.setBizContent(bizContent);
System.out.println("request: " + JSON.toJSONString(request));
// System.out.println("request: " + JSON.toJSONString(request));
try {
String result = client.buildPostForm(request);
......@@ -104,25 +115,34 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
return R.ok();
}
/**
* @Description: 代发任务批次明细查询
* @Author: huyc
* @Date: 2024-11-12
* @return: R
**/
public R selectIcbcTransactionFlowInfo() {
//应用方加密串
String AES_Key = "8jTKCqZ9035g+HRzpZQqZA==";
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);
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://gw.open.icbc.com.cn/api/jft/api/payroll/querydetail/V1");
JftApiPayrollQueryDetailRequestV1.JftApiPayrollQueryDetailRequestV1Biz bizContent = new
JftApiPayrollQueryDetailRequestV1.JftApiPayrollQueryDetailRequestV1Biz();
bizContent.setAppId(APP_ID);
bizContent.setOutVendorId("020101190");
bizContent.setAppId(icbcConfigProperties.getAppId());
//企业编号
bizContent.setOutVendorId(icbcConfigProperties.getCompanyNo());
//查询类型:1 批次 2 批次明细
bizContent.setType("2");
//批次号,appSerialno为空时,必输
bizContent.setAppBatserialno("WX04");
bizContent.setAppBatserialno("WX203");
//内部批次号,组成规则:批次号-顺序号,appBatserialno为空时必输
// bizContent.setAppSerialno("WX04-1");
//开始条数,如果送1,则返回排序的第一条开始,appBatserialno不为空时必输
bizContent.setStartId("0");
//结束条数,每次最多返回50条,返回条数按照结束-开始+1,appBatserialno不为空时必输
bizContent.setEndId("10");
request.setBizContent(bizContent);
try {
......@@ -137,47 +157,44 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
return R.ok();
}
public R businessOpen() {
/**
* @Description: 根据银行卡号查询银行信息
* @Author: huyc
* @Date: 2024-11-12
* @return: R
**/
@Override
public R querybankinfo() {
String apiUrl= "https://gw.open.icbc.com.cn/api/jft/api/vendor/separate/accounts/business/open/V1";
String encryptKey = "u1NKBJOMzvkHFvGiKbsq3g==";
//签名类型为RSA2时,需传入appid,私钥和网关公钥,签名类型使用定值IcbcConstants.SIGN_TYPE_RSA2,其他参数使用缺省值
DefaultIcbcClient client = new DefaultIcbcClient(APP_ID,"RSA2", MY_PRIVATE_KEY,"UTF-8", "json",APIGW_PUBLIC_KEY,"AES",encryptKey, "", "");
JftApiVendorSeparateAccountsBusinessOpenRequestV1 request = new JftApiVendorSeparateAccountsBusinessOpenRequestV1();
//4、根据测试环境和生产环境替换相应ip和端口
request.setServiceUrl(apiUrl);
//5、请对照接口文档用bizContent.setxxx()方法对业务上送数据进行赋值
JftApiVendorSeparateAccountsBusinessOpenRequestV1.JftApiVendorSeparateAccountsBusinessOpenRequestV1Biz bizContent = new JftApiVendorSeparateAccountsBusinessOpenRequestV1.JftApiVendorSeparateAccountsBusinessOpenRequestV1Biz();
bizContent.setAppId(APP_ID);
bizContent.setOutVendorId("0202407190000011934");
bizContent.setOutVendorManagerId("0202407190000011934");
bizContent.setOutUpperVendorId(APP_ID);
bizContent.setVendorName("安徽皖信人力资源管理有限公司");
bizContent.setBizType("01");
bizContent.setOpenCardType("0");
bizContent.setBusinessType("02");//开通业务类型
bizContent.setSubBusinessType("03");//开通业务类型
bizContent.setBusSwitch("1");//业务开通关闭标志,开通时传1 关闭时传0
bizContent.setRegistType("1");//注册标识 1 注册+开通业务 2 仅维护业务
bizContent.setUpperMcardNo("");
bizContent.setEqfEnsurePhone("");
request.setBizContent(bizContent);
JftApiVendorSeparateAccountsBusinessOpenResponseV1 response;
JSONObject jsonObject = new JSONObject();
jsonObject.put("key",request);
String a = jsonObject.toJSONString();
DefaultIcbcClient client = new DefaultIcbcClient(icbcConfigProperties.getAppId(), IcbcConstants.SIGN_TYPE_CA_SM_ICBC,
icbcConfigProperties.getAppPrivateKey(), IcbcConstants.CHARSET_UTF8, IcbcConstants.FORMAT_JSON, null,
null, null, icbcConfigProperties.getCaSm(), null);
client.setIcbc_ca(icbcConfigProperties.getCaSmIcbc());
try {
response = (JftApiVendorSeparateAccountsBusinessOpenResponseV1)client.execute(request, System.currentTimeMillis()+"");
MybankEnterpriseAccountQuerybankinfoRequestV1.MybankEnterpriseAccountQuerybankinfoRequestBizV1 bizContent =
new MybankEnterpriseAccountQuerybankinfoRequestV1.MybankEnterpriseAccountQuerybankinfoRequestBizV1();
MybankEnterpriseAccountQuerybankinfoRequestV1 request = new MybankEnterpriseAccountQuerybankinfoRequestV1();
// 请对照接口文档用bizContent.setxxx()方法对业务上送数据进行赋值
bizContent.setTransCode("QBKNC");
// 当天
String nowDate = DateUtil.getThisDay();
bizContent.setTranDate(nowDate);
bizContent.setTranTime("103231001");
bizContent.setLanguage("zh_CN");
bizContent.setfSeqNo("AHWX"+ System.currentTimeMillis());
//银行卡号
bizContent.setCardNo("1302015209250019444");
request.setServiceUrl("https://gw.open.icbc.com.cn/api/mybank/enterprise/account/querybankinfo/V1");
request.setBizContent(bizContent);
MybankEnterpriseAccountQuerybankinfoResponseV1 response = client.execute(request);
if (response.isSuccess()) {
//6、业务成功处理,请根据接口文档用response.getxxx()获取同步返回的业务数据
System.out.println("ReturnCode:"+response.getReturnCode());
System.out.println("response:" + response);
// 业务成功处理
return R.ok(response);
} else {
//失败
System.out.println("ReturnCode:"+response.getReturnCode());
System.out.println("ReturnMsg:"+response.getReturnMsg());
// 失败
return R.failed("error");
}
} catch (IcbcApiException e) {
} catch (Exception e) {
e.printStackTrace();
}
return R.ok();
......@@ -272,8 +289,8 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
//验证工行上行网关RSA签名
String signStr = WebUtils.buildOrderedSignStr(path, params);
log.error("验签入参,signStr:[[{}]], sign_type:[[{}]], APIGW_PUBLIC_KEY:[[{}]], charset:[[{}]], sign:[[{}]]",
signStr, signType, APIGW_PUBLIC_KEY, sign);
return IcbcSignature.verify(signStr, signType, APIGW_PUBLIC_KEY, charset, sign);
signStr, signType, icbcConfigProperties.getApigwPublicKey(), sign);
return IcbcSignature.verify(signStr, signType, icbcConfigProperties.getApigwPublicKey(), charset, sign);
}
......@@ -314,7 +331,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
String signType = IcbcConstants.SIGN_TYPE_RSA2;
String signStr = "\"response_biz_content\":" + responseBizContent + "," + "\"sign_type\":" + "\"" + signType
+ "\"";
String signParam = IcbcSignature.sign(signStr, signType, MY_PRIVATE_KEY, charset);
String signParam = IcbcSignature.sign(signStr, signType, icbcConfigProperties.getAppPrivateKey(), charset);
String returnJson = "{\"response_biz_content\":" + responseBizContent + ",\"sign_type\":\"" + signType + "\""
+ ",\"sign\":\"" + signParam + "\"}";
return returnJson;
......
......@@ -40,7 +40,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 聚富通到账通知交易流水查询
......@@ -327,6 +326,12 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
}
}
/**
* @Description: 根据银行卡号查询银行信息
* @Author: huyc
* @Date: 2024-11-12
* @return: R
**/
@Override
public R querybankinfo() {
......@@ -345,7 +350,9 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
MybankEnterpriseAccountQuerybankinfoRequestV1 request = new MybankEnterpriseAccountQuerybankinfoRequestV1();
// 请对照接口文档用bizContent.setxxx()方法对业务上送数据进行赋值
bizContent.setTransCode("QBKNC");
bizContent.setTranDate("20240821");
// 当天
String nowDate = DateUtil.getThisDay();
bizContent.setTranDate(nowDate);
bizContent.setTranTime("103231001");
bizContent.setLanguage("zh_CN");
bizContent.setfSeqNo("AHWX"+ System.currentTimeMillis());
......
......@@ -71,10 +71,20 @@ springdoc:
#按包路径匹配
packagesToScan: com.yifu.cloud.plus.v1.ekp.controller
#工行生产环境配置
#工行到账查询生产环境配置
icbc:
appId: 11000000000000019038
appPrivateKey: 4d931f6ad4331158fcc4dea23f0d71393328146e40b5f63f197b9f6ad3732f44
serverUrl: https://gw.open.icbc.com.cn/api/mybank/enterprise/trade/qhisd/V1
caSm: MIICSTCCAeygAwIBAgIGAJuAEtYAMAwGCCqBHM9VAYN1BQAwQTELMAkGA1UEBhMCY24xGzAZBgNVBAoMEnNtMmNvci5pY2JjLmNvbS5jbjEVMBMGA1UEAwwMc20ycm9vdGNhY29yMB4XDTIzMTIyMTA5NTAxNloXDTI4MTIyMTE1NTk1OVowVDELMAkGA1UEBhMCY24xGzAZBgNVBAoMEnNtMmNvci5pY2JjLmNvbS5jbjENMAsGA1UECwwEMTMwMjEZMBcGA1UEAwwQYWh3eC55LjEzMDIuMDIwMTBZMBMGByqGSM49AgEGCCqBHM9VAYItA0IABGEC1fF2rHTWfipQhOr+8SfvXDBiazIrImcsPH5aGaYMFK2RIXv0AF2xe2ZgAzcWRbgop0cAjaBHXpzSfIlnfl6jgbowgbcwHwYDVR0jBBgwFoAUDD6RRlIIkxjZ0/0x6S8mKdW3D2Y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nqzzaYmODo3T3qmZUJsUwIhAOaMMH0IpwefVTSwJlhrVbmEB5DmoxLo1Xb/1tvfW1l2
\ No newline at end of file
......@@ -27,7 +27,6 @@ import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
......@@ -180,8 +179,8 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
/**
* 试用期(单位月)
*/
@Length(max = 2, message = "试用期 不能超过2 个字符" )
@ExcelAttribute(name = "试用期", maxLength = 32)
@Length(max = 3, message = "试用期 不能超过3个字符" )
@ExcelAttribute(name = "试用期", maxLength = 3, isNotEmpty = true)
@Schema(description = "试用期" )
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("试用期" )
......
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