Browse Source

Merge branch 'master' of http://192.168.101.10:13000/boman/boman-framwork

yrik 4 years ago
parent
commit
b7d00f4aad

+ 13 - 0
boman-modules/boman-gen/src/main/java/com/boman/gen/controller/GenTableColumnController.java

@@ -6,15 +6,19 @@ import com.boman.common.core.utils.DateUtils;
 import com.boman.common.core.utils.SecurityUtils;
 import com.boman.common.core.web.controller.BaseController;
 import com.boman.common.core.web.domain.AjaxResult;
+import com.boman.common.core.web.page.TableDataInfo;
 import com.boman.common.log.annotation.Log;
 import com.boman.common.log.enums.BusinessType;
 import com.boman.common.security.annotation.PreAuthorize;
+import com.boman.gen.domain.GenTable;
 import com.boman.gen.domain.GenTableColumn;
 import com.boman.gen.service.IGenTableColumnService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.List;
+
 /**
  * @author tjf
  * @Description gen_table_column
@@ -28,6 +32,15 @@ public class GenTableColumnController extends BaseController {
     private IGenTableColumnService genTableColumnService;
 
 
+    /**
+     * 查询代码生成列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo genTableColumnList(GenTableColumn genTableColumn) {
+        startPage();
+        List<GenTableColumn> list = genTableColumnService.selectGenTableColumnList(genTableColumn);
+        return getDataTable(list);
+    }
 
     /**
     * @Description 新增业务表字段

+ 7 - 0
boman-modules/boman-gen/src/main/java/com/boman/gen/mapper/GenTableColumnMapper.java

@@ -27,6 +27,13 @@ public interface GenTableColumnMapper
      */
     public List<GenTableColumn> selectGenTableColumnListByTableId(Long tableId);
 
+    /**
+     * 查询字段列表
+     * @param genTableColumn
+     * @return
+     */
+    public List<GenTableColumn> selectGenTableColumnList(GenTableColumn genTableColumn);
+
     /**
      * 根据gen_table_column的id查询字段对象
      * @param columnId

+ 5 - 0
boman-modules/boman-gen/src/main/java/com/boman/gen/service/GenTableColumnServiceImpl.java

@@ -44,6 +44,11 @@ public class GenTableColumnServiceImpl implements IGenTableColumnService {
         return genTableColumnMapper.selectGenTableColumnListByTableId(tableId);
     }
 
+    @Override
+    public List<GenTableColumn> selectGenTableColumnList(GenTableColumn genTableColumn) {
+        return genTableColumnMapper.selectGenTableColumnList(genTableColumn);
+    }
+
     /**
      * 根据gen_table_column的id查询字段对象
      *

+ 1 - 2
boman-modules/boman-gen/src/main/java/com/boman/gen/service/GenTableServiceImpl.java

@@ -499,7 +499,6 @@ public class GenTableServiceImpl implements IGenTableService {
             genTableColumn.setColumnComment(columnComment[i]);
             genTableColumn.setColumnType(columnType[i]);
             genTableColumn.setIsPk("0");
-            genTableColumn.setIsIncrement("0");
             genTableColumn.setIsInsert("1");
             genTableColumn.setQueryType("EQ");
             genTableColumn.setHtmlType(htmlType[i]);
@@ -510,7 +509,7 @@ public class GenTableServiceImpl implements IGenTableService {
             genTableColumn.setMask("000000");
             if (i == 0) {
                 genTableColumn.setSort(1);
-                genTableColumn.setIsIncrement("1");
+                genTableColumn.setIsPk("1");
                 genTableColumn.setHrParentId(genTableColumnLog.getColumnId());
             }
             genTableColumnMapper.insertGenTableColumn(genTableColumn);

+ 7 - 0
boman-modules/boman-gen/src/main/java/com/boman/gen/service/IGenTableColumnService.java

@@ -18,6 +18,13 @@ public interface IGenTableColumnService
      */
     public List<GenTableColumn> selectGenTableColumnListByTableId(Long tableId);
 
