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 f869e47..207b28b 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 @@ -77,7 +77,9 @@ public class PayBillApiSavePlugin implements ApiSavePlugin { if ("bd_supplier".equals(payeetype) || "bd_customer".equals(payeetype)) { 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")); + if (objects.length > 0) { + map.put("payeenumber", objects[0].getString("number")); + } //收款人编码 objectNumber = objects[0].getString("number"); } else { @@ -142,7 +144,9 @@ public class PayBillApiSavePlugin implements ApiSavePlugin { 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")); + if (objects.length > 0) { + map.put("payernumber", objects[0].getString("number")); + } //收款人编码 objectNumber = objects[0].getString("number"); } else {