lucky пре 3 месеци
родитељ
комит
4dfb9d006c

+ 2 - 5
zkqy-admin/src/main/java/com/zkqy/web/controller/dragForm/DragTableController.java

@@ -4,6 +4,7 @@ import java.util.List;
 import java.util.Map;
 import javax.servlet.http.HttpServletResponse;
 
+import com.zkqy.common.annotation.Anonymous;
 import com.zkqy.system.entity.DragTable;
 import com.zkqy.system.entity.vo.DragTableVo;
 import com.zkqy.system.service.*;
@@ -109,11 +110,7 @@ public class DragTableController extends BaseController {
         //if(dragTableVo.getDragTableStatisticList().size() > 0){
         //    dragTableStatisticService.batchInsertDragTableStatistic(dragTableVo);
         //}
-        //新增表格按钮关联表
-        if(dragTableVo.getDragTableBtnRelevanceList().size() > 0){
-            dragTableBtnRelevanceService.batchInsertDragTableBtnRelevance(dragTableVo.getDragTableBtnRelevanceList());
-        }
-         return AjaxResult.success();
+         return AjaxResult.success("动态表格新增成功");
     }
 
     /**

+ 1 - 0
zkqy-admin/src/main/java/com/zkqy/web/controller/dragForm/TableSqlController.java

@@ -104,4 +104,5 @@ public class TableSqlController extends BaseController
     {
         return toAjax(tableSqlService.deleteTableSqlByTIds(tIds));
     }
+
 }

+ 2 - 2
zkqy-admin/src/main/resources/application-druid.yml

@@ -7,9 +7,9 @@ spring:
         druid:
             # 主库数据源
             master:
-                url: jdbc:mysql://192.168.110.15:3306/zkqy-call?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                url: jdbc:mysql://192.168.110.83:3306/hqzk?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                 username: root
-                password: zkqy8888
+                password: root
             # 从库数据源
 #            slave:
 #                # 从数据源开关/默认关闭

+ 1 - 1
zkqy-admin/src/main/resources/application.yml

@@ -88,7 +88,7 @@ spring:
   # redis 配置
   redis:
     # 地址
-    host: 192.168.110.15
+    host: 127.0.0.1
     # 端口,默认为6379
     port: 6379
     # 数据库索引

+ 14 - 0
zkqy-system/src/main/java/com/zkqy/system/entity/vo/DragTableVo.java

@@ -18,6 +18,20 @@ public class DragTableVo {
      */
     private Long tId;
 
+    /**
+     * 表格类型
+     * 0:表格列表;1:联动表格;2:流程表格 3:树形表格
+     */
+    private  String dtType;
+
+    public String getDtType() {
+        return dtType;
+    }
+
+    public void setDtType(String dtType) {
+        this.dtType = dtType;
+    }
+
     /**
      * 菜单名称
      */

+ 63 - 0
zkqy-system/src/main/java/com/zkqy/system/mapper/DragTreeMapper.java

