提交内容:API映射公共单据—收款处理

备注:BIP银行对账单字段对应
提交人:邹江涛
This commit is contained in:
zoujiangtao 2024-12-05 18:02:59 +08:00
parent 1f7e1b57b8
commit 395a62cf90
1 changed files with 32 additions and 2 deletions

View File

@ -79,7 +79,7 @@ public class ApiMappingBillPlugin extends AbstractFormPlugin implements Plugin {
// 银企交易明细查询
case "bei_transdetail_cas":
DynamicObject[] objects3 = BusinessDataServiceHelper.load("bei_transdetail_cas",
"id,bizdate,oppbank,oppunit,accountbank,description,oppbank,company,oppbanknumber," +
"id,bizdate,oppbank,oppunit,accountbank,description,company,oppbanknumber," +
"bankdetailno,transbalance,description,debitamount,creditamount"
, new QFilter("billno", QCP.equals, billNumber).toArray());
billObject = objects3[0];
@ -124,7 +124,7 @@ public class ApiMappingBillPlugin extends AbstractFormPlugin implements Plugin {
Object shkd_soufield = dynamicObject.get("shkd_soufield");
logger.info("shkd_soufield: {}", shkd_soufield);
Object value = null;
if (shkd_soufield != null) {
if (shkd_soufield != null && !"".equals(shkd_soufield)) {
String[] parts = shkd_soufield.toString().split("\\.");
logger.info("billObject{}\nparts: {}", billObject, Arrays.toString(parts));
if (parts.length == 1) {
@ -157,6 +157,16 @@ public class ApiMappingBillPlugin extends AbstractFormPlugin implements Plugin {
} else {
value = billObject.get("creditamount");
}
} else if ("direction".equals(parts[0])) {
// 付款金额
BigDecimal debitamount = billObject.getBigDecimal("debitamount");
// 收款金额
BigDecimal creditamount = billObject.getBigDecimal("creditamount");
if (debitamount.compareTo(BigDecimal.ZERO) != 0) {
value = "1";//支出
} else {
value = "2";//收入
}
} else {
value = billObject.get(parts[0]);
}
@ -318,6 +328,16 @@ public class ApiMappingBillPlugin extends AbstractFormPlugin implements Plugin {
} else {
value = dynamic.get("creditamount");
}
} else if ("direction".equals(parts[0])) {
// 付款金额
BigDecimal debitamount = dynamic.getBigDecimal("debitamount");
// 收款金额
BigDecimal creditamount = dynamic.getBigDecimal("creditamount");
if (debitamount.compareTo(BigDecimal.ZERO) != 0) {
value = "1";//支出
} else {
value = "2";//收入
}
} else {
value = dynamic.get(parts[0]);
}
@ -416,6 +436,16 @@ public class ApiMappingBillPlugin extends AbstractFormPlugin implements Plugin {
} else {
value = dynamic.get("creditamount");
}
} else if ("direction".equals(parts[0])) {
// 付款金额
BigDecimal debitamount = dynamic.getBigDecimal("debitamount");
// 收款金额
BigDecimal creditamount = dynamic.getBigDecimal("creditamount");
if (debitamount.compareTo(BigDecimal.ZERO) != 0) {
value = "1";//支出
} else {
value = "2";//收入
}
} else {
value = dynamic.get(parts[0]);
}