chenshudong преди 4 месеца
родител
ревизия
cb63a3dc44

+ 19 - 18
airport-admin/src/main/java/com/sundot/airport/web/controller/check/CheckLargeScreenController.java

@@ -19,6 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
19 19
 import org.springframework.cache.annotation.Cacheable;
20 20
 import org.springframework.security.access.prepost.PreAuthorize;
21 21
 import org.springframework.web.bind.annotation.GetMapping;
22
+import org.springframework.web.bind.annotation.RequestHeader;
22 23
 import org.springframework.web.bind.annotation.RequestMapping;
23 24
 import org.springframework.web.bind.annotation.RestController;
24 25
 
@@ -42,8 +43,8 @@ public class CheckLargeScreenController extends BaseController {
42 43
      */
43 44
     @PreAuthorize("@ss.hasPermi('check:checkTask:list')")
44 45
     @GetMapping("/planOverview")
45
-    public AjaxResult planOverview(CheckLargeScreenPlanQueryParamDto dto) {
46
-        List<CheckLargeScreenPlanOverviewDto> result = checkLargeScreenService.planOverview(dto);
46
+    public AjaxResult planOverview(CheckLargeScreenPlanQueryParamDto dto, @RequestHeader(value = "X-Request-Source", defaultValue = "mobile") String source) {
47
+        List<CheckLargeScreenPlanOverviewDto> result = checkLargeScreenService.planOverview(dto, source);
47 48
         return success(result);
48 49
     }
49 50
 
@@ -52,8 +53,8 @@ public class CheckLargeScreenController extends BaseController {
52 53
      */
53 54
     @PreAuthorize("@ss.hasPermi('check:checkTask:list')")
54 55
     @GetMapping("/planDistribution")
55
-    public AjaxResult planDistribution(CheckLargeScreenPlanQueryParamDto dto) {
56
-        List<CheckLargeScreenCommonDto> result = checkLargeScreenService.planDistribution(dto);
56
+    public AjaxResult planDistribution(CheckLargeScreenPlanQueryParamDto dto, @RequestHeader(value = "X-Request-Source", defaultValue = "mobile") String source) {
57
+        List<CheckLargeScreenCommonDto> result = checkLargeScreenService.planDistribution(dto, source);
57 58
         return success(result);
58 59
     }
59 60
 
@@ -62,8 +63,8 @@ public class CheckLargeScreenController extends BaseController {
62 63
      */
63 64
     @PreAuthorize("@ss.hasPermi('check:checkTask:list')")
64 65
     @GetMapping("/planStatistics")
65
-    public AjaxResult planStatistics(CheckLargeScreenPlanQueryParamDto dto) {
66
-        List<CheckTask> result = checkLargeScreenService.planStatistics(dto);
66
+    public AjaxResult planStatistics(CheckLargeScreenPlanQueryParamDto dto, @RequestHeader(value = "X-Request-Source", defaultValue = "mobile") String source) {
67
+        List<CheckTask> result = checkLargeScreenService.planStatistics(dto, source);
67 68
         return success(result);
68 69
     }
69 70
 
@@ -72,8 +73,8 @@ public class CheckLargeScreenController extends BaseController {
72 73
      */
73 74
     @PreAuthorize("@ss.hasPermi('check:checkTask:list')")
74 75
     @GetMapping("/problemDistribution")
75
-    public AjaxResult problemDistribution(CheckLargeScreenProblemQueryParamDto dto) {
76
-        List<CheckLargeScreenProblemDto> result = checkLargeScreenService.problemDistribution(dto);
76
+    public AjaxResult problemDistribution(CheckLargeScreenProblemQueryParamDto dto, @RequestHeader(value = "X-Request-Source", defaultValue = "mobile") String source) {
77
+        List<CheckLargeScreenProblemDto> result = checkLargeScreenService.problemDistribution(dto, source);
77 78
         return success(result);
78 79
     }
79 80
 
@@ -82,8 +83,8 @@ public class CheckLargeScreenController extends BaseController {
82 83
      */
83 84
     @PreAuthorize("@ss.hasPermi('check:checkTask:list')")
84 85
     @GetMapping("/problemComparison")
85
-    public AjaxResult problemComparison(CheckLargeScreenProblemQueryParamDto dto) {
86
-        List<CheckLargeScreenProblemDto> result = checkLargeScreenService.problemComparison(dto);
86
+    public AjaxResult problemComparison(CheckLargeScreenProblemQueryParamDto dto, @RequestHeader(value = "X-Request-Source", defaultValue = "mobile") String source) {
87
+        List<CheckLargeScreenProblemDto> result = checkLargeScreenService.problemComparison(dto, source);
87 88
         return success(result);
88 89
     }
89 90
 
@@ -92,8 +93,8 @@ public class CheckLargeScreenController extends BaseController {
92 93
      */
93 94
     @PreAuthorize("@ss.hasPermi('check:checkTask:list')")
94 95
     @GetMapping("/problemComparisonTwo")
95
-    public AjaxResult problemComparisonTwo(CheckLargeScreenProblemQueryParamDto dto) {
96
-        List<CheckLargeScreenProblemDto> result = checkLargeScreenService.problemComparisonTwo(dto);
96
+    public AjaxResult problemComparisonTwo(CheckLargeScreenProblemQueryParamDto dto, @RequestHeader(value = "X-Request-Source", defaultValue = "mobile") String source) {
97
+        List<CheckLargeScreenProblemDto> result = checkLargeScreenService.problemComparisonTwo(dto, source);
97 98
         return success(result);
98 99
     }
99 100
 
@@ -102,8 +103,8 @@ public class CheckLargeScreenController extends BaseController {
102 103
      */
103 104
     @PreAuthorize("@ss.hasPermi('check:checkTask:list')")
104 105
     @GetMapping("/problemTrend")
105
-    public AjaxResult problemTrend(CheckLargeScreenProblemQueryParamDto dto) {
106
-        List<CheckLargeScreenProblemTrendDto> result = checkLargeScreenService.problemTrend(dto);
106
+    public AjaxResult problemTrend(CheckLargeScreenProblemQueryParamDto dto, @RequestHeader(value = "X-Request-Source", defaultValue = "mobile") String source) {
107
+        List<CheckLargeScreenProblemTrendDto> result = checkLargeScreenService.problemTrend(dto, source);
107 108
         return success(result);
108 109
     }
109 110
 
@@ -112,8 +113,8 @@ public class CheckLargeScreenController extends BaseController {
112 113
      */
113 114
     @PreAuthorize("@ss.hasPermi('check:checkTask:list')")
114 115
     @GetMapping("/correction")
115
-    public AjaxResult correction(CheckLargeScreenCorrectionQueryParamDto dto) {
116
-        CheckLargeScreenCorrectionDto result = checkLargeScreenService.correction(dto);
116
+    public AjaxResult correction(CheckLargeScreenCorrectionQueryParamDto dto, @RequestHeader(value = "X-Request-Source", defaultValue = "mobile") String source) {
117
+        CheckLargeScreenCorrectionDto result = checkLargeScreenService.correction(dto, source);
117 118
         return success(result);
118 119
     }
119 120
 
@@ -122,8 +123,8 @@ public class CheckLargeScreenController extends BaseController {
122 123
      */
123 124
     @PreAuthorize("@ss.hasPermi('check:checkTask:list')")
124 125
     @GetMapping("/correctionDistribution")
125
-    public AjaxResult correctionDistribution(CheckLargeScreenCorrectionQueryParamDto dto) {
126
-        List<CheckLargeScreenCorrectionDto> result = checkLargeScreenService.correctionDistribution(dto);
126
+    public AjaxResult correctionDistribution(CheckLargeScreenCorrectionQueryParamDto dto, @RequestHeader(value = "X-Request-Source", defaultValue = "mobile") String source) {
127
+        List<CheckLargeScreenCorrectionDto> result = checkLargeScreenService.correctionDistribution(dto, source);
127 128
         return success(result);
128 129
     }
129 130
 

+ 9 - 9
airport-check/src/main/java/com/sundot/airport/check/service/ICheckLargeScreenService.java

@@ -30,7 +30,7 @@ public interface ICheckLargeScreenService {
30 30
      * @param dto 大屏查询参数
31 31
      * @return 计划安排总览
32 32
      */
33
-    public List<CheckLargeScreenPlanOverviewDto> planOverview(CheckLargeScreenPlanQueryParamDto dto);
33
+    public List<CheckLargeScreenPlanOverviewDto> planOverview(CheckLargeScreenPlanQueryParamDto dto, String source);
34 34
 
35 35
     /**
36 36
      * 巡检计划-日常任务检查指标累积分布
@@ -38,7 +38,7 @@ public interface ICheckLargeScreenService {
38 38
      * @param dto 大屏查询参数
39 39
      * @return 日常任务检查指标累积分布
40 40
      */
41
-    public List<CheckLargeScreenCommonDto> planDistribution(CheckLargeScreenPlanQueryParamDto dto);
41
+    public List<CheckLargeScreenCommonDto> planDistribution(CheckLargeScreenPlanQueryParamDto dto, String source);
42 42
 
43 43
     /**
44 44
      * 巡检计划-任务明细统计表
@@ -46,7 +46,7 @@ public interface ICheckLargeScreenService {
46 46
      * @param dto 大屏查询参数
47 47
      * @return 任务明细统计表
48 48
      */
49
-    public List<CheckTask> planStatistics(CheckLargeScreenPlanQueryParamDto dto);
49
+    public List<CheckTask> planStatistics(CheckLargeScreenPlanQueryParamDto dto, String source);
50 50
 
51 51
     /**
52 52
      * 问题发现-总体问题分布
@@ -54,7 +54,7 @@ public interface ICheckLargeScreenService {
54 54
      * @param dto 大屏查询参数
55 55
      * @return 总体问题分布
56 56
      */
57
-    public List<CheckLargeScreenProblemDto> problemDistribution(CheckLargeScreenProblemQueryParamDto dto);
57
+    public List<CheckLargeScreenProblemDto> problemDistribution(CheckLargeScreenProblemQueryParamDto dto, String source);
58 58
 
59 59
     /**
60 60
      * 问题发现-问题分布对比
@@ -62,7 +62,7 @@ public interface ICheckLargeScreenService {
62 62
      * @param dto 大屏查询参数
63 63
      * @return 问题分布对比
64 64
      */
65
-    public List<CheckLargeScreenProblemDto> problemComparison(CheckLargeScreenProblemQueryParamDto dto);
65
+    public List<CheckLargeScreenProblemDto> problemComparison(CheckLargeScreenProblemQueryParamDto dto, String source);
66 66
 
67 67
     /**
68 68
      * 问题发现-通道面貌-问题对比
@@ -70,7 +70,7 @@ public interface ICheckLargeScreenService {
70 70
      * @param dto 大屏查询参数
71 71
      * @return 通道面貌-问题对比
72 72
      */
73
-    public List<CheckLargeScreenProblemDto> problemComparisonTwo(CheckLargeScreenProblemQueryParamDto dto);
73
+    public List<CheckLargeScreenProblemDto> problemComparisonTwo(CheckLargeScreenProblemQueryParamDto dto, String source);
74 74
 
75 75
     /**
76 76
      * 问题发现-通道面貌-问题趋势
@@ -78,7 +78,7 @@ public interface ICheckLargeScreenService {
78 78
      * @param dto 大屏查询参数
79 79
      * @return 通道面貌-问题趋势
80 80
      */
81
-    public List<CheckLargeScreenProblemTrendDto> problemTrend(CheckLargeScreenProblemQueryParamDto dto);
81
+    public List<CheckLargeScreenProblemTrendDto> problemTrend(CheckLargeScreenProblemQueryParamDto dto, String source);
82 82
 
83 83
     /**
84 84
      * 问题整改-整改状态总计
@@ -86,7 +86,7 @@ public interface ICheckLargeScreenService {
86 86
      * @param dto 大屏查询参数
87 87
      * @return 整改状态总计
88 88
      */
89
-    public CheckLargeScreenCorrectionDto correction(CheckLargeScreenCorrectionQueryParamDto dto);
89
+    public CheckLargeScreenCorrectionDto correction(CheckLargeScreenCorrectionQueryParamDto dto, String source);
90 90
 
91 91
     /**
92 92
      * 问题整改-整改状态分布-科级对比
@@ -94,7 +94,7 @@ public interface ICheckLargeScreenService {
94 94
      * @param dto 大屏查询参数
95 95
      * @return 整改状态总计
96 96
      */
97
-    public List<CheckLargeScreenCorrectionDto> correctionDistribution(CheckLargeScreenCorrectionQueryParamDto dto);
97
+    public List<CheckLargeScreenCorrectionDto> correctionDistribution(CheckLargeScreenCorrectionQueryParamDto dto, String source);
98 98
 
99 99
     /**
100 100
      * 巡检执行

+ 241 - 212
airport-check/src/main/java/com/sundot/airport/check/service/impl/CheckLargeScreenServiceImpl.java

@@ -35,6 +35,7 @@ import com.sundot.airport.common.enums.CheckLevelEnum;
35 35
 import com.sundot.airport.common.enums.DeptType;
36 36
 import com.sundot.airport.common.enums.DeptTypeEnum;
37 37
 import com.sundot.airport.common.enums.RoleTypeEnum;
38
+import com.sundot.airport.common.enums.SourceTypeEnum;
38 39
 import com.sundot.airport.common.exception.ServiceException;
39 40
 import com.sundot.airport.common.utils.LargeScreenDateUtils;
40 41
 import com.sundot.airport.common.utils.SecurityUtils;
@@ -89,7 +90,7 @@ public class CheckLargeScreenServiceImpl implements ICheckLargeScreenService {
89 90
      * @return 计划安排总览
90 91
      */
91 92
     @Override
92
-    public List<CheckLargeScreenPlanOverviewDto> planOverview(CheckLargeScreenPlanQueryParamDto dto) {
93
+    public List<CheckLargeScreenPlanOverviewDto> planOverview(CheckLargeScreenPlanQueryParamDto dto, String source) {
93 94
         // 1、参数校验
94 95
         validateDateRange(dto.getStartDate(), dto.getEndDate());
95 96
         // 2、生成日期序列
@@ -101,25 +102,27 @@ public class CheckLargeScreenServiceImpl implements ICheckLargeScreenService {
101 102
         Map<String, String> sysDictDataMap = sysDictDataList.stream().collect(Collectors.toMap(SysDictData::getDictValue, SysDictData::getDictLabel));
102 103
         List<String> typeList = sysDictDataList.stream().map(SysDictData::getDictValue).collect(Collectors.toList());
103 104
         // 4、构建统计映射
104
-        List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
105
-        if (CollUtil.isEmpty(roles)) {
106
-            return Collections.emptyList();
107
-        }
108
-        List<String> roleKeyList = roles.stream().map(SysRole::getRoleKey).collect(Collectors.toList());
109
-        if (roleKeyList.contains(RoleTypeEnum.admin.getCode())) {
110
-            dto.setIsSelfCheck(null);
111
-            dto.setCreateId(null);
112
-        } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
113
-            dto.setIsSelfCheck(0);
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());
118
-        } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
119
-            dto.setIsSelfCheck(0);
120
-            dto.setCreateId(SecurityUtils.getLoginUser().getUserId());
121
-        } else {
122
-            return Collections.emptyList();
105
+        if (StrUtil.equals(SourceTypeEnum.mobile.getCode(), source)) {
106
+            List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
107
+            if (CollUtil.isEmpty(roles)) {
108
+                return Collections.emptyList();
109
+            }
110
+            List<String> roleKeyList = roles.stream().map(SysRole::getRoleKey).collect(Collectors.toList());
111
+            if (roleKeyList.contains(RoleTypeEnum.admin.getCode())) {
112
+                dto.setIsSelfCheck(null);
113
+                dto.setCreateId(null);
114
+            } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
115
+                dto.setIsSelfCheck(0);
116
+                dto.setCreateId(null);
117
+            } else if (roleKeyList.contains(RoleTypeEnum.jingli.getCode()) || roleKeyList.contains(RoleTypeEnum.xingzheng.getCode())) {
118
+                dto.setIsSelfCheck(0);
119
+                dto.setCreateId(SecurityUtils.getLoginUser().getUserId());
120
+            } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
121
+                dto.setIsSelfCheck(0);
122
+                dto.setCreateId(SecurityUtils.getLoginUser().getUserId());
123
+            } else {
124
+                return Collections.emptyList();
125
+            }
123 126
         }
124 127
         List<CheckLargeScreenPlanOverviewDto> list = checkLargeScreenMapper.planOverview(dto);
125 128
         Map<String, BigDecimal> statsMap = list.stream().collect(Collectors.toMap(item -> item.getType() + "***" + item.getDate(), CheckLargeScreenPlanOverviewDto::getTotal, (oldValue, newValue) -> newValue));
@@ -145,26 +148,28 @@ public class CheckLargeScreenServiceImpl implements ICheckLargeScreenService {
145 148
      * @return 日常任务检查指标累积分布
146 149
      */
147 150
     @Override
148
-    public List<CheckLargeScreenCommonDto> planDistribution(CheckLargeScreenPlanQueryParamDto dto) {
149
-        List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
150
-        if (CollUtil.isEmpty(roles)) {
151
-            return Collections.emptyList();
152
-        }
153
-        List<String> roleKeyList = roles.stream().map(SysRole::getRoleKey).collect(Collectors.toList());
154
-        if (roleKeyList.contains(RoleTypeEnum.admin.getCode())) {
155
-            dto.setIsSelfCheck(null);
156
-            dto.setCreateId(null);
157
-        } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
158
-            dto.setIsSelfCheck(0);
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());
163
-        } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
164
-            dto.setIsSelfCheck(0);
165
-            dto.setCreateId(SecurityUtils.getLoginUser().getUserId());
166
-        } else {
167
-            return Collections.emptyList();
151
+    public List<CheckLargeScreenCommonDto> planDistribution(CheckLargeScreenPlanQueryParamDto dto, String source) {
152
+        if (StrUtil.equals(SourceTypeEnum.mobile.getCode(), source)) {
153
+            List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
154
+            if (CollUtil.isEmpty(roles)) {
155
+                return Collections.emptyList();
156
+            }
157
+            List<String> roleKeyList = roles.stream().map(SysRole::getRoleKey).collect(Collectors.toList());
158
+            if (roleKeyList.contains(RoleTypeEnum.admin.getCode())) {
159
+                dto.setIsSelfCheck(null);
160
+                dto.setCreateId(null);
161
+            } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
162
+                dto.setIsSelfCheck(0);
163
+                dto.setCreateId(null);
164
+            } else if (roleKeyList.contains(RoleTypeEnum.jingli.getCode()) || roleKeyList.contains(RoleTypeEnum.xingzheng.getCode())) {
165
+                dto.setIsSelfCheck(0);
166
+                dto.setCreateId(SecurityUtils.getLoginUser().getUserId());
167
+            } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
168
+                dto.setIsSelfCheck(0);
169
+                dto.setCreateId(SecurityUtils.getLoginUser().getUserId());
170
+            } else {
171
+                return Collections.emptyList();
172
+            }
168 173
         }
169 174
         List<CheckLargeScreenCommonDto> resultTemp = checkLargeScreenMapper.planDistribution(dto);
170 175
         // 未查询到的需补充0数据填充到结果中
@@ -190,26 +195,28 @@ public class CheckLargeScreenServiceImpl implements ICheckLargeScreenService {
190 195
      * @return 任务明细统计表
191 196
      */
192 197
     @Override
193
-    public List<CheckTask> planStatistics(CheckLargeScreenPlanQueryParamDto dto) {
194
-        List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
195
-        if (CollUtil.isEmpty(roles)) {
196
-            return Collections.emptyList();
197
-        }
198
-        List<String> roleKeyList = roles.stream().map(SysRole::getRoleKey).collect(Collectors.toList());
199
-        if (roleKeyList.contains(RoleTypeEnum.admin.getCode())) {
200
-            dto.setIsSelfCheck(null);
201
-            dto.setCreateId(null);
202
-        } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
203
-            dto.setIsSelfCheck(0);
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());
208
-        } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
209
-            dto.setIsSelfCheck(0);
210
-            dto.setCreateId(SecurityUtils.getLoginUser().getUserId());
211
-        } else {
212
-            return Collections.emptyList();
198
+    public List<CheckTask> planStatistics(CheckLargeScreenPlanQueryParamDto dto, String source) {
199
+        if (StrUtil.equals(SourceTypeEnum.mobile.getCode(), source)) {
200
+            List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
201
+            if (CollUtil.isEmpty(roles)) {
202
+                return Collections.emptyList();
203
+            }
204
+            List<String> roleKeyList = roles.stream().map(SysRole::getRoleKey).collect(Collectors.toList());
205
+            if (roleKeyList.contains(RoleTypeEnum.admin.getCode())) {
206
+                dto.setIsSelfCheck(null);
207
+                dto.setCreateId(null);
208
+            } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
209
+                dto.setIsSelfCheck(0);
210
+                dto.setCreateId(null);
211
+            } else if (roleKeyList.contains(RoleTypeEnum.jingli.getCode()) || roleKeyList.contains(RoleTypeEnum.xingzheng.getCode())) {
212
+                dto.setIsSelfCheck(0);
213
+                dto.setCreateId(SecurityUtils.getLoginUser().getUserId());
214
+            } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
215
+                dto.setIsSelfCheck(0);
216
+                dto.setCreateId(SecurityUtils.getLoginUser().getUserId());
217
+            } else {
218
+                return Collections.emptyList();
219
+            }
213 220
         }
214 221
         List<CheckTask> result = checkLargeScreenMapper.planStatistics(dto);
215 222
         return result;
@@ -222,27 +229,29 @@ public class CheckLargeScreenServiceImpl implements ICheckLargeScreenService {
222 229
      * @return 总体问题分布
223 230
      */
224 231
     @Override
225
-    public List<CheckLargeScreenProblemDto> problemDistribution(CheckLargeScreenProblemQueryParamDto dto) {
226
-        List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
227
-        if (CollUtil.isEmpty(roles)) {
228
-            return Collections.emptyList();
229
-        }
230
-        List<String> roleKeyList = roles.stream().map(SysRole::getRoleKey).collect(Collectors.toList());
231
-        if (roleKeyList.contains(RoleTypeEnum.admin.getCode())) {
232
-            dto.setIsSelfCheck(null);
233
-        } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
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());
238
-        } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
239
-            dto.setIsSelfCheck(0);
240
-            dto.setCheckedDepartmentId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
241
-        } else if (roleKeyList.contains(RoleTypeEnum.banzuzhang.getCode())) {
242
-            dto.setIsSelfCheck(0);
243
-            dto.setCheckedTeamId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
244
-        } else {
245
-            return Collections.emptyList();
232
+    public List<CheckLargeScreenProblemDto> problemDistribution(CheckLargeScreenProblemQueryParamDto dto, String source) {
233
+        if (StrUtil.equals(SourceTypeEnum.mobile.getCode(), source)) {
234
+            List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
235
+            if (CollUtil.isEmpty(roles)) {
236
+                return Collections.emptyList();
237
+            }
238
+            List<String> roleKeyList = roles.stream().map(SysRole::getRoleKey).collect(Collectors.toList());
239
+            if (roleKeyList.contains(RoleTypeEnum.admin.getCode())) {
240
+                dto.setIsSelfCheck(null);
241
+            } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
242
+                dto.setIsSelfCheck(0);
243
+            } else if (roleKeyList.contains(RoleTypeEnum.jingli.getCode()) || roleKeyList.contains(RoleTypeEnum.xingzheng.getCode())) {
244
+                dto.setIsSelfCheck(0);
245
+                dto.setCheckedBrigadeId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
246
+            } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
247
+                dto.setIsSelfCheck(0);
248
+                dto.setCheckedDepartmentId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
249
+            } else if (roleKeyList.contains(RoleTypeEnum.banzuzhang.getCode())) {
250
+                dto.setIsSelfCheck(0);
251
+                dto.setCheckedTeamId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
252
+            } else {
253
+                return Collections.emptyList();
254
+            }
246 255
         }
247 256
         List<CheckLargeScreenProblemDto> result = checkLargeScreenMapper.problemDistribution(dto);
248 257
         // 问题对比和问题趋势
@@ -254,8 +263,8 @@ public class CheckLargeScreenServiceImpl implements ICheckLargeScreenService {
254 263
             checkLargeScreenProblemQueryParamDto.setStartDate(dto.getStartDate());
255 264
             checkLargeScreenProblemQueryParamDto.setEndDate(dto.getEndDate());
256 265
             checkLargeScreenProblemQueryParamDto.setCategoryCodeOne(item.getCode());
257
-            item.setCheckLargeScreenProblemDtoList(problemComparisonTwo(checkLargeScreenProblemQueryParamDto));
258
-            item.setCheckLargeScreenProblemTrendDtoList(problemTrend(checkLargeScreenProblemQueryParamDto));
266
+            item.setCheckLargeScreenProblemDtoList(problemComparisonTwo(checkLargeScreenProblemQueryParamDto, source));
267
+            item.setCheckLargeScreenProblemTrendDtoList(problemTrend(checkLargeScreenProblemQueryParamDto, source));
259 268
         });
260 269
         return result;
261 270
     }
@@ -267,33 +276,37 @@ public class CheckLargeScreenServiceImpl implements ICheckLargeScreenService {
267 276
      * @return 问题分布对比
268 277
      */
269 278
     @Override
270
-    public List<CheckLargeScreenProblemDto> problemComparison(CheckLargeScreenProblemQueryParamDto dto) {
271
-        List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
272
-        if (CollUtil.isEmpty(roles)) {
273
-            return Collections.emptyList();
274
-        }
275
-        List<String> roleKeyList = roles.stream().map(SysRole::getRoleKey).collect(Collectors.toList());
279
+    public List<CheckLargeScreenProblemDto> problemComparison(CheckLargeScreenProblemQueryParamDto dto, String source) {
276 280
         List<CheckLargeScreenProblemDto> resultTemp;
277
-        if (roleKeyList.contains(RoleTypeEnum.admin.getCode())) {
278
-            dto.setIsSelfCheck(null);
279
-            resultTemp = checkLargeScreenMapper.problemComparisonBrigade(dto);
280
-        } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
281
-            dto.setIsSelfCheck(0);
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);
287
-        } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
288
-            dto.setIsSelfCheck(0);
289
-            dto.setCheckedDepartmentId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
290
-            resultTemp = checkLargeScreenMapper.problemComparison(dto);
291
-        } else if (roleKeyList.contains(RoleTypeEnum.banzuzhang.getCode())) {
292
-            dto.setIsSelfCheck(0);
293
-            dto.setCheckedTeamId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
294
-            resultTemp = checkLargeScreenMapper.problemComparisonBanZu(dto);
281
+        if (StrUtil.equals(SourceTypeEnum.mobile.getCode(), source)) {
282
+            List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
283
+            if (CollUtil.isEmpty(roles)) {
284
+                return Collections.emptyList();
285
+            }
286
+            List<String> roleKeyList = roles.stream().map(SysRole::getRoleKey).collect(Collectors.toList());
287
+            if (roleKeyList.contains(RoleTypeEnum.admin.getCode())) {
288
+                dto.setIsSelfCheck(null);
289
+                resultTemp = checkLargeScreenMapper.problemComparisonBrigade(dto);
290
+            } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
291
+                dto.setIsSelfCheck(0);
292
+                resultTemp = checkLargeScreenMapper.problemComparisonBrigade(dto);
293
+            } else if (roleKeyList.contains(RoleTypeEnum.jingli.getCode()) || roleKeyList.contains(RoleTypeEnum.xingzheng.getCode())) {
294
+                dto.setIsSelfCheck(0);
295
+                dto.setCheckedBrigadeId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
296
+                resultTemp = checkLargeScreenMapper.problemComparisonBrigade(dto);
297
+            } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
298
+                dto.setIsSelfCheck(0);
299
+                dto.setCheckedDepartmentId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
300
+                resultTemp = checkLargeScreenMapper.problemComparison(dto);
301
+            } else if (roleKeyList.contains(RoleTypeEnum.banzuzhang.getCode())) {
302
+                dto.setIsSelfCheck(0);
303
+                dto.setCheckedTeamId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
304
+                resultTemp = checkLargeScreenMapper.problemComparisonBanZu(dto);
305
+            } else {
306
+                return Collections.emptyList();
307
+            }
295 308
         } else {
296
-            return Collections.emptyList();
309
+            resultTemp = checkLargeScreenMapper.problemComparisonBrigade(dto);
297 310
         }
298 311
         if (CollUtil.isEmpty(resultTemp)) {
299 312
             return Collections.emptyList();
@@ -327,39 +340,44 @@ public class CheckLargeScreenServiceImpl implements ICheckLargeScreenService {
327 340
      * @return 通道面貌-问题对比
328 341
      */
329 342
     @Override
330
-    public List<CheckLargeScreenProblemDto> problemComparisonTwo(CheckLargeScreenProblemQueryParamDto dto) {
331
-        List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
332
-        if (CollUtil.isEmpty(roles)) {
333
-            return Collections.emptyList();
334
-        }
335
-        List<String> roleKeyList = roles.stream().map(SysRole::getRoleKey).collect(Collectors.toList());
343
+    public List<CheckLargeScreenProblemDto> problemComparisonTwo(CheckLargeScreenProblemQueryParamDto dto, String source) {
336 344
         List<CheckLargeScreenProblemDto> resultTemp;
337 345
         List<CheckLargeScreenProblemDto> deptList;
338
-        if (roleKeyList.contains(RoleTypeEnum.admin.getCode())) {
339
-            dto.setIsSelfCheck(null);
340
-            resultTemp = checkLargeScreenMapper.problemComparisonTwoBrigade(dto);
341
-            deptList = checkLargeScreenMapper.getProblemBrigade(dto);
342
-        } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
343
-            dto.setIsSelfCheck(0);
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());
346
+        if (StrUtil.equals(SourceTypeEnum.mobile.getCode(), source)) {
347
+            List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
348
+            if (CollUtil.isEmpty(roles)) {
349
+                return Collections.emptyList();
350
+            }
351
+            List<String> roleKeyList = roles.stream().map(SysRole::getRoleKey).collect(Collectors.toList());
352
+            if (roleKeyList.contains(RoleTypeEnum.admin.getCode())) {
353
+                dto.setIsSelfCheck(null);
354
+                resultTemp = checkLargeScreenMapper.problemComparisonTwoBrigade(dto);
355
+                deptList = checkLargeScreenMapper.getProblemBrigade(dto);
356
+            } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
357
+                dto.setIsSelfCheck(0);
358
+                resultTemp = checkLargeScreenMapper.problemComparisonTwoBrigade(dto);
359
+                deptList = checkLargeScreenMapper.getProblemBrigade(dto);
360
+            } else if (roleKeyList.contains(RoleTypeEnum.jingli.getCode()) || roleKeyList.contains(RoleTypeEnum.xingzheng.getCode())) {
361
+                dto.setIsSelfCheck(0);
362
+                dto.setCheckedBrigadeId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
363
+                resultTemp = checkLargeScreenMapper.problemComparisonTwoBrigade(dto);
364
+                deptList = checkLargeScreenMapper.getProblemBrigade(dto);
365
+            } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
366
+                dto.setIsSelfCheck(0);
367
+                dto.setCheckedDepartmentId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
368
+                resultTemp = checkLargeScreenMapper.problemComparisonTwo(dto);
369
+                deptList = checkLargeScreenMapper.getProblemDepartment(dto);
370
+            } else if (roleKeyList.contains(RoleTypeEnum.banzuzhang.getCode())) {
371
+                dto.setIsSelfCheck(0);
372
+                dto.setCheckedTeamId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
373
+                resultTemp = checkLargeScreenMapper.problemComparisonTwoBanZu(dto);
374
+                deptList = checkLargeScreenMapper.getProblemTeam(dto);
375
+            } else {
376
+                return Collections.emptyList();
377
+            }
378
+        } else {
349 379
             resultTemp = checkLargeScreenMapper.problemComparisonTwoBrigade(dto);
350 380
             deptList = checkLargeScreenMapper.getProblemBrigade(dto);
351
-        } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
352
-            dto.setIsSelfCheck(0);
353
-            dto.setCheckedDepartmentId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
354
-            resultTemp = checkLargeScreenMapper.problemComparisonTwo(dto);
355
-            deptList = checkLargeScreenMapper.getProblemDepartment(dto);
356
-        } else if (roleKeyList.contains(RoleTypeEnum.banzuzhang.getCode())) {
357
-            dto.setIsSelfCheck(0);
358
-            dto.setCheckedTeamId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
359
-            resultTemp = checkLargeScreenMapper.problemComparisonTwoBanZu(dto);
360
-            deptList = checkLargeScreenMapper.getProblemTeam(dto);
361
-        } else {
362
-            return Collections.emptyList();
363 381
         }
364 382
         if (CollUtil.isEmpty(resultTemp) || CollUtil.isEmpty(deptList)) {
365 383
             return Collections.emptyList();
@@ -393,44 +411,49 @@ public class CheckLargeScreenServiceImpl implements ICheckLargeScreenService {
393 411
      * @return 通道面貌-问题趋势
394 412
      */
395 413
     @Override
396
-    public List<CheckLargeScreenProblemTrendDto> problemTrend(CheckLargeScreenProblemQueryParamDto dto) {
414
+    public List<CheckLargeScreenProblemTrendDto> problemTrend(CheckLargeScreenProblemQueryParamDto dto, String source) {
397 415
         // 1、参数校验
398 416
         validateDateRange(dto.getStartDate(), dto.getEndDate());
399 417
         // 2、生成日期序列
400 418
         List<Date> dateRange = generateDateRange(dto.getStartDate(), dto.getEndDate());
401 419
         // 3、构建统计映射
402
-        List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
403
-        if (CollUtil.isEmpty(roles)) {
404
-            return Collections.emptyList();
405
-        }
406
-        List<String> roleKeyList = roles.stream().map(SysRole::getRoleKey).collect(Collectors.toList());
407 420
         List<CheckLargeScreenProblemTrendDto> list;
408 421
         List<CheckLargeScreenProblemDto> deptList;
409
-        if (roleKeyList.contains(RoleTypeEnum.admin.getCode())) {
410
-            dto.setIsSelfCheck(null);
411
-            list = checkLargeScreenMapper.problemTrendBrigade(dto);
412
-            deptList = checkLargeScreenMapper.getProblemBrigade(dto);
413
-        } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
414
-            dto.setIsSelfCheck(0);
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());
422
+        if (StrUtil.equals(SourceTypeEnum.mobile.getCode(), source)) {
423
+            List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
424
+            if (CollUtil.isEmpty(roles)) {
425
+                return Collections.emptyList();
426
+            }
427
+            List<String> roleKeyList = roles.stream().map(SysRole::getRoleKey).collect(Collectors.toList());
428
+            if (roleKeyList.contains(RoleTypeEnum.admin.getCode())) {
429
+                dto.setIsSelfCheck(null);
430
+                list = checkLargeScreenMapper.problemTrendBrigade(dto);
431
+                deptList = checkLargeScreenMapper.getProblemBrigade(dto);
432
+            } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
433
+                dto.setIsSelfCheck(0);
434
+                list = checkLargeScreenMapper.problemTrendBrigade(dto);
435
+                deptList = checkLargeScreenMapper.getProblemBrigade(dto);
436
+            } else if (roleKeyList.contains(RoleTypeEnum.jingli.getCode()) || roleKeyList.contains(RoleTypeEnum.xingzheng.getCode())) {
437
+                dto.setIsSelfCheck(null);
438
+                dto.setCheckedBrigadeId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
439
+                list = checkLargeScreenMapper.problemTrendBrigade(dto);
440
+                deptList = checkLargeScreenMapper.getProblemBrigade(dto);
441
+            } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
442
+                dto.setIsSelfCheck(null);
443
+                dto.setCheckedDepartmentId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
444
+                list = checkLargeScreenMapper.problemTrend(dto);
445
+                deptList = checkLargeScreenMapper.getProblemDepartment(dto);
446
+            } else if (roleKeyList.contains(RoleTypeEnum.banzuzhang.getCode())) {
447
+                dto.setIsSelfCheck(null);
448
+                dto.setCheckedTeamId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
449
+                list = checkLargeScreenMapper.problemTrendBanZu(dto);
450
+                deptList = checkLargeScreenMapper.getProblemTeam(dto);
451
+            } else {
452
+                return Collections.emptyList();
453
+            }
454
+        } else {
420 455
             list = checkLargeScreenMapper.problemTrendBrigade(dto);
421 456
             deptList = checkLargeScreenMapper.getProblemBrigade(dto);
422
-        } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
423
-            dto.setIsSelfCheck(null);
424
-            dto.setCheckedDepartmentId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
425
-            list = checkLargeScreenMapper.problemTrend(dto);
426
-            deptList = checkLargeScreenMapper.getProblemDepartment(dto);
427
-        } else if (roleKeyList.contains(RoleTypeEnum.banzuzhang.getCode())) {
428
-            dto.setIsSelfCheck(null);
429
-            dto.setCheckedTeamId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
430
-            list = checkLargeScreenMapper.problemTrendBanZu(dto);
431
-            deptList = checkLargeScreenMapper.getProblemTeam(dto);
432
-        } else {
433
-            return Collections.emptyList();
434 457
         }
435 458
         if (CollUtil.isEmpty(list) || CollUtil.isEmpty(deptList)) {
436 459
             return Collections.emptyList();
@@ -460,27 +483,29 @@ public class CheckLargeScreenServiceImpl implements ICheckLargeScreenService {
460 483
      * @return 整改状态总计
461 484
      */
462 485
     @Override
463
-    public CheckLargeScreenCorrectionDto correction(CheckLargeScreenCorrectionQueryParamDto dto) {
464
-        List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
465
-        if (CollUtil.isEmpty(roles)) {
466
-            return null;
467
-        }
468
-        List<String> roleKeyList = roles.stream().map(SysRole::getRoleKey).collect(Collectors.toList());
469
-        if (roleKeyList.contains(RoleTypeEnum.admin.getCode())) {
470
-            dto.setIsSelfCheck(null);
471
-        } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
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());
476
-        } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
477
-            dto.setIsSelfCheck(0);
478
-            dto.setCheckedDepartmentId(SecurityUtils.getLoginUser().getDeptId());
479
-        } else if (roleKeyList.contains(RoleTypeEnum.banzuzhang.getCode())) {
480
-            dto.setIsSelfCheck(0);
481
-            dto.setCheckedTeamId(SecurityUtils.getLoginUser().getDeptId());
482
-        } else {
483
-            return null;
486
+    public CheckLargeScreenCorrectionDto correction(CheckLargeScreenCorrectionQueryParamDto dto, String source) {
487
+        if (StrUtil.equals(SourceTypeEnum.mobile.getCode(), source)) {
488
+            List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
489
+            if (CollUtil.isEmpty(roles)) {
490
+                return null;
491
+            }
492
+            List<String> roleKeyList = roles.stream().map(SysRole::getRoleKey).collect(Collectors.toList());
493
+            if (roleKeyList.contains(RoleTypeEnum.admin.getCode())) {
494
+                dto.setIsSelfCheck(null);
495
+            } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
496
+                dto.setIsSelfCheck(0);
497
+            } else if (roleKeyList.contains(RoleTypeEnum.jingli.getCode()) || roleKeyList.contains(RoleTypeEnum.xingzheng.getCode())) {
498
+                dto.setIsSelfCheck(0);
499
+                dto.setCheckedBrigadeId(SecurityUtils.getLoginUser().getDeptId());
500
+            } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
501
+                dto.setIsSelfCheck(0);
502
+                dto.setCheckedDepartmentId(SecurityUtils.getLoginUser().getDeptId());
503
+            } else if (roleKeyList.contains(RoleTypeEnum.banzuzhang.getCode())) {
504
+                dto.setIsSelfCheck(0);
505
+                dto.setCheckedTeamId(SecurityUtils.getLoginUser().getDeptId());
506
+            } else {
507
+                return null;
508
+            }
484 509
         }
485 510
         List<CheckLargeScreenCorrectionAssistDto> list = checkLargeScreenMapper.correction(dto);
486 511
         BigDecimal onTimeCompletedCount = BigDecimal.valueOf(list.stream().filter(item -> StringUtils.equals(CheckLargeScreenCorrectionTypeEnum.ON_TIME_COMPLETED.getCode(), item.getType())).count());
@@ -513,33 +538,37 @@ public class CheckLargeScreenServiceImpl implements ICheckLargeScreenService {
513 538
      * @return 整改状态总计
514 539
      */
515 540
     @Override
516
-    public List<CheckLargeScreenCorrectionDto> correctionDistribution(CheckLargeScreenCorrectionQueryParamDto dto) {
517
-        List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
518
-        if (CollUtil.isEmpty(roles)) {
519
-            return Collections.emptyList();
520
-        }
521
-        List<String> roleKeyList = roles.stream().map(SysRole::getRoleKey).collect(Collectors.toList());
541
+    public List<CheckLargeScreenCorrectionDto> correctionDistribution(CheckLargeScreenCorrectionQueryParamDto dto, String source) {
522 542
         List<CheckLargeScreenCorrectionDto> result;
523
-        if (roleKeyList.contains(RoleTypeEnum.admin.getCode())) {
524
-            dto.setIsSelfCheck(null);
525
-            result = checkLargeScreenMapper.correctionDistributionBrigade(dto);
526
-        } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
527
-            dto.setIsSelfCheck(0);
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);
533
-        } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
534
-            dto.setIsSelfCheck(0);
535
-            dto.setCheckedDepartmentId(SecurityUtils.getLoginUser().getDeptId());
536
-            result = checkLargeScreenMapper.correctionDistribution(dto);
537
-        } else if (roleKeyList.contains(RoleTypeEnum.banzuzhang.getCode())) {
538
-            dto.setIsSelfCheck(0);
539
-            dto.setCheckedTeamId(SecurityUtils.getLoginUser().getDeptId());
540
-            result = checkLargeScreenMapper.correctionDistributionBanZu(dto);
543
+        if (StrUtil.equals(SourceTypeEnum.mobile.getCode(), source)) {
544
+            List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
545
+            if (CollUtil.isEmpty(roles)) {
546
+                return Collections.emptyList();
547
+            }
548
+            List<String> roleKeyList = roles.stream().map(SysRole::getRoleKey).collect(Collectors.toList());
549
+            if (roleKeyList.contains(RoleTypeEnum.admin.getCode())) {
550
+                dto.setIsSelfCheck(null);
551
+                result = checkLargeScreenMapper.correctionDistributionBrigade(dto);
552
+            } else if (roleKeyList.contains(RoleTypeEnum.test.getCode()) || roleKeyList.contains(RoleTypeEnum.zhijianke.getCode())) {
553
+                dto.setIsSelfCheck(0);
554
+                result = checkLargeScreenMapper.correctionDistributionBrigade(dto);
555
+            } else if (roleKeyList.contains(RoleTypeEnum.jingli.getCode()) || roleKeyList.contains(RoleTypeEnum.xingzheng.getCode())) {
556
+                dto.setIsSelfCheck(0);
557
+                dto.setCheckedBrigadeId(SecurityUtils.getLoginUser().getDeptId());
558
+                result = checkLargeScreenMapper.correctionDistributionBrigade(dto);
559
+            } else if (roleKeyList.contains(RoleTypeEnum.kezhang.getCode())) {
560
+                dto.setIsSelfCheck(0);
561
+                dto.setCheckedDepartmentId(SecurityUtils.getLoginUser().getDeptId());
562
+                result = checkLargeScreenMapper.correctionDistribution(dto);
563
+            } else if (roleKeyList.contains(RoleTypeEnum.banzuzhang.getCode())) {
564
+                dto.setIsSelfCheck(0);
565
+                dto.setCheckedTeamId(SecurityUtils.getLoginUser().getDeptId());
566
+                result = checkLargeScreenMapper.correctionDistributionBanZu(dto);
567
+            } else {
568
+                return Collections.emptyList();
569
+            }
541 570
         } else {
542
-            return Collections.emptyList();
571
+            result = checkLargeScreenMapper.correctionDistributionBrigade(dto);
543 572
         }
544 573
         return result;
545 574
     }

+ 48 - 0
airport-check/src/main/resources/mapper/check/CheckLargeScreenMapper.xml

@@ -17,6 +17,9 @@
17 17
         <if test="createId != null">
18 18
             and ct.create_id=#{createId}
19 19
         </if>
20
+        <if test="deptId != null">
21
+            and ct.self_check_dept_id=#{deptId}
22
+        </if>
20 23
         <if test="startDate != null and endDate != null">
21 24
             and (ct.check_start_time >= #{startDate}
22 25
             and ct.check_start_time <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
@@ -35,6 +38,9 @@
35 38
         <if test="createId != null">
36 39
             and ct.create_id=#{createId}
37 40
         </if>
41
+        <if test="deptId != null">
42
+            and ct.self_check_dept_id=#{deptId}
43
+        </if>
38 44
         <if test="startDate != null and endDate != null">
39 45
             and (ct.check_start_time >= #{startDate}
40 46
             and ct.check_start_time <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
@@ -53,6 +59,9 @@
53 59
         <if test="createId != null">
54 60
             and ct.create_id=#{createId}
55 61
         </if>
62
+        <if test="deptId != null">
63
+            and ct.self_check_dept_id=#{deptId}
64
+        </if>
56 65
         <if test="startDate != null and endDate != null">
57 66
             and (ct.check_start_time >= #{startDate}
58 67
             and ct.check_start_time <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
@@ -103,6 +112,9 @@
103 112
         <if test="checkedDepartmentId != null">
104 113
             and cc.checked_department_id=#{checkedDepartmentId}
105 114
         </if>
115
+        <if test="checkedTeamId != null">
116
+            and cc.checked_team_id=#{checkedTeamId}
117
+        </if>
106 118
         <if test="startDate != null and endDate != null">
107 119
             and (cc.check_time >= #{startDate}
108 120
             and cc.check_time <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
@@ -129,6 +141,9 @@
129 141
         <if test="checkedDepartmentId != null">
130 142
             and cc.checked_department_id=#{checkedDepartmentId}
131 143
         </if>
144
+        <if test="checkedTeamId != null">
145
+            and cc.checked_team_id=#{checkedTeamId}
146
+        </if>
132 147
         <if test="startDate != null and endDate != null">
133 148
             and (cc.check_time >= #{startDate}
134 149
             and cc.check_time <![CDATA[ < ]]> date_add(#{endDate} , interval 1 day))
@@ -155,6 +170,9 @@
155 170
         <if test="checkedDepartmentId != null">
156 171
             and cc.checked_department_id=#{checkedDepartmentId}
157 172
         </if>
173
+        <if test="checkedTeamId != null">
174
+            and cc.checked_team_id=#{checkedTeamId}
175
+        </if>
158 176
         <if test="categoryCodeOne != null and categoryCodeOne != ''">
159 177
             and cpi.category_code_one=#{categoryCodeOne}
160 178
         </if>
@@ -184,6 +202,9 @@
184 202
         <if test="checkedDepartmentId != null">
185 203
             and cc.checked_department_id=#{checkedDepartmentId}
186 204
         </if>
205
+        <if test="checkedTeamId != null">
206
+            and cc.checked_team_id=#{checkedTeamId}
207
+        </if>
187 208
         <if test="categoryCodeOne != null and categoryCodeOne != ''">
188 209
             and cpi.category_code_one=#{categoryCodeOne}
189 210
         </if>
@@ -207,6 +228,12 @@
207 228
         <if test="isSelfCheck != null">
208 229
             and cc.is_self_check=#{isSelfCheck}
209 230
         </if>
231
+        <if test="checkedBrigadeId != null">
232
+            and cc.checked_brigade_id=#{checkedBrigadeId}
233
+        </if>
234
+        <if test="checkedDepartmentId != null">
235
+            and cc.checked_department_id=#{checkedDepartmentId}
236
+        </if>
210 237
         <if test="checkedTeamId != null">
211 238
             and cc.checked_team_id=#{checkedTeamId}
212 239
         </if>
@@ -230,6 +257,12 @@
230 257
         <if test="isSelfCheck != null">
231 258
             and cc.is_self_check=#{isSelfCheck}
232 259
         </if>
260
+        <if test="checkedBrigadeId != null">
261
+            and cc.checked_brigade_id=#{checkedBrigadeId}
262
+        </if>
263
+        <if test="checkedDepartmentId != null">
264
+            and cc.checked_department_id=#{checkedDepartmentId}
265
+        </if>
233 266
         <if test="checkedTeamId != null">
234 267
             and cc.checked_team_id=#{checkedTeamId}
235 268
         </if>
@@ -261,6 +294,9 @@
261 294
         <if test="checkedDepartmentId != null">
262 295
             and cc.checked_department_id=#{checkedDepartmentId}
263 296
         </if>
297
+        <if test="checkedTeamId != null">
298
+            and cc.checked_team_id=#{checkedTeamId}
299
+        </if>
264 300
         <if test="categoryCodeOne != null and categoryCodeOne != ''">
265 301
             and cpi.category_code_one=#{categoryCodeOne}
266 302
         </if>
@@ -289,6 +325,9 @@
289 325
         <if test="checkedDepartmentId != null">
290 326
             and cc.checked_department_id=#{checkedDepartmentId}
291 327
         </if>
328
+        <if test="checkedTeamId != null">
329
+            and cc.checked_team_id=#{checkedTeamId}
330
+        </if>
292 331
         <if test="categoryCodeOne != null and categoryCodeOne != ''">
293 332
             and cpi.category_code_one=#{categoryCodeOne}
294 333
         </if>
@@ -311,6 +350,12 @@
311 350
         <if test="isSelfCheck != null">
312 351
             and cc.is_self_check=#{isSelfCheck}
313 352
         </if>
353
+        <if test="checkedBrigadeId != null">
354
+            and cc.checked_brigade_id=#{checkedBrigadeId}
355
+        </if>
356
+        <if test="checkedDepartmentId != null">
357
+            and cc.checked_department_id=#{checkedDepartmentId}
358
+        </if>
314 359
         <if test="checkedTeamId != null">
315 360
             and cc.checked_team_id=#{checkedTeamId}
316 361
         </if>
@@ -647,6 +692,9 @@
647 692
         <if test="processStatus != null">
648 693
             and cc.process_status=#{processStatus}
649 694
         </if>
695
+        <if test="checkedBrigadeId != null">
696
+            and cc.checked_brigade_id=#{checkedBrigadeId}
697
+        </if>
650 698
         <if test="checkedDepartmentId != null">
651 699
             and cc.checked_department_id=#{checkedDepartmentId}
652 700
         </if>