携带客户报错优化

This commit is contained in:
李贵强 2025-07-09 18:37:36 +08:00
parent e0d92bbfd9
commit 4af62784cf
1 changed files with 2 additions and 3 deletions

View File

@ -629,13 +629,12 @@ public class RecBillSaveOperation extends AbstractOperationServicePlugIn impleme
DynamicObject[] bd_customer = BusinessDataServiceHelper.load("bd_customer", "id,name",customerFilter.toArray()); DynamicObject[] bd_customer = BusinessDataServiceHelper.load("bd_customer", "id,name",customerFilter.toArray());
boolean exitCustomerArray = false; boolean exitCustomerArray = false;
if (null != bd_customer ) { if (null != bd_customer ) {
//if (bd_customer.length==1){ if (bd_customer.length!=0){
bill.set("payer", bd_customer[0].getPkValue()); //付款人id bill.set("payer", bd_customer[0].getPkValue()); //付款人id
bill.set("payernumber", bd_customer[0].getString("number")); //付款人编码 bill.set("payernumber", bd_customer[0].getString("number")); //付款人编码
bill.set("payername", bd_customer[0].getString("name")); //付款人名称 bill.set("payername", bd_customer[0].getString("name")); //付款人名称
exitCustomerArray=true; exitCustomerArray=true;
//} }
//else if (bd_customer.length>1){ //else if (bd_customer.length>1){
//for (int i = 0; i < bd_customer.length; i++) { //for (int i = 0; i < bd_customer.length; i++) {
//DynamicObjectCollection dynamicObjectCollection = bd_customer[i].getDynamicObjectCollection("shjh_entry_five"); //DynamicObjectCollection dynamicObjectCollection = bd_customer[i].getDynamicObjectCollection("shjh_entry_five");