chenshudong 4 kuukautta sitten
vanhempi
commit
5d32fe5fbd

+ 20 - 6
airport-admin/src/main/java/com/sundot/airport/web/controller/attendance/AttendancePostRecordController.java

@@ -95,6 +95,9 @@ public class AttendancePostRecordController extends BaseController {
95 95
             case STATION:
96 96
                 attendancePostRecord.setAttendanceStationId(dataPermission.getValue());
97 97
                 break;
98
+            case BRIGADE:
99
+                attendancePostRecord.setAttendanceBrigadeId(dataPermission.getValue());
100
+                break;
98 101
             case DEPARTMENT:
99 102
                 attendancePostRecord.setAttendanceDepartmentId(dataPermission.getValue());
100 103
                 break;
@@ -234,6 +237,9 @@ public class AttendancePostRecordController extends BaseController {
234 237
             case STATION:
235 238
                 attendancePostRecord.setAttendanceStationId(dataPermission.getValue());
236 239
                 break;
240
+            case BRIGADE:
241
+                attendancePostRecord.setAttendanceBrigadeId(dataPermission.getValue());
242
+                break;
237 243
             case DEPARTMENT:
238 244
                 attendancePostRecord.setAttendanceDepartmentId(dataPermission.getValue());
239 245
                 break;
@@ -293,10 +299,15 @@ public class AttendancePostRecordController extends BaseController {
293 299
             if (ObjUtil.isNotNull(department)) {
294 300
                 attendancePostRecord.setAttendanceDepartmentId(department.getDeptId());
295 301
                 attendancePostRecord.setAttendanceDepartmentName(department.getDeptName());
296
-                SysDept station = sysDeptService.selectDeptById(department.getParentId());
297
-                if (ObjUtil.isNotNull(station)) {
298
-                    attendancePostRecord.setAttendanceStationId(station.getDeptId());
299
-                    attendancePostRecord.setAttendanceStationName(station.getDeptName());
302
+                SysDept brigade = sysDeptService.selectDeptById(department.getParentId());
303
+                if (ObjUtil.isNotNull(brigade)) {
304
+                    attendancePostRecord.setAttendanceBrigadeId(brigade.getDeptId());
305
+                    attendancePostRecord.setAttendanceBrigadeName(brigade.getDeptName());
306
+                    SysDept station = sysDeptService.selectDeptById(brigade.getParentId());
307
+                    if (ObjUtil.isNotNull(station)) {
308
+                        attendancePostRecord.setAttendanceStationId(station.getDeptId());
309
+                        attendancePostRecord.setAttendanceStationName(station.getDeptName());
310
+                    }
300 311
                 }
301 312
             }
302 313
         }
@@ -596,12 +607,15 @@ public class AttendancePostRecordController extends BaseController {
596 607
 
597 608
                 String[] teamStr = vo.getAttendanceTeamName().split("/");
598 609
                 SysDept station = deptList.stream().filter(x -> StrUtil.equals(teamStr[0], x.getDeptName())).findFirst().orElse(new SysDept());
599
-                SysDept department = deptList.stream().filter(x -> StrUtil.equals(teamStr[1], x.getDeptName()) && ObjUtil.equals(station.getDeptId(), x.getParentId())).findFirst().orElse(new SysDept());
600
-                SysDept teams = deptList.stream().filter(x -> StrUtil.equals(teamStr[2], x.getDeptName()) && ObjUtil.equals(department.getDeptId(), x.getParentId())).findFirst().orElse(new SysDept());
610
+                SysDept brigade = deptList.stream().filter(x -> StrUtil.equals(teamStr[1], x.getDeptName()) && ObjUtil.equals(station.getDeptId(), x.getParentId())).findFirst().orElse(new SysDept());
611
+                SysDept department = deptList.stream().filter(x -> StrUtil.equals(teamStr[2], x.getDeptName()) && ObjUtil.equals(brigade.getDeptId(), x.getParentId())).findFirst().orElse(new SysDept());
612
+                SysDept teams = deptList.stream().filter(x -> StrUtil.equals(teamStr[3], x.getDeptName()) && ObjUtil.equals(department.getDeptId(), x.getParentId())).findFirst().orElse(new SysDept());
601 613
                 attendancePostRecord.setAttendanceTeamId(teams.getDeptId());
602 614
                 attendancePostRecord.setAttendanceTeamName(teams.getDeptName());
603 615
                 attendancePostRecord.setAttendanceDepartmentId(department.getDeptId());
604 616
                 attendancePostRecord.setAttendanceDepartmentName(department.getDeptName());
617
+                attendancePostRecord.setAttendanceBrigadeId(brigade.getDeptId());
618
+                attendancePostRecord.setAttendanceBrigadeName(brigade.getDeptName());
605 619
                 attendancePostRecord.setAttendanceStationId(station.getDeptId());
606 620
                 attendancePostRecord.setAttendanceStationName(station.getDeptName());
607 621
 

+ 14 - 0
airport-admin/src/main/java/com/sundot/airport/web/controller/attendance/AttendanceRecordController.java

@@ -64,6 +64,9 @@ public class AttendanceRecordController extends BaseController {
64 64
             case STATION:
65 65
                 attendanceRecord.setStationCode(dataPermission.getValue().toString());
66 66
                 break;
67
+            case BRIGADE:
68
+                attendanceRecord.setBrigadeCode(dataPermission.getValue().toString());
69
+                break;
67 70
             case DEPARTMENT:
68 71
                 attendanceRecord.setDepartmentCode(dataPermission.getValue().toString());
69 72
                 break;
@@ -97,6 +100,9 @@ public class AttendanceRecordController extends BaseController {
97 100
             case STATION:
98 101
                 attendanceRecord.setStationCode(dataPermission.getValue().toString());
99 102
                 break;
103
+            case BRIGADE:
104
+                attendanceRecord.setBrigadeCode(dataPermission.getValue().toString());
105
+                break;
100 106
             case DEPARTMENT:
101 107
                 attendanceRecord.setDepartmentCode(dataPermission.getValue().toString());
102 108
                 break;
@@ -139,6 +145,10 @@ public class AttendanceRecordController extends BaseController {
139 145
             attendanceRecord.setDepartmentCode(userInfo.getDepartmentId().toString());
140 146
         }
141 147
         attendanceRecord.setDepartmentName(userInfo.getDepartmentName());
148
+        if (Objects.nonNull(userInfo.getBrigadeId())) {
149
+            attendanceRecord.setBrigadeCode(userInfo.getBrigadeId().toString());
150
+        }
151
+        attendanceRecord.setBrigadeName(userInfo.getBrigadeName());
142 152
         if (Objects.nonNull(userInfo.getStationId())) {
143 153
             attendanceRecord.setStationCode(userInfo.getStationId().toString());
144 154
         }
@@ -245,6 +255,10 @@ public class AttendanceRecordController extends BaseController {
245 255
                     attendanceRecord.setDepartmentCode(userInfo.getDepartmentId().toString());
246 256
                 }
247 257
                 attendanceRecord.setDepartmentName(userInfo.getDepartmentName());
258
+                if (Objects.nonNull(userInfo.getBrigadeId())) {
259
+                    attendanceRecord.setBrigadeCode(userInfo.getBrigadeId().toString());
260
+                }
261
+                attendanceRecord.setBrigadeName(userInfo.getBrigadeName());
248 262
                 if (Objects.nonNull(userInfo.getStationId())) {
249 263
                     attendanceRecord.setStationCode(userInfo.getStationId().toString());
250 264
                 }

+ 13 - 0
airport-attendance/src/main/java/com/sundot/airport/attendance/domain/AttendancePostRecord.java

@@ -110,6 +110,17 @@ public class AttendancePostRecord extends BaseEntity {
110 110
     private String attendanceDepartmentName;
111 111
 
112 112
     /**
113
+     * 考勤大队ID
114
+     */
115
+    private Long attendanceBrigadeId;
116
+
117
+    /**
118
+     * 考勤大队名称
119
+     */
120
+    @Excel(name = "大队名称", sort = 13)
121
+    private String attendanceBrigadeName;
122
+
123
+    /**
113 124
      * 考勤机构站ID
114 125
      */
115 126
     private Long attendanceStationId;
@@ -193,6 +204,8 @@ public class AttendancePostRecord extends BaseEntity {
193 204
                 ", attendanceTeamName='" + attendanceTeamName + '\'' +
194 205
                 ", attendanceDepartmentId=" + attendanceDepartmentId +
195 206
                 ", attendanceDepartmentName='" + attendanceDepartmentName + '\'' +
207
+                ", attendanceBrigadeId=" + attendanceBrigadeId +
208
+                ", attendanceBrigadeName='" + attendanceBrigadeName + '\'' +
196 209
                 ", attendanceStationId=" + attendanceStationId +
197 210
                 ", attendanceStationName='" + attendanceStationName + '\'' +
198 211
                 ", channelName='" + channelName + '\'' +

+ 13 - 0
airport-attendance/src/main/java/com/sundot/airport/attendance/domain/AttendanceRecord.java

@@ -87,6 +87,17 @@ public class AttendanceRecord extends BaseEntity {
87 87
     private String departmentName;
88 88
 
89 89
     /**
90
+     * 大队编码
91
+     */
92
+    private String brigadeCode;
93
+
94
+    /**
95
+     * 大队名称
96
+     */
97
+    @Excel(name = "大队名称", sort = 9)
98
+    private String brigadeName;
99
+
100
+    /**
90 101
      * 机构站编码
91 102
      */
92 103
     private String stationCode;
@@ -144,6 +155,8 @@ public class AttendanceRecord extends BaseEntity {
144 155
                 .append("teamName", getTeamName())
145 156
                 .append("departmentCode", getDepartmentCode())
146 157
                 .append("departmentName", getDepartmentName())
158
+                .append("brigadeCode", getBrigadeCode())
159
+                .append("brigadeName", getBrigadeName())
147 160
                 .append("stationCode", getStationCode())
148 161
                 .append("stationName", getStationName())
149 162
                 .append("userName", getUserName())

+ 1 - 1
airport-attendance/src/main/java/com/sundot/airport/attendance/dto/AttendancePostRecordImportVO.java

@@ -47,7 +47,7 @@ public class AttendancePostRecordImportVO implements Serializable {
47 47
     /**
48 48
      * 考勤班组名称
49 49
      */
50
-    @Excel(name = "班组(机构站/科室/班组)", width = 30, sort = 5)
50
+    @Excel(name = "班组(机构站/大队/科室/班组)", width = 30, sort = 5)
51 51
     private String attendanceTeamName;
52 52
 
53 53
     /**

+ 16 - 0
airport-attendance/src/main/resources/mapper/attendance/AttendancePostRecordMapper.xml

@@ -25,6 +25,8 @@
25 25
         <result property="attendanceTeamName" column="attendance_team_name"/>
26 26
         <result property="attendanceDepartmentId" column="attendance_department_id"/>
27 27
         <result property="attendanceDepartmentName" column="attendance_department_name"/>
28
+        <result property="attendanceBrigadeId" column="attendance_brigade_id"/>
29
+        <result property="attendanceBrigadeName" column="attendance_brigade_name"/>
28 30
         <result property="attendanceStationId" column="attendance_station_id"/>
29 31
         <result property="attendanceStationName" column="attendance_station_name"/>
30 32
         <result property="channelName" column="channel_name"/>
@@ -61,6 +63,8 @@
61 63
                attendance_team_name,
62 64
                attendance_department_id,
63 65
                attendance_department_name,
66
+               attendance_brigade_id,
67
+               attendance_brigade_name,
64 68
                attendance_station_id,
65 69
                attendance_station_name,
66 70
                channel_name,
@@ -108,6 +112,10 @@
108 112
             <if test="attendanceDepartmentName != null  and attendanceDepartmentName != ''">and
109 113
                 attendance_department_name like concat('%', #{attendanceDepartmentName}, '%')
110 114
             </if>
115
+            <if test="attendanceBrigadeId != null ">and attendance_brigade_id = #{attendanceBrigadeId}</if>
116
+            <if test="attendanceBrigadeName != null  and attendanceBrigadeName != ''">and
117
+                attendance_brigade_name like concat('%', #{attendanceBrigadeName}, '%')
118
+            </if>
111 119
             <if test="attendanceStationId != null ">and attendance_station_id = #{attendanceStationId}</if>
112 120
             <if test="attendanceStationName != null  and attendanceStationName != ''">and attendance_station_name like
113 121
                 concat('%', #{attendanceStationName}, '%')
@@ -165,6 +173,8 @@
165 173
             <if test="attendanceDepartmentId != null">attendance_department_id,</if>
166 174
             <if test="attendanceDepartmentName != null and attendanceDepartmentName != ''">attendance_department_name,
167 175
             </if>
176
+            <if test="attendanceBrigadeId != null">attendance_brigade_id,</if>
177
+            <if test="attendanceBrigadeName != null and attendanceBrigadeName != ''">attendance_brigade_name,</if>
168 178
             <if test="attendanceStationId != null">attendance_station_id,</if>
169 179
             <if test="attendanceStationName != null and attendanceStationName != ''">attendance_station_name,</if>
170 180
             <if test="channelName != null and channelName != ''">channel_name,</if>
@@ -201,6 +211,8 @@
201 211
             <if test="attendanceDepartmentName != null and attendanceDepartmentName != ''">
202 212
                 #{attendanceDepartmentName},
203 213
             </if>
214
+            <if test="attendanceBrigadeId != null">#{attendanceBrigadeId},</if>
215
+            <if test="attendanceBrigadeName != null and attendanceBrigadeName != ''">#{attendanceBrigadeName},</if>
204 216
             <if test="attendanceStationId != null">#{attendanceStationId},</if>
205 217
             <if test="attendanceStationName != null and attendanceStationName != ''">#{attendanceStationName},</if>
206 218
             <if test="channelName != null and channelName != ''">#{channelName},</if>
@@ -243,6 +255,10 @@
243 255
             <if test="attendanceDepartmentName != null and attendanceDepartmentName != ''">attendance_department_name =
244 256
                 #{attendanceDepartmentName},
245 257
             </if>
258
+            <if test="attendanceBrigadeId != null">attendance_brigade_id = #{attendanceBrigadeId},</if>
259
+            <if test="attendanceBrigadeName != null and attendanceBrigadeName != ''">attendance_brigade_name =
260
+                #{attendanceBrigadeName},
261
+            </if>
246 262
             <if test="attendanceStationId != null">attendance_station_id = #{attendanceStationId},</if>
247 263
             <if test="attendanceStationName != null and attendanceStationName != ''">attendance_station_name =
248 264
                 #{attendanceStationName},

+ 14 - 0
airport-attendance/src/main/resources/mapper/attendance/AttendanceRecordMapper.xml

@@ -21,6 +21,8 @@
21 21
         <result property="teamName" column="team_name"/>
22 22
         <result property="departmentCode" column="department_code"/>
23 23
         <result property="departmentName" column="department_name"/>
24
+        <result property="brigadeCode" column="brigade_code"/>
25
+        <result property="brigadeName" column="brigade_name"/>
24 26
         <result property="stationCode" column="station_code"/>
25 27
         <result property="stationName" column="station_name"/>
26 28
         <result property="userName" column="user_name"/>
@@ -47,6 +49,8 @@
47 49
                team_name,
48 50
                department_code,
49 51
                department_name,
52
+               brigade_code,
53
+               brigade_name,
50 54
                station_code,
51 55
                station_name,
52 56
                user_name,
@@ -73,6 +77,10 @@
73 77
             <if test="departmentName != null  and departmentName != ''">and department_name like concat('%',
74 78
                 #{departmentName}, '%')
75 79
             </if>
80
+            <if test="brigadeCode != null  and brigadeCode != ''">and brigade_code = #{brigadeCode}</if>
81
+            <if test="brigadeName != null  and brigadeName != ''">and brigade_name like concat('%',
82
+                #{brigadeName}, '%')
83
+            </if>
76 84
             <if test="stationCode != null  and stationCode != ''">and station_code = #{stationCode}</if>
77 85
             <if test="stationName != null  and stationName != ''">and station_name like concat('%', #{stationName},
78 86
                 '%')
@@ -115,6 +123,8 @@
115 123
             <if test="teamName != null and teamName != ''">team_name,</if>
116 124
             <if test="departmentCode != null and departmentCode != ''">department_code,</if>
117 125
             <if test="departmentName != null and departmentName != ''">department_name,</if>
126
+            <if test="brigadeCode != null and brigadeCode != ''">brigade_code,</if>
127
+            <if test="brigadeName != null and brigadeName != ''">brigade_name,</if>
118 128
             <if test="stationCode != null and stationCode != ''">station_code,</if>
119 129
             <if test="stationName != null and stationName != ''">station_name,</if>
120 130
             <if test="userName != null and userName != ''">user_name,</if>
@@ -139,6 +149,8 @@
139 149
             <if test="teamName != null and teamName != ''">#{teamName},</if>
140 150
             <if test="departmentCode != null and departmentCode != ''">#{departmentCode},</if>
141 151
             <if test="departmentName != null and departmentName != ''">#{departmentName},</if>
152
+            <if test="brigadeCode != null and brigadeCode != ''">#{brigadeCode},</if>
153
+            <if test="brigadeName != null and brigadeName != ''">#{brigadeName},</if>
142 154
             <if test="stationCode != null and stationCode != ''">#{stationCode},</if>
143 155
             <if test="stationName != null and stationName != ''">#{stationName},</if>
144 156
             <if test="userName != null and userName != ''">#{userName},</if>
@@ -167,6 +179,8 @@
167 179
             <if test="teamName != null and teamName != ''">team_name = #{teamName},</if>
168 180
             <if test="departmentCode != null and departmentCode != ''">department_code = #{departmentCode},</if>
169 181
             <if test="departmentName != null and departmentName != ''">department_name = #{departmentName},</if>
182
+            <if test="brigadeCode != null and brigadeCode != ''">brigade_code = #{brigadeCode},</if>
183
+            <if test="brigadeName != null and brigadeName != ''">brigade_name = #{brigadeName},</if>
170 184
             <if test="stationCode != null and stationCode != ''">station_code = #{stationCode},</if>
171 185
             <if test="stationName != null and stationName != ''">station_name = #{stationName},</if>
172 186
             <if test="userName != null and userName != ''">user_name = #{userName},</if>