Forráskód Böngészése

修复设置formId

lzh 2 hete
szülő
commit
4ac0741b6d

+ 7 - 3
code/jyyy/nckd-jimin-jyyy-fi/src/main/java/nckd/jimin/jyyy/fi/plugin/form/DailyApplyBillEditPlugin.java

@@ -16,6 +16,7 @@ import kd.bos.orm.query.QCP;
 import kd.bos.orm.query.QFilter;
 import kd.bos.servicehelper.BusinessDataServiceHelper;
 import kd.bos.servicehelper.operation.SaveServiceHelper;
+import kd.bos.util.StringUtils;
 
 import java.nio.charset.StandardCharsets;
 import java.util.*;
@@ -73,10 +74,13 @@ public class DailyApplyBillEditPlugin extends AbstractBillPlugIn implements Befo
         super.afterCreateNewData(e);
         Map<String, Object> customParams = this.getView().getFormShowParameter().getCustomParams();
         BillShowParameter parameter = new BillShowParameter();
-        String formId =customParams.get("formId").toString();
-        if(EmptyUtils.isNotEmpty(formId)){
+        String formId = "";
+        if(EmptyUtils.isNotEmpty(customParams.get("formId"))){
+            formId =customParams.get("formId").toString();
             parameter.setFormId(formId);
-            this.getModel().setValue("nckd_pageid", formId);
+            if(StringUtils.isNotEmpty(formId)) {
+                this.getModel().setValue("nckd_pageid", formId);
+            }
         }
         if(customParams.get("viewType") != null){
             String[] typeStrings = customParams.get("viewType").toString().split(",");