فهرست منبع

完善接口申请流程

yhliang 3 سال پیش
والد
کامیت
6c90d4c152

+ 5 - 0
mybusiness/pom.xml

@@ -30,6 +30,11 @@
 
 		<dependency>
 			<groupId>com.leisp</groupId>
+			<artifactId>leisp-framework</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>com.leisp</groupId>
 			<artifactId>leisp-admin</artifactId>
 		</dependency>
 

+ 14 - 1
mybusiness/src/main/java/com/sooka/apply/controller/IntRecordController.java

@@ -58,6 +58,19 @@ public class IntRecordController extends BaseController
     }
 
     /**
+     * 查询申请记录列表
+     */
+    @RequiresPermissions("apply:record:list")
+    @PostMapping("/intDetailedList")
+    @ResponseBody
+    public TableDataInfo intDetailedList(IntDetailed intDetailed)
+    {
+        startPage();
+        List<IntDetailed> list = intRecordService.selectIntDetailedList(intDetailed);
+        return getDataTable(list);
+    }
+
+    /**
      * 导出申请记录列表
      */
     @RequiresPermissions("apply:record:export")
@@ -96,7 +109,7 @@ public class IntRecordController extends BaseController
     }
 
     /**
-     * 修改申请记录
+     * 申请记录
      */
     @GetMapping("/edit/{id}")
     public String edit(@PathVariable("id") String id, ModelMap mmap)

+ 9 - 0
mybusiness/src/main/java/com/sooka/apply/mapper/IntRecordMapper.java

