From 9ef0b232e6d5f3a5e0fe976418468de1680d78cb Mon Sep 17 00:00:00 2001 From: zoujiangtao Date: Thu, 26 Dec 2024 10:59:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=86=85=E5=AE=B9=EF=BC=9A?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=B0=83=E6=95=B4=EF=BC=8C=E7=BC=96=E7=A0=81?= =?UTF-8?q?=E4=BC=A0=E7=BB=9F=E4=B8=80=E7=A4=BE=E4=BC=9A=E4=BF=A1=E7=94=A8?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=20=E5=A4=87=E6=B3=A8=EF=BC=9A=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=B0=83=E6=95=B4=EF=BC=8C=E7=BC=96=E7=A0=81=E4=BC=A0?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=E7=A4=BE=E4=BC=9A=E4=BF=A1=E7=94=A8=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=20=E6=8F=90=E4=BA=A4=E4=BA=BA=EF=BC=9A=E9=82=B9?= =?UTF-8?q?=E6=B1=9F=E6=B6=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sys/plugin/api/PayBillApiSavePlugin.java | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/api/PayBillApiSavePlugin.java b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/api/PayBillApiSavePlugin.java index 59a1e7f..f869e47 100644 --- a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/api/PayBillApiSavePlugin.java +++ b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/api/PayBillApiSavePlugin.java @@ -76,7 +76,13 @@ public class PayBillApiSavePlugin implements ApiSavePlugin { } if ("bd_supplier".equals(payeetype) || "bd_customer".equals(payeetype)) { -// BusinessDataServiceHelper.load(payeetype, "id,number,name,societycreditcode",) + DynamicObject[] objects = BusinessDataServiceHelper.load(payeetype.toString(), "id,number,name,societycreditcode", new QFilter("societycreditcode", QCP.equals, map.get("payeenumber").toString()).toArray()); + map.put("payeenumber", objects[0].getString("number")); + //收款人编码 + objectNumber = objects[0].getString("number"); + } else { + //收款人编码 + objectNumber = map.get("payeenumber").toString(); } @@ -84,11 +90,8 @@ public class PayBillApiSavePlugin implements ApiSavePlugin { //收款人类型 objectType = payeetype.toString(); if (!"other".equals(objectType)) { - //收款人编码 - objectNumber = map.get("payeenumber").toString(); //收款人ID fieldName1 = "payee"; - Map payeebankObj = (Map) map.get("payeebank"); bankNumber = (String) payeebankObj.get("number"); logger.info("付款处理 → \nobjectType:{}\nobjectNumber:{}\nbankNumber:{}", objectType, objectNumber, bankNumber); @@ -136,12 +139,21 @@ public class PayBillApiSavePlugin implements ApiSavePlugin { map.put("payertype", "other"); map.put("payerformid", "other"); } + + if ("bd_supplier".equals(payertype) || "bd_customer".equals(payertype)) { + DynamicObject[] objects = BusinessDataServiceHelper.load(payertype.toString(), "id,number,name,societycreditcode", new QFilter("societycreditcode", QCP.equals, map.get("payernumber").toString()).toArray()); + map.put("payernumber", objects[0].getString("number")); + //收款人编码 + objectNumber = objects[0].getString("number"); + } else { + //收款人编码 + objectNumber = map.get("payernumber").toString(); + } + objectType = payertype.toString(); if (!"other".equals(objectType)) { - objectNumber = map.get("payernumber").toString(); fieldName1 = "payer"; - Map accountbank = (Map) map.get("accountbank"); bankNumber = (String) accountbank.get("number"); logger.info("收款处理 → \nobjectType:{}\nobjectNumber:{}\nbankNumber:{}", objectType, objectNumber, bankNumber);