Commit fabb54f1 authored by huyuchen's avatar huyuchen

工行对接修改

parent 0dea854b
package com.yifu.cloud.plus.v1.ekp.service.impl; package com.yifu.cloud.plus.v1.ekp.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.icbc.api.DefaultIcbcClient; import com.icbc.api.DefaultIcbcClient;
...@@ -68,9 +69,10 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -68,9 +69,10 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
bizContent.setOprType("1"); bizContent.setOprType("1");
bizContent.setTotalAmt("2"); bizContent.setTotalAmt("2");
bizContent.setTotalCount("2"); bizContent.setTotalCount("2");
bizContent.setAppSerialno("WX03"); bizContent.setAppSerialno("WX04");
bizContent.setLocalFilepath("D:/icbcFile/020101190_WX03_0_20240816.xls"); bizContent.setFileCheckSign("1");
bizContent.setFileMdcode(getMdCode("D:/icbcFile/020101190_WX03_0_20240816.xls")); bizContent.setLocalFilepath("D:/icbcFile/020101190_WX04_0_20240819.xls");
bizContent.setFileMdcode(getMdCode("D:/icbcFile/020101190_WX04_0_20240819.xls"));
bizContent.setFileType("1"); bizContent.setFileType("1");
bizContent.setNotifyUrl(null); bizContent.setNotifyUrl(null);
bizContent.setAppRemark("备注"); bizContent.setAppRemark("备注");
...@@ -78,6 +80,8 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -78,6 +80,8 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
jsonObject.put("key",request); jsonObject.put("key",request);
String a = jsonObject.toJSONString(); String a = jsonObject.toJSONString();
request.setBizContent(bizContent); request.setBizContent(bizContent);
System.out.println("request: " + JSON.toJSONString(request));
try { try {
String result = client.buildPostForm(request); String result = client.buildPostForm(request);
if (Common.isNotNull(result)) { if (Common.isNotNull(result)) {
...@@ -111,9 +115,9 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -111,9 +115,9 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
bizContent.setOutVendorId("020101190"); bizContent.setOutVendorId("020101190");
bizContent.setType("2"); bizContent.setType("2");
//批次号,appSerialno为空时,必输 //批次号,appSerialno为空时,必输
bizContent.setAppBatserialno("WX01"); bizContent.setAppBatserialno("WX04");
//内部批次号,组成规则:批次号-顺序号,appBatserialno为空时必输 //内部批次号,组成规则:批次号-顺序号,appBatserialno为空时必输
// bizContent.setAppSerialno("230921"); // bizContent.setAppSerialno("WX04-1");
bizContent.setStartId("0"); bizContent.setStartId("0");
bizContent.setEndId("10"); bizContent.setEndId("10");
request.setBizContent(bizContent); request.setBizContent(bizContent);
...@@ -212,7 +216,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -212,7 +216,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
byte[] buffer = new byte[1024]; byte[] buffer = new byte[1024];
String mdCode; String mdCode;
try { try {
MessageDigest digest = MessageDigest.getInstance("MD5"); MessageDigest digest = MessageDigest.getInstance("SHA-256");
in = new FileInputStream(filePath); in = new FileInputStream(filePath);
int len; int len;
while ((len = in.read(buffer, 0, 1024)) != -1) { while ((len = in.read(buffer, 0, 1024)) != -1) {
......
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