Parcourir la source

业务处理单过滤

xuhao il y a 5 mois
Parent
commit
0bb1d3a798

+ 10 - 0
src/main/java/fi/em/formPlugin/BusinessProcessingConvertPlugIn.java

@@ -72,6 +72,16 @@ public class BusinessProcessingConvertPlugIn extends AbstractConvertPlugIn imple
                 numberQFilter.and("ar_finarbill.id", QCP.not_equals2, Long.valueOf(id));
             }
             e.getCustQFilters().add(numberQFilter);
+        }else if("draw-clyf".equals(type)){
+            String userid = this.getOption().getVariableValue("userid");
+            QFilter numberQFilter = new QFilter("er_dailyloanbill.billpayerid.id", QCP.equals, Long.valueOf(userid));
+            numberQFilter.and("ar_finarbill.billstatus", QCP.equals, "G");
+            for(int i=0;i<objects.size();i++){
+                JSONObject jsonObject = objects.getJSONObject(i);
+                String id = jsonObject.getString("id");
+                numberQFilter.and("ar_finarbill.id", QCP.not_equals2, Long.valueOf(id));
+            }
+            e.getCustQFilters().add(numberQFilter);
         }
         super.beforeBuildRowCondition(e);
     }

+ 20 - 0
src/main/java/fi/em/formPlugin/BusinessProcessingUnAuditEditPlugin.java

@@ -129,6 +129,26 @@ public class BusinessProcessingUnAuditEditPlugin  extends AbstractListPlugin imp
                 draw.getOption().setVariableValue("orgnumber", number);
                 draw.getOption().setVariableValue("JSONArray", jSONArray.toString());
                 draw.getOption().setVariableValue("type", "draw-ssysd");
+            }else if (draw.getOperateKey().equals("draw-clyf")) {
+                //诉讼核销
+                Object values = this.getModel().getValue("applier");//获取当前单据报销人
+                DynamicObject dynamicObjects = (DynamicObject) values;
+                if (dynamicObjects == null) {
+                    throw new KDBizException("报销人为空!");
+                }
+                DynamicObjectCollection nckdEntryentity1 = this.getModel().getEntryEntity("nckd_clearloanentry");
+                JSONArray jSONArray = new JSONArray();
+                for(int i=0;i<nckdEntryentity1.size();i++){
+                    JSONObject jsonObject = new JSONObject();
+                    DynamicObject dynamicObject1 = nckdEntryentity1.get(i);
+                    String nckdTextfield7 = dynamicObject1.getString("nckd_bigintfield2");
+                    jsonObject.put("id",nckdTextfield7);
+                    jSONArray.add(jsonObject);
+                }
+                String userid = dynamicObjects.getString("id");//当前单据报销人id
+                draw.getOption().setVariableValue("userid", userid);
+                draw.getOption().setVariableValue("JSONArray", jSONArray.toString());
+                draw.getOption().setVariableValue("type", "draw-clyf");
             }
         }
         super.beforeDoOperation(args);

+ 1 - 0
src/main/java/fi/em/formPlugin/YwclF7ListtenerFromPlugin.java

@@ -88,6 +88,7 @@ public class YwclF7ListtenerFromPlugin extends AbstractBillPlugIn implements Plu
         fieldEdit19.addBeforeF7SelectListener(this);
         BasedataEdit fieldEdit20 = this.getView().getControl(nckd_orgvs);
         fieldEdit20.addBeforeF7SelectListener(this);
+
     }
 
     @Override