Sfoglia il codice sorgente

部门表-大队性质

chenshudong 6 giorni fa
parent
commit
48853ff929

+ 14 - 0
airport-common/src/main/java/com/sundot/airport/common/core/domain/entity/SysDept.java

@@ -89,6 +89,11 @@ public class SysDept extends BaseEntity {
89
      */
89
      */
90
     private String deptTypeDesc;
90
     private String deptTypeDesc;
91
 
91
 
92
+    /**
93
+     * 大队性质
94
+     */
95
+    private String brigadeNature;
96
+
92
     public Long getDeptId() {
97
     public Long getDeptId() {
93
         return deptId;
98
         return deptId;
94
     }
99
     }
@@ -207,6 +212,14 @@ public class SysDept extends BaseEntity {
207
         this.deptTypeDesc = deptTypeDesc;
212
         this.deptTypeDesc = deptTypeDesc;
208
     }
213
     }
209
 
214
 
215
+    public String getBrigadeNature() {
216
+        return brigadeNature;
217
+    }
218
+
219
+    public void setBrigadeNature(String brigadeNature) {
220
+        this.brigadeNature = brigadeNature;
221
+    }
222
+
210
     @Override
223
     @Override
211
     public String toString() {
224
     public String toString() {
212
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
225
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
@@ -226,6 +239,7 @@ public class SysDept extends BaseEntity {
226
                 .append("updateTime", getUpdateTime())
239
                 .append("updateTime", getUpdateTime())
227
                 .append("deptType", getDeptType())
240
                 .append("deptType", getDeptType())
228
                 .append("deptTypeDesc", getDeptTypeDesc())
241
                 .append("deptTypeDesc", getDeptTypeDesc())
242
+                .append("brigadeNature", getBrigadeNature())
229
                 .toString();
243
                 .toString();
230
     }
244
     }
231
 }
245
 }

+ 32 - 0
airport-common/src/main/java/com/sundot/airport/common/enums/BrigadeNatureEnum.java

@@ -0,0 +1,32 @@
1
+package com.sundot.airport.common.enums;
2
+
3
+import lombok.AllArgsConstructor;
4
+import lombok.Getter;
5
+
6
+/**
7
+ * 大队性质枚举
8
+ */
9
+@Getter
10
+@AllArgsConstructor
11
+public enum BrigadeNatureEnum {
12
+
13
+    SECURITY_CHECK("SECURITY_CHECK", "安检"),
14
+    GENERAL_ADMINISTRATION("GENERAL_ADMINISTRATION", "综管"),
15
+    QUALITY_CONTROL("QUALITY_CONTROL", "品控"),
16
+    TRAINING("TRAINING", "培训"),
17
+    EQUIPMENT("EQUIPMENT", "设备"),
18
+    COMPREHENSIVE("COMPREHENSIVE", "综合");
19
+
20
+    private final String code;
21
+    private final String desc;
22
+
23
+    public static BrigadeNatureEnum getByCode(String code) {
24
+        for (BrigadeNatureEnum itemEnum : values()) {
25
+            if (itemEnum.getCode().equals(code)) {
26
+                return itemEnum;
27
+            }
28
+        }
29
+        return null;
30
+    }
31
+
32
+}

+ 11 - 1
airport-system/src/main/resources/mapper/system/SysDeptMapper.xml

@@ -22,6 +22,7 @@
22
         <result property="updateTime" column="update_time"/>
22
         <result property="updateTime" column="update_time"/>
23
         <result property="deptType" column="dept_type"/>
23
         <result property="deptType" column="dept_type"/>
24
         <result property="deptTypeDesc" column="dept_type_desc"/>
24
         <result property="deptTypeDesc" column="dept_type_desc"/>
25
+        <result property="brigadeNature" column="brigade_nature"/>
25
     </resultMap>
26
     </resultMap>
26
 
27
 
27
     <sql id="selectDeptVo">
28
     <sql id="selectDeptVo">
@@ -38,7 +39,8 @@
38
                d.create_by,
39
                d.create_by,
39
                d.create_time,
40
                d.create_time,
40
                d.dept_type,
41
                d.dept_type,
41
-               d.dept_type_desc
42
+               d.dept_type_desc,
43
+               d.brigade_nature
42
         from sys_dept d
44
         from sys_dept d
43
     </sql>