+    /**
+     * 查询字段列表
+     * @param genTableColumn
+     * @return
+     */
+    public List<GenTableColumn> selectGenTableColumnList(GenTableColumn genTableColumn);
+
     /**
      * 根据gen_table_column的id查询字段对象
      * @param columnId

+ 15 - 0
boman-modules/boman-gen/src/main/resources/mapper/generator/GenTableColumnMapper.xml

@@ -49,6 +49,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         order by sort
     </select>
 
+    <select id="selectGenTableColumnList" parameterType="GenTableColumn" resultMap="GenTableColumnResult">
+        <include refid="selectGenTableColumnVo"/>
+        <where>
+            <if test="tableId != null and tableId != ''">
+                AND table_id = #{tableId}
+            </if>
+            <if test="columnName != null and columnName != ''">
+                AND lower(column_name) like lower(concat('%', #{columnName}, '%'))
+            </if>
+            <if test="htmlType != null and htmlType != ''">
+                AND html_type = #{htmlType}
+            </if>
+        </where>
+    </select>
+
     <select id="selectGenTableColumnByColumnId" parameterType="GenTableColumn" resultMap="GenTableColumnResult">
         <include refid="selectGenTableColumnVo"/>
         where column_id = #{columnId}

+ 8 - 0
ruoyi-ui/src/api/tool/gen.js

@@ -81,6 +81,14 @@ export function listAllColumnsByTableId(data) {
     data
   })
 }
+// 查询表HR详细信息
+export function genTableColumnList(query) {
+  return request({
+    url: '/boman-gen/genTableColumn/list',
+    method: 'get',
+    params: query
+  })
+}
 
 // 修改代码生成信息
 export function updateGenTable(data) {

+ 1 - 0
ruoyi-ui/src/assets/icons/svg/spot.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1618986939606" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2162" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M512 320a192.064 192.064 0 0 1 0 384 192 192 0 0 1 0-384z" fill="" p-id="2163"></path></svg>

+ 1 - 1
ruoyi-ui/src/assets/styles/sidebar.scss

@@ -114,7 +114,7 @@
       }
     }
     .nest-menu .is-active{
-      span{
+      &>span{
         color: #fff!important;
       }
       background-color: #3C8DBC!important;

+ 77 - 0
ruoyi-ui/src/router/index.js

@@ -57,12 +57,89 @@ export const constantRoutes = [
     path: '',
     component: Layout,
     redirect: 'index',
+    meta: { title: '首页', icon: '', noCache: true, affix: true },
     children: [
       {
         path: 'index',
         component: (resolve) => require(['@/views/index'], resolve),
         name: '首页',
         meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true }
+      },
+      {
+        path: 'index1',
+        name: '流程工作台',
+        hidden: false,
+        alwaysShow: true,
+        meta: { title: '流程工作台', icon: 'spot', noCache: true },
+        children: [{
+          path: 'index1',
+          hidden: false,
+          component: (resolve) => require(['@/views/index'], resolve),
+          name: '待我审批',
+          meta: { title: '待我审批', icon: '', noCache: false},
+        },{
+          path: 'index2',
+          hidden: false,
+          component: (resolve) => require(['@/views/index'], resolve),
+          name: '已办理',
+          meta: { title: '已办理', icon: '', noCache: false},
+        },{
+          path: 'index3',
+          hidden: false,
+          component: (resolve) => require(['@/views/index'], resolve),
+          name: '已延时',
+          meta: { title: '已延时', icon: '', noCache: false},
+        },{
+          path: 'index4',
+          hidden: false,
+          component: (resolve) => require(['@/views/index'], resolve),
+          name: '我的流程',
+          meta: { title: '我的流程', icon: '', noCache: false},
+        }]
+      },{
+        path: 'index2',
+        name: '工作协助',
+        hidden: false,
+        alwaysShow: true,
+        meta: { title: '工作协助', icon: 'spot', noCache: true },
+        children: [{
+          path: 'index1',
+          hidden: false,
+          component: (resolve) => require(['@/views/index'], resolve),
+          name: '批注',
+          meta: { title: '批注', icon: '', noCache: false},
+        },{
+          path: 'index2',
+          hidden: false,
+          component: (resolve) => require(['@/views/index'], resolve),
+          name: '微邮',
+          meta: { title: '微邮', icon: '', noCache: false},
+        }]
+      },{
+        path: 'index3',
+        name: '交办事项',
+        hidden: false,
+        alwaysShow: true,
+        meta: { title: '交办事项', icon: 'spot', noCache: true },
+        children: [{
+          path: 'index1',
+          hidden: false,
+          component: (resolve) => require(['@/views/index'], resolve),
+          name: '待我处理',
+          meta: { title: '待我处理', icon: '', noCache: false},
+        },{
+          path: 'index2',
+          hidden: false,
+          component: (resolve) => require(['@/views/index'], resolve),
+          name: '我的安排',
+          meta: { title: '我的安排', icon: '', noCache: false },
+        },{
+          path: 'index3',
+          hidden: false,
+          component: (resolve) => require(['@/views/index'], resolve),
+          name: '历史事务',
+          meta: { title: '历史事务', icon: '', noCache: false},
+        }]
       }
     ]
   },

+ 5 - 3
ruoyi-ui/src/views/tool/gen/editTable.vue

@@ -369,6 +369,7 @@
     setGenTable,
     delGenTable,
     listAllColumnsByTableId,
+	genTableColumnList,
     tableSql,
     zxImplement,
     getReload,
@@ -549,10 +550,11 @@
           this.dictOptions = response.data;
         });
         // 关联字段
-        listAllColumnsByTableId({
-          tableId
+        genTableColumnList({
+          tableId,
+          htmlType: 'HR'
         }).then(response => {
-          this.columList = response.data;
+          this.columList = response.rows;
         });
         // 关联表数据
         listTable(this.glbParams).then(response => {