Procházet zdrojové kódy

查获统计+查获大屏

chenshudong před 4 měsíci
rodič
revize
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 95
     @ApiModelProperty("班组id")
96 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 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 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 67
      * @param dto  大屏查询参数
68
-     * @param type 类型:1=按科室;2=按班组;3=按个人
68
+     * @param type 类型:1=按科室;2=按班组;3=按个人;4=按大队
69 69
      * @return 查获排名
70 70
      */
71 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 127
      * @param dto  大屏查询参数
128
-     * @param type 类型:1=按科室;2=按班组;3=按个人
128
+     * @param type 类型:1=按科室;2=按班组;3=按个人;4=按大队
129 129
      * @return 查获排名
130 130
      */
131 131
     @Override
@@ -153,6 +153,9 @@ public class ItemLargeScreenServiceImpl implements ItemLargeScreenService {
153 153
                     }
154 154
                 }
155 155
                 break;
156
+            case 4:
157
+                result = itemLargeScreenMapper.rankByBrigade(dto);
158
+                break;
156 159
             default:
157 160
                 return Collections.emptyList();
158 161
         }

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

@@ -15,7 +15,9 @@
15 15
             and (isr.seizure_time >= #{startDate}
16 16
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
17 17
         </if>
18
+        <if test="inspectBrigadeId != null">and isr.inspect_brigade_id = #{inspectBrigadeId}</if>
18 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 21
         <if test="isPolice == '1' or isPolice == 1 ">and isi.handling_method = 'TRANSFER_TO_AIRPORT_POLICE'</if>
20 22
         <if test="isConceal=='1' or isConceal == 1">and isi.is_active_concealment = 1</if>
21 23
     </select>
@@ -63,7 +65,9 @@
63 65
             and (isr.seizure_time >= #{startDate}
64 66
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
65 67
         </if>
68
+        <if test="inspectBrigadeId != null">and isr.inspect_brigade_id = #{inspectBrigadeId}</if>
66 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 71
         and isr.process_status=3
68 72
         order by isr.seizure_time desc
69 73
     </select>
@@ -110,7 +114,9 @@
110 114
             and (isr.seizure_time >= #{startDate}
111 115
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
112 116
         </if>
117
+        <if test="inspectBrigadeId != null">and isr.inspect_brigade_id = #{inspectBrigadeId}</if>
113 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 120
         order by isr.seizure_time desc
115 121
     </select>
116 122
 
@@ -139,7 +145,9 @@
139 145
         <if test="levelType == 2  and categoryCode != null and  categoryCode != ''">
140 146
             and isi.category_code_one = #{categoryCode}
141 147
         </if>
148
+        <if test="inspectBrigadeId != null">and isr.inspect_brigade_id = #{inspectBrigadeId}</if>
142 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 151
         <if test="isPolice=='1' or isPolice==1">and isi.handling_method = 'TRANSFER_TO_AIRPORT_POLICE'</if>
144 152
         <if test="isConceal=='1' or isConceal==1">and isi.is_active_concealment = 1</if>
145 153
         group by
@@ -167,7 +175,9 @@
167 175
             and (isr.seizure_time >= #{startDate}
168 176
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
169 177
         </if>
178
+        <if test="inspectBrigadeId != null">and isr.inspect_brigade_id = #{inspectBrigadeId}</if>
170 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 181
         <if test="isPolice=='1' or isPolice==1">and isi.handling_method = 'TRANSFER_TO_AIRPORT_POLICE'</if>
172 182
         <if test="isConceal=='1' or isConceal==1">and isi.is_active_concealment = 1</if>
173 183
         group by isr.check_method,
@@ -189,7 +199,38 @@
189 199
             and (isr.seizure_time >= #{startDate}
190 200
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
191 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 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 234
     </select>
194 235
 
195 236
     <!--查获排名-按科室-->
@@ -205,7 +246,9 @@
205 246
             and (isr.seizure_time >= #{startDate}
206 247
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
207 248
         </if>
249
+        <if test="inspectBrigadeId != null">and isr.inspect_brigade_id = #{inspectBrigadeId}</if>
208 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 252
         <if test="categoryCodeOne != null and  categoryCodeOne != ''">
210 253
             and isi.category_code_one = #{categoryCodeOne}
211 254
         </if>
@@ -232,7 +275,9 @@
232 275
             and (isr.seizure_time >= #{startDate}
233 276
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
234 277
         </if>
278
+        <if test="inspectBrigadeId != null">and isr.inspect_brigade_id = #{inspectBrigadeId}</if>
235 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 281
         <if test="categoryCodeOne != null and  categoryCodeOne != ''">
237 282
             and isi.category_code_one = #{categoryCodeOne}
238 283
         </if>
@@ -259,6 +304,7 @@
259 304
             and (isr.seizure_time >= #{startDate}
260 305
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
261 306
         </if>
307
+        <if test="inspectBrigadeId != null">and isr.inspect_brigade_id = #{inspectBrigadeId}</if>
262 308
         <if test="inspectDepartmentId != null">and isr.inspect_department_id = #{inspectDepartmentId}</if>
263 309
         <if test="inspectTeamId != null">and isr.inspect_team_id = #{inspectTeamId}</if>
264 310
         <if test="categoryCodeOne != null and  categoryCodeOne != ''">
@@ -343,7 +389,9 @@
343 389
         <if test="categoryCodeTwo != null and  categoryCodeTwo != ''">
344 390
             and isi.category_code_two = #{categoryCodeTwo}
345 391
         </if>
392
+        <if test="inspectBrigadeId != null">and isr.inspect_brigade_id = #{inspectBrigadeId}</if>
346 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 395
         <if test="isPolice=='1' or isPolice==1 ">and isi.handling_method = 'TRANSFER_TO_AIRPORT_POLICE'</if>
348 396
         <if test="isConceal=='1' or  isConceal==1 ">and isi.is_active_concealment = 1</if>
349 397
         group by hours.hour
@@ -361,7 +409,9 @@
361 409
             and (isr.seizure_time >= #{startDate}
362 410
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
363 411
         </if>
412
+        <if test="inspectBrigadeId != null">and isr.inspect_brigade_id = #{inspectBrigadeId}</if>
364 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 415
         <if test="categoryCodeOne != null and categoryCodeOne != ''">
366 416
             and isi.category_code_one = #{categoryCodeOne}
367 417
         </if>
@@ -389,7 +439,9 @@
389 439
             and (isr.seizure_time >= #{startDate}
390 440
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
391 441
         </if>
442
+        <if test="inspectBrigadeId != null">and isr.inspect_brigade_id = #{inspectBrigadeId}</if>
392 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 445
         <if test="isPolice=='1' or isPolice==1">and isi.handling_method = 'TRANSFER_TO_AIRPORT_POLICE'</if>
394 446
         <if test="isConceal=='1' or isConceal==1">and isi.is_active_concealment = 1</if>
395 447
         group by isi.check_position_code_one,
@@ -414,7 +466,9 @@
414 466
             and (isr.seizure_time >= #{startDate}
415 467
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
416 468
         </if>
469
+        <if test="inspectBrigadeId != null">and isr.inspect_brigade_id = #{inspectBrigadeId}</if>
417 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 472
         group by isr.regional_code,
419 473
         isr.regional_name,
420 474
         isi.category_code_one,
@@ -441,7 +495,9 @@
441 495
             and (isr.seizure_time >= #{startDate}
442 496
             and isr.seizure_time <![CDATA[ < ]]> date_add(#{endDate}, interval 1 day))
443 497
         </if>
498
+        <if test="inspectBrigadeId != null">and isr.inspect_brigade_id = #{inspectBrigadeId}</if>
444 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 501
         <if test="isPolice=='1' or isPolice==1">and isi.handling_method = 'TRANSFER_TO_AIRPORT_POLICE'</if>
446 502
         <if test="isConceal=='1' or isConceal==1">and isi.is_active_concealment = 1</if>
447 503
         <if test="levelType == 2 and positionCode!=null and positionCode!=''">and isi.check_position_code_one =