chenshudong 4 місяців тому
батько
коміт
ff370edf48

+ 2 - 1
airport-admin/src/main/java/com/sundot/airport/web/controller/item/ItemLargeScreenController.java

@@ -125,7 +125,8 @@ public class ItemLargeScreenController extends BaseController {
125 125
     }
126 126
 
127 127
     /**
128
-     *  app端 查获位置分布
128
+     * app端 查获位置分布
129
+     *
129 130
      * @param dto 大屏查询参数
130 131
      * @return 查获位置分布
131 132
      */

+ 3 - 1
airport-item/src/main/java/com/sundot/airport/item/mapper/ItemLargeScreenMapper.java

@@ -112,13 +112,15 @@ public interface ItemLargeScreenMapper {
112 112
 
113 113
     /**
114 114
      * app端 查获位置分布
115
+     *
115 116
      * @param dto
116 117
      * @return
117 118
      */
118 119
     List<ItemLargeScreenPositionAppDto> appPosition(BaseLargeScreenQueryParamDto dto);
119
-    
120
+
120 121
     /**
121 122
      * 按天统计查获趋势数据
123
+     *
122 124
      * @param dto 查询参数
123 125
      * @return 按天统计的查获数据
124 126
      */

+ 4 - 2
airport-item/src/main/java/com/sundot/airport/item/service/ItemLargeScreenService.java

@@ -55,6 +55,7 @@ public interface ItemLargeScreenService {
55 55
 
56 56
     /**
57 57
      * app端查获总数量+移交公安数量+故意隐匿数量
58
+     *
58 59
      * @param dto 大屏查询参数
59 60
      * @return 查获总数量+移交公安数量+故意隐匿数量
60 61
      */
@@ -79,6 +80,7 @@ public interface ItemLargeScreenService {
79 80
 
80 81
     /**
81 82
      * app端查获时段分布
83
+     *
82 84
      * @param dto
83 85
      * @return
84 86
      */
@@ -93,7 +95,8 @@ public interface ItemLargeScreenService {
93 95
     public List<ItemLargeScreenPositionDto> position(BaseLargeScreenQueryParamDto dto);
94 96
 
95 97
     /**
96
-     *  app端 查获位置分布
98
+     * app端 查获位置分布
99
+     *
97 100
      * @param dto
98 101
      * @return
99 102
      */
@@ -108,5 +111,4 @@ public interface ItemLargeScreenService {
108 111
     public List<ItemLargeScreenChannelDto> channel(BaseLargeScreenQueryParamDto dto);
109 112
 
110 113
 
111
-
112 114
 }

+ 9 - 6
airport-item/src/main/java/com/sundot/airport/item/service/impl/ItemLargeScreenServiceImpl.java

@@ -112,6 +112,7 @@ public class ItemLargeScreenServiceImpl implements ItemLargeScreenService {
112 112
 
113 113
     /**
114 114
      * app端查获总数量+移交公安数量+故意隐匿数量
115
+     *
115 116
      * @param dto 大屏查询参数
116 117
      * @return
117 118
      */
@@ -143,10 +144,10 @@ public class ItemLargeScreenServiceImpl implements ItemLargeScreenService {
143 144
                 break;
144 145
             case 3:
145 146
                 result = itemLargeScreenMapper.rankByIndividual(dto);
146
-                for(ItemLargeScreenCommonDto itemLargeScreenCommonDto : result){
147
-                    if(Objects.nonNull(itemLargeScreenCommonDto)){
147
+                for (ItemLargeScreenCommonDto itemLargeScreenCommonDto : result) {
148
+                    if (Objects.nonNull(itemLargeScreenCommonDto)) {
148 149
                         SysUser sysUser = sysUserService.selectUserById(itemLargeScreenCommonDto.getId());
149
-                        if(Objects.nonNull(sysUser)){
150
+                        if (Objects.nonNull(sysUser)) {
150 151
                             itemLargeScreenCommonDto.setName(sysUser.getNickName());
151 152
                         }
152 153
                     }
@@ -174,8 +175,9 @@ public class ItemLargeScreenServiceImpl implements ItemLargeScreenService {
174 175
     }
175 176
 
176 177
     /**
177
-     *  app端 查获时段分布
178
-     * @param dto  大屏查询参数
178
+     * app端 查获时段分布
179
+     *
180
+     * @param dto 大屏查询参数
179 181
      * @return 查获时段分布
180 182
      */
181 183
     @Override
@@ -240,7 +242,8 @@ public class ItemLargeScreenServiceImpl implements ItemLargeScreenService {
240 242
     }
241 243
 
242 244
     /**
243
-     *  app端 查获位置分布
245
+     * app端 查获位置分布
246
+     *
244 247
      * @param dto
245 248
      * @return
246 249
      */

+ 100 - 98
airport-item/src/main/resources/mapper/item/ItemLargeScreenMapper.xml

@@ -9,7 +9,7 @@
9 9
         select ifnull(sum(isi.quantity), 0) totalSum
10 10
         from item_seizure_record isr
11 11
         left join item_seizure_items isi on isr.id = isi.record_id
12
-        where  isr.process_status=3
12
+        where isr.process_status=3
13 13
         <if test="specifiedDate != null">and date(isr.seizure_time) = #{specifiedDate}</if>
14 14
         <if test="startDate != null and endDate != null">
15 15
             and (isr.seizure_time >= #{startDate}
@@ -63,7 +63,7 @@
63 63
             and (isr.seizure_time >= #{startDate}
64 64
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
65 65
         </if>
66
-        <if test="inspectDepartmentId != null"> and isr.inspect_department_id = #{inspectDepartmentId} </if>
66
+        <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
67 67
         and isr.process_status=3
68 68
         order by isr.seizure_time desc
69 69
     </select>
@@ -110,7 +110,7 @@
110 110
             and (isr.seizure_time >= #{startDate}
111 111
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
112 112
         </if>
113
-        <if test="inspectDepartmentId != null"> and isr.inspect_department_id = #{inspectDepartmentId} </if>
113
+        <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
114 114
         order by isr.seizure_time desc
115 115
     </select>
116 116
 
@@ -118,39 +118,39 @@
118 118
     <select id="category" resultType="com.sundot.airport.item.domain.ItemLargeScreenCommonDto">
119 119
         select
120 120
         <!--判断参数里的级别类型,根据级别类型,查询对应级别-->
121
-            <if test="levelType == 1">
122
-                isi.category_code_one code,
123
-                isi.category_name_one name,
124
-                sum(isi.quantity) total
125
-            </if>
126
-            <if test="levelType == 2">
127
-                isi.category_code_two code,
128
-                isi.category_name_two name,
129
-                sum(isi.quantity) total
130
-            </if>
121
+        <if test="levelType == 1">
122
+            isi.category_code_one code,
123
+            isi.category_name_one name,
124
+            sum(isi.quantity) total
125
+        </if>
126
+        <if test="levelType == 2">
127
+            isi.category_code_two code,
128
+            isi.category_name_two name,
129
+            sum(isi.quantity) total
130
+        </if>
131 131
         from item_seizure_record isr
132 132
         left join item_seizure_items isi on isr.id = isi.record_id
133
-        where  isr.process_status=3
133
+        where isr.process_status=3
134 134
         <if test="specifiedDate != null">and date(isr.seizure_time) = #{specifiedDate}</if>
135 135
         <if test="startDate != null and endDate != null">
136 136
             and (isr.seizure_time >= #{startDate}
137 137
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
138 138
         </if>
139
-        <if test="levelType == 2  and categoryCode != null and  categoryCode != ''" >
139
+        <if test="levelType == 2  and categoryCode != null and  categoryCode != ''">
140 140
             and isi.category_code_one = #{categoryCode}
141 141
         </if>
142
-        <if test="inspectDepartmentId != null"> and isr.inspect_department_id = #{inspectDepartmentId} </if>
142
+        <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
143 143
         <if test="isPolice=='1' or isPolice==1">and isi.handling_method = 'TRANSFER_TO_AIRPORT_POLICE'</if>
144 144
         <if test="isConceal=='1' or isConceal==1">and isi.is_active_concealment = 1</if>
145 145
         group by
146
-            <if test="levelType == 1">
147
-                isi.category_code_one,
148
-                isi.category_name_one
149
-            </if>
150
-            <if test="levelType == 2">
151
-                isi.category_code_two,
152
-                isi.category_name_two
153
-            </if>
146
+        <if test="levelType == 1">
147
+            isi.category_code_one,
148
+            isi.category_name_one
149
+        </if>
150
+        <if test="levelType == 2">
151
+            isi.category_code_two,
152
+            isi.category_name_two
153
+        </if>
154 154
         order by total desc
155 155
     </select>
156 156
 
@@ -161,13 +161,13 @@
161 161
         sum(isi.quantity) total
162 162
         from item_seizure_record isr
163 163
         left join item_seizure_items isi on isr.id = isi.record_id
164
-        where  isr.process_status=3
164
+        where isr.process_status=3
165 165
         <if test="specifiedDate != null">and date(isr.seizure_time) = #{specifiedDate}</if>
166 166
         <if test="startDate != null and endDate != null">
167 167
             and (isr.seizure_time >= #{startDate}
168 168
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
169 169
         </if>
170
-        <if test="inspectDepartmentId != null"> and isr.inspect_department_id = #{inspectDepartmentId} </if>
170
+        <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
171 171
         <if test="isPolice=='1' or isPolice==1">and isi.handling_method = 'TRANSFER_TO_AIRPORT_POLICE'</if>
172 172
         <if test="isConceal=='1' or isConceal==1">and isi.is_active_concealment = 1</if>
173 173
         group by isr.check_method,
@@ -183,13 +183,13 @@
183 183
         ifnull(sum(case when isi.is_active_concealment = 1 then isi.quantity else 0 end), 0) as concealTotal
184 184
         from item_seizure_record isr
185 185
         left join item_seizure_items isi on isr.id = isi.record_id
186
-        where  isr.process_status=3
186
+        where isr.process_status=3
187 187
         <if test="specifiedDate != null">and date(isr.seizure_time) = #{specifiedDate}</if>
188 188
         <if test="startDate != null and endDate != null">
189 189
             and (isr.seizure_time >= #{startDate}
190 190
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
191 191
         </if>
192
-        <if test="inspectDepartmentId != null"> and isr.inspect_department_id = #{inspectDepartmentId} </if>
192
+        <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
193 193
     </select>
194 194
 
195 195
     <!--查获排名-按科室-->
@@ -199,13 +199,13 @@
199 199
         sum(isi.quantity) total
200 200
         from item_seizure_record isr
201 201
         left join item_seizure_items isi on isr.id = isi.record_id
202
-        where  isr.process_status=3
202
+        where isr.process_status=3
203 203
         <if test="specifiedDate != null">and date(isr.seizure_time) = #{specifiedDate}</if>
204 204
         <if test="startDate != null and endDate != null">
205 205
             and (isr.seizure_time >= #{startDate}
206 206
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
207 207
         </if>
208
-        <if test="inspectDepartmentId != null"> and isr.inspect_department_id = #{inspectDepartmentId} </if>
208
+        <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
209 209
         <if test="categoryCodeOne != null and  categoryCodeOne != ''">
210 210
             and isi.category_code_one = #{categoryCodeOne}
211 211
         </if>
@@ -226,13 +226,13 @@
226 226
         sum(isi.quantity) total
227 227
         from item_seizure_record isr
228 228
         left join item_seizure_items isi on isr.id = isi.record_id
229
-        where  isr.process_status=3
229
+        where isr.process_status=3
230 230
         <if test="specifiedDate != null">and date(isr.seizure_time) = #{specifiedDate}</if>
231 231
         <if test="startDate != null and endDate != null">
232 232
             and (isr.seizure_time >= #{startDate}
233 233
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
234 234
         </if>
235
-        <if test="inspectDepartmentId != null"> and isr.inspect_department_id = #{inspectDepartmentId} </if>
235
+        <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
236 236
         <if test="categoryCodeOne != null and  categoryCodeOne != ''">
237 237
             and isi.category_code_one = #{categoryCodeOne}
238 238
         </if>
@@ -253,14 +253,14 @@
253 253
         sum(isi.quantity) total
254 254
         from item_seizure_record isr
255 255
         left join item_seizure_items isi on isr.id = isi.record_id
256
-        where  isr.process_status=3
256
+        where isr.process_status=3
257 257
         <if test="specifiedDate != null">and date(isr.seizure_time) = #{specifiedDate}</if>
258 258
         <if test="startDate != null and endDate != null">
259 259
             and (isr.seizure_time >= #{startDate}
260 260
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
261 261
         </if>
262
-        <if test="inspectDepartmentId != null"> and isr.inspect_department_id = #{inspectDepartmentId} </if>
263
-        <if test="inspectTeamId != null"> and isr.inspect_team_id = #{inspectTeamId} </if>
262
+        <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
263
+        <if test="inspectTeamId != null">and isr.inspect_team_id = #{inspectTeamId}</if>
264 264
         <if test="categoryCodeOne != null and  categoryCodeOne != ''">
265 265
             and isi.category_code_one = #{categoryCodeOne}
266 266
         </if>
@@ -276,63 +276,63 @@
276 276
 
277 277
     <!--查获时段分布-->
278 278
     <select id="timeSpan" resultType="com.sundot.airport.item.domain.ItemLargeScreenTimeSpanDto">
279
-        select hours.hour                   as hourOfDay,
280
-               ifnull(sum(isi.quantity), 0) as total
279
+        select hours.hour as hourOfDay,
280
+        ifnull(sum(isi.quantity), 0) as total
281 281
         from (select 0 as hour
282
-              union
283
-              select 1
284
-              union
285
-              select 2
286
-              union
287
-              select 3
288
-              union
289
-              select 4
290
-              union
291
-              select 5
292
-              union
293
-              select 6
294
-              union
295
-              select 7
296
-              union
297
-              select 8
298
-              union
299
-              select 9
300
-              union
301
-              select 10
302
-              union
303
-              select 11
304
-              union
305
-              select 12
306
-              union
307
-              select 13
308
-              union
309
-              select 14
310
-              union
311
-              select 15
312
-              union
313
-              select 16
314
-              union
315
-              select 17
316
-              union
317
-              select 18
318
-              union
319
-              select 19
320
-              union
321
-              select 20
322
-              union
323
-              select 21
324
-              union
325
-              select 22
326
-              union
327
-              select 23) as hours
328
-                 left join item_seizure_record isr
329
-                           on hours.hour = hour (isr.seizure_time)
282
+        union
283
+        select 1
284
+        union
285
+        select 2
286
+        union
287
+        select 3
288
+        union
289
+        select 4
290
+        union
291
+        select 5
292
+        union
293
+        select 6
294
+        union
295
+        select 7
296
+        union
297
+        select 8
298
+        union
299
+        select 9
300
+        union
301
+        select 10
302
+        union
303
+        select 11
304
+        union
305
+        select 12
306
+        union
307
+        select 13
308
+        union
309
+        select 14
310
+        union
311
+        select 15
312
+        union
313
+        select 16
314
+        union
315
+        select 17
316
+        union
317
+        select 18
318
+        union
319
+        select 19
320
+        union
321
+        select 20
322
+        union
323
+        select 21
324
+        union
325
+        select 22
326
+        union
327
+        select 23) as hours
328
+        left join item_seizure_record isr
329
+        on hours.hour = hour (isr.seizure_time)
330 330
         <if test="specifiedDate != null and specifiedDate != null">
331
-        and date (isr.seizure_time) = #{specifiedDate}
331
+            and date (isr.seizure_time) = #{specifiedDate}
332 332
         </if>
333
-            left join item_seizure_items isi
333
+        left join item_seizure_items isi
334 334
         on isr.id = isi.record_id
335
-        where  isr.process_status=3
335
+        where isr.process_status=3
336 336
         <if test="startDate != null and endDate != null">
337 337
             and (isr.seizure_time >= #{startDate}
338 338
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
@@ -343,7 +343,7 @@
343 343
         <if test="categoryCodeTwo != null and  categoryCodeTwo != ''">
344 344
             and isi.category_code_two = #{categoryCodeTwo}
345 345
         </if>
346
-        <if test="inspectDepartmentId != null"> and isr.inspect_department_id = #{inspectDepartmentId} </if>
346
+        <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
347 347
         <if test="isPolice=='1' or isPolice==1 ">and isi.handling_method = 'TRANSFER_TO_AIRPORT_POLICE'</if>
348 348
         <if test="isConceal=='1' or  isConceal==1 ">and isi.is_active_concealment = 1</if>
349 349
         group by hours.hour
@@ -353,7 +353,7 @@
353 353
     <!--按天统计趋势数据-->
354 354
     <select id="dailyTrend" resultType="com.sundot.airport.item.domain.ItemLargeScreenDailyTrendDto">
355 355
         select DATE(isr.seizure_time) as date,
356
-               ifnull(sum(isi.quantity), 0) as total
356
+        ifnull(sum(isi.quantity), 0) as total
357 357
         from item_seizure_record isr
358 358
         left join item_seizure_items isi on isr.id = isi.record_id
359 359
         where isr.process_status = 3
@@ -361,7 +361,7 @@
361 361
             and (isr.seizure_time >= #{startDate}
362 362
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
363 363
         </if>
364
-        <if test="inspectDepartmentId != null"> and isr.inspect_department_id = #{inspectDepartmentId} </if>
364
+        <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
365 365
         <if test="categoryCodeOne != null and categoryCodeOne != ''">
366 366
             and isi.category_code_one = #{categoryCodeOne}
367 367
         </if>
@@ -383,13 +383,13 @@
383 383
         sum(isi.quantity) total
384 384
         from item_seizure_record isr
385 385
         left join item_seizure_items isi on isr.id = isi.record_id
386
-        where  isr.process_status=3
386
+        where isr.process_status=3
387 387
         <if test="specifiedDate != null">and date(isr.seizure_time) = #{specifiedDate}</if>
388 388
         <if test="startDate != null and endDate != null">
389 389
             and (isr.seizure_time >= #{startDate}
390 390
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
391 391
         </if>
392
-        <if test="inspectDepartmentId != null"> and isr.inspect_department_id = #{inspectDepartmentId} </if>
392
+        <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
393 393
         <if test="isPolice=='1' or isPolice==1">and isi.handling_method = 'TRANSFER_TO_AIRPORT_POLICE'</if>
394 394
         <if test="isConceal=='1' or isConceal==1">and isi.is_active_concealment = 1</if>
395 395
         group by isi.check_position_code_one,
@@ -408,13 +408,13 @@
408 408
         sum(isi.quantity) total
409 409
         from item_seizure_record isr
410 410
         left join item_seizure_items isi on isr.id = isi.record_id
411
-        where  isr.process_status=3
411
+        where isr.process_status=3
412 412
         <if test="specifiedDate != null">and date(isr.seizure_time) = #{specifiedDate}</if>
413 413
         <if test="startDate != null and endDate != null">
414 414
             and (isr.seizure_time >= #{startDate}
415 415
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
416 416
         </if>
417
-        <if test="inspectDepartmentId != null"> and isr.inspect_department_id = #{inspectDepartmentId} </if>
417
+        <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
418 418
         group by isr.regional_code,
419 419
         isr.regional_name,
420 420
         isi.category_code_one,
@@ -435,16 +435,18 @@
435 435
         sum(isi.quantity) total
436 436
         from item_seizure_record isr
437 437
         left join item_seizure_items isi on isr.id = isi.record_id
438
-        where  isr.process_status=3
438
+        where isr.process_status=3
439 439
         <if test="specifiedDate != null">and date(isr.seizure_time) = #{specifiedDate}</if>
440 440
         <if test="startDate != null and endDate != null">
441 441
             and (isr.seizure_time >= #{startDate}
442 442
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
443 443
         </if>
444
-        <if test="inspectDepartmentId != null"> and isr.inspect_department_id = #{inspectDepartmentId} </if>
444
+        <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
445 445
         <if test="isPolice=='1' or isPolice==1">and isi.handling_method = 'TRANSFER_TO_AIRPORT_POLICE'</if>
446 446
         <if test="isConceal=='1' or isConceal==1">and isi.is_active_concealment = 1</if>
447
-        <if test="levelType == 2 and positionCode!=null and positionCode!=''">and  isi.check_position_code_one = #{positionCode}</if>
447
+        <if test="levelType == 2 and positionCode!=null and positionCode!=''">and isi.check_position_code_one =
448
+            #{positionCode}
449
+        </if>
448 450
         group by
449 451
         <if test="levelType == 1">
450 452
             isi.check_position_code_one,