Sfoglia il codice sorgente

查获统计+查获大屏

chenshudong 4 mesi fa
parent
commit
95f4e68a90

+ 5 - 0
airport-common/src/main/java/com/sundot/airport/common/core/domain/BaseLargeScreenQueryParamDto.java

@@ -95,4 +95,9 @@ public class BaseLargeScreenQueryParamDto implements Serializable {
95
     @ApiModelProperty("班组id")
95
     @ApiModelProperty("班组id")
96
     private Long inspectTeamId;
96
     private Long inspectTeamId;
97
 
97
 
98
+    /**
99
+     * 大队id
100
+     */
101
+    @ApiModelProperty("大队id")
102
+    private Long inspectBrigadeId;
98
 }
103
 }

+ 8 - 0
airport-item/src/main/java/com/sundot/airport/item/mapper/ItemLargeScreenMapper.java

@@ -63,6 +63,14 @@ public interface ItemLargeScreenMapper {
63
     public ItemLargeScreenTotalSomeDto getTotalSome(BaseLargeScreenQueryParamDto dto);
63
     public ItemLargeScreenTotalSomeDto getTotalSome(BaseLargeScreenQueryParamDto dto);
64
 
64
 
65
     /**
65
     /**
66
+     * 查获排名-按大队
67
+     *
68
+     * @param dto 大屏查询参数
69
+     * @return 查获排名-按大队
70
+     */
71
+    public List<ItemLargeScreenCommonDto> rankByBrigade(BaseLargeScreenQueryParamDto dto);
72
+
73
+    /**
66
      * 查获排名-按科室
74
      * 查获排名-按科室
67
      *
75
      *
68
      * @param dto 大屏查询参数
76
      * @param dto 大屏查询参数

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

@@ -65,7 +65,7 @@ public interface ItemLargeScreenService {
65
      * 查获排名
65
      * 查获排名
66
      *
66
      *
67
      * @param dto  大屏查询参数
67
      * @param dto  大屏查询参数
68
-     * @param type 类型:1=按科室;2=按班组;3=按个人
68
+     * @param type 类型:1=按科室;2=按班组;3=按个人;4=按大队
69
      * @return 查获排名
69
      * @return 查获排名
70
      */
70
      */
71
     public List<ItemLargeScreenCommonDto> rank(BaseLargeScreenQueryParamDto dto, int type);
71
     public List<ItemLargeScreenCommonDto> rank(BaseLargeScreenQueryParamDto dto, int type);

+ 4 - 1
airport-item/src/main/java/com/sundot/airport/item/service/impl/ItemLargeScreenServiceImpl.java

@@ -125,7 +125,7 @@ public class ItemLargeScreenServiceImpl implements ItemLargeScreenService {
125
      * 查获排名
125
      * 查获排名
126
      *
126
      *
127
      * @param dto  大屏查询参数
127
      * @param dto  大屏查询参数
128
-     * @param type 类型:1=按科室;2=按班组;3=按个人
128
+     * @param type 类型:1=按科室;2=按班组;3=按个人;4=按大队
129
      * @return 查获排名
129
      * @return 查获排名
130
      */
130
      */
131
     @Override
131
     @Override
@@ -153,6 +153,9 @@ public class ItemLargeScreenServiceImpl implements ItemLargeScreenService {
153
                     }
153
                     }
154
                 }
154
                 }
155
                 break;
155
                 break;
156
+            case 4:
157
+                result = itemLargeScreenMapper.rankByBrigade(dto);
158
+                break;
156
             default:
159
             default:
157
                 return Collections.emptyList();
160
                 return Collections.emptyList();
158
         }
161
         }

+ 56 - 0
airport-item/src/main/resources/mapper/item/ItemLargeScreenMapper.xml

