parent
fd1bda9fae
commit
7015ea8375
|
@ -168,7 +168,7 @@ public class ApiService {
|
|||
* @param systemName 推送系统标识
|
||||
* @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();
|
||||
|
@ -189,11 +189,9 @@ public class ApiService {
|
|||
|
||||
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 saveResponseBody;
|
||||
JSONObject jsonObject;
|
||||
|
@ -202,6 +200,16 @@ public class ApiService {
|
|||
String submitUrl;
|
||||
Map<String, Object> submitRequestBody;
|
||||
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) {
|
||||
// 付款处理
|
||||
case "https://biptestctny.invest.com.cn:8002/iuap-api-auth/yonbip/fi/fundpayment/save":
|
||||
|
|
|
@ -130,13 +130,20 @@ public class ApiMappingBillPlugin extends AbstractFormPlugin implements Plugin {
|
|||
List<DynamicObject> dynamicObjects = new ArrayList<>();
|
||||
|
||||
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]));
|
||||
this.getView().showTipNotification("返回结果:" + result);
|
||||
}
|
||||
|
||||
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]));
|
||||
this.getView().showTipNotification("返回结果:" + result);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ public class PaymentProcessingBillPlugin extends AbstractBillPlugIn implements P
|
|||
String bankpaystatus = dataEntity.getString("bankpaystatus");
|
||||
if ("TF、NC、OF".contains(bankpaystatus)) {
|
||||
List<DynamicObject> dynamicObjects = new ArrayList<>();
|
||||
String result = ApiService.paymentSlipsJson(dataEntity, "BIPNO", dynamicObjects);
|
||||
String result = ApiService.paymentSlipsJson(dataEntity, "BIPNO", dynamicObjects, null);
|
||||
if (result.contains("成功")) {
|
||||
SaveServiceHelper.save(dynamicObjects.toArray(new DynamicObject[0]));
|
||||
this.getView().showSuccessNotification("打回成功");
|
||||
|
|
|
@ -62,7 +62,7 @@ public class PushTaskPlugin extends AbstractTask implements Plugin {
|
|||
.and("shkd_pushstatus", QCP.not_equals, "结算失败")
|
||||
.and("billstatus", QCP.equals, "D").toArray());
|
||||
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]));
|
||||
break;
|
||||
// 收款处理
|
||||
|
@ -75,7 +75,7 @@ public class PushTaskPlugin extends AbstractTask implements Plugin {
|
|||
.and("shkd_pushstatus", QCP.not_equals, "已结算")
|
||||
.and("billstatus", QCP.equals, "D").toArray());
|
||||
dynamicObjects = Arrays.asList(objects2);
|
||||
dynamicObjects.forEach(dynamicObject -> ApiService.paymentSlipsJson(dynamicObject, "BIP", dynamicObjectList));
|
||||
dynamicObjects.forEach(dynamicObject -> ApiService.paymentSlipsJson(dynamicObject, "BIP", dynamicObjectList, null));
|
||||
break;
|
||||
// 银行收付处理
|
||||
case "bei_transdetail_cas":
|
||||
|
@ -104,7 +104,7 @@ public class PushTaskPlugin extends AbstractTask implements Plugin {
|
|||
.and("shkd_pushstatus", QCP.equals, "结算失败").toArray());
|
||||
dynamicObjects = Arrays.asList(objects4);
|
||||
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]));
|
||||
default:
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue