parent
88ab918ed8
commit
c3a86a2605
|
@ -93,16 +93,18 @@ public class PushTaskPlugin extends AbstractTask implements Plugin {
|
||||||
dynamicObjects.forEach(dynamicObject -> {
|
dynamicObjects.forEach(dynamicObject -> {
|
||||||
String responseBody = ApiService.paymentSlipsJson(dynamicObject, "BIP");
|
String responseBody = ApiService.paymentSlipsJson(dynamicObject, "BIP");
|
||||||
if (!responseBody.contains("失败")) {
|
if (!responseBody.contains("失败")) {
|
||||||
logger.info("推送 → {} → 成功\n推送单据编号:{}\n推送数据:{}", finalBillName, dynamicObject.getString("billno"), responseBody);
|
|
||||||
JSONObject jsonObject = JSON.parseObject(responseBody);
|
JSONObject jsonObject = JSON.parseObject(responseBody);
|
||||||
JSONObject data = jsonObject.getJSONObject("data");
|
String code = jsonObject.getString("code");
|
||||||
String code = data.getString("code");
|
if ("200".equals(code)) {
|
||||||
String id = data.getString("id");
|
JSONObject data = jsonObject.getJSONObject("data");
|
||||||
dynamicObject.set("shkd_businessnumber", code);
|
dynamicObject.set("shkd_businessnumber", data.getString("code"));
|
||||||
dynamicObject.set("shkd_businessid", id);
|
dynamicObject.set("shkd_businessid", data.getString("id"));
|
||||||
dynamicObject.set("shkd_businessname", "BIP");
|
dynamicObject.set("shkd_businessname", "BIP");
|
||||||
dynamicObject.set("shkd_pushstatus", "已推送");
|
dynamicObject.set("shkd_pushstatus", "已推送");
|
||||||
objects.add(dynamicObject);
|
objects.add(dynamicObject);
|
||||||
|
} else {
|
||||||
|
logger.info("推送 → {} → 失败\n失败单据编号:{}\n推送失败接口返回数据:{}", finalBillName, dynamicObject.getString("billno"), responseBody);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
logger.info("推送 → {} → 失败,失败单据编号:{}", finalBillName, dynamicObject.getString("billno"));
|
logger.info("推送 → {} → 失败,失败单据编号:{}", finalBillName, dynamicObject.getString("billno"));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue