parent
8b31f009f8
commit
5c9223ef1c
|
@ -204,7 +204,6 @@ public class ApiService {
|
|||
String saveUrl = objects[0].getString("shkd_url");
|
||||
|
||||
|
||||
|
||||
String saveRequestBody;
|
||||
String result = null;
|
||||
String saveResponseBody;
|
||||
|
@ -315,11 +314,11 @@ public class ApiService {
|
|||
dynamicObjects.add(dynamic);
|
||||
logger.info("付款处理(支付结果) → BIP推送接口 → 成功\n成功单据编号:{}\n成功请求体:{}\n推送成功接口返回数据:{}",
|
||||
dynamic.getString("billno"), saveRequestBody, saveResponseBody);
|
||||
result = "推送 → 付款处理(支付结果) → 成功";
|
||||
result = "推送 → 付款处理(支付结果) → 成功,返回信息:";
|
||||
} else {
|
||||
logger.info("付款处理(支付结果) → BIP推送接口 → 失败\n失败单据编号:{}\n失败请求体:{}\n推送失败接口返回数据:{}",
|
||||
dynamic.getString("billno"), saveRequestBody, saveResponseBody);
|
||||
result = "推送 → 付款处理(支付结果) → 失败";
|
||||
result = "推送 → 付款处理(支付结果) → 失败,返回信息:" + JSON.parseObject(saveResponseBody).getString("message");
|
||||
}
|
||||
break;
|
||||
// 电子回单
|
||||
|
|
|
@ -39,7 +39,6 @@ public class HitBackOperationServicePlugin extends AbstractOperationServicePlugI
|
|||
"shkd_pushstatus,shkd_businessnumber,shkd_businessid,shkd_businessname,billstatus,bankpaystatus"
|
||||
, new QFilter("id", QCP.in, pkValue)
|
||||
.and("billstatus", QCP.equals, "C")//已审核
|
||||
.and("shkd_pushstatus", QCP.equals, "未结算")
|
||||
.and("shkd_businessname", QCP.equals, "共享系统").toArray());
|
||||
if (objects == null || objects.length == 0) {
|
||||
args.setCancel(true);
|
||||
|
@ -48,23 +47,31 @@ public class HitBackOperationServicePlugin extends AbstractOperationServicePlugI
|
|||
StringBuilder stringBuilder = new StringBuilder();
|
||||
for (DynamicObject dynamicObject : objects) {
|
||||
String bankpaystatus = dynamicObject.getString("bankpaystatus");
|
||||
if (!"未结算".equals(dynamicObject.getString("shkd_pushstatus"))) {
|
||||
args.setCancel(true);
|
||||
args.setCancelMessage("打回失败,该单据结算结果已被推送");
|
||||
return;
|
||||
}
|
||||
|
||||
if ("TF、NC、OF".contains(bankpaystatus)) {
|
||||
List<DynamicObject> dynamicObjects = new ArrayList<>();
|
||||
String result = ApiService.paymentSlipsJson(dynamicObject, "BIPNO", dynamicObjects, null);
|
||||
logger.info("result信息:{}", result);
|
||||
if (result.contains("成功")) {
|
||||
SaveServiceHelper.save(dynamicObjects.toArray(new DynamicObject[0]));
|
||||
stringBuilder.append("单据编号:" + dynamicObject.getString("billno") + " → 打回成功\n");
|
||||
stringBuilder.append(result);
|
||||
return;
|
||||
} else {
|
||||
stringBuilder.append("单据编号:" + dynamicObject.getString("billno") + "打回失败\n");
|
||||
}
|
||||
} else {
|
||||
stringBuilder.append("单据编号:" + dynamicObject.getString("billno") + "打回失败,请确认银行支付状态\n");
|
||||
}
|
||||
}
|
||||
logger.info("打回结果:\n" + stringBuilder);
|
||||
args.setCancel(true);
|
||||
args.setCancelMessage(stringBuilder.toString());
|
||||
args.setCancelMessage(result);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
args.setCancel(true);
|
||||
args.setCancelMessage("打回失败,请确认银行支付状态");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue