Prechádzať zdrojové kódy

业务处理单过滤

xuhao 5 mesiacov pred
rodič
commit
1730b22bd6

+ 9 - 0
src/main/java/fi/em/formPlugin/CostAllocationEditPlugin.java

@@ -252,6 +252,9 @@ public class CostAllocationEditPlugin extends AbstractListPlugin implements Plug
                 }
                 if(bigDecimal1.compareTo(bigDecimal) == 1){
                     DynamicObjectCollection accountentry = this.getModel().getEntryEntity("accountentry");
+                    if(accountentry==null){
+                        throw new KDBizException("收款明细分录为空,请维护!");
+                    }
                     DynamicObject dynamicObject = accountentry.get(0);
                     if(dynamicObject!=null){
                         this.getModel().setValue("nckd_orireceiveamount",new BigDecimal(0),0);
@@ -259,12 +262,18 @@ public class CostAllocationEditPlugin extends AbstractListPlugin implements Plug
                     }
                 } else if (bigDecimal1.compareTo(bigDecimal) == 0) {
                     DynamicObjectCollection accountentry = this.getModel().getEntryEntity("accountentry");
+                    if(accountentry==null){
+                        throw new KDBizException("收款明细分录为空,请维护!");
+                    }
                     DynamicObject dynamicObject = accountentry.get(0);
                     if(dynamicObject!=null){
                         this.getModel().setValue("nckd_orireceiveamount",new BigDecimal(0),0);
                     }
                 }else {
                     DynamicObjectCollection accountentry = this.getModel().getEntryEntity("accountentry");
+                    if(accountentry==null){
+                        throw new KDBizException("收款明细分录为空,请维护!");
+                    }
                     DynamicObject dynamicObject = accountentry.get(0);
                    if(dynamicObject!=null){
                        String orireceiveamount = this.getModel().getValue("nckd_orireceiveamount", 0).toString();