提交内容:定时任务

备注:定时推送单据至BIP
提交人:邹江涛
This commit is contained in:
zoujiangtao 2024-12-16 17:34:52 +08:00
parent bf1810ac7c
commit 029549a0f7
1 changed files with 19 additions and 3 deletions

View File

@ -61,7 +61,8 @@ public class ApiMappingBillPlugin extends AbstractFormPlugin implements Plugin {
case "cas_paybill": case "cas_paybill":
DynamicObject[] objects1 = BusinessDataServiceHelper.load("cas_paybill", DynamicObject[] objects1 = BusinessDataServiceHelper.load("cas_paybill",
"id,billno,actpayamt,entry,entry.e_expenseitem,entry.e_remark,settletype,payeebanknum," + "id,billno,actpayamt,entry,entry.e_expenseitem,entry.e_remark,settletype,payeebanknum," +
"payeetype,payeenumber,payeracctbank,payeebank,payeebankname,paymenttype,org,bizdate,description" "payeetype,payeenumber,payeracctbank,payeebank,payeebankname,paymenttype,org,bizdate,description," +
"shkd_pushstatus,shkd_businessnumber,shkd_businessid,shkd_businessname,billstatus,bankpaystatus"
, new QFilter("billno", QCP.equals, billNumber).toArray()); , new QFilter("billno", QCP.equals, billNumber).toArray());
billObject = objects1[0]; billObject = objects1[0];
logger.info("获取付款处理推送对象 → billObject{}", billObject); logger.info("获取付款处理推送对象 → billObject{}", billObject);
@ -70,7 +71,8 @@ public class ApiMappingBillPlugin extends AbstractFormPlugin implements Plugin {
case "cas_recbill": case "cas_recbill":
DynamicObject[] objects2 = BusinessDataServiceHelper.load("cas_recbill", DynamicObject[] objects2 = BusinessDataServiceHelper.load("cas_recbill",
"id,billno,entry,entry.e_expenseitem,settletype,entry.e_remark,receivingtype," + "id,billno,entry,entry.e_expenseitem,settletype,entry.e_remark,receivingtype," +
"payertype,org,bizdate,accountbank,payernumber,actrecamt,txt_description" "payertype,org,bizdate,accountbank,payernumber,actrecamt,txt_description,shkd_pushstatus," +
"shkd_businessnumber,shkd_businessid,shkd_businessname,billstatus"
, new QFilter("billno", QCP.equals, billNumber).toArray()); , new QFilter("billno", QCP.equals, billNumber).toArray());
billObject = objects2[0]; billObject = objects2[0];
logger.info("获取收款处理推送对象 → billObject{}", billObject); logger.info("获取收款处理推送对象 → billObject{}", billObject);
@ -79,7 +81,8 @@ public class ApiMappingBillPlugin extends AbstractFormPlugin implements Plugin {
case "bei_transdetail_cas": case "bei_transdetail_cas":
DynamicObject[] objects3 = BusinessDataServiceHelper.load("bei_transdetail_cas", DynamicObject[] objects3 = BusinessDataServiceHelper.load("bei_transdetail_cas",
"id,bizdate,oppbank,oppunit,accountbank,description,company,oppbanknumber," + "id,bizdate,oppbank,oppunit,accountbank,description,company,oppbanknumber," +
"bankdetailno,transbalance,description,debitamount,creditamount" "bankdetailno,transbalance,description,debitamount,creditamount,shkd_pushstatus," +
"shkd_businessnumber,shkd_businessid,shkd_businessname"
, new QFilter("billno", QCP.equals, billNumber).toArray()); , new QFilter("billno", QCP.equals, billNumber).toArray());
billObject = objects3[0]; billObject = objects3[0];
logger.info("获取银企交易明细查询推送对象 → billObject{}", billObject); logger.info("获取银企交易明细查询推送对象 → billObject{}", billObject);
@ -125,6 +128,19 @@ public class ApiMappingBillPlugin extends AbstractFormPlugin implements Plugin {
this.getView().showTipNotification("返回结果:" + responseBody); this.getView().showTipNotification("返回结果:" + responseBody);
} }
if ("shkd_hitBack".equals(itemKey)) {
String responseBody = ApiService.paymentSlipsJson(billObject, "BIPNO");
JSONObject jsonObject = JSON.parseObject(responseBody);
String code = jsonObject.getString("code");
if ("200".equals(code)) {
billObject.set("billstatus", "A");
SaveServiceHelper.save(new DynamicObject[]{billObject});
} else {
logger.info("推送 → 失败\n失败单据编号{}\n推送失败接口返回数据{}", billObject.getString("billno"), responseBody);
}
this.getView().showTipNotification("返回结果:" + responseBody);
}
if ("shkd_gettoken".equals(itemKey)) { if ("shkd_gettoken".equals(itemKey)) {
//域名 //域名
String domainName = dataEntity.getString("shkd_domainname"); String domainName = dataEntity.getString("shkd_domainname");