Quellcode durchsuchen

fix:修复表单组布局样式返回缺失

韩帛霖 vor 1 Jahr
Ursprung
Commit
23338d3292

+ 5 - 2
zkqy-business/src/main/java/com/zkqy/business/controller/CommonBtnController.java

@@ -136,9 +136,9 @@ public class CommonBtnController extends BaseController {
             } else {
                 String sqlKey = commonEntity.getBasicMap().get("sqlKey").toString();
                 DragForm dragForm = dragFormService.selectDragFormBySqlKey(sqlKey);
-                if(dragForm != null){
+                if (dragForm != null) {
                     return success(dragFormService.selectDragFormBySqlKey(sqlKey));
-                }else {
+                } else {
                     String btnKey = commonEntity.getBasicMap().get("btnKey").toString();
                     DragTableBtn dragTableBtnPojo = dragTableBtnService.selectDragTableBtnByBtnKey(btnKey);
 //                    dragTableBtnPojo.getBtnFormKey();
@@ -220,6 +220,9 @@ public class CommonBtnController extends BaseController {
         // 得到当前主表单key
         ((Map) relationJsonMap.get("mainForm")).get("formKey");
 
+        // 表单组布局样式
+        relationJsonMap.put("layoutJson", dragFormGroup.getLayoutJson());
+
         // 主表单增加模版信息
         commonEntityList.forEach(ctem -> {
             if (ctem.getResultMap().get("formKey").equals(((Map) relationJsonMap.get("mainForm")).get("formKey"))) {

+ 78 - 60
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/DragFormGroup.java

@@ -7,136 +7,154 @@ import org.apache.commons.lang3.builder.ToStringStyle;
 
 /**
  * 动态单组对象 drag_form_group
- * 
+ *
  * @author hzh
  * @date 2024-01-26
  */
-public class DragFormGroup extends BaseEntity
-{
+public class DragFormGroup extends BaseEntity {
     private static final long serialVersionUID = 1L;
 
-    /** 主键 */
+    /**
+     * 主键
+     */
     private Long id;
 
-    /** 表单组Key */
+    /**
+     * 表单组Key
+     */
     @Excel(name = "表单组Key")
     private String groupKey;
 
-    /** 动态组名称 */
+    /**
+     * 动态组名称
+     */
     @Excel(name = "动态组名称")
     private String fGName;
 
-    /** 当前表单组中所绑定的表单 */
+    /**
+     * 当前表单组中所绑定的表单
+     */
     @Excel(name = "当前表单组中所绑定的表单")
     private String formKeys;
 
-    /** 表单组主表名称(tableName:formKey) */
+    /**
+     * 表单组主表名称(tableName:formKey)
+     */
     @Excel(name = "表单组主表名称", readConverterExp = "t=ableName:formKey")
     private String mainTable;
 
-    /** 各个表单之间的关系 */
+    /**
+     * 各个表单之间的关系
+     */
     @Excel(name = "各个表单之间的关系")
     private String relationJson;
 
-    /** 回显数据sql */
+    /**
+     * 回显数据sql
+     */
     @Excel(name = "回显数据sql")
     private String showDataSql;
 
+    /**
+     * 布局样式
+     */
+    private String layoutJson;
 
-    /** 逻辑删除 */
+    /**
+     * 逻辑删除
+     */
     private String delFlag;
 
-    public void setId(Long id) 
-    {
+    public String getLayoutJson() {
+        return layoutJson;
+    }
+
+    public void setLayoutJson(String layoutJson) {
+        this.layoutJson = layoutJson;
+    }
+
+    public void setId(Long id) {
         this.id = id;
     }
 
-    public Long getId() 
-    {
+    public Long getId() {
         return id;
     }
-    public void setGroupKey(String groupKey) 
-    {
+
+    public void setGroupKey(String groupKey) {
         this.groupKey = groupKey;
     }
 
-    public String getGroupKey() 
-    {
+    public String getGroupKey() {
         return groupKey;
     }
-    public void setfGName(String fGName) 
-    {
+
+    public void setfGName(String fGName) {
         this.fGName = fGName;
     }
 
-    public String getfGName() 
-    {
+    public String getfGName() {
         return fGName;
     }
-    public void setFormKeys(String formKeys) 
-    {
+
+    public void setFormKeys(String formKeys) {
         this.formKeys = formKeys;
     }
 
-    public String getFormKeys() 
-    {
+    public String getFormKeys() {
         return formKeys;
     }
-    public void setMainTable(String mainTable) 
-    {
+
+    public void setMainTable(String mainTable) {
         this.mainTable = mainTable;
     }
 
-    public String getMainTable() 
-    {
+    public String getMainTable() {
         return mainTable;
     }
-    public void setRelationJson(String relationJson) 
-    {
+
+    public void setRelationJson(String relationJson) {
         this.relationJson = relationJson;
     }
 
-    public String getRelationJson() 
-    {
+    public String getRelationJson() {
         return relationJson;
     }
-    public void setShowDataSql(String showDataSql) 
-    {
+
+    public void setShowDataSql(String showDataSql) {
         this.showDataSql = showDataSql;
     }
 
-    public String getShowDataSql() 
-    {
+    public String getShowDataSql() {
         return showDataSql;
     }
-    public void setDelFlag(String delFlag) 
-    {
+
+    public void setDelFlag(String delFlag) {
         this.delFlag = delFlag;
     }
 
-    public String getDelFlag() 
-    {
+    public String getDelFlag() {
         return delFlag;
     }
 
     @Override
     public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("groupKey", getGroupKey())
-            .append("fGName", getfGName())
-            .append("remark", getRemark())
-            .append("formKeys", getFormKeys())
-            .append("mainTable", getMainTable())
-            .append("relationJson", getRelationJson())
-            .append("showDataSql", getShowDataSql())
-            .append("updateTime", getUpdateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateById", getUpdateById())
-            .append("createTime", getCreateTime())
-            .append("createById", getCreateById())
-            .append("createBy", getCreateBy())
-            .append("delFlag", getDelFlag())
-            .toString();
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("groupKey", getGroupKey())
+                .append("fGName", getfGName())
+                .append("remark", getRemark())
+                .append("formKeys", getFormKeys())
+                .append("mainTable", getMainTable())
+                .append("relationJson", getRelationJson())
+                .append("showDataSql", getShowDataSql())
+                .append("updateTime", getUpdateTime())
+                .append("updateBy", getUpdateBy())
+                .append("updateById", getUpdateById())
+                .append("createTime", getCreateTime())
+                .append("createById", getCreateById())
+                .append("createBy", getCreateBy())
+                .append("delFlag", getDelFlag())
+                .toString();
     }
 }

+ 2 - 0
zkqy-process-execution/src/main/resources/mapper/bpm/dispersed/DragFormGroupMapper.xml

@@ -12,6 +12,7 @@
         <result property="formKeys" column="form_keys"/>
         <result property="mainTable" column="main_table"/>
         <result property="relationJson" column="relation_json"/>
+        <result property="layoutJson" column="layout_json"/>
         <result property="showDataSql" column="show_data_sql"/>
         <result property="updateTime" column="update_time"/>
         <result property="updateBy" column="update_by"/>
@@ -31,6 +32,7 @@
                main_table,
                relation_json,
                show_data_sql,
+               layout_json,
                update_time,
                update_by,
                update_by_id,