@@ -29,6 +29,15 @@ public interface IntRecordMapper
     public List<IntRecord> selectIntRecordList(IntRecord intRecord);
 
     /**
+     * 查询申请记录明细
+     *
+     * @param intDetailed 查询条件
+     * @return 申请明细集合
+     */
+    public List<IntDetailed> selectIntDetailedList(IntDetailed intDetailed);
+
+
+    /**
      * 新增申请记录
      * 
      * @param intRecord 申请记录

+ 8 - 0
mybusiness/src/main/java/com/sooka/apply/service/IIntRecordService.java

@@ -31,6 +31,14 @@ public interface IIntRecordService
     public List<IntRecord> selectIntRecordList(IntRecord intRecord);
 
     /**
+     * 查询申请记录明细
+     *
+     * @param intDetailed 查询条件
+     * @return 申请明细集合
+     */
+    public List<IntDetailed> selectIntDetailedList(IntDetailed intDetailed);
+
+    /**
      * 新增申请记录
      * 
      * @param intBo 申请记录

+ 11 - 0
mybusiness/src/main/java/com/sooka/apply/service/impl/IntRecordServiceImpl.java

@@ -57,6 +57,17 @@ public class IntRecordServiceImpl implements IIntRecordService
     }
 
     /**
+     * 查询申请记录明细
+     *
+     * @param intDetailed 查询条件
+     * @return 申请明细集合
+     */
+    @Override
+    public List<IntDetailed> selectIntDetailedList(IntDetailed intDetailed) {
+        return intRecordMapper.selectIntDetailedList(intDetailed);
+    }
+
+    /**
      * 新增申请记录
      * 
      * @param intBo 申请记录

+ 20 - 0
mybusiness/src/main/resources/mapper/apply/IntRecordMapper.xml

@@ -46,6 +46,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
           AND d2.dept_id = i.org_id
     </sql>
 
+    <sql id="selectIntDetailedVo">
+        SELECT
+            b.id,
+            b.record_id,
+            b.int_id,
+            b.str_at,
+            b.end_at,
+            b.secret_key,
+            b.STATUS
+        FROM
+            int_detailed b
+    </sql>
+
     <select id="selectIntRecordList" parameterType="IntRecord" resultMap="IntRecordResult">
         <include refid="selectIntRecordVo"/>
         <where>  
@@ -56,6 +69,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
         ORDER BY i.apply_time DESC
     </select>
+
+    <select id="selectIntDetailedList" parameterType="IntDetailed" resultMap="IntDetailedResult">
+        <include refid="selectIntDetailedVo"/>
+        <where>
+            <if test="recordId != null "> and record_id = #{recordId}</if>
+        </where>
+    </select>
     
     <select id="selectIntRecordById" parameterType="String" resultMap="IntRecordIntDetailedResult">
         select a.id, a.apply_oid, a.org_id, a.apply_time, a.int_numbers,

+ 0 - 183
mybusiness/src/main/resources/templates/apply/record/add1.html

@@ -1,183 +0,0 @@
-<!DOCTYPE html>
-<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
-<head>
-    <th:block th:include="include :: header('新增申请记录')" />
-    <th:block th:include="include :: datetimepicker-css" />
-</head>
-<body class="white-bg">
-    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
-        <form class="form-horizontal m" id="form-record-add">
-            <h4 class="form-header h4">申请记录信息</h4>
-            <div class="form-group">    
-                <label class="col-sm-3 control-label">申请部门:</label>
-                <div class="col-sm-8">
-                    <input name="applyOid" class="form-control" type="text">
-                </div>
-            </div>
-            <div class="form-group">    
-                <label class="col-sm-3 control-label">登记部门:</label>
-                <div class="col-sm-8">
-                    <input name="orgId" class="form-control" type="text">
-                </div>
-            </div>
-            <div class="form-group">    
-                <label class="col-sm-3 control-label">申请时间:</label>
-                <div class="col-sm-8">
-                    <div class="input-group date">
-                        <input name="applyTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
-                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
-                    </div>
-                </div>
-            </div>
-            <div class="form-group">    
-                <label class="col-sm-3 control-label">接口数量:</label>
-                <div class="col-sm-8">
-                    <input name="intNumbers" class="form-control" type="text">
-                </div>
-            </div>
-            <div class="form-group">    
-                <label class="col-sm-3 control-label">备注:</label>
-                <div class="col-sm-8">
-                    <input name="remarks" class="form-control" type="text">
-                </div>
-            </div>
-            <h4 class="form-header h4">申请明细信息</h4>
-            <div class="row">
-                <div class="col-sm-12">
-                    <button type="button" class="btn btn-white btn-sm" onclick="addColumn()"><i class="fa fa-plus"> 增加</i></button>
-                    <button type="button" class="btn btn-white btn-sm" onclick="sub.delColumn()"><i class="fa fa-minus"> 删除</i></button>
-                    <div class="col-sm-12 select-table table-striped">
-                        <table id="bootstrap-table"></table>
-                    </div>
-                </div>
-            </div>
-        </form>
-    </div>
-    <th:block th:include="include :: footer" />
-    <th:block th:include="include :: datetimepicker-js" />
-    <script th:inline="javascript">
-        var prefix = ctx + "apply/record"
-        $("#form-record-add").validate({
-            focusCleanup: true
-        });
-
-        function submitHandler() {
-            if ($.validate.form()) {
-                $.operate.save(prefix + "/add", $('#form-record-add').serialize());
-            }
-        }
-
-        $("input[name='applyTime']").datetimepicker({
-            format: "yyyy-mm-dd",
-            minView: "month",
-            autoclose: true
-        });
-
-        $(function() {
-            var options = {
-                pagination: false,
-                showSearch: false,
-                showRefresh: false,
-                showToggle: false,
-                showColumns: false,
-                columns: [{
-                    checkbox: true
-                },
-                {
-                    field: 'index',
-                    align: 'center',
-                    title: "序号",
-                    formatter: function (value, row, index) {
-                    	var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
-                    	return columnIndex + $.table.serialNumber(index);
-                    }
-                },
-                {
-                    field: 'intId',
-                    align: 'center',
-                    title: '接口表id',
-                    formatter: function(value, row, index) {
-                        var html = $.common.sprintf("<input class='form-control' type='text' name='intDetailedList[%s].intId' value='%s'>", index, value);
-                        return html;
-                    }
-                },
-                {
-                    field: 'strAt',
-                    align: 'center',
-                    title: '开始时间',
-                    formatter: function(value, row, index) {
-                        var html = $.common.sprintf("<input class='form-control' type='text' name='intDetailedList[%s].strAt' value='%s'>", index, value);
-                        return html;
-                    }
-                },
-                {
-                    field: 'endAt',
-                    align: 'center',
-                    title: '结束时间',
-                    formatter: function(value, row, index) {
-                        var html = $.common.sprintf("<input class='form-control' type='text' name='intDetailedList[%s].endAt' value='%s'>", index, value);
-                        return html;
-                    }
-                },
-                {
-                    field: 'accessId',
-                    align: 'center',
-                    title: 'access_id',
-                    formatter: function(value, row, index) {
-                        var html = $.common.sprintf("<input class='form-control' type='text' name='intDetailedList[%s].accessId' value='%s'>", index, value);
-                        return html;
-                    }
-                },
-                {
-                    field: 'secretKey',
-                    align: 'center',
-                    title: 'secret_key',
-                    formatter: function(value, row, index) {
-                        var html = $.common.sprintf("<input class='form-control' type='text' name='intDetailedList[%s].secretKey' value='%s'>", index, value);
-                        return html;
-                    }
-                },
-                {
-                    field: 'status',
-                    align: 'center',
-                    title: '状态',
-                    formatter: function(value, row, index) {
-                        var html = $.common.sprintf("<input class='form-control' type='text' name='intDetailedList[%s].status' value='%s'>", index, value);
-                        return html;
-                    }
-                },
-                {
-                    field: 'remarks',
-                    align: 'center',
-                    title: '备注',
-                    formatter: function(value, row, index) {
-                        var html = $.common.sprintf("<input class='form-control' type='text' name='intDetailedList[%s].remarks' value='%s'>", index, value);
-                        return html;
-                    }
-                
-                }]
-            };
-            $.table.init(options);
-        });
-
-        function addColumn() {
-            var count = $("#" + table.options.id).bootstrapTable('getData').length;
-            sub.editColumn();
-        	
-            $("#" + table.options.id).bootstrapTable('insertRow', {
-                index: count,
-                row: {
-                    index: $.table.serialNumber(count),
-                    intId: "",
-                    strAt: "",
-                    endAt: "",
-                    accessId: "",
-                    secretKey: "",
-                    status: "",
-                    remarks: ""
-                }
-            });
-        }
-    </script>
-</body>
-</html>

+ 2 - 2
mybusiness/src/main/resources/templates/apply/record/edit.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
 <head>
-    <th:block th:include="include :: header('修改申请记录')" />
+    <th:block th:include="include :: header('申请记录')" />
     <th:block th:include="include :: datetimepicker-css" />
 </head>
 <body class="white-bg">
@@ -26,7 +26,7 @@
 
         $(function() {
             var options = {
-                data: [[${intRecord.intDetailedList}]],
+                url: prefix + "/intDetailedList",
                 pagination: false,
                 showSearch: false,
                 showRefresh: false,