@@ -0,0 +1,63 @@
+package com.zkqy.system.mapper;
+
+import com.zkqy.system.entity.DragTree;
+
+import java.util.List;
+
+
+/**
+ * 拖拽树结构Mapper接口
+ * 
+ * @author hmc
+ * @date 2025-03-05
+ */
+public interface DragTreeMapper 
+{
+    /**
+     * 查询拖拽树结构
+     * 
+     * @param id 拖拽树结构主键
+     * @return 拖拽树结构
+     */
+    public DragTree selectDragTreeById(Long id);
+
+    /**
+     * 查询拖拽树结构列表
+     * 
+     * @param dragTree 拖拽树结构
+     * @return 拖拽树结构集合
+     */
+    public List<DragTree> selectDragTreeList(DragTree dragTree);
+
+    /**
+     * 新增拖拽树结构
+     * 
+     * @param dragTree 拖拽树结构
+     * @return 结果
+     */
+    public int insertDragTree(DragTree dragTree);
+
+    /**
+     * 修改拖拽树结构
+     * 
+     * @param dragTree 拖拽树结构
+     * @return 结果
+     */
+    public int updateDragTree(DragTree dragTree);
+
+    /**
+     * 删除拖拽树结构
+     * 
+     * @param id 拖拽树结构主键
+     * @return 结果
+     */
+    public int deleteDragTreeById(Long id);
+
+    /**
+     * 批量删除拖拽树结构
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteDragTreeByIds(Long[] ids);
+}

+ 8 - 0
zkqy-system/src/main/java/com/zkqy/system/mapper/MobilePageTableListMapper.java

@@ -54,6 +54,14 @@ public interface MobilePageTableListMapper
      */
     public int updateMobilePageTableList(MobilePageTableList mobilePageTableList);
 
+    /**
+     * 修改页面列表
+     *
+     * @param mobilePageTableList 页面列表
+     * @return 结果
+     */
+    public int updateMobilePageTableListByPageId(MobilePageTableList mobilePageTableList);
+
     /**
      * 删除页面列表
      * 

+ 63 - 0
zkqy-system/src/main/java/com/zkqy/system/service/IDragTreeService.java

@@ -0,0 +1,63 @@
+package com.zkqy.system.service;
+
+import com.zkqy.system.entity.DragTree;
+
+import java.util.List;
+
+
+/**
+ * 拖拽树结构Service接口
+ * 
+ * @author hmc
+ * @date 2025-03-05
+ */
+public interface IDragTreeService 
+{
+    /**
+     * 查询拖拽树结构
+     * 
+     * @param id 拖拽树结构主键
+     * @return 拖拽树结构
+     */
+    public DragTree selectDragTreeById(Long id);
+
+    /**
+     * 查询拖拽树结构列表
+     * 
+     * @param dragTree 拖拽树结构
+     * @return 拖拽树结构集合
+     */
+    public List<DragTree> selectDragTreeList(DragTree dragTree);
+
+    /**
+     * 新增拖拽树结构
+     * 
+     * @param dragTree 拖拽树结构
+     * @return 结果
+     */
+    public int insertDragTree(DragTree dragTree);
+
+    /**
+     * 修改拖拽树结构
+     * 
+     * @param dragTree 拖拽树结构
+     * @return 结果
+     */
+    public int updateDragTree(DragTree dragTree);
+
+    /**
+     * 批量删除拖拽树结构
+     * 
+     * @param ids 需要删除的拖拽树结构主键集合
+     * @return 结果
+     */
+    public int deleteDragTreeByIds(Long[] ids);
+
+    /**
+     * 删除拖拽树结构信息
+     * 
+     * @param id 拖拽树结构主键
+     * @return 结果
+     */
+    public int deleteDragTreeById(Long id);
+}

+ 3 - 16
zkqy-system/src/main/java/com/zkqy/system/service/impl/DragTableServiceImpl.java

@@ -28,6 +28,8 @@ import javax.annotation.Resource;
  */
 @Service
 public class DragTableServiceImpl implements IDragTableService {
+
+
     @Autowired
     private DragTableMapper dragTableMapper;
 
@@ -40,8 +42,6 @@ public class DragTableServiceImpl implements IDragTableService {
     @Resource
     private CommonMapper commonMapper;
 
-    @Resource
-    private TransactionTemplate transactionTemplate;
 
     @Resource
     private DragTableStatisticMapper dragTableStatisticMapper;
@@ -88,22 +88,9 @@ public class DragTableServiceImpl implements IDragTableService {
      */
     @Override
     public int insertDragTable(DragTable dragTable) {
-        // 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);
-    // }
 
     /**
      * 批量删除动态表格
@@ -212,7 +199,7 @@ public class DragTableServiceImpl implements IDragTableService {
         dragTable.setDtColumnName(JSON.toJSONString(dragTableVo.getDtColumnName()));
         dragTable.setPrimaryKey(dragTableVo.getPrimaryKey());
         dragTable.setMenuId(dragTableVo.getMenuId());
-        dragTable.setDtType("0");// 表格类型
+        dragTable.setDtType(dragTableVo.getDtType());// 表格类型
         // add table_sql
         TableSql tableSql = new TableSql();
         tableSql.setTableSql(dragTableVo.getTableSql());

+ 97 - 0
zkqy-system/src/main/java/com/zkqy/system/service/impl/DragTreeServiceImpl.java

@@ -0,0 +1,97 @@
+package com.zkqy.system.service.impl;
+
+import java.util.List;
+
+import com.zkqy.common.utils.DateUtils;
+import com.zkqy.system.entity.DragTree;
+import com.zkqy.system.mapper.DragTreeMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.zkqy.system.service.IDragTreeService;
+
+/**
+ * 拖拽树结构Service业务层处理
+ * 
+ * @author hmc
+ * @date 2025-03-05
+ */
+@Service
+public class DragTreeServiceImpl implements IDragTreeService
+{
+    @Autowired
+    private DragTreeMapper dragTreeMapper;
+
+    /**
+     * 查询拖拽树结构
+     * 
+     * @param id 拖拽树结构主键
+     * @return 拖拽树结构
+     */
+    @Override
+    public DragTree selectDragTreeById(Long id)
+    {
+        return dragTreeMapper.selectDragTreeById(id);
+    }
+
+    /**
+     * 查询拖拽树结构列表
+     * 
+     * @param dragTree 拖拽树结构
+     * @return 拖拽树结构
+     */
+    @Override
+    public List<DragTree> selectDragTreeList(DragTree dragTree)
+    {
+        return dragTreeMapper.selectDragTreeList(dragTree);
+    }
+
+    /**
+     * 新增拖拽树结构
+     * 
+     * @param dragTree 拖拽树结构
+     * @return 结果
+     */
+    @Override
+    public int insertDragTree(DragTree dragTree)
+    {
+        dragTree.setCreateTime(DateUtils.getNowDate());
+        return dragTreeMapper.insertDragTree(dragTree);
+    }
+
+    /**
+     * 修改拖拽树结构
+     * 
+     * @param dragTree 拖拽树结构
+     * @return 结果
+     */
+    @Override
+    public int updateDragTree(DragTree dragTree)
+    {
+        dragTree.setUpdateTime(DateUtils.getNowDate());
+        return dragTreeMapper.updateDragTree(dragTree);
+    }
+
+    /**
+     * 批量删除拖拽树结构
+     * 
+     * @param ids 需要删除的拖拽树结构主键
+     * @return 结果
+     */
+    @Override
+    public int deleteDragTreeByIds(Long[] ids)
+    {
+        return dragTreeMapper.deleteDragTreeByIds(ids);
+    }
+
+    /**
+     * 删除拖拽树结构信息
+     * 
+     * @param id 拖拽树结构主键
+     * @return 结果
+     */
+    @Override
+    public int deleteDragTreeById(Long id)
+    {
+        return dragTreeMapper.deleteDragTreeById(id);
+    }
+}

+ 2 - 1
zkqy-system/src/main/java/com/zkqy/system/service/impl/MobilePageDataServiceImpl.java

@@ -87,7 +87,8 @@ public class MobilePageDataServiceImpl implements IMobilePageDataService
     public int updateMobilePageData(MobilePageData mobilePageData)
     {
         if (mobilePageData.getIsExistsList().equals("true")) {
-            mobilePageTableListMapper.updateMobilePageTableList(mobilePageData.getMobilePageTableList());
+            mobilePageData.getMobilePageTableList().setPageId(mobilePageData.getId());
+            mobilePageTableListMapper.updateMobilePageTableListByPageId(mobilePageData.getMobilePageTableList());
         }
         return mobilePageDataMapper.updateMobilePageData(mobilePageData);
     }

+ 1 - 0
zkqy-system/src/main/resources/mapper/dragmapper/DragTableMapper.xml

@@ -43,6 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="echoData"      column="echo_data"/>
         <result property="menuId" column="menu_id"/>
         <result property="primaryKey" column="primary_key"/>
+        <result property="dtType" column="dt_type"></result>
     </resultMap>
 
     <sql id="selectDragTableVo">

+ 37 - 13
zkqy-system/src/main/resources/mapper/mobile/MobilePageTableListMapper.xml

@@ -8,14 +8,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="id"    column="id"    />
         <result property="pageId"    column="page_id"    />
         <result property="tableNameDes"    column="table_name_des"    />
-        <result property="isSingleTable"    column="isSingleTable"    />
+        <result property="isSingleTable"    column="is_single_table"    />
         <result property="tableNames"    column="table_names"    />
         <result property="tableColumnName"    column="table_column_name"    />
         <result property="tableColumnDesc"    column="table_column_desc"    />
         <result property="tableJoin"    column="table_join"    />
         <result property="tableQueryConditions"    column="table_query_conditions"    />
-        <result property="timeRangeFilters"    column="timeRangeFilters"    />
-        <result property="tablelistSort"    column="tablelistSort"    />
+        <result property="timeRangeFilters"    column="time_range_filters"    />
+        <result property="tablelistSort"    column="tablelist_sort"    />
         <result property="listMapValue"    column="list_map_value"    />
         <result property="extensions"    column="extensions"    />
         <result property="createTime"    column="create_time"    />
@@ -27,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectMobilePageTableListVo">
-        select id, page_id, table_name_des, isSingleTable, table_names, table_column_name, table_column_desc, table_join, table_query_conditions, timeRangeFilters, tablelistSort, list_map_value, extensions, create_time, create_by_id, create_by, update_by, update_by_id, update_time from {DBNAME}.mobile_page_table_list
+        select id, page_id, table_name_des, is_single_table, table_names, table_column_name, table_column_desc, table_join, table_query_conditions, time_range_filters, tablelist_sort, list_map_value, extensions, create_time, create_by_id, create_by, update_by, update_by_id, update_time from {DBNAME}.mobile_page_table_list
     </sql>
 
     <select id="selectMobilePageTableListList" parameterType="com.zkqy.system.entity.MobilePageTableList" resultMap="MobilePageTableListResult">
@@ -35,14 +35,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>  
             <if test="pageId != null "> and page_id = #{pageId}</if>
             <if test="tableNameDes != null  and tableNameDes != ''"> and table_name_des = #{tableNameDes}</if>
-            <if test="isSingleTable != null  and isSingleTable != ''"> and isSingleTable = #{isSingleTable}</if>
+            <if test="isSingleTable != null  and isSingleTable != ''"> and is_single_table = #{isSingleTable}</if>
             <if test="tableNames != null  and tableNames != ''"> and table_names = #{tableNames}</if>
             <if test="tableColumnName != null  and tableColumnName != ''"> and table_column_name like concat('%', #{tableColumnName}, '%')</if>
             <if test="tableColumnDesc != null  and tableColumnDesc != ''"> and table_column_desc = #{tableColumnDesc}</if>
             <if test="tableJoin != null  and tableJoin != ''"> and table_join = #{tableJoin}</if>
             <if test="tableQueryConditions != null  and tableQueryConditions != ''"> and table_query_conditions = #{tableQueryConditions}</if>
-            <if test="timeRangeFilters != null  and timeRangeFilters != ''"> and timeRangeFilters = #{timeRangeFilters}</if>
-            <if test="tablelistSort != null  and tablelistSort != ''"> and tablelistSort = #{tablelistSort}</if>
+            <if test="timeRangeFilters != null  and timeRangeFilters != ''"> and time_range_filters = #{timeRangeFilters}</if>
+            <if test="tablelistSort != null  and tablelistSort != ''"> and tablelist_sort = #{tablelistSort}</if>
             <if test="listMapValue != null  and listMapValue != ''"> and list_map_value = #{listMapValue}</if>
             <if test="extensions != null  and extensions != ''"> and extensions = #{extensions}</if>
             <if test="createById != null "> and create_by_id = #{createById}</if>
@@ -66,14 +66,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="id != null">id,</if>
             <if test="pageId != null">page_id,</if>
             <if test="tableNameDes != null">table_name_des,</if>
-            <if test="isSingleTable != null">isSingleTable,</if>
+            <if test="isSingleTable != null">is_single_table,</if>
             <if test="tableNames != null">table_names,</if>
             <if test="tableColumnName != null">table_column_name,</if>
             <if test="tableColumnDesc != null">table_column_desc,</if>
             <if test="tableJoin != null">table_join,</if>
             <if test="tableQueryConditions != null">table_query_conditions,</if>
-            <if test="timeRangeFilters != null">timeRangeFilters,</if>
-            <if test="tablelistSort != null">tablelistSort,</if>
+            <if test="timeRangeFilters != null">time_range_filters,</if>
+            <if test="tablelistSort != null">tablelist_sort,</if>
             <if test="listMapValue != null">list_map_value,</if>
             <if test="extensions != null">extensions,</if>
             <if test="createTime != null">create_time,</if>
@@ -111,14 +111,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="SET" suffixOverrides=",">
             <if test="pageId != null">page_id = #{pageId},</if>
             <if test="tableNameDes != null">table_name_des = #{tableNameDes},</if>
-            <if test="isSingleTable != null">isSingleTable = #{isSingleTable},</if>
+            <if test="isSingleTable != null">is_single_table = #{isSingleTable},</if>
             <if test="tableNames != null">table_names = #{tableNames},</if>
             <if test="tableColumnName != null">table_column_name = #{tableColumnName},</if>
             <if test="tableColumnDesc != null">table_column_desc = #{tableColumnDesc},</if>
             <if test="tableJoin != null">table_join = #{tableJoin},</if>
             <if test="tableQueryConditions != null">table_query_conditions = #{tableQueryConditions},</if>
-            <if test="timeRangeFilters != null">timeRangeFilters = #{timeRangeFilters},</if>
-            <if test="tablelistSort != null">tablelistSort = #{tablelistSort},</if>
+            <if test="timeRangeFilters != null">time_range_filters = #{timeRangeFilters},</if>
+            <if test="tablelistSort != null">tablelist_sort = #{tablelistSort},</if>
             <if test="listMapValue != null">list_map_value = #{listMapValue},</if>
             <if test="extensions != null">extensions = #{extensions},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
@@ -130,6 +130,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </trim>
         where id = #{id}
     </update>
+    <update id="updateMobilePageTableListByPageId">
+        update {DBNAME}.mobile_page_table_list
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="pageId != null">page_id = #{pageId},</if>
+            <if test="tableNameDes != null">table_name_des = #{tableNameDes},</if>
+            <if test="isSingleTable != null">is_single_table = #{isSingleTable},</if>
+            <if test="tableNames != null">table_names = #{tableNames},</if>
+            <if test="tableColumnName != null">table_column_name = #{tableColumnName},</if>
+            <if test="tableColumnDesc != null">table_column_desc = #{tableColumnDesc},</if>
+            <if test="tableJoin != null">table_join = #{tableJoin},</if>
+            <if test="tableQueryConditions != null">table_query_conditions = #{tableQueryConditions},</if>
+            <if test="timeRangeFilters != null">time_range_filters = #{timeRangeFilters},</if>
+            <if test="tablelistSort != null">tablelist_sort = #{tablelistSort},</if>
+            <if test="listMapValue != null">list_map_value = #{listMapValue},</if>
+            <if test="extensions != null">extensions = #{extensions},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="createById != null">create_by_id = #{createById},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateById != null">update_by_id = #{updateById},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where page_id = #{pageId}
+    </update>
 
     <delete id="deleteMobilePageTableListById" parameterType="Long">
         delete from {DBNAME}.mobile_page_table_list where id = #{id}