提交内容:银企交易明细,电子回单查询推送BIP

备注:银企交易明细,电子回单查询推送BIP
提交人:邹江涛
This commit is contained in:
zoujiangtao 2024-12-22 17:05:53 +08:00
parent fd1bda9fae
commit 7015ea8375
4 changed files with 25 additions and 10 deletions

View File

@ -168,7 +168,7 @@ public class ApiService {
* @param systemName 推送系统标识 * @param systemName 推送系统标识
* @return 推送结果 * @return 推送结果
*/ */
public static String paymentSlipsJson(DynamicObject dynamic, String systemName, List<DynamicObject> dynamicObjects) { public static String paymentSlipsJson(DynamicObject dynamic, String systemName, List<DynamicObject> dynamicObjects, String requestBody) {
// 获取推送的单据标识 // 获取推送的单据标识
String billMark = dynamic.getDataEntityType().getName(); String billMark = dynamic.getDataEntityType().getName();
@ -189,11 +189,9 @@ public class ApiService {
String saveUrl = objects[0].getString("shkd_url"); String saveUrl = objects[0].getString("shkd_url");
// 组装请求体数据
String saveRequestBody = assembleRequestBody(dynamic, objects[0]);
logger.info("请求URL{}\n组装请求body{}", saveUrl, saveRequestBody);
String saveRequestBody;
String result = null; String result = null;
String saveResponseBody; String saveResponseBody;
JSONObject jsonObject; JSONObject jsonObject;
@ -202,6 +200,16 @@ public class ApiService {
String submitUrl; String submitUrl;
Map<String, Object> submitRequestBody; Map<String, Object> submitRequestBody;
String submitResponseBody; String submitResponseBody;
if (requestBody != null) {
// 组装请求体数据
saveRequestBody = requestBody;
logger.info("请求URL{}\n组装请求body{}", saveUrl, saveRequestBody);
} else {
saveRequestBody = assembleRequestBody(dynamic, objects[0]);
logger.info("请求URL{}\n组装请求body{}", saveUrl, saveRequestBody);
}
switch (saveUrl) { switch (saveUrl) {
// 付款处理 // 付款处理
case "https://biptestctny.invest.com.cn:8002/iuap-api-auth/yonbip/fi/fundpayment/save": case "https://biptestctny.invest.com.cn:8002/iuap-api-auth/yonbip/fi/fundpayment/save":

View File

@ -130,13 +130,20 @@ public class ApiMappingBillPlugin extends AbstractFormPlugin implements Plugin {
List<DynamicObject> dynamicObjects = new ArrayList<>(); List<DynamicObject> dynamicObjects = new ArrayList<>();
if ("shkd_testapi".equals(itemKey)) { if ("shkd_testapi".equals(itemKey)) {
String result = ApiService.paymentSlipsJson(billObject, "BIP", dynamicObjects); String result = ApiService.paymentSlipsJson(billObject, "BIP", dynamicObjects, null);
SaveServiceHelper.save(dynamicObjects.toArray(new DynamicObject[0]));
this.getView().showTipNotification("返回结果:" + result);
}
if ("shkd_pushjson".equals(itemKey)) {
String requestBody = ApiService.assembleRequestBody(billObject, dataEntity);
String result = ApiService.paymentSlipsJson(billObject, "BIP", dynamicObjects, requestBody);
SaveServiceHelper.save(dynamicObjects.toArray(new DynamicObject[0])); SaveServiceHelper.save(dynamicObjects.toArray(new DynamicObject[0]));
this.getView().showTipNotification("返回结果:" + result); this.getView().showTipNotification("返回结果:" + result);
} }
if ("shkd_hitback".equals(itemKey)) { if ("shkd_hitback".equals(itemKey)) {
String result = ApiService.paymentSlipsJson(billObject, "BIPNO", dynamicObjects); String result = ApiService.paymentSlipsJson(billObject, "BIPNO", dynamicObjects, null);
SaveServiceHelper.save(dynamicObjects.toArray(new DynamicObject[0])); SaveServiceHelper.save(dynamicObjects.toArray(new DynamicObject[0]));
this.getView().showTipNotification("返回结果:" + result); this.getView().showTipNotification("返回结果:" + result);
} }

View File

@ -30,7 +30,7 @@ public class PaymentProcessingBillPlugin extends AbstractBillPlugIn implements P
String bankpaystatus = dataEntity.getString("bankpaystatus"); String bankpaystatus = dataEntity.getString("bankpaystatus");
if ("TF、NC、OF".contains(bankpaystatus)) { if ("TF、NC、OF".contains(bankpaystatus)) {
List<DynamicObject> dynamicObjects = new ArrayList<>(); List<DynamicObject> dynamicObjects = new ArrayList<>();
String result = ApiService.paymentSlipsJson(dataEntity, "BIPNO", dynamicObjects); String result = ApiService.paymentSlipsJson(dataEntity, "BIPNO", dynamicObjects, null);
if (result.contains("成功")) { if (result.contains("成功")) {
SaveServiceHelper.save(dynamicObjects.toArray(new DynamicObject[0])); SaveServiceHelper.save(dynamicObjects.toArray(new DynamicObject[0]));
this.getView().showSuccessNotification("打回成功"); this.getView().showSuccessNotification("打回成功");

View File

@ -62,7 +62,7 @@ public class PushTaskPlugin extends AbstractTask implements Plugin {
.and("shkd_pushstatus", QCP.not_equals, "结算失败") .and("shkd_pushstatus", QCP.not_equals, "结算失败")
.and("billstatus", QCP.equals, "D").toArray()); .and("billstatus", QCP.equals, "D").toArray());
dynamicObjects = Arrays.asList(objects1); dynamicObjects = Arrays.asList(objects1);
dynamicObjects.forEach(dynamicObject -> ApiService.paymentSlipsJson(dynamicObject, "BIP", dynamicObjectList)); dynamicObjects.forEach(dynamicObject -> ApiService.paymentSlipsJson(dynamicObject, "BIP", dynamicObjectList, null));
SaveServiceHelper.save(dynamicObjectList.toArray(new DynamicObject[0])); SaveServiceHelper.save(dynamicObjectList.toArray(new DynamicObject[0]));
break; break;
// 收款处理 // 收款处理
@ -75,7 +75,7 @@ public class PushTaskPlugin extends AbstractTask implements Plugin {
.and("shkd_pushstatus", QCP.not_equals, "已结算") .and("shkd_pushstatus", QCP.not_equals, "已结算")
.and("billstatus", QCP.equals, "D").toArray()); .and("billstatus", QCP.equals, "D").toArray());
dynamicObjects = Arrays.asList(objects2); dynamicObjects = Arrays.asList(objects2);
dynamicObjects.forEach(dynamicObject -> ApiService.paymentSlipsJson(dynamicObject, "BIP", dynamicObjectList)); dynamicObjects.forEach(dynamicObject -> ApiService.paymentSlipsJson(dynamicObject, "BIP", dynamicObjectList, null));
break; break;
// 银行收付处理 // 银行收付处理
case "bei_transdetail_cas": case "bei_transdetail_cas":
@ -104,7 +104,7 @@ public class PushTaskPlugin extends AbstractTask implements Plugin {
.and("shkd_pushstatus", QCP.equals, "结算失败").toArray()); .and("shkd_pushstatus", QCP.equals, "结算失败").toArray());
dynamicObjects = Arrays.asList(objects4); dynamicObjects = Arrays.asList(objects4);
dynamicObjects.addAll(Arrays.asList(objects5)); dynamicObjects.addAll(Arrays.asList(objects5));
dynamicObjects.forEach(dynamicObject -> ApiService.paymentSlipsJson(dynamicObject, "BIPNO", dynamicObjectList)); dynamicObjects.forEach(dynamicObject -> ApiService.paymentSlipsJson(dynamicObject, "BIPNO", dynamicObjectList, null));
SaveServiceHelper.save(dynamicObjectList.toArray(new DynamicObject[0])); SaveServiceHelper.save(dynamicObjectList.toArray(new DynamicObject[0]));
default: default:
} }