45
     </sql>
44
 
46
 
@@ -63,6 +65,9 @@
63
         <if test="deptTypeDesc != null and deptTypeDesc != ''">
65
         <if test="deptTypeDesc != null and deptTypeDesc != ''">
64
             AND dept_type_desc = #{deptTypeDesc}
66
             AND dept_type_desc = #{deptTypeDesc}
65
         </if>
67
         </if>
68
+        <if test="brigadeNature != null and brigadeNature != ''">
69
+            AND brigade_nature = #{brigadeNature}
70
+        </if>
66
         <!-- 数据范围过滤 -->
71
         <!-- 数据范围过滤 -->
67
         ${params.dataScope}
72
         ${params.dataScope}
68
         order by d.parent_id, d.order_num
73
         order by d.parent_id, d.order_num
@@ -92,6 +97,7 @@
92
                d.status,
97
                d.status,
93
                d.dept_type,
98
                d.dept_type,
94
                d.dept_type_desc,
99
                d.dept_type_desc,
100
+               d.brigade_nature,
95
                (select dept_name from sys_dept where dept_id = d.parent_id) parent_name
101
                (select dept_name from sys_dept where dept_id = d.parent_id) parent_name
96
         from sys_dept d
102
         from sys_dept d
97
         where d.dept_id = #{deptId}
103
         where d.dept_id = #{deptId}
@@ -156,6 +162,7 @@
156
         <if test="createBy != null and createBy != ''">create_by,</if>
162
         <if test="createBy != null and createBy != ''">create_by,</if>
157
         <if test="deptType != null and deptType != ''">dept_type,</if>
163
         <if test="deptType != null and deptType != ''">dept_type,</if>
158
         <if test="deptTypeDesc != null and deptTypeDesc != ''">dept_type_desc,</if>
164
         <if test="deptTypeDesc != null and deptTypeDesc != ''">dept_type_desc,</if>
165
+        <if test="brigadeNature != null and brigadeNature != ''">brigade_nature,</if>
159
         create_time
166
         create_time
160
         )values(
167
         )values(
161
         <if test="deptId != null and deptId != 0">#{deptId},</if>
168
         <if test="deptId != null and deptId != 0">#{deptId},</if>
@@ -170,6 +177,7 @@
170
         <if test="createBy != null and createBy != ''">#{createBy},</if>
177
         <if test="createBy != null and createBy != ''">#{createBy},</if>
171
         <if test="deptType != null and deptType != ''">#{deptType},</if>
178
         <if test="deptType != null and deptType != ''">#{deptType},</if>
172
         <if test="deptTypeDesc != null and deptTypeDesc != ''">#{deptTypeDesc},</if>
179
         <if test="deptTypeDesc != null and deptTypeDesc != ''">#{deptTypeDesc},</if>
180
+        <if test="brigadeNature != null and brigadeNature != ''">#{brigadeNature},</if>
173
         sysdate()
181
         sysdate()
174
         )
182
         )
175
     </insert>
183
     </insert>
@@ -188,6 +196,7 @@
188
             <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
196
             <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
189
             <if test="deptType != null and deptType != ''">dept_type = #{deptType},</if>
197
             <if test="deptType != null and deptType != ''">dept_type = #{deptType},</if>
190
             <if test="deptTypeDesc != null and deptTypeDesc != ''">dept_type_desc = #{deptTypeDesc},</if>
198
             <if test="deptTypeDesc != null and deptTypeDesc != ''">dept_type_desc = #{deptTypeDesc},</if>
199
+            <if test="brigadeNature != null and brigadeNature != ''">brigade_nature = #{brigadeNature},</if>
191
             update_time = sysdate()
200
             update_time = sysdate()
192
         </set>
201
         </set>
193
         where dept_id = #{deptId}
202
         where dept_id = #{deptId}
@@ -254,6 +263,7 @@
254
         d.status,
263
         d.status,
255
         d.dept_type,
264
         d.dept_type,
256
         d.dept_type_desc,
265
         d.dept_type_desc,
266
+        d.brigade_nature,
257
         (select dept_name from sys_dept where dept_id = d.parent_id) parent_name
267
         (select dept_name from sys_dept where dept_id = d.parent_id) parent_name
258
         from sys_dept d
268
         from sys_dept d
259
         where d.dept_id in
269
         where d.dept_id in