Commit 03fdfd10 authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/MVP1.6.9' into MVP1.6.9

parents abea6dc2 dcc12f74
......@@ -44,6 +44,10 @@ public class IcbcConfigProperties {
**/
private String companyNo;
private String caSm;
private String caSmIcbc;
/**
* 异步通知地址
*/
......
......@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.ekp.controller;
import com.icbc.api.IcbcApiException;
import com.yifu.cloud.plus.v1.ekp.service.IcbcTransactionFlowQueryService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
......@@ -25,12 +26,12 @@ public class IcbcTransactionFlowQueryController {
private final IcbcTransactionFlowQueryService icbcTransactionFlowQueryService;
/**
* 交易流水查询
* 管家卡交易流水查询
*
* @param
* @return
*/
@Operation(summary = "交易流水查询", description = "交易流水查询")
@Operation(summary = "管家卡交易流水查询", description = "交管家卡易流水查询")
@PostMapping("/page")
public R getIcbcTransactionFlow() {
return icbcTransactionFlowQueryService.getIcbcTransactionFlow();
......@@ -48,6 +49,19 @@ public class IcbcTransactionFlowQueryController {
return icbcTransactionFlowQueryService.getIcbcTransactionFlowNew();
}
/**
* 交易流水查询
*
* @param
* @return
*/
@Operation(summary = "交易流水查询", description = "交易流水查询")
@Inner
@PostMapping("/inner/newPage")
public R getIcbcTransactionFlowInner() throws IcbcApiException {
return icbcTransactionFlowQueryService.getIcbcTransactionFlowNew();
}
/**
* 预订单接口
*
......
......@@ -117,43 +117,10 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
public R getIcbcTransactionFlowNew() throws IcbcApiException {
// String ca_sm_path = "D:/icbcFile/ahwx_y_1302.cer";
// String ca_sm_icbc_path = "D:/icbcFile/API_GATEWAY_ICBC_SM_REAL.cer";
// 获取当前类加载器
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
// 获取资源的URL
// URL resourceUrl = classLoader.getResource("/file/ahwx_y_1302.cer");
// URL resourceUrl1 = classLoader.getResource("/file/API_GATEWAY_ICBC_SM_REAL.cer");
// String ca_sm = IcbcSignature.getCAInfoStr(resourceUrl.getPath());
// String ca_sm_icbc = IcbcSignature.getCAInfoStr(resourceUrl1.getPath());
// String ca_sm = IcbcSignature.getCAInfoStr(ca_sm_path);
// String ca_sm_icbc = IcbcSignature.getCAInfoStr(ca_sm_icbc_path);
// log.error("文件地址:" + resourceUrl.getPath() + "转化后的编码" + ca_sm);
// log.error("文件地址1:" + resourceUrl1.getPath() + "转化后的编码1" + ca_sm_icbc);
// DefaultIcbcClient(appid, 签名类型, SM2企业私钥, 编码格式, 数据格式, null, null, null, SM2 cer公钥串, null)
DefaultIcbcClient client = new DefaultIcbcClient(icbcConfigProperties.getAppId(), IcbcConstants.SIGN_TYPE_CA_SM_ICBC,
icbcConfigProperties.getAppPrivateKey(), IcbcConstants.CHARSET_UTF8, IcbcConstants.FORMAT_JSON, null,
null, null, "MIICSTCCAeygAwIBAgIGAJuAEtYAMAwGCCqBHM9VAYN1BQAwQTELMAkGA1UEBhMCY24xGzAZBgNVBAoMEnNtMmNvci5pY2JjLmNvbS5jbjEVMBMGA1UEAwwMc20ycm9vdGNhY29yMB4XDTIzMTIyMTA5NTAxNloXDTI4MTIyMTE1NTk1OVowVDELMAkGA1UEBhMCY24xGzAZBgNVBAoMEnNtMmNvci5pY2JjLmNvbS5jbjENMAsGA1UECwwEMTMwMjEZMBcGA1UEAwwQYWh3eC55LjEzMDIuMDIwMTBZMBMGByqGSM49AgEGCCqBHM9VAYItA0IABGEC1fF2rHTWfipQhOr+8SfvXDBiazIrImcsPH5aGaYMFK2RIXv0AF2xe2ZgAzcWRbgop0cAjaBHXpzSfIlnfl6jgbowgbcwHwYDVR0jBBgwFoAUDD6RRlIIkxjZ0/0x6S8mKdW3D2YwCQYDVR0TBAIwADBdBgNVHR8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20uY24vb2NhMzEv\n" +
"b2NhMzEuY2VyMB8GA1UdIwQYMBaAFAjY0SbESH2c7KyY6fF/YrmAzqlFMAwGA1Ud\n" +
"EwEB/wQCMAAwSAYDVR0gBEEwPzA9BghggRyG7yoBBDAxMC8GCCsGAQUFBwIBFiNo\n" +
"dHRwOi8vd3d3LmNmY2EuY29tLmNuL3VzL3VzLTE0Lmh0bTA9BgNVHR8ENjA0MDKg\n" +
"MKAuhixodHRwOi8vY3JsLmNmY2EuY29tLmNuL29jYTMxL1NNMi9jcmwyNzMwLmNy\n" +
"bDAOBgNVHQ8BAf8EBAMCBsAwHQYDVR0OBBYEFOpEqrs73yvBXqvDQoT33v05FnDI\n" +
"MB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDBDAMBggqgRzPVQGDdQUAA0kA\n" +
"MEYCIQCdKpfhUijpAKEQekHxlk4LvnqzzaYmODo3T3qmZUJsUwIhAOaMMH0Ipwef\n" +
"VTSwJlhrVbmEB5DmoxLo1Xb/1tvfW1l2");
null, null, icbcConfigProperties.getCaSm(), null);
client.setIcbc_ca(icbcConfigProperties.getCaSmIcbc());
MybankEnterpriseTradeQhisdRequestV1.MybankEnterpriseTradeQhisdRequestBizV1 bizContent =
new MybankEnterpriseTradeQhisdRequestV1.MybankEnterpriseTradeQhisdRequestBizV1();
......@@ -165,7 +132,6 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
String formattedTime = currentTime.format(formatter);
bizContent.setTranDate(DateUtil.getThisDay());
bizContent.setTranTime(formattedTime);
log.error("formattedTime:" + formattedTime);
bizContent.setTransCode("QHISD");
bizContent.setLanguage("zh_CN");
String fSeqNo = "AHWX" + System.currentTimeMillis();
......@@ -188,6 +154,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
list.stream().filter(e-> e.getDrcrf().equals("2") && !serioList.contains(e)).collect(Collectors.toList());
//封装数据
if (!insertList.isEmpty()) {
log.error("到账明细条数:" + insertList.size());
for (MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1 entry : insertList) {
EKPEntryPushParam pushParam = new EKPEntryPushParam();
initValue(entry,pushParam,bankName,bankNo);
......@@ -196,7 +163,6 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
if (StringUtils.isBlank(body)){
sendToEkp(pushParam);
}
break;
}
}
}
......
......@@ -75,4 +75,6 @@ springdoc:
icbc:
appId: 11000000000000019038
appPrivateKey: 4d931f6ad4331158fcc4dea23f0d71393328146e40b5f63f197b9f6ad3732f44
serverUrl: https://gw.open.icbc.com.cn/api/mybank/enterprise/trade/qhisd/V1
\ No newline at end of file
serverUrl: https://gw.open.icbc.com.cn/api/mybank/enterprise/trade/qhisd/V1
caSm: MIICSTCCAeygAwIBAgIGAJuAEtYAMAwGCCqBHM9VAYN1BQAwQTELMAkGA1UEBhMCY24xGzAZBgNVBAoMEnNtMmNvci5pY2JjLmNvbS5jbjEVMBMGA1UEAwwMc20ycm9vdGNhY29yMB4XDTIzMTIyMTA5NTAxNloXDTI4MTIyMTE1NTk1OVowVDELMAkGA1UEBhMCY24xGzAZBgNVBAoMEnNtMmNvci5pY2JjLmNvbS5jbjENMAsGA1UECwwEMTMwMjEZMBcGA1UEAwwQYWh3eC55LjEzMDIuMDIwMTBZMBMGByqGSM49AgEGCCqBHM9VAYItA0IABGEC1fF2rHTWfipQhOr+8SfvXDBiazIrImcsPH5aGaYMFK2RIXv0AF2xe2ZgAzcWRbgop0cAjaBHXpzSfIlnfl6jgbowgbcwHwYDVR0jBBgwFoAUDD6RRlIIkxjZ0/0x6S8mKdW3D2YwCQYDVR0TBAIwADBdBgNVHR8EVjBUMFKgUKBOpEwwSjEQMA4GA1UEAwwHY3JsNDE3MDEMMAoGA1UECwwDY3JsMRswGQYDVQQKDBJzbTJjb3IuaWNiYy5jb20uY24xCzAJBgNVBAYTAmNuMAsGA1UdDwQEAwIHgDAdBgNVHQ4E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bTJjb3IuaWNiYy5jb20uY24xCzAJBgNVBAYTAmNuMAsGA1UdDwQEAwIHgDAdBgNVHQ4EFgQUd0LHEI6l7Faq6/9GObNld3SH7xswDAYIKoEcz1UBg3UFAANJADBGAiEA68uRM5zYzMhaheAG+fw3AtkRFE5146+Qw6GVP93WojwCIQDzsIL3duLRtTot8ciVuKUQkI+GrXAg7nWnd2M2o9oRBw==
-----END CERTIFICATE-----
\ No newline at end of file
package com.yifu.cloud.plus.v1.job.compont;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprEkpProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Component;
/**
* @Author huyc
* @Description 定时任务具体执行类
* @Date 10:48 2022/8/17
* @Param
* @return
**/
@Component(value = "ekpTask")
@Slf4j
@EnableConfigurationProperties(DaprEkpProperties.class)
public class EkpTask {
@Autowired
private DaprEkpProperties daprEkpProperties;
/**
* @Author huyc
* @Description 入账明细生成
* @Date 2024-8-28 16:31:32
* @Param
* @return
**/
public void doCreateEntryInfoEkp() {
log.info("------------定时生成入账明细数据-定时任务开始------------");
HttpDaprUtil.invokeMethodPost(daprEkpProperties.getAppUrl(),daprEkpProperties.getAppId(),"/icbcQuery/inner/newPage","", Object.class, SecurityConstants.FROM_IN);
log.info("------------定时生成入账明细数据-定时任务结束------------");
}
}
\ No newline at end of file
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