chenshudong месяцев назад: 3
Родитель
Сommit
b320ca17aa

+ 3 - 3
airport-admin/src/main/java/com/sundot/airport/web/controller/system/SysUserController.java

@@ -194,8 +194,8 @@ public class SysUserController extends BaseController {
194
         IndicatorCalculateParams indicatorCalculateParams = this.appendParams(dto);
194
         IndicatorCalculateParams indicatorCalculateParams = this.appendParams(dto);
195
         if (Objects.nonNull(dto.getDeptId())) {
195
         if (Objects.nonNull(dto.getDeptId())) {
196
             SysDept sysDept = deptService.selectDeptById(dto.getDeptId());
196
             SysDept sysDept = deptService.selectDeptById(dto.getDeptId());
197
-            if (StrUtil.equals(DeptTypeEnum.STATION.getCode(), sysDept.getDeptType()) || StrUtil.equals(DeptTypeEnum.DEPARTMENT.getCode(), sysDept.getDeptType()) || StrUtil.equals(DeptTypeEnum.TEAMS.getCode(), sysDept.getDeptType())) {
198
-                indicatorCalculateParams.setUserType(StrUtil.equals(DeptTypeEnum.STATION.getCode(), sysDept.getDeptType()) ? UserType.STATION : StrUtil.equals(DeptTypeEnum.DEPARTMENT.getCode(), sysDept.getDeptType()) ? UserType.DEPARTMENT : UserType.TEAM);
197
+            if (StrUtil.equals(DeptTypeEnum.STATION.getCode(), sysDept.getDeptType()) || StrUtil.equals(DeptTypeEnum.BRIGADE.getCode(), sysDept.getDeptType()) || StrUtil.equals(DeptTypeEnum.MANAGER.getCode(), sysDept.getDeptType()) || StrUtil.equals(DeptTypeEnum.TEAMS.getCode(), sysDept.getDeptType())) {
198
+                indicatorCalculateParams.setUserType(StrUtil.equals(DeptTypeEnum.STATION.getCode(), sysDept.getDeptType()) ? UserType.STATION : StrUtil.equals(DeptTypeEnum.BRIGADE.getCode(), sysDept.getDeptType()) ? UserType.BRIGADE : StrUtil.equals(DeptTypeEnum.DEPARTMENT.getCode(), sysDept.getDeptType()) ? UserType.DEPARTMENT : UserType.TEAM);
199
                 List<SysUser> sysUsers = iSysUserService.selectUserListByRoleKeyAndDeptId(Arrays.asList(RoleTypeEnum.banzuzhang.getCode(), RoleTypeEnum.SecurityCheck.getCode()), dto.getDeptId());
199
                 List<SysUser> sysUsers = iSysUserService.selectUserListByRoleKeyAndDeptId(Arrays.asList(RoleTypeEnum.banzuzhang.getCode(), RoleTypeEnum.SecurityCheck.getCode()), dto.getDeptId());
200
                 indicatorCalculateParams.setUserIds(sysUsers.stream().map(SysUser::getUserId).collect(Collectors.toList()));
200
                 indicatorCalculateParams.setUserIds(sysUsers.stream().map(SysUser::getUserId).collect(Collectors.toList()));
201
                 indicatorCalculateParams.setDeptId(dto.getDeptId());
201
                 indicatorCalculateParams.setDeptId(dto.getDeptId());
@@ -258,7 +258,7 @@ public class SysUserController extends BaseController {
258
         // 返回结果处理
258
         // 返回结果处理
259
         SysDept sysDept = deptService.selectDeptById(dto.getDeptId());
259
         SysDept sysDept = deptService.selectDeptById(dto.getDeptId());
260
         if (StrUtil.equals(DeptTypeEnum.STATION.getCode(), sysDept.getDeptType()) || StrUtil.equals(DeptTypeEnum.BRIGADE.getCode(), sysDept.getDeptType()) || StrUtil.equals(DeptTypeEnum.MANAGER.getCode(), sysDept.getDeptType())) {
260
         if (StrUtil.equals(DeptTypeEnum.STATION.getCode(), sysDept.getDeptType()) || StrUtil.equals(DeptTypeEnum.BRIGADE.getCode(), sysDept.getDeptType()) || StrUtil.equals(DeptTypeEnum.MANAGER.getCode(), sysDept.getDeptType())) {
261
-            indicatorCalculateParams.setUserType(StrUtil.equals(DeptTypeEnum.STATION.getCode(), sysDept.getDeptType()) ? UserType.DEPARTMENT : UserType.TEAM);
261
+            indicatorCalculateParams.setUserType(StrUtil.equals(DeptTypeEnum.STATION.getCode(), sysDept.getDeptType()) ? UserType.BRIGADE : StrUtil.equals(DeptTypeEnum.BRIGADE.getCode(), sysDept.getDeptType()) ? UserType.DEPARTMENT : UserType.TEAM);
262
             SysDept temp = new SysDept();
262
             SysDept temp = new SysDept();
263
             temp.setParentId(dto.getDeptId());
263
             temp.setParentId(dto.getDeptId());
264
             List<SysDept> deptList = deptService.selectDeptInfoAll(temp);
264
             List<SysDept> deptList = deptService.selectDeptInfoAll(temp);

+ 7 - 0
airport-common/src/main/java/com/sundot/airport/common/enums/portrait/UserType.java

@@ -21,6 +21,11 @@ public enum UserType {
21
     DEPARTMENT("科级"),
21
     DEPARTMENT("科级"),
22
 
22
 
23
     /**
23
     /**
24
+     * 大队单位
25
+     */
26
+    BRIGADE("大队"),
27
+
28
+    /**
24
      * 站级单位
29
      * 站级单位
25
      */
30
      */
26
     STATION("站级");
31
     STATION("站级");
@@ -62,6 +67,8 @@ public enum UserType {
62
                 return TEAM;
67
                 return TEAM;
63
             case "department":
68
             case "department":
64
                 return DEPARTMENT;
69
                 return DEPARTMENT;
70
+            case "brigade":
71
+                return BRIGADE;
65
             case "station":
72
             case "station":
66
                 return STATION;
73
                 return STATION;
67
             default:
74
             default:

+ 36 - 0
airport-item/src/main/java/com/sundot/airport/item/mapper/ItemSeizureStatsMapper.java

@@ -97,6 +97,18 @@ public interface ItemSeizureStatsMapper {
97
                                                        @Param("endTime") Date endTime);
97
                                                        @Param("endTime") Date endTime);
98
 
98
 
99
     /**
99
     /**
100
+     * 查询大队有效查获总量
101
+     *
102
+     * @param brigadeId 大队ID
103
+     * @param startTime 开始时间
104
+     * @param endTime   结束时间
105
+     * @return 有效查获总量统计
106
+     */
107
+    SeizureStats selectBrigadeEffectiveSeizureCount(@Param("brigadeId") Long brigadeId,
108
+                                                    @Param("startTime") Date startTime,
109
+                                                    @Param("endTime") Date endTime);
110
+
111
+    /**
100
      * 查询科室故意隐匿查获总量
112
      * 查询科室故意隐匿查获总量
101
      *
113
      *
102
      * @param departmentId 科室ID
114
      * @param departmentId 科室ID
@@ -109,6 +121,18 @@ public interface ItemSeizureStatsMapper {
109
                                                          @Param("endTime") Date endTime);
121
                                                          @Param("endTime") Date endTime);
110
 
122
 
111
     /**
123
     /**
124
+     * 查询大队故意隐匿查获总量
125
+     *
126
+     * @param brigadeId 大队ID
127
+     * @param startTime 开始时间
128
+     * @param endTime   结束时间
129
+     * @return 故意隐匿查获总量统计
130
+     */
131
+    SeizureStats selectBrigadeWillfulConcealmentCount(@Param("brigadeId") Long brigadeId,
132
+                                                      @Param("startTime") Date startTime,
133
+                                                      @Param("endTime") Date endTime);
134
+
135
+    /**
112
      * 查询科室移交公安查获总量
136
      * 查询科室移交公安查获总量
113
      *
137
      *
114
      * @param departmentId 科室ID
138
      * @param departmentId 科室ID
@@ -121,6 +145,18 @@ public interface ItemSeizureStatsMapper {
121
                                                     @Param("endTime") Date endTime);
145
                                                     @Param("endTime") Date endTime);
122
 
146
 
123
     /**
147
     /**
148
+     * 查询大队移交公安查获总量
149
+     *
150
+     * @param brigadeId 大队ID
151
+     * @param startTime 开始时间
152
+     * @param endTime   结束时间
153
+     * @return 移交公安查获总量统计
154
+     */
155
+    SeizureStats selectBrigadeReferToPoliceCount(@Param("brigadeId") Long brigadeId,
156
+                                                 @Param("startTime") Date startTime,
157
+                                                 @Param("endTime") Date endTime);
158
+
159
+    /**
124
      * 查询机构站有效查获总量
160
      * 查询机构站有效查获总量
125
      *
161
      *
126
      * @param stationId 机构站ID
162
      * @param stationId 机构站ID

+ 30 - 0
airport-item/src/main/java/com/sundot/airport/item/service/IItemSeizureStatsService.java

@@ -70,6 +70,16 @@ public interface IItemSeizureStatsService {
70
     SeizureStats getDepartmentEffectiveSeizureCount(Long departmentId, Date startTime, Date endTime);
70
     SeizureStats getDepartmentEffectiveSeizureCount(Long departmentId, Date startTime, Date endTime);
71
 
71
 
72
     /**
72
     /**
73
+     * 查询大队有效查获总量
74
+     *
75
+     * @param brigadeId 大队ID
76
+     * @param startTime 开始时间
77
+     * @param endTime   结束时间
78
+     * @return 有效查获总量统计
79
+     */
80
+    SeizureStats getBrigadeEffectiveSeizureCount(Long brigadeId, Date startTime, Date endTime);
81
+
82
+    /**
73
      * 查询站点有效查获总量
83
      * 查询站点有效查获总量
74
      *
84
      *
75
      * @param stationId 站点ID
85
      * @param stationId 站点ID
@@ -110,6 +120,16 @@ public interface IItemSeizureStatsService {
110
     SeizureStats getDepartmentWillfulConcealmentCount(Long departmentId, Date startTime, Date endTime);
120
     SeizureStats getDepartmentWillfulConcealmentCount(Long departmentId, Date startTime, Date endTime);
111
 
121
 
112
     /**
122
     /**
123
+     * 查询大队故意隐匿查获总量
124
+     *
125
+     * @param brigadeId 大队ID
126
+     * @param startTime 开始时间
127
+     * @param endTime   结束时间
128
+     * @return 故意隐匿查获总量统计
129
+     */
130
+    SeizureStats getBrigadeWillfulConcealmentCount(Long brigadeId, Date startTime, Date endTime);
131
+
132
+    /**
113
      * 查询站点故意隐匿查获总量
133
      * 查询站点故意隐匿查获总量
114
      *
134
      *
115
      * @param stationId 站点ID
135
      * @param stationId 站点ID
@@ -150,6 +170,16 @@ public interface IItemSeizureStatsService {
150
     SeizureStats getDepartmentReferToPoliceCount(Long departmentId, Date startTime, Date endTime);
170
     SeizureStats getDepartmentReferToPoliceCount(Long departmentId, Date startTime, Date endTime);
151
 
171
 
152
     /**
172
     /**
173
+     * 查询大队移交公安查获总量
174
+     *
175
+     * @param brigadeId 大队ID
176
+     * @param startTime 开始时间
177
+     * @param endTime   结束时间
178
+     * @return 移交公安查获总量统计
179
+     */
180
+    SeizureStats getBrigadeReferToPoliceCount(Long brigadeId, Date startTime, Date endTime);
181
+
182
+    /**
153
      * 查询站点移交公安查获总量
183
      * 查询站点移交公安查获总量
154
      *
184
      *
155
      * @param stationId 站点ID
185
      * @param stationId 站点ID

+ 15 - 0
airport-item/src/main/java/com/sundot/airport/item/service/impl/ItemSeizureStatsServiceImpl.java

@@ -48,6 +48,11 @@ public class ItemSeizureStatsServiceImpl implements IItemSeizureStatsService {
48
     }
48
     }
49
 
49
 
50
     @Override
50
     @Override
51
+    public SeizureStats getBrigadeEffectiveSeizureCount(Long brigadeId, Date startTime, Date endTime) {
52
+        return itemSeizureStatsMapper.selectBrigadeEffectiveSeizureCount(brigadeId, startTime, endTime);
53
+    }
54
+
55
+    @Override
51
     public SeizureStats getStationEffectiveSeizureCount(Long stationId, Date startTime, Date endTime) {
56
     public SeizureStats getStationEffectiveSeizureCount(Long stationId, Date startTime, Date endTime) {
52
         return itemSeizureStatsMapper.selectStationEffectiveSeizureCount(stationId, startTime, endTime);
57
         return itemSeizureStatsMapper.selectStationEffectiveSeizureCount(stationId, startTime, endTime);
53
     }
58
     }
@@ -68,6 +73,11 @@ public class ItemSeizureStatsServiceImpl implements IItemSeizureStatsService {
68
     }
73
     }
69
 
74
 
70
     @Override
75
     @Override
76
+    public SeizureStats getBrigadeWillfulConcealmentCount(Long brigadeId, Date startTime, Date endTime) {
77
+        return itemSeizureStatsMapper.selectBrigadeWillfulConcealmentCount(brigadeId, startTime, endTime);
78
+    }
79
+
80
+    @Override
71
     public SeizureStats getStationWillfulConcealmentCount(Long stationId, Date startTime, Date endTime) {
81
     public SeizureStats getStationWillfulConcealmentCount(Long stationId, Date startTime, Date endTime) {
72
         return itemSeizureStatsMapper.selectStationWillfulConcealmentCount(stationId, startTime, endTime);
82
         return itemSeizureStatsMapper.selectStationWillfulConcealmentCount(stationId, startTime, endTime);
73
     }
83
     }
@@ -88,6 +98,11 @@ public class ItemSeizureStatsServiceImpl implements IItemSeizureStatsService {
88
     }
98
     }
89
 
99
 
90
     @Override
100
     @Override
101
+    public SeizureStats getBrigadeReferToPoliceCount(Long brigadeId, Date startTime, Date endTime) {
102
+        return itemSeizureStatsMapper.selectBrigadeReferToPoliceCount(brigadeId, startTime, endTime);
103
+    }
104
+
105
+    @Override
91
     public SeizureStats getStationReferToPoliceCount(Long stationId, Date startTime, Date endTime) {
106
     public SeizureStats getStationReferToPoliceCount(Long stationId, Date startTime, Date endTime) {
92
         return itemSeizureStatsMapper.selectStationReferToPoliceCount(stationId, startTime, endTime);
107
         return itemSeizureStatsMapper.selectStationReferToPoliceCount(stationId, startTime, endTime);
93
     }
108
     }

+ 3 - 0
airport-item/src/main/java/com/sundot/airport/item/service/portrait/EffectiveSeizureCountIndicator.java

@@ -56,6 +56,9 @@ public class EffectiveSeizureCountIndicator implements Indicator<Object> {
56
         } else if (UserType.DEPARTMENT.equals(userType)) {
56
         } else if (UserType.DEPARTMENT.equals(userType)) {
57
             // 科室:周期内总量
57
             // 科室:周期内总量
58
             this.value = itemSeizureStatsService.getDepartmentEffectiveSeizureCount(deptId, startTime, endTime);
58
             this.value = itemSeizureStatsService.getDepartmentEffectiveSeizureCount(deptId, startTime, endTime);
59
+        } else if (UserType.BRIGADE.equals(userType)) {
60
+            // 大队:周期内总量
61
+            this.value = itemSeizureStatsService.getBrigadeEffectiveSeizureCount(deptId, startTime, endTime);
59
         } else if (UserType.STATION.equals(userType)) {
62
         } else if (UserType.STATION.equals(userType)) {
60
             // 站点:周期内总量
63
             // 站点:周期内总量
61
             this.value = itemSeizureStatsService.getStationEffectiveSeizureCount(deptId, startTime, endTime);
64
             this.value = itemSeizureStatsService.getStationEffectiveSeizureCount(deptId, startTime, endTime);

+ 3 - 0
airport-item/src/main/java/com/sundot/airport/item/service/portrait/ReferToPoliceCountIndicator.java

@@ -57,6 +57,9 @@ public class ReferToPoliceCountIndicator implements Indicator<Object> {
57
         } else if (UserType.DEPARTMENT.equals(userType)) {
57
         } else if (UserType.DEPARTMENT.equals(userType)) {
58
             // 科室:周期内总量
58
             // 科室:周期内总量
59
             this.value = itemSeizureStatsService.getDepartmentReferToPoliceCount(deptId, startTime, endTime);
59
             this.value = itemSeizureStatsService.getDepartmentReferToPoliceCount(deptId, startTime, endTime);
60
+        } else if (UserType.BRIGADE.equals(userType)) {
61
+            // 大队:周期内总量
62
+            this.value = itemSeizureStatsService.getBrigadeReferToPoliceCount(deptId, startTime, endTime);
60
         } else if (UserType.STATION.equals(userType)) {
63
         } else if (UserType.STATION.equals(userType)) {
61
             // 站点:周期内总量
64
             // 站点:周期内总量
62
             this.value = itemSeizureStatsService.getStationReferToPoliceCount(deptId, startTime, endTime);
65
             this.value = itemSeizureStatsService.getStationReferToPoliceCount(deptId, startTime, endTime);

+ 3 - 0
airport-item/src/main/java/com/sundot/airport/item/service/portrait/WillfulConcealmentCountIndicator.java

@@ -57,6 +57,9 @@ public class WillfulConcealmentCountIndicator implements Indicator<Object> {
57
         } else if (UserType.DEPARTMENT.equals(userType)) {
57
         } else if (UserType.DEPARTMENT.equals(userType)) {
58
             // 科室:周期内总量
58
             // 科室:周期内总量
59
             this.value = itemSeizureStatsService.getDepartmentWillfulConcealmentCount(deptId, startTime, endTime);
59
             this.value = itemSeizureStatsService.getDepartmentWillfulConcealmentCount(deptId, startTime, endTime);
60
+        } else if (UserType.BRIGADE.equals(userType)) {
61
+            // 大队:周期内总量
62
+            this.value = itemSeizureStatsService.getBrigadeWillfulConcealmentCount(deptId, startTime, endTime);
60
         } else if (UserType.STATION.equals(userType)) {
63
         } else if (UserType.STATION.equals(userType)) {
61
             // 站点:周期内总量
64
             // 站点:周期内总量
62
             this.value = itemSeizureStatsService.getStationWillfulConcealmentCount(deptId, startTime, endTime);
65
             this.value = itemSeizureStatsService.getStationWillfulConcealmentCount(deptId, startTime, endTime);

+ 43 - 0
airport-item/src/main/resources/mapper/item/ItemSeizureStatsMapper.xml

@@ -125,6 +125,20 @@
125
           AND isr.process_status = '3' -- 已归档状态
125
           AND isr.process_status = '3' -- 已归档状态
126
     </select>
126
     </select>
127
 
127
 
128
+    <!-- 组织有效查获总量 - 大队级别 -->
129
+    <select id="selectBrigadeEffectiveSeizureCount"
130
+            resultType="com.sundot.airport.item.domain.portrait.SeizureStats">
131
+        SELECT IFNULL(SUM(isi.quantity), 0) AS totalCount,
132
+               COUNT(DISTINCT isr.inspect_user_id) AS count
133
+        FROM item_seizure_record isr
134
+            LEFT JOIN item_seizure_items isi
135
+        ON isr.id = isi.record_id
136
+        WHERE isr.inspect_brigade_id = #{brigadeId}
137
+          AND isr.seizure_time >= #{startTime}
138
+          AND isr.seizure_time &lt;= #{endTime}
139
+          AND isr.process_status = '3' -- 已归档状态
140
+    </select>
141
+
128
     <!-- 组织有效查获总量 - 站点级别 -->
142
     <!-- 组织有效查获总量 - 站点级别 -->
129
     <select id="selectStationEffectiveSeizureCount" resultType="com.sundot.airport.item.domain.portrait.SeizureStats">
143
     <select id="selectStationEffectiveSeizureCount" resultType="com.sundot.airport.item.domain.portrait.SeizureStats">
130
         SELECT IFNULL(SUM(isi.quantity), 0) AS totalCount,
144
         SELECT IFNULL(SUM(isi.quantity), 0) AS totalCount,
@@ -167,6 +181,21 @@
167
           AND isr.process_status = '3' -- 已归档状态
181
           AND isr.process_status = '3' -- 已归档状态
168
     </select>
182
     </select>
169
 
183
 
184
+    <!-- 组织故意隐匿查获总量 - 大队级别 -->
185
+    <select id="selectBrigadeWillfulConcealmentCount"
186
+            resultType="com.sundot.airport.item.domain.portrait.SeizureStats">
187
+        SELECT IFNULL(SUM(isi.quantity), 0) AS totalCount,
188
+               COUNT(DISTINCT isr.inspect_user_id) AS count
189
+        FROM item_seizure_record isr
190
+            LEFT JOIN item_seizure_items isi
191
+        ON isr.id = isi.record_id
192
+        WHERE isr.inspect_brigade_id = #{brigadeId}
193
+          AND isr.seizure_time >= #{startTime}
194
+          AND isr.seizure_time &lt;= #{endTime}
195
+          AND isi.is_active_concealment = 1
196
+          AND isr.process_status = '3' -- 已归档状态
197
+    </select>
198
+
170
     <!-- 组织故意隐匿查获总量 - 站点级别 -->
199
     <!-- 组织故意隐匿查获总量 - 站点级别 -->
171
     <select id="selectStationWillfulConcealmentCount" resultType="com.sundot.airport.item.domain.portrait.SeizureStats">
200
     <select id="selectStationWillfulConcealmentCount" resultType="com.sundot.airport.item.domain.portrait.SeizureStats">
172
         SELECT IFNULL(SUM(isi.quantity), 0) AS totalCount,
201
         SELECT IFNULL(SUM(isi.quantity), 0) AS totalCount,
@@ -209,6 +238,20 @@
209
           AND isr.process_status = '3' -- 已归档状态
238
           AND isr.process_status = '3' -- 已归档状态
210
     </select>
239
     </select>
211
 
240
 
241
+    <!-- 组织移交公安查获总量 - 大队级别 -->
242
+    <select id="selectBrigadeReferToPoliceCount" resultType="com.sundot.airport.item.domain.portrait.SeizureStats">
243
+        SELECT IFNULL(SUM(isi.quantity), 0) AS totalCount,
244
+               COUNT(DISTINCT isr.inspect_user_id) AS count
245
+        FROM item_seizure_record isr
246
+            LEFT JOIN item_seizure_items isi
247
+        ON isr.id = isi.record_id
248
+        WHERE isr.inspect_brigade_id = #{brigadeId}
249
+          AND isr.seizure_time >= #{startTime}
250
+          AND isr.seizure_time &lt;= #{endTime}
251
+          AND isi.handling_method = 'TRANSFER_TO_AIRPORT_POLICE'
252
+          AND isr.process_status = '3' -- 已归档状态
253
+    </select>
254
+
212
     <!-- 组织移交公安查获总量 - 站点级别 -->
255
     <!-- 组织移交公安查获总量 - 站点级别 -->
213
     <select id="selectStationReferToPoliceCount" resultType="com.sundot.airport.item.domain.portrait.SeizureStats">
256
     <select id="selectStationReferToPoliceCount" resultType="com.sundot.airport.item.domain.portrait.SeizureStats">
214
         SELECT IFNULL(SUM(isi.quantity), 0) AS totalCount,
257
         SELECT IFNULL(SUM(isi.quantity), 0) AS totalCount,