@@ -15,7 +15,9 @@
15
             and (isr.seizure_time >= #{startDate}
15
             and (isr.seizure_time >= #{startDate}
16
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
16
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
17
         </if>
17
         </if>
18
+        <if test="inspectBrigadeId != null">and isr.inspect_brigade_id = #{inspectBrigadeId}</if>
18
         <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
19
         <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
20
+        <if test="inspectTeamId != null">and isr.inspect_team_id = #{inspectTeamId}</if>
19
         <if test="isPolice == '1' or isPolice == 1 ">and isi.handling_method = 'TRANSFER_TO_AIRPORT_POLICE'</if>
21
         <if test="isPolice == '1' or isPolice == 1 ">and isi.handling_method = 'TRANSFER_TO_AIRPORT_POLICE'</if>
20
         <if test="isConceal=='1' or isConceal == 1">and isi.is_active_concealment = 1</if>
22
         <if test="isConceal=='1' or isConceal == 1">and isi.is_active_concealment = 1</if>
21
     </select>
23
     </select>
@@ -63,7 +65,9 @@
63
             and (isr.seizure_time >= #{startDate}
65
             and (isr.seizure_time >= #{startDate}
64
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
66
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
65
         </if>
67
         </if>
68
+        <if test="inspectBrigadeId != null">and isr.inspect_brigade_id = #{inspectBrigadeId}</if>
66
         <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
69
         <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
70
+        <if test="inspectTeamId != null">and isr.inspect_team_id = #{inspectTeamId}</if>
67
         and isr.process_status=3
71
         and isr.process_status=3
68
         order by isr.seizure_time desc
72
         order by isr.seizure_time desc
69
     </select>
73
     </select>
@@ -110,7 +114,9 @@
110
             and (isr.seizure_time >= #{startDate}
114
             and (isr.seizure_time >= #{startDate}
111
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
115
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
112
         </if>
116
         </if>
117
+        <if test="inspectBrigadeId != null">and isr.inspect_brigade_id = #{inspectBrigadeId}</if>
113
         <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
118
         <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
119
+        <if test="inspectTeamId != null">and isr.inspect_team_id = #{inspectTeamId}</if>
114
         order by isr.seizure_time desc
120
         order by isr.seizure_time desc
115
     </select>
121
     </select>
116
 
122
 
@@ -139,7 +145,9 @@
139
         <if test="levelType == 2  and categoryCode != null and  categoryCode != ''">
145
         <if test="levelType == 2  and categoryCode != null and  categoryCode != ''">
140
             and isi.category_code_one = #{categoryCode}
146
             and isi.category_code_one = #{categoryCode}
141
         </if>
147
         </if>
148
+        <if test="inspectBrigadeId != null">and isr.inspect_brigade_id = #{inspectBrigadeId}</if>
142
         <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
149
         <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
150
+        <if test="inspectTeamId != null">and isr.inspect_team_id = #{inspectTeamId}</if>
143
         <if test="isPolice=='1' or isPolice==1">and isi.handling_method = 'TRANSFER_TO_AIRPORT_POLICE'</if>
151
         <if test="isPolice=='1' or isPolice==1">and isi.handling_method = 'TRANSFER_TO_AIRPORT_POLICE'</if>
144
         <if test="isConceal=='1' or isConceal==1">and isi.is_active_concealment = 1</if>
152
         <if test="isConceal=='1' or isConceal==1">and isi.is_active_concealment = 1</if>
145
         group by
153
         group by
@@ -167,7 +175,9 @@
167
             and (isr.seizure_time >= #{startDate}
175
             and (isr.seizure_time >= #{startDate}
168
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
176
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
169
         </if>
177
         </if>
178
+        <if test="inspectBrigadeId != null">and isr.inspect_brigade_id = #{inspectBrigadeId}</if>
170
         <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
179
         <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
180
+        <if test="inspectTeamId != null">and isr.inspect_team_id = #{inspectTeamId}</if>
171
         <if test="isPolice=='1' or isPolice==1">and isi.handling_method = 'TRANSFER_TO_AIRPORT_POLICE'</if>
181
         <if test="isPolice=='1' or isPolice==1">and isi.handling_method = 'TRANSFER_TO_AIRPORT_POLICE'</if>
172
         <if test="isConceal=='1' or isConceal==1">and isi.is_active_concealment = 1</if>
182
         <if test="isConceal=='1' or isConceal==1">and isi.is_active_concealment = 1</if>
173
         group by isr.check_method,
183
         group by isr.check_method,
@@ -189,7 +199,38 @@
189
             and (isr.seizure_time >= #{startDate}
199
             and (isr.seizure_time >= #{startDate}
190
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
200
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
191
         </if>
201
         </if>
202
+        <if test="inspectBrigadeId != null">and isr.inspect_brigade_id = #{inspectBrigadeId}</if>
203
+        <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
204
+        <if test="inspectTeamId != null">and isr.attendance_team_id = #{inspectTeamId}</if>
205
+    </select>
206
+
207
+    <!--查获排名-按大队-->
208
+    <select id="rankByBrigade" resultType="com.sundot.airport.item.domain.ItemLargeScreenCommonDto">
209
+        select isr.inspect_brigade_id id,
210
+        isr.inspect_brigade_name name,
211
+        sum(isi.quantity) total
212
+        from item_seizure_record isr
213
+        left join item_seizure_items isi on isr.id = isi.record_id
214
+        where isr.process_status=3
215
+        <if test="specifiedDate != null">and date(isr.seizure_time) = #{specifiedDate}</if>
216
+        <if test="startDate != null and endDate != null">
217
+            and (isr.seizure_time >= #{startDate}
218
+            and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
219
+        </if>
220
+        <if test="inspectBrigadeId != null">and isr.inspect_brigade_id = #{inspectBrigadeId}</if>
192
         <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
221
         <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
222
+        <if test="inspectTeamId != null">and isr.inspect_team_id = #{inspectTeamId}</if>
223
+        <if test="categoryCodeOne != null and  categoryCodeOne != ''">
224
+            and isi.category_code_one = #{categoryCodeOne}
225
+        </if>
226
+        <if test="categoryCodeTwo != null and  categoryCodeTwo != ''">
227
+            and isi.category_code_two = #{categoryCodeTwo}
228
+        </if>
229
+        <if test="isPolice=='1' or isPolice==1 ">and isi.handling_method = 'TRANSFER_TO_AIRPORT_POLICE'</if>
230
+        <if test="isConceal=='1' or isConceal==1 ">and isi.is_active_concealment = 1</if>
231
+        group by isr.inspect_brigade_id,
232
+        isr.inspect_brigade_name
233
+        order by total desc
193
     </select>
234
     </select>
194
 
235
 
195
     <!--查获排名-按科室-->
236
     <!--查获排名-按科室-->
@@ -205,7 +246,9 @@
205
             and (isr.seizure_time >= #{startDate}
246
             and (isr.seizure_time >= #{startDate}
206
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
247
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
207
         </if>
248
         </if>
249
+        <if test="inspectBrigadeId != null">and isr.inspect_brigade_id = #{inspectBrigadeId}</if>
208
         <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
250
         <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
251
+        <if test="inspectTeamId != null">and isr.inspect_team_id = #{inspectTeamId}</if>
209
         <if test="categoryCodeOne != null and  categoryCodeOne != ''">
252
         <if test="categoryCodeOne != null and  categoryCodeOne != ''">
210
             and isi.category_code_one = #{categoryCodeOne}
253
             and isi.category_code_one = #{categoryCodeOne}
211
         </if>
254
         </if>
@@ -232,7 +275,9 @@
232
             and (isr.seizure_time >= #{startDate}
275
             and (isr.seizure_time >= #{startDate}
233
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
276
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
234
         </if>
277
         </if>
278
+        <if test="inspectBrigadeId != null">and isr.inspect_brigade_id = #{inspectBrigadeId}</if>
235
         <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
279
         <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
280
+        <if test="inspectTeamId != null">and isr.inspect_team_id = #{inspectTeamId}</if>
236
         <if test="categoryCodeOne != null and  categoryCodeOne != ''">
281
         <if test="categoryCodeOne != null and  categoryCodeOne != ''">
237
             and isi.category_code_one = #{categoryCodeOne}
282
             and isi.category_code_one = #{categoryCodeOne}
238
         </if>
283
         </if>
@@ -259,6 +304,7 @@
259
             and (isr.seizure_time >= #{startDate}
304
             and (isr.seizure_time >= #{startDate}
260
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
305
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
261
         </if>
306
         </if>
307
+        <if test="inspectBrigadeId != null">and isr.inspect_brigade_id = #{inspectBrigadeId}</if>
262
         <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
308
         <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
263
         <if test="inspectTeamId != null">and isr.inspect_team_id = #{inspectTeamId}</if>
309
         <if test="inspectTeamId != null">and isr.inspect_team_id = #{inspectTeamId}</if>
264
         <if test="categoryCodeOne != null and  categoryCodeOne != ''">
310
         <if test="categoryCodeOne != null and  categoryCodeOne != ''">
@@ -343,7 +389,9 @@
343
         <if test="categoryCodeTwo != null and  categoryCodeTwo != ''">
389
         <if test="categoryCodeTwo != null and  categoryCodeTwo != ''">
344
             and isi.category_code_two = #{categoryCodeTwo}
390
             and isi.category_code_two = #{categoryCodeTwo}
345
         </if>
391
         </if>
392
+        <if test="inspectBrigadeId != null">and isr.inspect_brigade_id = #{inspectBrigadeId}</if>
346
         <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
393
         <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
394
+        <if test="inspectTeamId != null">and isr.inspect_team_id = #{inspectTeamId}</if>
347
         <if test="isPolice=='1' or isPolice==1 ">and isi.handling_method = 'TRANSFER_TO_AIRPORT_POLICE'</if>
395
         <if test="isPolice=='1' or isPolice==1 ">and isi.handling_method = 'TRANSFER_TO_AIRPORT_POLICE'</if>
348
         <if test="isConceal=='1' or  isConceal==1 ">and isi.is_active_concealment = 1</if>
396
         <if test="isConceal=='1' or  isConceal==1 ">and isi.is_active_concealment = 1</if>
349
         group by hours.hour
397
         group by hours.hour
@@ -361,7 +409,9 @@
361
             and (isr.seizure_time >= #{startDate}
409
             and (isr.seizure_time >= #{startDate}
362
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
410
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
363
         </if>
411
         </if>
412
+        <if test="inspectBrigadeId != null">and isr.inspect_brigade_id = #{inspectBrigadeId}</if>
364
         <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
413
         <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
414
+        <if test="inspectTeamId != null">and isr.inspect_team_id = #{inspectTeamId}</if>
365
         <if test="categoryCodeOne != null and categoryCodeOne != ''">
415
         <if test="categoryCodeOne != null and categoryCodeOne != ''">
366
             and isi.category_code_one = #{categoryCodeOne}
416
             and isi.category_code_one = #{categoryCodeOne}
367
         </if>
417
         </if>
@@ -389,7 +439,9 @@
389
             and (isr.seizure_time >= #{startDate}
439
             and (isr.seizure_time >= #{startDate}
390
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
440
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
391
         </if>
441
         </if>
442
+        <if test="inspectBrigadeId != null">and isr.inspect_brigade_id = #{inspectBrigadeId}</if>
392
         <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
443
         <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
444
+        <if test="inspectTeamId != null">and isr.inspect_team_id = #{inspectTeamId}</if>
393
         <if test="isPolice=='1' or isPolice==1">and isi.handling_method = 'TRANSFER_TO_AIRPORT_POLICE'</if>
445
         <if test="isPolice=='1' or isPolice==1">and isi.handling_method = 'TRANSFER_TO_AIRPORT_POLICE'</if>
394
         <if test="isConceal=='1' or isConceal==1">and isi.is_active_concealment = 1</if>
446
         <if test="isConceal=='1' or isConceal==1">and isi.is_active_concealment = 1</if>
395
         group by isi.check_position_code_one,
447
         group by isi.check_position_code_one,
@@ -414,7 +466,9 @@
414
             and (isr.seizure_time >= #{startDate}
466
             and (isr.seizure_time >= #{startDate}
415
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
467
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
416
         </if>
468
         </if>
469
+        <if test="inspectBrigadeId != null">and isr.inspect_brigade_id = #{inspectBrigadeId}</if>
417
         <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
470
         <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
471
+        <if test="inspectTeamId != null">and isr.inspect_team_id = #{inspectTeamId}</if>
418
         group by isr.regional_code,
472
         group by isr.regional_code,
419
         isr.regional_name,
473
         isr.regional_name,
420
         isi.category_code_one,
474
         isi.category_code_one,
@@ -441,7 +495,9 @@
441
             and (isr.seizure_time >= #{startDate}
495
             and (isr.seizure_time >= #{startDate}
442
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
496
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
443
         </if>
497
         </if>
498
+        <if test="inspectBrigadeId != null">and isr.inspect_brigade_id = #{inspectBrigadeId}</if>
444
         <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
499
         <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
500
+        <if test="inspectTeamId != null">and isr.inspect_team_id = #{inspectTeamId}</if>
445
         <if test="isPolice=='1' or isPolice==1">and isi.handling_method = 'TRANSFER_TO_AIRPORT_POLICE'</if>
501
         <if test="isPolice=='1' or isPolice==1">and isi.handling_method = 'TRANSFER_TO_AIRPORT_POLICE'</if>
446
         <if test="isConceal=='1' or isConceal==1">and isi.is_active_concealment = 1</if>
502
         <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 =
503
         <if test="levelType == 2 and positionCode!=null and positionCode!=''">and isi.check_position_code_one =