From 395a62cf9013531cd1d96cc5a1b9299f912349d2 Mon Sep 17 00:00:00 2001 From: zoujiangtao Date: Thu, 5 Dec 2024 18:02:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=86=85=E5=AE=B9=EF=BC=9AAP?= =?UTF-8?q?I=E6=98=A0=E5=B0=84=E5=85=AC=E5=85=B1=E5=8D=95=E6=8D=AE?= =?UTF-8?q?=E2=80=94=E6=94=B6=E6=AC=BE=E5=A4=84=E7=90=86=20=E5=A4=87?= =?UTF-8?q?=E6=B3=A8=EF=BC=9ABIP=E9=93=B6=E8=A1=8C=E5=AF=B9=E8=B4=A6?= =?UTF-8?q?=E5=8D=95=E5=AD=97=E6=AE=B5=E5=AF=B9=E5=BA=94=20=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E4=BA=BA=EF=BC=9A=E9=82=B9=E6=B1=9F=E6=B6=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sys/plugin/form/ApiMappingBillPlugin.java | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/form/ApiMappingBillPlugin.java b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/form/ApiMappingBillPlugin.java index c7e3385..244c4fc 100644 --- a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/form/ApiMappingBillPlugin.java +++ b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/form/ApiMappingBillPlugin.java @@ -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]); }