瀏覽代碼

部门表-大队性质

chenshudong 5 天之前
父節點
當前提交
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 90
     private String deptTypeDesc;
91 91
 
92
+    /**
93
+     * 大队性质
94
+     */
95
+    private String brigadeNature;
96
+
92 97
     public Long getDeptId() {
93 98
         return deptId;
94 99
     }
@@ -207,6 +212,14 @@ public class SysDept extends BaseEntity {
207 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 223
     @Override
211 224
     public String toString() {
212 225
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
@@ -226,6 +239,7 @@ public class SysDept extends BaseEntity {
226 239
                 .append("updateTime", getUpdateTime())
227 240
                 .append("deptType", getDeptType())
228 241
                 .append("deptTypeDesc", getDeptTypeDesc())
242
+                .append("brigadeNature", getBrigadeNature())
229 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 22
         <result property="updateTime" column="update_time"/>
23 23
         <result property="deptType" column="dept_type"/>
24 24
         <result property="deptTypeDesc" column="dept_type_desc"/>
25
+        <result property="brigadeNature" column="brigade_nature"/>
25 26
     </resultMap>
26 27
 
27 28
     <sql id="selectDeptVo">
@@ -38,7 +39,8 @@
38 39
                d.create_by,
39 40
                d.create_time,
40 41
                d.dept_type,
41
-               d.dept_type_desc
42
+               d.dept_type_desc,
43
+               d.brigade_nature
42 44
         from sys_dept d
43 45
     </sql>
44 46
 
@@ -63,6 +65,9 @@
63 65
         <if test="deptTypeDesc != null and deptTypeDesc != ''">
64 66
             AND dept_type_desc = #{deptTypeDesc}
65 67
         </if>
68
+        <if test="brigadeNature != null and brigadeNature != ''">
69
+            AND brigade_nature = #{brigadeNature}
70
+        </if>
66 71
         <!-- 数据范围过滤 -->
67 72
         ${params.dataScope}
68 73
         order by d.parent_id, d.order_num
@@ -92,6 +97,7 @@
92 97
                d.status,
93 98
                d.dept_type,
94 99
                d.dept_type_desc,
100
+               d.brigade_nature,
95 101
                (select dept_name from sys_dept where dept_id = d.parent_id) parent_name
96 102
         from sys_dept d
97 103
         where d.dept_id = #{deptId}
@@ -156,6 +162,7 @@
156 162
         <if test="createBy != null and createBy != ''">create_by,</if>
157 163
         <if test="deptType != null and deptType != ''">dept_type,</if>
158 164
         <if test="deptTypeDesc != null and deptTypeDesc != ''">dept_type_desc,</if>
165
+        <if test="brigadeNature != null and brigadeNature != ''">brigade_nature,</if>
159 166
         create_time
160 167
         )values(
161 168
         <if test="deptId != null and deptId != 0">#{deptId},</if>
@@ -170,6 +177,7 @@
170 177
         <if test="createBy != null and createBy != ''">#{createBy},</if>
171 178
         <if test="deptType != null and deptType != ''">#{deptType},</if>
172 179
         <if test="deptTypeDesc != null and deptTypeDesc != ''">#{deptTypeDesc},</if>
180
+        <if test="brigadeNature != null and brigadeNature != ''">#{brigadeNature},</if>
173 181
         sysdate()
174 182
         )
175 183
     </insert>
@@ -188,6 +196,7 @@
188 196
             <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
189 197
             <if test="deptType != null and deptType != ''">dept_type = #{deptType},</if>
190 198
             <if test="deptTypeDesc != null and deptTypeDesc != ''">dept_type_desc = #{deptTypeDesc},</if>
199
+            <if test="brigadeNature != null and brigadeNature != ''">brigade_nature = #{brigadeNature},</if>
191 200
             update_time = sysdate()
192 201
         </set>
193 202
         where dept_id = #{deptId}
@@ -254,6 +263,7 @@
254 263
         d.status,
255 264
         d.dept_type,
256 265
         d.dept_type_desc,
266
+        d.brigade_nature,
257 267
         (select dept_name from sys_dept where dept_id = d.parent_id) parent_name
258 268
         from sys_dept d
259 269
         where d.dept_id in