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 207b28b..2152602 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,12 +76,16 @@ public class PayBillApiSavePlugin implements ApiSavePlugin { } if ("bd_supplier".equals(payeetype) || "bd_customer".equals(payeetype)) { + logger.info("收款人ID:{}", map.get("payeenumber")); DynamicObject[] objects = BusinessDataServiceHelper.load(payeetype.toString(), "id,number,name,societycreditcode", new QFilter("societycreditcode", QCP.equals, map.get("payeenumber").toString()).toArray()); if (objects.length > 0) { map.put("payeenumber", objects[0].getString("number")); + //收款人编码 + objectNumber = objects[0].getString("number"); + } else { + //收款人编码 + objectNumber = map.get("payeenumber").toString(); } - //收款人编码 - objectNumber = objects[0].getString("number"); } else { //收款人编码 objectNumber = map.get("payeenumber").toString(); @@ -146,9 +150,12 @@ public class PayBillApiSavePlugin implements ApiSavePlugin { DynamicObject[] objects = BusinessDataServiceHelper.load(payertype.toString(), "id,number,name,societycreditcode", new QFilter("societycreditcode", QCP.equals, map.get("payernumber").toString()).toArray()); if (objects.length > 0) { map.put("payernumber", objects[0].getString("number")); + //收款人编码 + objectNumber = objects[0].getString("number"); + } else { + //收款人编码 + objectNumber = map.get("payernumber").toString(); } - //收款人编码 - objectNumber = objects[0].getString("number"); } else { //收款人编码 objectNumber = map.get("payernumber").toString();