Bladeren bron

feat:共同表格中联合查询配置以及解析逻辑

韩帛霖 11 maanden geleden
bovenliggende
commit
8b0c0d42cc

+ 22 - 30
zkqy-system/src/main/java/com/zkqy/system/entity/DragTableCondition.java

@@ -15,7 +15,7 @@ import java.util.Map;
  * @author zkqy
  * @date 2023-07-31
  */
-public class DragTableCondition extends BaseEntity  implements Serializable {
+public class DragTableCondition extends BaseEntity implements Serializable {
     private static final long serialVersionUID = 1L;
 
     /**
@@ -84,7 +84,7 @@ public class DragTableCondition extends BaseEntity  implements Serializable {
     private String conditionTableFieldKey;
 
     /**
-     * 数据来源(0:字典;1:表字段)
+     * 数据来源(0:字典;1:表字段)::存储下拉框数据来源sql
      */
     @Excel(name = "数据来源", readConverterExp = "0=:字典;1:表字段")
     private String conditionDatasource;
@@ -123,8 +123,7 @@ public class DragTableCondition extends BaseEntity  implements Serializable {
      */
     List<Map<String, Object>> dropDownList;
 
-    public DragTableCondition() {
-    }
+    public DragTableCondition() {}
 
     public DragTableCondition(Long tId, String conditionField) {
         this.tId = tId;
@@ -137,7 +136,8 @@ public class DragTableCondition extends BaseEntity  implements Serializable {
         this.conditionDefaultValue = conditionDefaultValue;
     }
 
-    public DragTableCondition(Long tId, String conditionName, String conditionField, String conditionType, String conditionDefaultValue) {
+    public DragTableCondition(Long tId, String conditionName, String conditionField, String conditionType,
+        String conditionDefaultValue) {
         this.tId = tId;
         this.conditionName = conditionName;
         this.conditionField = conditionField;
@@ -145,7 +145,11 @@ public class DragTableCondition extends BaseEntity  implements Serializable {
         this.conditionDefaultValue = conditionDefaultValue;
     }
 
-    public DragTableCondition(Long tcId, Long tId, String conditionName, String conditionField, String conditionNotes, String conditionType, String conditionDefaultValue, Long sort, String conditionTableName, String conditionTableFieldName, String conditionTableFieldKey, String conditionDatasource, String componentType, String componentSize, String componentIcon, String isHidden, String delFlag, List<Map<String, Object>> dropDownList) {
+    public DragTableCondition(Long tcId, Long tId, String conditionName, String conditionField, String conditionNotes,
+        String conditionType, String conditionDefaultValue, Long sort, String conditionTableName,
+        String conditionTableFieldName, String conditionTableFieldKey, String conditionDatasource, String componentType,
+        String componentSize, String componentIcon, String isHidden, String delFlag,
+        List<Map<String, Object>> dropDownList) {
         this.tcId = tcId;
         this.tId = tId;
         this.conditionName = conditionName;
@@ -312,29 +316,17 @@ public class DragTableCondition extends BaseEntity  implements Serializable {
 
     @Override
     public String toString() {
-        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
-                .append("tcId", getTcId())
-                .append("tId", gettId())
-                .append("conditionName", getConditionName())
-                .append("conditionField", getConditionField())
-                .append("conditionNotes", getConditionNotes())
-                .append("conditionType", getConditionType())
-                .append("conditionDefaultValue", getConditionDefaultValue())
-                .append("sort", getSort())
-                .append("conditionTableName", getConditionTableName())
-                .append("conditionTableFieldName", getConditionTableFieldName())
-                .append("conditionTableFieldKey", getConditionTableFieldKey())
-                .append("conditionDatasource", getConditionDatasource())
-                .append("componentType", getComponentType())
-                .append("componentSize", getComponentSize())
-                .append("componentIcon", getComponentIcon())
-                .append("isHidden", getIsHidden())
-                .append("delFlag", getDelFlag())
-                .append("createBy", getCreateBy())
-                .append("createTime", getCreateTime())
-                .append("updateBy", getUpdateBy())
-                .append("updateTime", getUpdateTime())
-                .append("dropDownList", getDropDownList())
-                .toString();
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("tcId", getTcId())
+            .append("tId", gettId()).append("conditionName", getConditionName())
+            .append("conditionField", getConditionField()).append("conditionNotes", getConditionNotes())
+            .append("conditionType", getConditionType()).append("conditionDefaultValue", getConditionDefaultValue())
+            .append("sort", getSort()).append("conditionTableName", getConditionTableName())
+            .append("conditionTableFieldName", getConditionTableFieldName())
+            .append("conditionTableFieldKey", getConditionTableFieldKey())
+            .append("conditionDatasource", getConditionDatasource()).append("componentType", getComponentType())
+            .append("componentSize", getComponentSize()).append("componentIcon", getComponentIcon())
+            .append("isHidden", getIsHidden()).append("delFlag", getDelFlag()).append("createBy", getCreateBy())
+            .append("createTime", getCreateTime()).append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime()).append("dropDownList", getDropDownList()).toString();
     }
 }

+ 12 - 26
zkqy-system/src/main/java/com/zkqy/system/entity/DragTableGroup.java

@@ -12,7 +12,7 @@ import java.io.Serializable;
  * @date 2023-11-01 14:19
  * @Description: 拖拽格组对象 drag_table_group
  */
-public class DragTableGroup extends BaseEntity  implements Serializable {
+public class DragTableGroup extends BaseEntity implements Serializable {
 
     private static final long serialVersionUID = 1L;
 
@@ -23,19 +23,16 @@ public class DragTableGroup extends BaseEntity  implements Serializable {
     @Excel(name = "表格组名称")
     private String groupName;
 
-
     /** 表格组key名称 */
     @Excel(name = "表格组key")
     private String groupKey;
 
-
-    /** 表格组类型 */
-    @Excel(name = "表格组key")
+    /** 表格组类型(0:联动表格;1:工艺工序表格) */
+    @Excel(name = "表格组类型(0:联动表格;1:工艺工序表格)")
     private String groupType;
 
-
-    /**模板类型*/
-    @Excel(name = "表格组key")
+    /** 模板类型 */
+    @Excel(name = "模板类型")
     private String templateType;
 
     /** 表格组描述 */
@@ -46,15 +43,12 @@ public class DragTableGroup extends BaseEntity  implements Serializable {
     @Excel(name = "存放表格联动信息")
     private String groupTableInfo;
 
-
-
     /**
      * 逻辑删除
      */
     private String delFlag;
 
-    public void setId(Long id)
-    {
+    public void setId(Long id) {
         this.id = id;
     }
 
@@ -94,7 +88,6 @@ public class DragTableGroup extends BaseEntity  implements Serializable {
         this.groupKey = groupKey;
     }
 
-
     public String getGroupType() {
         return groupType;
     }
@@ -103,7 +96,6 @@ public class DragTableGroup extends BaseEntity  implements Serializable {
         this.groupType = groupType;
     }
 
-
     public String getDelFlag() {
         return delFlag;
     }
@@ -122,17 +114,11 @@ public class DragTableGroup extends BaseEntity  implements Serializable {
 
     @Override
     public String toString() {
-        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
-                .append("id", getId())
-                .append("groupName", getGroupName())
-                .append("groupDescription", getGroupDescription())
-                .append("groupTableInfo", getGroupTableInfo())
-                .append("createById", getCreateById())
-                .append("createBy", getCreateBy())
-                .append("createTime", getCreateTime())
-                .append("updateById", getUpdateById())
-                .append("updateBy", getUpdateBy())
-                .append("updateTime", getUpdateTime())
-                .toString();
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", getId())
+            .append("groupName", getGroupName()).append("groupDescription", getGroupDescription())
+            .append("groupTableInfo", getGroupTableInfo()).append("createById", getCreateById())
+            .append("createBy", getCreateBy()).append("createTime", getCreateTime())
+            .append("updateById", getUpdateById()).append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime()).toString();
     }
 }

+ 11 - 1
zkqy-system/src/main/java/com/zkqy/system/service/impl/DragTableConditionServiceImpl.java

@@ -17,7 +17,7 @@ import com.zkqy.system.service.IDragTableConditionService;
  * @date 2023-07-31
  */
 @Service
-public class DragTableConditionServiceImpl implements IDragTableConditionService 
+public class DragTableConditionServiceImpl implements IDragTableConditionService
 {
     @Autowired
     private DragTableConditionMapper dragTableConditionMapper;
@@ -34,6 +34,7 @@ public class DragTableConditionServiceImpl implements IDragTableConditionService
     public int insertDragTableCondition(CommonEntity commonEntity)
     {
         List<Object> list = (List<Object>) commonEntity.getCommMap();
+
         List<Map<String, Object>> mapList = new ArrayList<>();
         for (Object obj : list) {
             System.out.println(obj);
@@ -66,3 +67,12 @@ public class DragTableConditionServiceImpl implements IDragTableConditionService
 
 
 }
+
+
+
+
+
+
+
+
+

+ 78 - 74
zkqy-system/src/main/java/com/zkqy/system/service/impl/DragTableServiceImpl.java

@@ -88,22 +88,22 @@ public class DragTableServiceImpl implements IDragTableService {
      */
     @Override
     public int insertDragTable(DragTable dragTable) {
-        //dragTable.setCreateTime(DateUtils.getNowDate());
-        //dragTable.setCreateById(SecurityUtils.getUserId());
+        // dragTable.setCreateTime(DateUtils.getNowDate());
+        // dragTable.setCreateById(SecurityUtils.getUserId());
         return dragTableMapper.insertDragTable(dragTable);
     }
 
-//    /**
-//     * 修改动态表格
-//     *
-//     * @param dragTable 动态表格
-//     * @return 结果
-//     */
-//    @Override
-//    public int updateDragTable(DragTable dragTable) {
-//        dragTable.setUpdateTime(DateUtils.getNowDate());
-//        return dragTableMapper.updateDragTable(dragTable);
-//    }
+    // /**
+    // * 修改动态表格
+    // *
+    // * @param dragTable 动态表格
+    // * @return 结果
+    // */
+    // @Override
+    // public int updateDragTable(DragTable dragTable) {
+    // dragTable.setUpdateTime(DateUtils.getNowDate());
+    // return dragTableMapper.updateDragTable(dragTable);
+    // }
 
     /**
      * 批量删除动态表格
@@ -129,25 +129,27 @@ public class DragTableServiceImpl implements IDragTableService {
 
     @Override
     public CommonEntity dragTableInfo(String tableKey) {
-        //DragTable dragTable = dragTableMapper.selectDragTableBySqlKey(sqlKey);
-        //根据tableKey查询动态表格结构数据
+        // DragTable dragTable = dragTableMapper.selectDragTableBySqlKey(sqlKey);
+        // 根据tableKey查询动态表格结构数据
         DragTable dragTable = dragTableMapper.selectDragTableByTableKey(tableKey);
-        //得到模板数据
+        // 得到模板数据
         Map<String, Object> resultMap = new HashMap<>();
         resultMap.put("template", dragTable);
-        //resultMap.put("where",dragTableConditionMapper.selectDragTableConditionByTid(dragTable.gettId()));
-        //根据表格id查询表格的条件
-        List<DragTableCondition> dragTableConditions = dragTableConditionMapper.selectDragTableConditionByTid(dragTable.gettId());
+        // resultMap.put("where",dragTableConditionMapper.selectDragTableConditionByTid(dragTable.gettId()));
+        // 根据表格id查询表格的条件
+        List<DragTableCondition> dragTableConditions =
+            dragTableConditionMapper.selectDragTableConditionByTid(dragTable.gettId());
         dragTableConditions.forEach(d -> {
             // 0 查询字典 1 查询表数据
             if (d.getConditionDatasource() != null && d.getConditionDatasource().equals("0")) {
                 d.setDropDownList(commonMapper.selectDropDownListByDict(d.getConditionTableName()));
             } else if (d.getConditionDatasource() != null && d.getConditionDatasource().equals("1")) {
-                d.setDropDownList(commonMapper.selectDropDownList(d.getConditionTableName(), d.getConditionTableFieldKey(), d.getConditionTableFieldName(), new HashMap<>()));
+                d.setDropDownList(commonMapper.selectDropDownList(d.getConditionTableName(),
+                    d.getConditionTableFieldKey(), d.getConditionTableFieldName(), new HashMap<>()));
             }
         });
         resultMap.put("where", dragTableConditions);
-        //resultMap.put("querySql", tableSqlMapper.selectTableSqlByTSqlKey(sqlKey));
+        // resultMap.put("querySql", tableSqlMapper.selectTableSqlByTSqlKey(sqlKey));
         resultMap.put("querySql", tableSqlMapper.selectTableSqlByTSqlKey(dragTable.getSqlKey()));
         // 表格样式信息
         DragTableStyle dragTableStyle = new DragTableStyle();
@@ -156,20 +158,19 @@ public class DragTableServiceImpl implements IDragTableService {
         resultMap.put("style", dragTableStyleList);
         CommonEntity commonEntity = new CommonEntity();
         // 动态表格按钮信息
-        //根据tableKey获取根节点信息
+        // 根据tableKey获取根节点信息
         List<String> btnKeys = dragTableBtnRelevanceMapper.selectBtnKeyByTableKey(dragTable.getTableKey());
-        //获取根节点数据
+        // 获取根节点数据
         if (btnKeys.size() > 0) {
             List<DragTableBtn> rootNodes = dragTableBtnMapper.selectDragTableBtnListByBtnKey(btnKeys);
-            //查询子节点
+            // 查询子节点
             List<Long> ids = rootNodes.stream().map(m -> m.getId()).collect(Collectors.toList());
             if (ids.isEmpty()) {
                 resultMap.put("button", rootNodes);
             } else {
                 List<DragTableBtn> childNodes = dragTableBtnMapper.selectChildNodeById(ids);
-                List<DragTableBtn> btnList = rootNodes.stream().peek(
-                        root -> root.setChildren(getChildrenList(root, childNodes))
-                ).collect(Collectors.toList());
+                List<DragTableBtn> btnList = rootNodes.stream()
+                    .peek(root -> root.setChildren(getChildrenList(root, childNodes))).collect(Collectors.toList());
                 resultMap.put("button", btnList);
             }
         }
@@ -179,9 +180,9 @@ public class DragTableServiceImpl implements IDragTableService {
 
     private List<DragTableBtn> getChildrenList(DragTableBtn root, List<DragTableBtn> childNodes) {
         List<DragTableBtn> list = childNodes.stream().filter(dragTableBtn ->
-                //筛选出下一节点元素
-                Objects.equals(dragTableBtn.getBtnParentId(), root.getId())).map(dragTableBtn -> {
-            //递归set子节点
+        // 筛选出下一节点元素
+        Objects.equals(dragTableBtn.getBtnParentId(), root.getId())).map(dragTableBtn -> {
+            // 递归set子节点
             dragTableBtn.setChildren(this.getChildrenList(dragTableBtn, childNodes));
             return dragTableBtn;
         }).collect(Collectors.toList());
@@ -200,25 +201,25 @@ public class DragTableServiceImpl implements IDragTableService {
     // SQL 条件的结束
     public static final String SQL_END = "LIKE '%#{val}%'";
 
-    //单个表格添加的逻辑
+    // 单个表格添加的逻辑
     @Transactional
     @Override
     public void addDragTable(DragTableVo dragTableVo) {
         String SQL = "";
-        //add drag_table
+        // add drag_table
         DragTable dragTable = new DragTable();
         BeanUtils.copyProperties(dragTableVo, dragTable);
         dragTable.setDtColumnName(JSON.toJSONString(dragTableVo.getDtColumnName()));
         dragTable.setPrimaryKey(dragTableVo.getPrimaryKey());
         dragTable.setMenuId(dragTableVo.getMenuId());
-        dragTable.setDtType("0");//表格类型
-        //add table_sql
+        dragTable.setDtType("0");// 表格类型
+        // add table_sql
         TableSql tableSql = new TableSql();
         tableSql.setTableSql(dragTableVo.getTableSql());
         dragTableMapper.insertDragTable(dragTable);
         List<String> searchFieldList = new ArrayList<>();
         dragTableVo.getSearchFieldList().forEach(item -> {
-            if (item.getConditionType().equals("SuperQuery")) {  // 当前表格的查询条件是超级查询
+            if (item.getConditionType().equals("SuperQuery")) { // 当前表格的查询条件是超级查询
                 searchFieldList.add(item.getConditionField());
             }
         });
@@ -240,7 +241,7 @@ public class DragTableServiceImpl implements IDragTableService {
                 }
                 break;
             case "ORACLE":
-//                SQL_START = "";
+                // SQL_START = "";
                 for (int i = 0; searchFieldList.size() > i; i++) {
                     SQL += searchFieldList.get(i);
                     SQL += (searchFieldList.size() - 1 == i ? " " : "||");
@@ -252,8 +253,8 @@ public class DragTableServiceImpl implements IDragTableService {
         // dragTableVo.getDtTableName() + ".del_flag = '0' AND ";
         dragTableVo.getConditionDefaultValueMap().keySet().forEach(item -> {
             try {
-                where.append(item +
-                        URLDecoder.decode(dragTableVo.getConditionDefaultValueMap().get(item).toString(), "UTF-8")
+                where.append(
+                    item + URLDecoder.decode(dragTableVo.getConditionDefaultValueMap().get(item).toString(), "UTF-8")
                         + " AND ");
             } catch (UnsupportedEncodingException e) {
                 throw new RuntimeException(e);
@@ -266,51 +267,53 @@ public class DragTableServiceImpl implements IDragTableService {
         tableSql.setOrderByColumn(dragTableVo.getOrderByColumn());
         tableSql.setSortOrder(dragTableVo.getSortOrder());
         tableSqlMapper.insertTableSql(tableSql);
-        // add drag_table_condition
+
+        // add drag_table_condition 添加动态表格高级查询条件以及共通页面条件框类型
         if (dragTableVo.getSearchFieldList().size() > 0) {
             dragTableVo.getConditionDefaultValueMap().keySet().forEach(item -> {
-                dragTableVo.getSearchFieldList().add(
-                        new DragTableCondition(
-                                dragTable.gettId(), "默认查询", item, "DefaultQuery", dragTableVo.getConditionDefaultValueMap().get(item).toString()));
+                dragTableVo.getSearchFieldList().add(new DragTableCondition(dragTable.gettId(), "默认查询", item,
+                    "DefaultQuery", dragTableVo.getConditionDefaultValueMap().get(item).toString()));
             });
             // 批量更新
             dragTableVo.getSearchFieldList().forEach(item -> {
                 item.settId(dragTable.gettId());
+                // 添加联合查询条件数据
                 dragTableConditionMapper.insertDragTableConditionOne(item);
             });
         }
     }
 
-    //表格组添加表格的逻辑
+    // 表格组添加表格的逻辑
     @Transactional
     @Override
     public void addDragTable(DragTableGroupVo dragTableGroupVo) {
         for (DragTableVo dragTableVo : dragTableGroupVo.getDragTables()) {
             String SQL = "";
-            //add drag_table
+            // add drag_table
             DragTable dragTable = new DragTable();
             BeanUtils.copyProperties(dragTableVo, dragTable);
             dragTable.setDtColumnName(JSON.toJSONString(dragTableVo.getDtColumnName()));
             dragTable.setPrimaryKey(dragTableVo.getPrimaryKey());
             dragTable.setMenuId(dragTableVo.getMenuId());
-            dragTable.setDtName(dragTableVo.getDtName());//表格名称
+            dragTable.setDtName(dragTableVo.getDtName());// 表格名称
             dragTable.setDtType("1");
-            //add table_sql
+            // add table_sql
             TableSql tableSql = new TableSql();
             tableSql.setTableSql(dragTableVo.getTableSql());
             dragTableMapper.insertDragTable(dragTable);
 
             List<String> searchFieldList = new ArrayList<>();
             dragTableVo.getSearchFieldList().forEach(item -> {
-                if (item.getConditionType().equals("SuperQuery")) {  // 当前表格的查询条件是超级查询
+                if (item.getConditionType().equals("SuperQuery")) { // 当前表格的查询条件是超级查询
                     searchFieldList.add(item.getConditionField());
                 }
             });
-            //拼接sql查询条件
+            // 拼接sql查询条件
             switch (SecurityUtils.getDatabaseType().toUpperCase()) {
                 case "MYSQL":
                     for (int i = 0; searchFieldList.size() > i; i++) {
-                        SQL += " AND " + searchFieldList.get(i) + "=" + dragTableVo.getConditionDefaultValueMap().get(searchFieldList.get(i));
+                        SQL += " AND " + searchFieldList.get(i) + "="
+                            + dragTableVo.getConditionDefaultValueMap().get(searchFieldList.get(i));
                     }
                     break;
                 case "DM":
@@ -322,7 +325,7 @@ public class DragTableServiceImpl implements IDragTableService {
                     }
                     break;
                 case "ORACLE":
-                    //SQL_START = "";
+                    // SQL_START = "";
                     for (int i = 0; searchFieldList.size() > i; i++) {
                         SQL += searchFieldList.get(i);
                         SQL += (searchFieldList.size() - 1 == i ? " " : "||");
@@ -337,12 +340,11 @@ public class DragTableServiceImpl implements IDragTableService {
             tableSql.setOrderByColumn(dragTableVo.getOrderByColumn());
             tableSql.setSortOrder(dragTableVo.getSortOrder());
             tableSqlMapper.insertTableSql(tableSql);
-            //add drag_table_condition
+            // add drag_table_condition
             if (dragTableVo.getSearchFieldList() != null && searchFieldList.size() > 0) {
                 dragTableVo.getConditionDefaultValueMap().keySet().forEach(item -> {
-                    dragTableVo.getSearchFieldList().add(
-                            new DragTableCondition(
-                                    dragTable.gettId(), "默认查询", item, "DefaultQuery", dragTableVo.getConditionDefaultValueMap().get(item).toString()));
+                    dragTableVo.getSearchFieldList().add(new DragTableCondition(dragTable.gettId(), "默认查询", item,
+                        "DefaultQuery", dragTableVo.getConditionDefaultValueMap().get(item).toString()));
                 });
                 // 批量更新
                 dragTableVo.getSearchFieldList().forEach(item -> {
@@ -350,9 +352,11 @@ public class DragTableServiceImpl implements IDragTableService {
                     dragTableConditionMapper.insertDragTableConditionOne(item);
                 });
             }
-            //给表格增加按钮
-            if (dragTableVo.getDragTableBtnRelevanceList() != null && dragTableVo.getDragTableBtnRelevanceList().size() > 0) {
-                dragTableBtnRelevanceService.batchInsertDragTableBtnRelevance(dragTableVo.getDragTableBtnRelevanceList());
+            // 给表格增加按钮
+            if (dragTableVo.getDragTableBtnRelevanceList() != null
+                && dragTableVo.getDragTableBtnRelevanceList().size() > 0) {
+                dragTableBtnRelevanceService
+                    .batchInsertDragTableBtnRelevance(dragTableVo.getDragTableBtnRelevanceList());
             }
         }
     }
@@ -362,18 +366,19 @@ public class DragTableServiceImpl implements IDragTableService {
         DragTableVo vo = dragTableMapper.selectDragTableVoByTId(tId);
         // vo.setSearchFieldList(dragTableConditionMapper.selectDragTableSearchField(tId));
         vo.setSearchFieldList(dragTableConditionMapper.selectDragTableConditionByTid(tId));
-        //查询动态表格数据统计
+        // 查询动态表格数据统计
         DragTableStatistic dragTableStatistic = new DragTableStatistic();
         dragTableStatistic.setTableKey(vo.getTableKey());
         vo.setDragTableStatisticList(dragTableStatisticMapper.selectDragTableStatisticList(dragTableStatistic));
-        //查询动态表格样式
+        // 查询动态表格样式
         DragTableStyle dragTableStyle = new DragTableStyle();
         dragTableStyle.setTableKey(vo.getTableKey());
         vo.setDragTableStyleList(dragTableStyleMapper.selectDragTableStyleList(dragTableStyle));
-        //查询动态表格和按钮关联表信息
+        // 查询动态表格和按钮关联表信息
         DragTableBtnRelevance dragTableBtnRelevance = new DragTableBtnRelevance();
         dragTableBtnRelevance.setTableKey(vo.getTableKey());
-        vo.setDragTableBtnRelevanceList(dragTableBtnRelevanceMapper.selectDragTableBtnRelevanceList(dragTableBtnRelevance));
+        vo.setDragTableBtnRelevanceList(
+            dragTableBtnRelevanceMapper.selectDragTableBtnRelevanceList(dragTableBtnRelevance));
         return vo;
     }
 
@@ -381,17 +386,17 @@ public class DragTableServiceImpl implements IDragTableService {
     @Override
     public void updateDragTable(DragTableVo dragTableVo) {
         String SQL = "";
-        //update drag_table
+        // update drag_table
         DragTable dragTable = new DragTable();
         BeanUtils.copyProperties(dragTableVo, dragTable);
         dragTable.setDtColumnName(JSON.toJSONString(dragTableVo.getDtColumnName()));
         dragTableMapper.updateDragTable(dragTable);
-        //update table_sql
+        // update table_sql
         TableSql tableSql = new TableSql();
         tableSql.setTableSql(dragTableVo.getTableSql());
         List<String> searchFieldList = new ArrayList<>();
         dragTableVo.getSearchFieldList().forEach(item -> {
-            if (item.getConditionType().equals("SuperQuery")) {  // 当前表格的查询条件是超级查询
+            if (item.getConditionType().equals("SuperQuery")) { // 当前表格的查询条件是超级查询
                 searchFieldList.add(item.getConditionField());
             }
         });
@@ -413,7 +418,7 @@ public class DragTableServiceImpl implements IDragTableService {
                 }
                 break;
             case "ORACLE":
-//                SQL_START = "";
+                // SQL_START = "";
                 for (int i = 0; searchFieldList.size() > i; i++) {
                     SQL += searchFieldList.get(i);
                     SQL += (searchFieldList.size() - 1 == i ? " " : "||");
@@ -424,8 +429,8 @@ public class DragTableServiceImpl implements IDragTableService {
         // dragTableVo.getDtTableName() + ".del_flag = '0' AND ";
         dragTableVo.getConditionDefaultValueMap().keySet().forEach(item -> {
             try {
-                where.append(item +
-                        URLDecoder.decode(dragTableVo.getConditionDefaultValueMap().get(item).toString(), "UTF-8")
+                where.append(
+                    item + URLDecoder.decode(dragTableVo.getConditionDefaultValueMap().get(item).toString(), "UTF-8")
                         + " AND ");
             } catch (UnsupportedEncodingException e) {
                 throw new RuntimeException(e);
@@ -443,9 +448,8 @@ public class DragTableServiceImpl implements IDragTableService {
             // delete
             dragTableConditionMapper.deleteDragTableConditionBytIds(Collections.singletonList(dragTableVo.gettId()));
             dragTableVo.getConditionDefaultValueMap().keySet().forEach(item -> {
-                dragTableVo.getSearchFieldList().add(
-                        new DragTableCondition(
-                                dragTable.gettId(), "默认查询", item, "DefaultQuery", dragTableVo.getConditionDefaultValueMap().get(item).toString()));
+                dragTableVo.getSearchFieldList().add(new DragTableCondition(dragTable.gettId(), "默认查询", item,
+                    "DefaultQuery", dragTableVo.getConditionDefaultValueMap().get(item).toString()));
             });
             // 批量更新
             dragTableVo.getSearchFieldList().forEach(item -> {
@@ -460,9 +464,9 @@ public class DragTableServiceImpl implements IDragTableService {
     public void deleteDragTable(List<Long> tIds, List<String> sqlKeys) {
         // delete drag_table
         dragTableMapper.deleteDragTableByTIds(tIds);
-        //delete table_sql
+        // delete table_sql
         tableSqlMapper.deleteTableSqlBySqlKeys(sqlKeys);
-        //delete drag_table_condition
+        // delete drag_table_condition
         dragTableConditionMapper.deleteDragTableConditionBytIds(tIds);
     }
 
@@ -473,12 +477,12 @@ public class DragTableServiceImpl implements IDragTableService {
 
     /**
      * 查询当前租户下的表格数量
+     * 
      * @param dragTable
      * @return
      */
     @Override
     public int selectDragTableListCount(DragTable dragTable) {
-       return dragTableMapper.selectDragTableListCount(dragTable);
+        return dragTableMapper.selectDragTableListCount(dragTable);
     }
 }
-