Kaynağa Gözat

巡检统计

chenshudong 4 ay önce
ebeveyn
işleme
358937cc67

+ 10 - 0
airport-check/src/main/java/com/sundot/airport/check/domain/CheckLargeScreenCorrectionAssistDto.java

@@ -14,6 +14,16 @@ import java.math.BigDecimal;
14
 public class CheckLargeScreenCorrectionAssistDto {
14
 public class CheckLargeScreenCorrectionAssistDto {
15
 
15
 
16
     /**
16
     /**
17
+     * 大队ID
18
+     */
19
+    private Long brigadeId;
20
+
21
+    /**
22
+     * 大队名称
23
+     */
24
+    private String brigadeName;
25
+
26
+    /**
17
      * 科室ID
27
      * 科室ID
18
      */
28
      */
19
     private Long departmentId;
29
     private Long departmentId;

+ 5 - 0
airport-check/src/main/java/com/sundot/airport/check/domain/CheckLargeScreenCorrectionQueryParamDto.java

@@ -18,6 +18,11 @@ public class CheckLargeScreenCorrectionQueryParamDto extends BaseLargeScreenQuer
18
     private Integer isSelfCheck;
18
     private Integer isSelfCheck;
19
 
19
 
20
     /**
20
     /**
21
+     * 被检查大队ID
22
+     */
23
+    private Long checkedBrigadeId;
24
+
25
+    /**
21
      * 被检查科室ID
26
      * 被检查科室ID
22
      */
27
      */
23
     private Long checkedDepartmentId;
28
     private Long checkedDepartmentId;

+ 5 - 0
airport-check/src/main/java/com/sundot/airport/check/domain/CheckLargeScreenProblemQueryParamDto.java

@@ -18,6 +18,11 @@ public class CheckLargeScreenProblemQueryParamDto extends BaseLargeScreenQueryPa
18
     private Integer isSelfCheck;
18
     private Integer isSelfCheck;
19
 
19
 
20
     /**
20
     /**
21
+     * 被检查大队ID
22
+     */
23
+    private Long checkedBrigadeId;
24
+
25
+    /**
21
      * 被检查科室ID
26
      * 被检查科室ID
22
      */
27
      */
23
     private Long checkedDepartmentId;
28
     private Long checkedDepartmentId;

+ 43 - 3
airport-check/src/main/java/com/sundot/airport/check/mapper/CheckLargeScreenMapper.java

@@ -58,7 +58,15 @@ public interface CheckLargeScreenMapper {
58
     public List<CheckLargeScreenProblemDto> problemDistribution(CheckLargeScreenProblemQueryParamDto dto);
58
     public List<CheckLargeScreenProblemDto> problemDistribution(CheckLargeScreenProblemQueryParamDto dto);
59
 
59
 
60
     /**
60
     /**
61
-     * 问题发现-问题分布对比
61
+     * 问题发现-问题分布对比-大队
62
+     *
63
+     * @param dto 大屏查询参数
64
+     * @return 问题分布对比
65
+     */
66
+    public List<CheckLargeScreenProblemDto> problemComparisonBrigade(CheckLargeScreenProblemQueryParamDto dto);
67
+
68
+    /**
69
+     * 问题发现-问题分布对比-科室
62
      *
70
      *
63
      * @param dto 大屏查询参数
71
      * @param dto 大屏查询参数
64
      * @return 问题分布对比
72
      * @return 问题分布对比
@@ -66,7 +74,15 @@ public interface CheckLargeScreenMapper {
66
     public List<CheckLargeScreenProblemDto> problemComparison(CheckLargeScreenProblemQueryParamDto dto);
74
     public List<CheckLargeScreenProblemDto> problemComparison(CheckLargeScreenProblemQueryParamDto dto);
67
 
75
 
68
     /**
76
     /**
69
-     * 问题发现-通道面貌-问题对比
77
+     * 问题发现-通道面貌-问题对比-大队
78
+     *
79
+     * @param dto 大屏查询参数
80
+     * @return 通道面貌-问题对比
81
+     */
82
+    public List<CheckLargeScreenProblemDto> problemComparisonTwoBrigade(CheckLargeScreenProblemQueryParamDto dto);
83
+
84
+    /**
85
+     * 问题发现-通道面貌-问题对比-科室
70
      *
86
      *
71
      * @param dto 大屏查询参数
87
      * @param dto 大屏查询参数
72
      * @return 通道面貌-问题对比
88
      * @return 通道面貌-问题对比
@@ -90,7 +106,15 @@ public interface CheckLargeScreenMapper {
90
     public List<CheckLargeScreenProblemDto> problemComparisonTwoBanZu(CheckLargeScreenProblemQueryParamDto dto);
106
     public List<CheckLargeScreenProblemDto> problemComparisonTwoBanZu(CheckLargeScreenProblemQueryParamDto dto);
91
 
107
 
92
     /**
108
     /**
93
-     * 问题发现-通道面貌-问题趋势
109
+     * 问题发现-通道面貌-问题趋势-大队
110
+     *
111
+     * @param dto 大屏查询参数
112
+     * @return 通道面貌-问题趋势
113
+     */
114
+    public List<CheckLargeScreenProblemTrendDto> problemTrendBrigade(CheckLargeScreenProblemQueryParamDto dto);
115
+
116
+    /**
117
+     * 问题发现-通道面貌-问题趋势-科室
94
      *
118
      *
95
      * @param dto 大屏查询参数
119
      * @param dto 大屏查询参数
96
      * @return 通道面貌-问题趋势
120
      * @return 通道面貌-问题趋势
@@ -114,6 +138,14 @@ public interface CheckLargeScreenMapper {
114
     public List<CheckLargeScreenCorrectionAssistDto> correction(CheckLargeScreenCorrectionQueryParamDto dto);
138
     public List<CheckLargeScreenCorrectionAssistDto> correction(CheckLargeScreenCorrectionQueryParamDto dto);
115
 
139
 
116
     /**
140
     /**
141
+     * 问题整改-整改状态分布-大队对比
142
+     *
143
+     * @param dto 大屏查询参数
144
+     * @return 整改状态分布-科级对比
145
+     */
146
+    public List<CheckLargeScreenCorrectionDto> correctionDistributionBrigade(CheckLargeScreenCorrectionQueryParamDto dto);
147
+
148
+    /**
117
      * 问题整改-整改状态分布-科级对比
149
      * 问题整改-整改状态分布-科级对比
118
      *
150
      *
119
      * @param dto 大屏查询参数
151
      * @param dto 大屏查询参数
@@ -153,6 +185,14 @@ public interface CheckLargeScreenMapper {
153
     public List<CheckLargeScreenInspectionExecuteUserDto> inspectionExecuteUser(List<Long> list);
185
     public List<CheckLargeScreenInspectionExecuteUserDto> inspectionExecuteUser(List<Long> list);
154
 
186
 
155
     /**
187
     /**
188
+     * 问题发现大队汇总
189
+     *
190
+     * @param dto 大屏查询参数
191
+     * @return 问题发现科室汇总
192
+     */
193
+    public List<CheckLargeScreenProblemDto> getProblemBrigade(CheckLargeScreenProblemQueryParamDto dto);
194
+
195
+    /**
156
      * 问题发现科室汇总
196
      * 问题发现科室汇总
157
      *
197
      *
158
      * @param dto 大屏查询参数
198
      * @param dto 大屏查询参数

+ 133 - 27
airport-check/src/main/java/com/sundot/airport/check/service/impl/CheckLargeScreenServiceImpl.java

@@ -112,8 +112,11 @@ public class CheckLargeScreenServiceImpl implements ICheckLargeScreenService {
112
         } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
112
         } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
113
             dto.setIsSelfCheck(0);
113
             dto.setIsSelfCheck(0);
114
             dto.setCreateId(null);
114
             dto.setCreateId(null);
115
+        } else if (roleKeyList.contains(RoleTypeEnum.jingli.getCode()) || roleKeyList.contains(RoleTypeEnum.xingzheng.getCode())) {
116
+            dto.setIsSelfCheck(0);
117
+            dto.setCreateId(SecurityUtils.getLoginUser().getUserId());
115
         } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
118
         } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
116
-            dto.setIsSelfCheck(1);
119
+            dto.setIsSelfCheck(0);
117
             dto.setCreateId(SecurityUtils.getLoginUser().getUserId());
120
             dto.setCreateId(SecurityUtils.getLoginUser().getUserId());
118
         } else {
121
         } else {
119
             return Collections.emptyList();
122
             return Collections.emptyList();
@@ -154,8 +157,11 @@ public class CheckLargeScreenServiceImpl implements ICheckLargeScreenService {
154
         } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
157
         } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
155
             dto.setIsSelfCheck(0);
158
             dto.setIsSelfCheck(0);
156
             dto.setCreateId(null);
159
             dto.setCreateId(null);
160
+        } else if (roleKeyList.contains(RoleTypeEnum.jingli.getCode()) || roleKeyList.contains(RoleTypeEnum.xingzheng.getCode())) {
161
+            dto.setIsSelfCheck(0);
162
+            dto.setCreateId(SecurityUtils.getLoginUser().getUserId());
157
         } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
163
         } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
158
-            dto.setIsSelfCheck(1);
164
+            dto.setIsSelfCheck(0);
159
             dto.setCreateId(SecurityUtils.getLoginUser().getUserId());
165
             dto.setCreateId(SecurityUtils.getLoginUser().getUserId());
160
         } else {
166
         } else {
161
             return Collections.emptyList();
167
             return Collections.emptyList();
@@ -196,8 +202,11 @@ public class CheckLargeScreenServiceImpl implements ICheckLargeScreenService {
196
         } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
202
         } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
197
             dto.setIsSelfCheck(0);
203
             dto.setIsSelfCheck(0);
198
             dto.setCreateId(null);
204
             dto.setCreateId(null);
205
+        } else if (roleKeyList.contains(RoleTypeEnum.jingli.getCode()) || roleKeyList.contains(RoleTypeEnum.xingzheng.getCode())) {
206
+            dto.setIsSelfCheck(0);
207
+            dto.setCreateId(SecurityUtils.getLoginUser().getUserId());
199
         } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
208
         } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
200
-            dto.setIsSelfCheck(1);
209
+            dto.setIsSelfCheck(0);
201
             dto.setCreateId(SecurityUtils.getLoginUser().getUserId());
210
             dto.setCreateId(SecurityUtils.getLoginUser().getUserId());
202
         } else {
211
         } else {
203
             return Collections.emptyList();
212
             return Collections.emptyList();
@@ -223,11 +232,14 @@ public class CheckLargeScreenServiceImpl implements ICheckLargeScreenService {
223
             dto.setIsSelfCheck(null);
232
             dto.setIsSelfCheck(null);
224
         } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
233
         } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
225
             dto.setIsSelfCheck(0);
234
             dto.setIsSelfCheck(0);
235
+        } else if (roleKeyList.contains(RoleTypeEnum.jingli.getCode()) || roleKeyList.contains(RoleTypeEnum.xingzheng.getCode())) {
236
+            dto.setIsSelfCheck(0);
237
+            dto.setCheckedBrigadeId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
226
         } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
238
         } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
227
-            dto.setIsSelfCheck(null);
239
+            dto.setIsSelfCheck(0);
228
             dto.setCheckedDepartmentId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
240
             dto.setCheckedDepartmentId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
229
         } else if (roleKeyList.contains(RoleTypeEnum.banzuzhang.getCode())) {
241
         } else if (roleKeyList.contains(RoleTypeEnum.banzuzhang.getCode())) {
230
-            dto.setIsSelfCheck(null);
242
+            dto.setIsSelfCheck(0);
231
             dto.setCheckedTeamId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
243
             dto.setCheckedTeamId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
232
         } else {
244
         } else {
233
             return Collections.emptyList();
245
             return Collections.emptyList();
@@ -264,16 +276,20 @@ public class CheckLargeScreenServiceImpl implements ICheckLargeScreenService {
264
         List<CheckLargeScreenProblemDto> resultTemp;
276
         List<CheckLargeScreenProblemDto> resultTemp;
265
         if (roleKeyList.contains(RoleTypeEnum.admin.getCode())) {
277
         if (roleKeyList.contains(RoleTypeEnum.admin.getCode())) {
266
             dto.setIsSelfCheck(null);
278
             dto.setIsSelfCheck(null);
267
-            resultTemp = checkLargeScreenMapper.problemComparison(dto);
279
+            resultTemp = checkLargeScreenMapper.problemComparisonBrigade(dto);
268
         } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
280
         } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
269
             dto.setIsSelfCheck(0);
281
             dto.setIsSelfCheck(0);
270
-            resultTemp = checkLargeScreenMapper.problemComparison(dto);
282
+            resultTemp = checkLargeScreenMapper.problemComparisonBrigade(dto);
283
+        } else if (roleKeyList.contains(RoleTypeEnum.jingli.getCode()) || roleKeyList.contains(RoleTypeEnum.xingzheng.getCode())) {
284
+            dto.setIsSelfCheck(0);
285
+            dto.setCheckedBrigadeId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
286
+            resultTemp = checkLargeScreenMapper.problemComparisonBrigade(dto);
271
         } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
287
         } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
272
-            dto.setIsSelfCheck(null);
288
+            dto.setIsSelfCheck(0);
273
             dto.setCheckedDepartmentId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
289
             dto.setCheckedDepartmentId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
274
             resultTemp = checkLargeScreenMapper.problemComparison(dto);
290
             resultTemp = checkLargeScreenMapper.problemComparison(dto);
275
         } else if (roleKeyList.contains(RoleTypeEnum.banzuzhang.getCode())) {
291
         } else if (roleKeyList.contains(RoleTypeEnum.banzuzhang.getCode())) {
276
-            dto.setIsSelfCheck(null);
292
+            dto.setIsSelfCheck(0);
277
             dto.setCheckedTeamId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
293
             dto.setCheckedTeamId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
278
             resultTemp = checkLargeScreenMapper.problemComparisonBanZu(dto);
294
             resultTemp = checkLargeScreenMapper.problemComparisonBanZu(dto);
279
         } else {
295
         } else {
@@ -321,19 +337,24 @@ public class CheckLargeScreenServiceImpl implements ICheckLargeScreenService {
321
         List<CheckLargeScreenProblemDto> deptList;
337
         List<CheckLargeScreenProblemDto> deptList;
322
         if (roleKeyList.contains(RoleTypeEnum.admin.getCode())) {
338
         if (roleKeyList.contains(RoleTypeEnum.admin.getCode())) {
323
             dto.setIsSelfCheck(null);
339
             dto.setIsSelfCheck(null);
324
-            resultTemp = checkLargeScreenMapper.problemComparisonTwo(dto);
325
-            deptList = checkLargeScreenMapper.getProblemDepartment(dto);
340
+            resultTemp = checkLargeScreenMapper.problemComparisonTwoBrigade(dto);
341
+            deptList = checkLargeScreenMapper.getProblemBrigade(dto);
326
         } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
342
         } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
327
             dto.setIsSelfCheck(0);
343
             dto.setIsSelfCheck(0);
328
-            resultTemp = checkLargeScreenMapper.problemComparisonTwo(dto);
329
-            deptList = checkLargeScreenMapper.getProblemDepartment(dto);
344
+            resultTemp = checkLargeScreenMapper.problemComparisonTwoBrigade(dto);
345
+            deptList = checkLargeScreenMapper.getProblemBrigade(dto);
346
+        } else if (roleKeyList.contains(RoleTypeEnum.jingli.getCode()) || roleKeyList.contains(RoleTypeEnum.xingzheng.getCode())) {
347
+            dto.setIsSelfCheck(0);
348
+            dto.setCheckedBrigadeId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
349
+            resultTemp = checkLargeScreenMapper.problemComparisonTwoBrigade(dto);
350
+            deptList = checkLargeScreenMapper.getProblemBrigade(dto);
330
         } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
351
         } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
331
-            dto.setIsSelfCheck(null);
352
+            dto.setIsSelfCheck(0);
332
             dto.setCheckedDepartmentId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
353
             dto.setCheckedDepartmentId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
333
             resultTemp = checkLargeScreenMapper.problemComparisonTwo(dto);
354
             resultTemp = checkLargeScreenMapper.problemComparisonTwo(dto);
334
             deptList = checkLargeScreenMapper.getProblemDepartment(dto);
355
             deptList = checkLargeScreenMapper.getProblemDepartment(dto);
335
         } else if (roleKeyList.contains(RoleTypeEnum.banzuzhang.getCode())) {
356
         } else if (roleKeyList.contains(RoleTypeEnum.banzuzhang.getCode())) {
336
-            dto.setIsSelfCheck(null);
357
+            dto.setIsSelfCheck(0);
337
             dto.setCheckedTeamId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
358
             dto.setCheckedTeamId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
338
             resultTemp = checkLargeScreenMapper.problemComparisonTwoBanZu(dto);
359
             resultTemp = checkLargeScreenMapper.problemComparisonTwoBanZu(dto);
339
             deptList = checkLargeScreenMapper.getProblemTeam(dto);
360
             deptList = checkLargeScreenMapper.getProblemTeam(dto);
@@ -387,12 +408,17 @@ public class CheckLargeScreenServiceImpl implements ICheckLargeScreenService {
387
         List<CheckLargeScreenProblemDto> deptList;
408
         List<CheckLargeScreenProblemDto> deptList;
388
         if (roleKeyList.contains(RoleTypeEnum.admin.getCode())) {
409
         if (roleKeyList.contains(RoleTypeEnum.admin.getCode())) {
389
             dto.setIsSelfCheck(null);
410
             dto.setIsSelfCheck(null);
390
-            list = checkLargeScreenMapper.problemTrend(dto);
391
-            deptList = checkLargeScreenMapper.getProblemDepartment(dto);
411
+            list = checkLargeScreenMapper.problemTrendBrigade(dto);
412
+            deptList = checkLargeScreenMapper.getProblemBrigade(dto);
392
         } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
413
         } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
393
             dto.setIsSelfCheck(0);
414
             dto.setIsSelfCheck(0);
394
-            list = checkLargeScreenMapper.problemTrend(dto);
395
-            deptList = checkLargeScreenMapper.getProblemDepartment(dto);
415
+            list = checkLargeScreenMapper.problemTrendBrigade(dto);
416
+            deptList = checkLargeScreenMapper.getProblemBrigade(dto);
417
+        } else if (roleKeyList.contains(RoleTypeEnum.jingli.getCode()) || roleKeyList.contains(RoleTypeEnum.xingzheng.getCode())) {
418
+            dto.setIsSelfCheck(null);
419
+            dto.setCheckedBrigadeId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
420
+            list = checkLargeScreenMapper.problemTrendBrigade(dto);
421
+            deptList = checkLargeScreenMapper.getProblemBrigade(dto);
396
         } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
422
         } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
397
             dto.setIsSelfCheck(null);
423
             dto.setIsSelfCheck(null);
398
             dto.setCheckedDepartmentId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
424
             dto.setCheckedDepartmentId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
@@ -444,11 +470,14 @@ public class CheckLargeScreenServiceImpl implements ICheckLargeScreenService {
444
             dto.setIsSelfCheck(null);
470
             dto.setIsSelfCheck(null);
445
         } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
471
         } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
446
             dto.setIsSelfCheck(0);
472
             dto.setIsSelfCheck(0);
473
+        } else if (roleKeyList.contains(RoleTypeEnum.jingli.getCode()) || roleKeyList.contains(RoleTypeEnum.xingzheng.getCode())) {
474
+            dto.setIsSelfCheck(0);
475
+            dto.setCheckedBrigadeId(SecurityUtils.getLoginUser().getDeptId());
447
         } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
476
         } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
448
-            dto.setIsSelfCheck(null);
477
+            dto.setIsSelfCheck(0);
449
             dto.setCheckedDepartmentId(SecurityUtils.getLoginUser().getDeptId());
478
             dto.setCheckedDepartmentId(SecurityUtils.getLoginUser().getDeptId());
450
         } else if (roleKeyList.contains(RoleTypeEnum.banzuzhang.getCode())) {
479
         } else if (roleKeyList.contains(RoleTypeEnum.banzuzhang.getCode())) {
451
-            dto.setIsSelfCheck(null);
480
+            dto.setIsSelfCheck(0);
452
             dto.setCheckedTeamId(SecurityUtils.getLoginUser().getDeptId());
481
             dto.setCheckedTeamId(SecurityUtils.getLoginUser().getDeptId());
453
         } else {
482
         } else {
454
             return null;
483
             return null;
@@ -461,8 +490,8 @@ public class CheckLargeScreenServiceImpl implements ICheckLargeScreenService {
461
         BigDecimal otherCount = BigDecimal.valueOf(list.stream().filter(item -> StringUtils.equals(CheckLargeScreenCorrectionTypeEnum.OTHER.getCode(), item.getType())).count());
490
         BigDecimal otherCount = BigDecimal.valueOf(list.stream().filter(item -> StringUtils.equals(CheckLargeScreenCorrectionTypeEnum.OTHER.getCode(), item.getType())).count());
462
 
491
 
463
         CheckLargeScreenCorrectionDto result = new CheckLargeScreenCorrectionDto();
492
         CheckLargeScreenCorrectionDto result = new CheckLargeScreenCorrectionDto();
464
-        if (ObjUtil.isNotNull(dto.getCheckedDepartmentId()) || ObjUtil.isNotNull(dto.getCheckedTeamId())) {
465
-            Long deptId = Optional.ofNullable(dto.getCheckedDepartmentId()).orElse(dto.getCheckedTeamId());
493
+        if (ObjUtil.isNotNull(dto.getCheckedBrigadeId()) || ObjUtil.isNotNull(dto.getCheckedDepartmentId()) || ObjUtil.isNotNull(dto.getCheckedTeamId())) {
494
+            Long deptId = ObjUtil.isNotNull(dto.getCheckedBrigadeId()) ? dto.getCheckedBrigadeId() : ObjUtil.isNotNull(dto.getCheckedDepartmentId()) ? dto.getCheckedDepartmentId() : dto.getCheckedTeamId();
466
             SysDept sysDept = sysDeptService.selectDeptById(deptId);
495
             SysDept sysDept = sysDeptService.selectDeptById(deptId);
467
             if (ObjUtil.isNotNull(sysDept)) {
496
             if (ObjUtil.isNotNull(sysDept)) {
468
                 result.setDeptId(sysDept.getDeptId());
497
                 result.setDeptId(sysDept.getDeptId());
@@ -493,16 +522,20 @@ public class CheckLargeScreenServiceImpl implements ICheckLargeScreenService {
493
         List<CheckLargeScreenCorrectionDto> result;
522
         List<CheckLargeScreenCorrectionDto> result;
494
         if (roleKeyList.contains(RoleTypeEnum.admin.getCode())) {
523
         if (roleKeyList.contains(RoleTypeEnum.admin.getCode())) {
495
             dto.setIsSelfCheck(null);
524
             dto.setIsSelfCheck(null);
496
-            result = checkLargeScreenMapper.correctionDistribution(dto);
525
+            result = checkLargeScreenMapper.correctionDistributionBrigade(dto);
497
         } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
526
         } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
498
             dto.setIsSelfCheck(0);
527
             dto.setIsSelfCheck(0);
499
-            result = checkLargeScreenMapper.correctionDistribution(dto);
528
+            result = checkLargeScreenMapper.correctionDistributionBrigade(dto);
529
+        } else if (roleKeyList.contains(RoleTypeEnum.jingli.getCode()) || roleKeyList.contains(RoleTypeEnum.xingzheng.getCode())) {
530
+            dto.setIsSelfCheck(0);
531
+            dto.setCheckedBrigadeId(SecurityUtils.getLoginUser().getDeptId());
532
+            result = checkLargeScreenMapper.correctionDistributionBrigade(dto);
500
         } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
533
         } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
501
-            dto.setIsSelfCheck(null);
534
+            dto.setIsSelfCheck(0);
502
             dto.setCheckedDepartmentId(SecurityUtils.getLoginUser().getDeptId());
535
             dto.setCheckedDepartmentId(SecurityUtils.getLoginUser().getDeptId());
503
             result = checkLargeScreenMapper.correctionDistribution(dto);
536
             result = checkLargeScreenMapper.correctionDistribution(dto);
504
         } else if (roleKeyList.contains(RoleTypeEnum.banzuzhang.getCode())) {
537
         } else if (roleKeyList.contains(RoleTypeEnum.banzuzhang.getCode())) {
505
-            dto.setIsSelfCheck(null);
538
+            dto.setIsSelfCheck(0);
506
             dto.setCheckedTeamId(SecurityUtils.getLoginUser().getDeptId());
539
             dto.setCheckedTeamId(SecurityUtils.getLoginUser().getDeptId());
507
             result = checkLargeScreenMapper.correctionDistributionBanZu(dto);
540
             result = checkLargeScreenMapper.correctionDistributionBanZu(dto);
508
         } else {
541
         } else {
@@ -530,6 +563,7 @@ public class CheckLargeScreenServiceImpl implements ICheckLargeScreenService {
530
             return Collections.emptyList();
563
             return Collections.emptyList();
531
         }
564
         }
532
         List<CheckLargeScreenInspectionExecuteUserDto> stationTargetUserList = new ArrayList<>();
565
         List<CheckLargeScreenInspectionExecuteUserDto> stationTargetUserList = new ArrayList<>();
566
+        List<CheckLargeScreenInspectionExecuteUserDto> brigadeTargetUserList = new ArrayList<>();
533
         List<CheckLargeScreenInspectionExecuteUserDto> departmentTargetUserList = new ArrayList<>();
567
         List<CheckLargeScreenInspectionExecuteUserDto> departmentTargetUserList = new ArrayList<>();
534
         List<CheckLargeScreenInspectionExecuteUserDto> teamUserTargetList = new ArrayList<>();
568
         List<CheckLargeScreenInspectionExecuteUserDto> teamUserTargetList = new ArrayList<>();
535
         List<CheckLargeScreenInspectionExecuteUserDto> targetUserList = checkLargeScreenMapper.inspectionExecuteUser(targetUserIdList);
569
         List<CheckLargeScreenInspectionExecuteUserDto> targetUserList = checkLargeScreenMapper.inspectionExecuteUser(targetUserIdList);
@@ -541,6 +575,8 @@ public class CheckLargeScreenServiceImpl implements ICheckLargeScreenService {
541
             checkLargeScreenInspectionExecuteUserDto.setUserName(key.split("-")[1]);
575
             checkLargeScreenInspectionExecuteUserDto.setUserName(key.split("-")[1]);
542
             if (value.contains(RoleTypeEnum.test.getCode()) || value.contains(RoleTypeEnum.zhijianke.getCode())) {
576
             if (value.contains(RoleTypeEnum.test.getCode()) || value.contains(RoleTypeEnum.zhijianke.getCode())) {
543
                 stationTargetUserList.add(checkLargeScreenInspectionExecuteUserDto);
577
                 stationTargetUserList.add(checkLargeScreenInspectionExecuteUserDto);
578
+            } else if (value.contains(RoleTypeEnum.jingli.getCode()) || value.contains(RoleTypeEnum.xingzheng.getCode())) {
579
+                brigadeTargetUserList.add(checkLargeScreenInspectionExecuteUserDto);
544
             } else if (value.contains(RoleTypeEnum.kezhang.getCode())) {
580
             } else if (value.contains(RoleTypeEnum.kezhang.getCode())) {
545
                 departmentTargetUserList.add(checkLargeScreenInspectionExecuteUserDto);
581
                 departmentTargetUserList.add(checkLargeScreenInspectionExecuteUserDto);
546
             } else if (value.contains(RoleTypeEnum.banzuzhang.getCode())) {
582
             } else if (value.contains(RoleTypeEnum.banzuzhang.getCode())) {
@@ -550,11 +586,15 @@ public class CheckLargeScreenServiceImpl implements ICheckLargeScreenService {
550
             }
586
             }
551
         });
587
         });
552
         List<Long> stationTargetUserIdList = stationTargetUserList.stream().map(CheckLargeScreenInspectionExecuteUserDto::getUserId).collect(Collectors.toList());
588
         List<Long> stationTargetUserIdList = stationTargetUserList.stream().map(CheckLargeScreenInspectionExecuteUserDto::getUserId).collect(Collectors.toList());
589
+        List<Long> brigadeTargetUserIdList = brigadeTargetUserList.stream().map(CheckLargeScreenInspectionExecuteUserDto::getUserId).collect(Collectors.toList());
553
         List<Long> departmentTargetUserIdList = departmentTargetUserList.stream().map(CheckLargeScreenInspectionExecuteUserDto::getUserId).collect(Collectors.toList());
590
         List<Long> departmentTargetUserIdList = departmentTargetUserList.stream().map(CheckLargeScreenInspectionExecuteUserDto::getUserId).collect(Collectors.toList());
554
         List<Long> teamTargetUserIdList = teamUserTargetList.stream().map(CheckLargeScreenInspectionExecuteUserDto::getUserId).collect(Collectors.toList());
591
         List<Long> teamTargetUserIdList = teamUserTargetList.stream().map(CheckLargeScreenInspectionExecuteUserDto::getUserId).collect(Collectors.toList());
555
 
592
 
556
         // 补充未执行用户数据
593
         // 补充未执行用户数据
557
         List<CheckLargeScreenInspectionExecuteDto> result = checkLargeScreenMapper.inspectionExecute();
594
         List<CheckLargeScreenInspectionExecuteDto> result = checkLargeScreenMapper.inspectionExecute();
595
+        if (CollUtil.isEmpty(result)) {
596
+            return Collections.emptyList();
597
+        }
558
         Map<String, CheckLargeScreenInspectionExecuteDto> checkLargeScreenInspectionExecuteDtoMap = result.stream().collect(Collectors.toMap(CheckLargeScreenInspectionExecuteDto::getTaskCode, item -> item));
598
         Map<String, CheckLargeScreenInspectionExecuteDto> checkLargeScreenInspectionExecuteDtoMap = result.stream().collect(Collectors.toMap(CheckLargeScreenInspectionExecuteDto::getTaskCode, item -> item));
559
         List<String> taskCodeList = result.stream().map(CheckLargeScreenInspectionExecuteDto::getTaskCode).collect(Collectors.toList());
599
         List<String> taskCodeList = result.stream().map(CheckLargeScreenInspectionExecuteDto::getTaskCode).collect(Collectors.toList());
560
         List<CheckLargeScreenInspectionExecuteItemDto> resultItemList = checkLargeScreenMapper.inspectionExecuteItem(taskCodeList);
600
         List<CheckLargeScreenInspectionExecuteItemDto> resultItemList = checkLargeScreenMapper.inspectionExecuteItem(taskCodeList);
@@ -580,6 +620,23 @@ public class CheckLargeScreenServiceImpl implements ICheckLargeScreenService {
580
                     checkLargeScreenInspectionExecuteItemDto.setUnqualifiedProjectCount(BigDecimal.ZERO);
620
                     checkLargeScreenInspectionExecuteItemDto.setUnqualifiedProjectCount(BigDecimal.ZERO);
581
                     value.add(checkLargeScreenInspectionExecuteItemDto);
621
                     value.add(checkLargeScreenInspectionExecuteItemDto);
582
                 });
622
                 });
623
+            } else if (StringUtils.equals(CheckLevelEnum.BRIGADE_LEVEL.getCode(), checkLargeScreenInspectionExecuteDto.getCheckLevel())) {
624
+                List<Long> unexecutedUserIdList = brigadeTargetUserIdList.stream().filter(item -> !userIdList.contains(item)).collect(Collectors.toList());
625
+                unexecutedUserIdList.forEach(item -> {
626
+                    CheckLargeScreenInspectionExecuteUserDto checkLargeScreenInspectionExecuteUserDto = targetUserMap.get(item);
627
+                    CheckLargeScreenInspectionExecuteItemDto checkLargeScreenInspectionExecuteItemDto = new CheckLargeScreenInspectionExecuteItemDto();
628
+                    checkLargeScreenInspectionExecuteItemDto.setTaskId(checkLargeScreenInspectionExecuteDto.getTaskId());
629
+                    checkLargeScreenInspectionExecuteItemDto.setTaskCode(checkLargeScreenInspectionExecuteDto.getTaskCode());
630
+                    checkLargeScreenInspectionExecuteItemDto.setTaskName(checkLargeScreenInspectionExecuteDto.getTaskName());
631
+                    checkLargeScreenInspectionExecuteItemDto.setRuleTypeNum(checkLargeScreenInspectionExecuteDto.getRuleTypeNum());
632
+                    checkLargeScreenInspectionExecuteItemDto.setUserId(checkLargeScreenInspectionExecuteUserDto.getUserId());
633
+                    checkLargeScreenInspectionExecuteItemDto.setUserName(checkLargeScreenInspectionExecuteUserDto.getNickName());
634
+                    checkLargeScreenInspectionExecuteItemDto.setCompletionPercentage(BigDecimal.ZERO);
635
+                    checkLargeScreenInspectionExecuteItemDto.setCheckOrderCount(BigDecimal.ZERO);
636
+                    checkLargeScreenInspectionExecuteItemDto.setRectificationOrderCount(BigDecimal.ZERO);
637
+                    checkLargeScreenInspectionExecuteItemDto.setUnqualifiedProjectCount(BigDecimal.ZERO);
638
+                    value.add(checkLargeScreenInspectionExecuteItemDto);
639
+                });
583
             } else if (StringUtils.equals(CheckLevelEnum.DEPARTMENT_LEVEL.getCode(), checkLargeScreenInspectionExecuteDto.getCheckLevel())) {
640
             } else if (StringUtils.equals(CheckLevelEnum.DEPARTMENT_LEVEL.getCode(), checkLargeScreenInspectionExecuteDto.getCheckLevel())) {
584
                 List<Long> unexecutedUserIdList = departmentTargetUserIdList.stream().filter(item -> !userIdList.contains(item)).collect(Collectors.toList());
641
                 List<Long> unexecutedUserIdList = departmentTargetUserIdList.stream().filter(item -> !userIdList.contains(item)).collect(Collectors.toList());
585
                 unexecutedUserIdList.forEach(item -> {
642
                 unexecutedUserIdList.forEach(item -> {
@@ -649,6 +706,22 @@ public class CheckLargeScreenServiceImpl implements ICheckLargeScreenService {
649
                         checkLargeScreenInspectionExecuteItemDto.setUnqualifiedProjectCount(BigDecimal.ZERO);
706
                         checkLargeScreenInspectionExecuteItemDto.setUnqualifiedProjectCount(BigDecimal.ZERO);
650
                         checkLargeScreenInspectionExecuteItemDtoList.add(checkLargeScreenInspectionExecuteItemDto);
707
                         checkLargeScreenInspectionExecuteItemDtoList.add(checkLargeScreenInspectionExecuteItemDto);
651
                     }
708
                     }
709
+                } else if (StringUtils.equals(CheckLevelEnum.BRIGADE_LEVEL.getCode(), resultItem.getCheckLevel())) {
710
+                    for (Long item : brigadeTargetUserIdList) {
711
+                        CheckLargeScreenInspectionExecuteUserDto checkLargeScreenInspectionExecuteUserDto = targetUserMap.get(item);
712
+                        CheckLargeScreenInspectionExecuteItemDto checkLargeScreenInspectionExecuteItemDto = new CheckLargeScreenInspectionExecuteItemDto();
713
+                        checkLargeScreenInspectionExecuteItemDto.setTaskId(resultItem.getTaskId());
714
+                        checkLargeScreenInspectionExecuteItemDto.setTaskCode(resultItem.getTaskCode());
715
+                        checkLargeScreenInspectionExecuteItemDto.setTaskName(resultItem.getTaskName());
716
+                        checkLargeScreenInspectionExecuteItemDto.setRuleTypeNum(resultItem.getRuleTypeNum());
717
+                        checkLargeScreenInspectionExecuteItemDto.setUserId(checkLargeScreenInspectionExecuteUserDto.getUserId());
718
+                        checkLargeScreenInspectionExecuteItemDto.setUserName(checkLargeScreenInspectionExecuteUserDto.getNickName());
719
+                        checkLargeScreenInspectionExecuteItemDto.setCompletionPercentage(BigDecimal.ZERO);
720
+                        checkLargeScreenInspectionExecuteItemDto.setCheckOrderCount(BigDecimal.ZERO);
721
+                        checkLargeScreenInspectionExecuteItemDto.setRectificationOrderCount(BigDecimal.ZERO);
722
+                        checkLargeScreenInspectionExecuteItemDto.setUnqualifiedProjectCount(BigDecimal.ZERO);
723
+                        checkLargeScreenInspectionExecuteItemDtoList.add(checkLargeScreenInspectionExecuteItemDto);
724
+                    }
652
                 } else if (StringUtils.equals(CheckLevelEnum.DEPARTMENT_LEVEL.getCode(), resultItem.getCheckLevel())) {
725
                 } else if (StringUtils.equals(CheckLevelEnum.DEPARTMENT_LEVEL.getCode(), resultItem.getCheckLevel())) {
653
                     for (Long item : departmentTargetUserIdList) {
726
                     for (Long item : departmentTargetUserIdList) {
654
                         CheckLargeScreenInspectionExecuteUserDto checkLargeScreenInspectionExecuteUserDto = targetUserMap.get(item);
727
                         CheckLargeScreenInspectionExecuteUserDto checkLargeScreenInspectionExecuteUserDto = targetUserMap.get(item);
@@ -709,6 +782,39 @@ public class CheckLargeScreenServiceImpl implements ICheckLargeScreenService {
709
             return result;
782
             return result;
710
         } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
783
         } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
711
             return result;
784
             return result;
785
+        } else if (roleKeyList.contains(RoleTypeEnum.jingli.getCode()) || roleKeyList.contains(RoleTypeEnum.xingzheng.getCode())) {
786
+            List<CheckLargeScreenInspectionExecuteDto> resultBrigade = result.stream()
787
+                    .filter(checkLargeScreenInspectionExecuteDto -> StringUtils.equals(CheckLevelEnum.BRIGADE_LEVEL.getCode(), checkLargeScreenInspectionExecuteDto.getCheckLevel()))
788
+                    .map(checkLargeScreenInspectionExecuteDto -> {
789
+                                CheckLargeScreenInspectionExecuteDto temp = new CheckLargeScreenInspectionExecuteDto();
790
+                                temp.setTaskId(checkLargeScreenInspectionExecuteDto.getTaskId());
791
+                                temp.setTaskCode(checkLargeScreenInspectionExecuteDto.getTaskCode());
792
+                                temp.setTaskName(checkLargeScreenInspectionExecuteDto.getTaskName());
793
+                                temp.setCheckLevel(checkLargeScreenInspectionExecuteDto.getCheckLevel());
794
+                                temp.setCheckLevelDesc(checkLargeScreenInspectionExecuteDto.getCheckLevelDesc());
795
+                                temp.setRuleTypeNum(checkLargeScreenInspectionExecuteDto.getRuleTypeNum());
796
+                                temp.setCheckStartTime(checkLargeScreenInspectionExecuteDto.getCheckStartTime());
797
+                                temp.setCheckEndTime(checkLargeScreenInspectionExecuteDto.getCheckEndTime());
798
+                                temp.setCompletedCount(checkLargeScreenInspectionExecuteDto.getCompletedCount());
799
+                                temp.setInProgressCount(checkLargeScreenInspectionExecuteDto.getInProgressCount());
800
+                                temp.setNotStartedCount(checkLargeScreenInspectionExecuteDto.getNotStartedCount());
801
+                                if (CollUtil.isNotEmpty(checkLargeScreenInspectionExecuteDto.getCheckLargeScreenInspectionExecuteItemDtoList())) {
802
+                                    temp.setCheckLargeScreenInspectionExecuteItemDtoList(checkLargeScreenInspectionExecuteDto.getCheckLargeScreenInspectionExecuteItemDtoList().stream()
803
+                                            .filter(itemDto -> SecurityUtils.getLoginUser().getUserId().equals(itemDto.getUserId()))
804
+                                            .collect(Collectors.toList()));
805
+                                }
806
+                                return temp;
807
+                            }
808
+                    )
809
+                    .filter(checkLargeScreenInspectionExecuteDto -> CollUtil.isNotEmpty(checkLargeScreenInspectionExecuteDto.getCheckLargeScreenInspectionExecuteItemDtoList()))
810
+                    .collect(Collectors.toList());
811
+            resultBrigade.addAll(result.stream()
812
+                    .filter(checklargeScreenInspectionExecuteDto -> StringUtils.equals(CheckLevelEnum.DEPARTMENT_LEVEL.getCode(), checklargeScreenInspectionExecuteDto.getCheckLevel()))
813
+                    .collect(Collectors.toList()));
814
+            resultBrigade.addAll(result.stream()
815
+                    .filter(checklargeScreenInspectionExecuteDto -> StringUtils.equals(CheckLevelEnum.TEAM_LEVEL.getCode(), checklargeScreenInspectionExecuteDto.getCheckLevel()))
816
+                    .collect(Collectors.toList()));
817
+            return resultBrigade;
712
         } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
818
         } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
713
             List<CheckLargeScreenInspectionExecuteDto> resultKeZhang = result.stream()
819
             List<CheckLargeScreenInspectionExecuteDto> resultKeZhang = result.stream()
714
                     .filter(checkLargeScreenInspectionExecuteDto -> StringUtils.equals(CheckLevelEnum.DEPARTMENT_LEVEL.getCode(), checkLargeScreenInspectionExecuteDto.getCheckLevel()))
820
                     .filter(checkLargeScreenInspectionExecuteDto -> StringUtils.equals(CheckLevelEnum.DEPARTMENT_LEVEL.getCode(), checkLargeScreenInspectionExecuteDto.getCheckLevel()))

+ 180 - 2
airport-check/src/main/resources/mapper/check/CheckLargeScreenMapper.xml

@@ -68,6 +68,9 @@
68
         <if test="isSelfCheck != null">
68
         <if test="isSelfCheck != null">
69
             and cc.is_self_check=#{isSelfCheck}
69
             and cc.is_self_check=#{isSelfCheck}
70
         </if>
70
         </if>
71
+        <if test="checkedBrigadeId != null">
72
+            and cc.checked_brigade_id=#{checkedBrigadeId}
73
+        </if>
71
         <if test="checkedDepartmentId != null">
74
         <if test="checkedDepartmentId != null">
72
             and cc.checked_department_id=#{checkedDepartmentId}
75
             and cc.checked_department_id=#{checkedDepartmentId}
73
         </if>
76
         </if>
@@ -82,6 +85,32 @@
82
         order by total desc
85
         order by total desc
83
     </select>
86
     </select>
84
 
87
 
88
+    <select id="problemComparisonBrigade" resultType="com.sundot.airport.check.domain.CheckLargeScreenProblemDto">
89
+        select cc.checked_brigade_id deptId,
90
+        cc.checked_brigade_name deptName,
91
+        cpi.category_code_one code,
92
+        cpi.category_name_one name,
93
+        count(cpi.id) total
94
+        from check_correction cc
95
+        inner join check_project_item cpi on (cpi.source_id = cc.id and cpi.type = 'CHECK_CORRECTION')
96
+        where 1 = 1
97
+        <if test="isSelfCheck != null">
98
+            and cc.is_self_check=#{isSelfCheck}
99
+        </if>
100
+        <if test="checkedBrigadeId != null">
101
+            and cc.checked_brigade_id=#{checkedBrigadeId}
102
+        </if>
103
+        <if test="checkedDepartmentId != null">
104
+            and cc.checked_department_id=#{checkedDepartmentId}
105
+        </if>
106
+        <if test="startDate != null and endDate != null">
107
+            and (cc.check_time >= #{startDate}
108
+            and cc.check_time <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
109
+        </if>
110
+        group by cc.checked_brigade_id, cc.checked_brigade_name, cpi.category_code_one, cpi.category_name_one
111
+        order by total desc
112
+    </select>
113
+
85
     <select id="problemComparison" resultType="com.sundot.airport.check.domain.CheckLargeScreenProblemDto">
114
     <select id="problemComparison" resultType="com.sundot.airport.check.domain.CheckLargeScreenProblemDto">
86
         select cc.checked_department_id deptId,
115
         select cc.checked_department_id deptId,
87
         cc.checked_department_name deptName,
116
         cc.checked_department_name deptName,
@@ -94,6 +123,9 @@
94
         <if test="isSelfCheck != null">
123
         <if test="isSelfCheck != null">
95
             and cc.is_self_check=#{isSelfCheck}
124
             and cc.is_self_check=#{isSelfCheck}
96
         </if>
125
         </if>
126
+        <if test="checkedBrigadeId != null">
127
+            and cc.checked_brigade_id=#{checkedBrigadeId}
128
+        </if>
97
         <if test="checkedDepartmentId != null">
129
         <if test="checkedDepartmentId != null">
98
             and cc.checked_department_id=#{checkedDepartmentId}
130
             and cc.checked_department_id=#{checkedDepartmentId}
99
         </if>
131
         </if>
@@ -105,6 +137,35 @@
105
         order by total desc
137
         order by total desc
106
     </select>
138
     </select>
107
 
139
 
140
+    <select id="problemComparisonTwoBrigade" resultType="com.sundot.airport.check.domain.CheckLargeScreenProblemDto">
141
+        select cc.checked_brigade_id deptId,
142
+        cc.checked_brigade_name deptName,
143
+        cpi.category_code_two code,
144
+        cpi.category_name_two name,
145
+        count(cpi.id) total
146
+        from check_correction cc
147
+        inner join check_project_item cpi on (cpi.source_id = cc.id and cpi.type = 'CHECK_CORRECTION')
148
+        where 1 = 1
149
+        <if test="isSelfCheck != null">
150
+            and cc.is_self_check=#{isSelfCheck}
151
+        </if>
152
+        <if test="checkedBrigadeId != null">
153
+            and cc.checked_brigade_id=#{checkedBrigadeId}
154
+        </if>
155
+        <if test="checkedDepartmentId != null">
156
+            and cc.checked_department_id=#{checkedDepartmentId}
157
+        </if>
158
+        <if test="categoryCodeOne != null and categoryCodeOne != ''">
159
+            and cpi.category_code_one=#{categoryCodeOne}
160
+        </if>
161
+        <if test="startDate != null and endDate != null">
162
+            and (cc.check_time >= #{startDate}
163
+            and cc.check_time <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
164
+        </if>
165
+        group by cc.checked_brigade_id, cc.checked_brigade_name, cpi.category_code_two, cpi.category_name_two
166
+        order by total desc
167
+    </select>
168
+
108
     <select id="problemComparisonTwo" resultType="com.sundot.airport.check.domain.CheckLargeScreenProblemDto">
169
     <select id="problemComparisonTwo" resultType="com.sundot.airport.check.domain.CheckLargeScreenProblemDto">
109
         select cc.checked_department_id deptId,
170
         select cc.checked_department_id deptId,
110
         cc.checked_department_name deptName,
171
         cc.checked_department_name deptName,
@@ -117,6 +178,9 @@
117
         <if test="isSelfCheck != null">
178
         <if test="isSelfCheck != null">
118
             and cc.is_self_check=#{isSelfCheck}
179
             and cc.is_self_check=#{isSelfCheck}
119
         </if>
180
         </if>
181
+        <if test="checkedBrigadeId != null">
182
+            and cc.checked_brigade_id=#{checkedBrigadeId}
183
+        </if>
120
         <if test="checkedDepartmentId != null">
184
         <if test="checkedDepartmentId != null">
121
             and cc.checked_department_id=#{checkedDepartmentId}
185
             and cc.checked_department_id=#{checkedDepartmentId}
122
         </if>
186
         </if>
@@ -180,6 +244,34 @@
180
         order by total desc
244
         order by total desc
181
     </select>
245
     </select>
182
 
246
 
247
+    <select id="problemTrendBrigade" resultType="com.sundot.airport.check.domain.CheckLargeScreenProblemTrendDto">
248
+        select date_format(cc.check_time, '%Y-%m-%d') date,
249
+        cc.checked_brigade_id id,
250
+        cc.checked_brigade_name name,
251
+        count(cpi.id) total
252
+        from check_correction cc
253
+        inner join check_project_item cpi on (cpi.source_id = cc.id and cpi.type = 'CHECK_CORRECTION')
254
+        where 1 = 1
255
+        <if test="isSelfCheck != null">
256
+            and cc.is_self_check=#{isSelfCheck}
257
+        </if>
258
+        <if test="checkedBrigadeId != null">
259
+            and cc.checked_brigade_id=#{checkedBrigadeId}
260
+        </if>
261
+        <if test="checkedDepartmentId != null">
262
+            and cc.checked_department_id=#{checkedDepartmentId}
263
+        </if>
264
+        <if test="categoryCodeOne != null and categoryCodeOne != ''">
265
+            and cpi.category_code_one=#{categoryCodeOne}
266
+        </if>
267
+        <if test="startDate != null and endDate != null">
268
+            and (cc.check_time >= #{startDate}
269
+            and cc.check_time <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
270
+        </if>
271
+        group by date_format(cc.check_time, '%Y-%m-%d'), cc.checked_brigade_id, cc.checked_brigade_name
272
+        order by total desc
273
+    </select>
274
+
183
     <select id="problemTrend" resultType="com.sundot.airport.check.domain.CheckLargeScreenProblemTrendDto">
275
     <select id="problemTrend" resultType="com.sundot.airport.check.domain.CheckLargeScreenProblemTrendDto">
184
         select date_format(cc.check_time, '%Y-%m-%d') date,
276
         select date_format(cc.check_time, '%Y-%m-%d') date,
185
         cc.checked_department_id id,
277
         cc.checked_department_id id,
@@ -191,6 +283,9 @@
191
         <if test="isSelfCheck != null">
283
         <if test="isSelfCheck != null">
192
             and cc.is_self_check=#{isSelfCheck}
284
             and cc.is_self_check=#{isSelfCheck}
193
         </if>
285
         </if>
286
+        <if test="checkedBrigadeId != null">
287
+            and cc.checked_brigade_id=#{checkedBrigadeId}
288
+        </if>
194
         <if test="checkedDepartmentId != null">
289
         <if test="checkedDepartmentId != null">
195
             and cc.checked_department_id=#{checkedDepartmentId}
290
             and cc.checked_department_id=#{checkedDepartmentId}
196
         </if>
291
         </if>
@@ -231,7 +326,9 @@
231
     </select>
326
     </select>
232
 
327
 
233
     <select id="correction" resultType="com.sundot.airport.check.domain.CheckLargeScreenCorrectionAssistDto">
328
     <select id="correction" resultType="com.sundot.airport.check.domain.CheckLargeScreenCorrectionAssistDto">
234
-        select cc.checked_department_id departmentId,
329
+        select cc.checked_brigade_id brigadeId,
330
+        cc.checked_brigade_name brigadeName,
331
+        cc.checked_department_id departmentId,
235
         cc.checked_department_name departmentName,
332
         cc.checked_department_name departmentName,
236
         cc.checked_team_id teamId,
333
         cc.checked_team_id teamId,
237
         cc.checked_team_name teamName,
334
         cc.checked_team_name teamName,
@@ -254,6 +351,9 @@
254
             and (cc.check_time >= #{startDate}
351
             and (cc.check_time >= #{startDate}
255
             and cc.check_time <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
352
             and cc.check_time <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
256
         </if>
353
         </if>
354
+        <if test="checkedBrigadeId != null">
355
+            and cc.checked_brigade_id=#{checkedBrigadeId}
356
+        </if>
257
         <if test="checkedDepartmentId != null">
357
         <if test="checkedDepartmentId != null">
258
             and cc.checked_department_id=#{checkedDepartmentId}
358
             and cc.checked_department_id=#{checkedDepartmentId}
259
         </if>
359
         </if>
@@ -262,6 +362,48 @@
262
         </if>
362
         </if>
263
     </select>
363
     </select>
264
 
364
 
365
+    <select id="correctionDistributionBrigade"
366
+            resultType="com.sundot.airport.check.domain.CheckLargeScreenCorrectionDto">
367
+        select temp.deptId deptId,
368
+        temp.deptName deptName,
369
+        ifnull(sum(case when temp.type = 'ON_TIME_COMPLETED' then 1 else 0 end), 0) onTimeCompletedCount,
370
+        ifnull(sum(case when temp.type = 'OVER_TIME_COMPLETED' then 1 else 0 end), 0) overTimeCompletedCount,
371
+        ifnull(sum(case when temp.type = 'ON_TIME_UNFINISHED' then 1 else 0 end), 0) onTimeUnfinishedCount,
372
+        ifnull(sum(case when temp.type = 'OVER_TIME_UNFINISHED' then 1 else 0 end), 0) overTimeUnfinishedCount,
373
+        ifnull(sum(case when temp.type = 'OTHER' then 1 else 0 end), 0) otherCount
374
+        from (select cc.checked_brigade_id deptId,
375
+        cc.checked_brigade_name deptName,
376
+        case
377
+        when cc.status = 'RECTIFIED' and cc.rectification_deadline >= cc.completion_time
378
+        then 'ON_TIME_COMPLETED'
379
+        when cc.status = 'RECTIFIED' and cc.rectification_deadline <![CDATA[ < ]]> cc.completion_time
380
+        then 'OVER_TIME_COMPLETED'
381
+        when cc.status = 'UNDER_RECTIFICATION' and CURRENT_DATE() <![CDATA[ <= ]]> cc.rectification_deadline
382
+        then 'ON_TIME_UNFINISHED'
383
+        when cc.status = 'UNDER_RECTIFICATION' and CURRENT_DATE() > cc.rectification_deadline
384
+        then 'OVER_TIME_UNFINISHED'
385
+        else 'OTHER' end type
386
+        from check_correction cc
387
+        where 1 = 1
388
+        <if test="isSelfCheck != null">
389
+            and cc.is_self_check=#{isSelfCheck}
390
+        </if>
391
+        <if test="checkedBrigadeId != null">
392
+            and cc.checked_brigade_id=#{checkedBrigadeId}
393
+        </if>
394
+        <if test="checkedDepartmentId != null">
395
+            and cc.checked_department_id=#{checkedDepartmentId}
396
+        </if>
397
+        <if test="checkedTeamId != null">
398
+            and cc.checked_team_id=#{checkedTeamId}
399
+        </if>
400
+        <if test="startDate != null and endDate != null">
401
+            and (cc.check_time >= #{startDate}
402
+            and cc.check_time <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
403
+        </if>) temp
404
+        group by temp.deptId, temp.deptName
405
+    </select>
406
+
265
     <select id="correctionDistribution" resultType="com.sundot.airport.check.domain.CheckLargeScreenCorrectionDto">
407
     <select id="correctionDistribution" resultType="com.sundot.airport.check.domain.CheckLargeScreenCorrectionDto">
266
         select temp.deptId deptId,
408
         select temp.deptId deptId,
267
         temp.deptName deptName,
409
         temp.deptName deptName,
@@ -287,6 +429,9 @@
287
         <if test="isSelfCheck != null">
429
         <if test="isSelfCheck != null">
288
             and cc.is_self_check=#{isSelfCheck}
430
             and cc.is_self_check=#{isSelfCheck}
289
         </if>
431
         </if>
432
+        <if test="checkedBrigadeId != null">
433
+            and cc.checked_brigade_id=#{checkedBrigadeId}
434
+        </if>
290
         <if test="checkedDepartmentId != null">
435
         <if test="checkedDepartmentId != null">
291
             and cc.checked_department_id=#{checkedDepartmentId}
436
             and cc.checked_department_id=#{checkedDepartmentId}
292
         </if>
437
         </if>
@@ -325,6 +470,9 @@
325
         <if test="isSelfCheck != null">
470
         <if test="isSelfCheck != null">
326
             and cc.is_self_check=#{isSelfCheck}
471
             and cc.is_self_check=#{isSelfCheck}
327
         </if>
472
         </if>
473
+        <if test="checkedBrigadeId != null">
474
+            and cc.checked_brigade_id=#{checkedBrigadeId}
475
+        </if>
328
         <if test="checkedDepartmentId != null">
476
         <if test="checkedDepartmentId != null">
329
             and cc.checked_department_id=#{checkedDepartmentId}
477
             and cc.checked_department_id=#{checkedDepartmentId}
330
         </if>
478
         </if>
@@ -369,7 +517,7 @@
369
             #{item}
517
             #{item}
370
         </foreach>
518
         </foreach>
371
         and (cr.check_time
519
         and (cr.check_time
372
-        between concat(curdate(), ' 09:00:00') and concat(date_add(curdate(), interval 1 day), ' 09:00:00'))
520
+        between concat(curdate(), ' 00:00:00') and concat(date_add(curdate(), interval 1 day), ' 00:00:00'))
373
         group by cr.task_code, cr.checker_id, cr.checker_name
521
         group by cr.task_code, cr.checker_id, cr.checker_name
374
     </select>
522
     </select>
375
 
523
 
@@ -394,6 +542,30 @@
394
         </foreach>
542
         </foreach>
395
     </select>
543
     </select>
396
 
544
 
545
+    <select id="getProblemBrigade" resultType="com.sundot.airport.check.domain.CheckLargeScreenProblemDto">
546
+        select distinct cc.checked_brigade_id deptId,
547
+        cc.checked_brigade_name deptName
548
+        from check_correction cc
549
+        inner join check_project_item cpi on (cpi.source_id = cc.id and cpi.type = 'CHECK_CORRECTION')
550
+        where 1 = 1
551
+        <if test="isSelfCheck != null">
552
+            and cc.is_self_check=#{isSelfCheck}
553
+        </if>
554
+        <if test="checkedBrigadeId != null">
555
+            and cc.checked_brigade_id=#{checkedBrigadeId}
556
+        </if>
557
+        <if test="checkedDepartmentId != null">
558
+            and cc.checked_department_id=#{checkedDepartmentId}
559
+        </if>
560
+        <if test="checkedTeamId != null">
561
+            and cc.checked_team_id=#{checkedTeamId}
562
+        </if>
563
+        <if test="startDate != null and endDate != null">
564
+            and (cc.check_time >= #{startDate}
565
+            and cc.check_time <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
566
+        </if>
567
+    </select>
568
+
397
     <select id="getProblemDepartment" resultType="com.sundot.airport.check.domain.CheckLargeScreenProblemDto">
569
     <select id="getProblemDepartment" resultType="com.sundot.airport.check.domain.CheckLargeScreenProblemDto">
398
         select distinct cc.checked_department_id deptId,
570
         select distinct cc.checked_department_id deptId,
399
         cc.checked_department_name deptName
571
         cc.checked_department_name deptName
@@ -403,6 +575,9 @@
403
         <if test="isSelfCheck != null">
575
         <if test="isSelfCheck != null">
404
             and cc.is_self_check=#{isSelfCheck}
576
             and cc.is_self_check=#{isSelfCheck}
405
         </if>
577
         </if>
578
+        <if test="checkedBrigadeId != null">
579
+            and cc.checked_brigade_id=#{checkedBrigadeId}
580
+        </if>
406
         <if test="checkedDepartmentId != null">
581
         <if test="checkedDepartmentId != null">
407
             and cc.checked_department_id=#{checkedDepartmentId}
582
             and cc.checked_department_id=#{checkedDepartmentId}
408
         </if>
583
         </if>
@@ -424,6 +599,9 @@
424
         <if test="isSelfCheck != null">
599
         <if test="isSelfCheck != null">
425
             and cc.is_self_check=#{isSelfCheck}
600
             and cc.is_self_check=#{isSelfCheck}
426
         </if>
601
         </if>
602
+        <if test="checkedBrigadeId != null">
603
+            and cc.checked_brigade_id=#{checkedBrigadeId}
604
+        </if>
427
         <if test="checkedDepartmentId != null">
605
         <if test="checkedDepartmentId != null">
428
             and cc.checked_department_id=#{checkedDepartmentId}
606
             and cc.checked_department_id=#{checkedDepartmentId}
429
         </if>
607
         </if>