Ver código fonte

查获记录表

chenshudong 4 meses atrás
pai
commit
eafd282792

+ 21 - 13
airport-admin/src/main/java/com/sundot/airport/web/controller/item/ItemSeizureRecordController.java

@@ -69,6 +69,9 @@ public class ItemSeizureRecordController extends BaseController {
69 69
             case STATION:
70 70
                 itemSeizureRecord.setInspectStationId(dataPermission.getValue());
71 71
                 break;
72
+            case BRIGADE:
73
+                itemSeizureRecord.setInspectBrigadeId(dataPermission.getValue());
74
+                break;
72 75
             case DEPARTMENT:
73 76
                 itemSeizureRecord.setInspectDepartmentId(dataPermission.getValue());
74 77
                 break;
@@ -80,7 +83,7 @@ public class ItemSeizureRecordController extends BaseController {
80 83
                 // 不设置过滤条件,查看所有数据
81 84
                 break;
82 85
         }
83
-        
86
+
84 87
         startPage();
85 88
         List<ItemSeizureRecord> list = itemSeizureRecordService.selectItemSeizureRecordList(itemSeizureRecord);
86 89
         return getDataTable(list);
@@ -102,6 +105,9 @@ public class ItemSeizureRecordController extends BaseController {
102 105
             case STATION:
103 106
                 itemSeizureRecord.setInspectStationId(dataPermission.getValue());
104 107
                 break;
108
+            case BRIGADE:
109
+                itemSeizureRecord.setInspectBrigadeId(dataPermission.getValue());
110
+                break;
105 111
             case DEPARTMENT:
106 112
                 itemSeizureRecord.setInspectDepartmentId(dataPermission.getValue());
107 113
                 break;
@@ -113,20 +119,20 @@ public class ItemSeizureRecordController extends BaseController {
113 119
                 // 不设置过滤条件,查看所有数据
114 120
                 break;
115 121
         }
116
-        
122
+
117 123
         List<ItemSeizureRecord> list = itemSeizureRecordService.selectItemSeizureRecordListForExport(itemSeizureRecord);
118 124
         exportData(response, list);
119 125
     }
120
-    
126
+
121 127
     /**
122 128
      * 导出查获记录数据
123
-     * 
129
+     *
124 130
      * @param response 响应对象
125
-     * @param list 查获记录列表
131
+     * @param list     查获记录列表
126 132
      */
127 133
     private void exportData(HttpServletResponse response, List<ItemSeizureRecord> list) {
128 134
         List<ItemSeizureRecordExportVO> exportList = new ArrayList<>();
129
-        
135
+
130 136
         // 直接使用已查询到的记录,避免再次查询数据库
131 137
         for (ItemSeizureRecord record : list) {
132 138
             if (record != null) {
@@ -140,14 +146,14 @@ public class ItemSeizureRecordController extends BaseController {
140 146
                     exportVO.setCheckMethodDesc(record.getCheckMethodDesc());
141 147
                     exportVO.setInspectTeamName(record.getInspectTeamName());
142 148
                     exportVO.setAttendanceTeamName(record.getAttendanceTeamName());
143
-                    
149
+
144 150
                     // 物品信息为空
145 151
                     exportVO.setCategoryNameTwo("");
146 152
                     exportVO.setQuantity(null);
147 153
                     exportVO.setCheckPositionNameTwo("");
148 154
                     exportVO.setHandlingMethod("");
149 155
                     exportVO.setIsActiveConcealmentDesc("");
150
-                    
156
+
151 157
                     exportList.add(exportVO);
152 158
                 } else {
153 159
                     // 处理有物品的记录
@@ -160,22 +166,22 @@ public class ItemSeizureRecordController extends BaseController {
160 166
                         exportVO.setCheckMethodDesc(record.getCheckMethodDesc());
161 167
                         exportVO.setInspectTeamName(record.getInspectTeamName());
162 168
                         exportVO.setAttendanceTeamName(record.getAttendanceTeamName());
163
-                        
169
+
164 170
                         // 物品信息
165
-                        exportVO.setCategoryNameTwo(item.getCategoryNameOne()+"/"+item.getCategoryNameTwo());
171
+                        exportVO.setCategoryNameTwo(item.getCategoryNameOne() + "/" + item.getCategoryNameTwo());
166 172
                         exportVO.setQuantity(item.getQuantity());
167
-                        exportVO.setCheckPositionNameTwo(item.getCheckPositionNameOne()+"/"+item.getCheckPositionNameTwo());
173
+                        exportVO.setCheckPositionNameTwo(item.getCheckPositionNameOne() + "/" + item.getCheckPositionNameTwo());
168 174
                         //处理方式查字典
169 175
                         String handlingMethodLabel = DictUtils.getDictLabel("item_handling_method", item.getHandlingMethod());
170 176
                         exportVO.setHandlingMethod(StringUtils.isNotEmpty(handlingMethodLabel) ? handlingMethodLabel : item.getHandlingMethod());
171 177
                         exportVO.setIsActiveConcealmentDesc("1".equals(String.valueOf(item.getIsActiveConcealment())) ? "是" : "否");
172
-                        
178
+
173 179
                         exportList.add(exportVO);
174 180
                     }
175 181
                 }
176 182
             }
177 183
         }
178
-        
184
+
179 185
         ExcelUtil<ItemSeizureRecordExportVO> util = new ExcelUtil<ItemSeizureRecordExportVO>(ItemSeizureRecordExportVO.class);
180 186
         util.exportExcel(response, exportList, "查获记录数据");
181 187
     }
@@ -203,6 +209,8 @@ public class ItemSeizureRecordController extends BaseController {
203 209
         }
204 210
         itemSeizureRecord.setInspectStationId(userInfo.getStationId());
205 211
         itemSeizureRecord.setInspectStationName(userInfo.getStationName());
212
+        itemSeizureRecord.setInspectBrigadeId(userInfo.getBrigadeId());
213
+        itemSeizureRecord.setInspectBrigadeName(userInfo.getBrigadeName());
206 214
         itemSeizureRecord.setInspectDepartmentId(userInfo.getDepartmentId());
207 215
         itemSeizureRecord.setInspectDepartmentName(userInfo.getDepartmentName());
208 216
         itemSeizureRecord.setInspectTeamId(userInfo.getTeamsId());

+ 42 - 16
airport-admin/src/main/java/com/sundot/airport/web/core/utils/DataPermissionUtils.java

@@ -22,9 +22,9 @@ import java.util.stream.Collectors;
22 22
  */
23 23
 @Component
24 24
 public class DataPermissionUtils {
25
-    
25
+
26 26
     private static ISysDeptService sysDeptService;
27
-    
27
+
28 28
     @Autowired
29 29
     public void setSysDeptService(ISysDeptService sysDeptService) {
30 30
         DataPermissionUtils.sysDeptService = sysDeptService;
@@ -33,8 +33,8 @@ public class DataPermissionUtils {
33 33
     /**
34 34
      * 获取数据权限结果
35 35
      *
36
-     * @param userId 当前用户ID
37
-     * @param deptId 当前用户部门ID
36
+     * @param userId    当前用户ID
37
+     * @param deptId    当前用户部门ID
38 38
      * @param loginUser 当前登录用户信息
39 39
      * @return 数据权限结果
40 40
      */
@@ -58,6 +58,7 @@ public class DataPermissionUtils {
58 58
         // 检查是否包含特定角色
59 59
         boolean isAdminRole = roleKeys.contains(RoleTypeEnum.admin.getCode());
60 60
         boolean isStationRole = roleKeys.contains(RoleTypeEnum.test.getCode()) || roleKeys.contains(RoleTypeEnum.zhijianke.getCode());
61
+        boolean isBrigadeRole = roleKeys.contains(RoleTypeEnum.jingli.getCode()) || roleKeys.contains(RoleTypeEnum.xingzheng.getCode());
61 62
         boolean isDepartmentRole = roleKeys.contains(RoleTypeEnum.kezhang.getCode());
62 63
         boolean isTeamRole = roleKeys.contains(RoleTypeEnum.banzuzhang.getCode());
63 64
         boolean isInspectorRole = roleKeys.contains(RoleTypeEnum.SecurityCheck.getCode());
@@ -76,6 +77,14 @@ public class DataPermissionUtils {
76 77
                 return new DataPermissionResult(DataPermissionType.SELF, userId);
77 78
             }
78 79
         }
80
+        // 大队级角色查看本站数据
81
+        else if (isBrigadeRole) {
82
+            if (sysDept != null) {
83
+                return new DataPermissionResult(DataPermissionType.BRIGADE, sysDept.getDeptId());
84
+            } else {
85
+                return new DataPermissionResult(DataPermissionType.SELF, userId);
86
+            }
87
+        }
79 88
         // 科室角色查看本科室数据
80 89
         else if (isDepartmentRole) {
81 90
             if (sysDept != null) {
@@ -101,65 +110,82 @@ public class DataPermissionUtils {
101 110
             return new DataPermissionResult(DataPermissionType.SELF, userId);
102 111
         }
103 112
     }
104
-    
113
+
105 114
     /**
106 115
      * 判断用户是否具有管理员角色
116
+     *
107 117
      * @param loginUser 当前登录用户
108 118
      * @return 是否是管理员
109 119
      */
110 120
     public static boolean isAdmin(LoginUser loginUser) {
111 121
         return hasRole(loginUser, RoleTypeEnum.admin.getCode());
112 122
     }
113
-    
123
+
114 124
     /**
115 125
      * 判断用户是否具有站级角色(站长或质检科)
126
+     *
116 127
      * @param loginUser 当前登录用户
117 128
      * @return 是否是站级角色
118 129
      */
119 130
     public static boolean isStationRole(LoginUser loginUser) {
120
-        return hasRole(loginUser, RoleTypeEnum.test.getCode()) || 
121
-               hasRole(loginUser, RoleTypeEnum.zhijianke.getCode());
131
+        return hasRole(loginUser, RoleTypeEnum.test.getCode()) ||
132
+                hasRole(loginUser, RoleTypeEnum.zhijianke.getCode());
122 133
     }
123
-    
134
+
135
+    /**
136
+     * 判断用户是否具有大队级角色(经理或大队行政)
137
+     *
138
+     * @param loginUser 当前登录用户
139
+     * @return 是否是站级角色
140
+     */
141
+    public static boolean isBrigadeRole(LoginUser loginUser) {
142
+        return hasRole(loginUser, RoleTypeEnum.jingli.getCode()) ||
143
+                hasRole(loginUser, RoleTypeEnum.xingzheng.getCode());
144
+    }
145
+
124 146
     /**
125 147
      * 判断用户是否具有科室角色
148
+     *
126 149
      * @param loginUser 当前登录用户
127 150
      * @return 是否是科室角色
128 151
      */
129 152
     public static boolean isDepartmentRole(LoginUser loginUser) {
130 153
         return hasRole(loginUser, RoleTypeEnum.kezhang.getCode());
131 154
     }
132
-    
155
+
133 156
     /**
134 157
      * 判断用户是否具有班组角色
158
+     *
135 159
      * @param loginUser 当前登录用户
136 160
      * @return 是否是班组角色
137 161
      */
138 162
     public static boolean isTeamRole(LoginUser loginUser) {
139 163
         return hasRole(loginUser, RoleTypeEnum.banzuzhang.getCode());
140 164
     }
141
-    
165
+
142 166
     /**
143 167
      * 判断用户是否具有安检员角色
168
+     *
144 169
      * @param loginUser 当前登录用户
145 170
      * @return 是否是安检员角色
146 171
      */
147 172
     public static boolean isInspectorRole(LoginUser loginUser) {
148 173
         return hasRole(loginUser, RoleTypeEnum.SecurityCheck.getCode());
149 174
     }
150
-    
175
+
151 176
     /**
152 177
      * 判断用户是否具有指定角色
178
+     *
153 179
      * @param loginUser 当前登录用户
154
-     * @param roleKey 角色键值
180
+     * @param roleKey   角色键值
155 181
      * @return 是否具有指定角色
156 182
      */
157 183
     private static boolean hasRole(LoginUser loginUser, String roleKey) {
158
-        if (loginUser == null || loginUser.getUser() == null || 
159
-            CollectionUtils.isEmpty(loginUser.getUser().getRoles())) {
184
+        if (loginUser == null || loginUser.getUser() == null ||
185
+                CollectionUtils.isEmpty(loginUser.getUser().getRoles())) {
160 186
             return false;
161 187
         }
162
-        
188
+
163 189
         return loginUser.getUser().getRoles().stream()
164 190
                 .anyMatch(role -> roleKey.equals(role.getRoleKey()));
165 191
     }

+ 11 - 6
airport-common/src/main/java/com/sundot/airport/common/enums/DataPermissionType.java

@@ -11,27 +11,32 @@ import lombok.Getter;
11 11
 @Getter
12 12
 @AllArgsConstructor
13 13
 public enum DataPermissionType {
14
-    
14
+
15 15
     /**
16 16
      * 全部数据权限
17 17
      */
18 18
     ALL(null, "全部数据权限"),
19
-    
19
+
20 20
     /**
21 21
      * 个人数据权限
22 22
      */
23 23
     SELF("userId", "个人数据权限"),
24
-    
24
+
25 25
     /**
26 26
      * 站点数据权限
27 27
      */
28 28
     STATION("stationId", "站点数据权限"),
29
-    
29
+
30
+    /**
31
+     * 大队数据权限
32
+     */
33
+    BRIGADE("brigadeId", "大队数据权限"),
34
+
30 35
     /**
31 36
      * 科室数据权限
32 37
      */
33 38
     DEPARTMENT("departmentId", "科室数据权限"),
34
-    
39
+
35 40
     /**
36 41
      * 班组数据权限
37 42
      */
@@ -41,7 +46,7 @@ public enum DataPermissionType {
41 46
      * 对应的字段名
42 47
      */
43 48
     private final String fieldName;
44
-    
49
+
45 50
     /**
46 51
      * 描述信息
47 52
      */

+ 60 - 0
airport-item/src/main/java/com/sundot/airport/item/domain/ItemSeizureRecord.java

@@ -220,6 +220,30 @@ public class ItemSeizureRecord extends BaseEntity {
220 220
     private String processStatus;
221 221
 
222 222
     /**
223
+     * 考勤大队ID
224
+     */
225
+    @Excel(name = "考勤大队ID")
226
+    private Long attendanceBrigadeId;
227
+
228
+    /**
229
+     * 考勤大队名称
230
+     */
231
+    @Excel(name = "考勤大队名称")
232
+    private String attendanceBrigadeName;
233
+
234
+    /**
235
+     * 查获人大队ID
236
+     */
237
+    @Excel(name = "查获人大队ID")
238
+    private Long inspectBrigadeId;
239
+
240
+    /**
241
+     * 查获人大队名称
242
+     */
243
+    @Excel(name = "查获人大队名称")
244
+    private String inspectBrigadeName;
245
+
246
+    /**
223 247
      * 查获物品明细列表
224 248
      */
225 249
     private List<ItemSeizureItems> itemSeizureItemsList;
@@ -488,6 +512,38 @@ public class ItemSeizureRecord extends BaseEntity {
488 512
         return inspectUserName;
489 513
     }
490 514
 
515
+    public void setAttendanceBrigadeId(Long attendanceBrigadeId) {
516
+        this.attendanceBrigadeId = attendanceBrigadeId;
517
+    }
518
+
519
+    public Long getAttendanceBrigadeId() {
520
+        return attendanceBrigadeId;
521
+    }
522
+
523
+    public void setAttendanceBrigadeName(String attendanceBrigadeName) {
524
+        this.attendanceBrigadeName = attendanceBrigadeName;
525
+    }
526
+
527
+    public String getAttendanceBrigadeName() {
528
+        return attendanceBrigadeName;
529
+    }
530
+
531
+    public void setInspectBrigadeId(Long inspectBrigadeId) {
532
+        this.inspectBrigadeId = inspectBrigadeId;
533
+    }
534
+
535
+    public Long getInspectBrigadeId() {
536
+        return inspectBrigadeId;
537
+    }
538
+
539
+    public void setInspectBrigadeName(String inspectBrigadeName) {
540
+        this.inspectBrigadeName = inspectBrigadeName;
541
+    }
542
+
543
+    public String getInspectBrigadeName() {
544
+        return inspectBrigadeName;
545
+    }
546
+
491 547
     public List<ItemSeizureItems> getItemSeizureItemsList() {
492 548
         return itemSeizureItemsList;
493 549
     }
@@ -532,6 +588,10 @@ public class ItemSeizureRecord extends BaseEntity {
532 588
                 ", passengerGenderDesc='" + passengerGenderDesc + '\'' +
533 589
                 ", inspectUserName='" + inspectUserName + '\'' +
534 590
                 ", processStatus='" + processStatus + '\'' +
591
+                ", attendanceBrigadeId='" + attendanceBrigadeId + '\'' +
592
+                ", attendanceBrigadeName='" + attendanceBrigadeName + '\'' +
593
+                ", inspectBrigadeId='" + inspectBrigadeId + '\'' +
594
+                ", inspectBrigadeName='" + inspectBrigadeName + '\'' +
535 595
                 ", itemSeizureItemsList=" + itemSeizureItemsList +
536 596
                 '}';
537 597
     }

+ 131 - 96
airport-item/src/main/resources/mapper/item/ItemSeizureRecordMapper.xml

@@ -43,6 +43,10 @@
43 43
         <result property="passengerGenderDesc" column="passenger_gender_desc"/>
44 44
         <result property="inspectUserName" column="inspect_user_name"/>
45 45
         <result property="processStatus" column="process_status"/>
46
+        <result property="attendanceBrigadeId" column="attendance_brigade_id"/>
47
+        <result property="attendanceBrigadeName" column="attendance_brigade_name"/>
48
+        <result property="inspectBrigadeId" column="inspect_brigade_id"/>
49
+        <result property="inspectBrigadeName" column="inspect_brigade_name"/>
46 50
     </resultMap>
47 51
 
48 52
     <resultMap type="ItemSeizureRecord" id="ItemSeizureRecordExportResult" extends="ItemSeizureRecordResult">
@@ -113,11 +117,15 @@
113 117
                check_method_desc,
114 118
                passenger_gender_desc,
115 119
                inspect_user_name,
116
-               process_status
120
+               process_status,
121
+               attendance_brigade_id,
122
+               attendance_brigade_name,
123
+               inspect_brigade_id,
124
+               inspect_brigade_name
117 125
         from item_seizure_record
118 126
     </sql>
119 127
 
120
-    <select id="selectItemSeizureRecordList"  resultMap="ItemSeizureRecordResult">
128
+    <select id="selectItemSeizureRecordList" resultMap="ItemSeizureRecordResult">
121 129
         <include refid="selectItemSeizureRecordVo"/>
122 130
         <where>
123 131
             <if test="tenantId != null  and tenantId != ''">and tenant_id = #{tenantId}</if>
@@ -139,26 +147,26 @@
139 147
             <if test="attendanceStationName != null  and attendanceStationName != ''">and attendance_station_name like
140 148
                 concat('%', #{attendanceStationName}, '%')
141 149
             </if>
142
-            <if test="channelName != null  and channelName != ''">and channel_name like concat('%', #{channelName},
143
-                '%')
150
+            <if test="channelName != null  and channelName != ''">and channel_name like
151
+                concat('%', #{channelName}, '%')
144 152
             </if>
145 153
             <if test="regionalCode != null ">and regional_code = #{regionalCode}</if>
146
-            <if test="regionalName != null  and regionalName != ''">and regional_name like concat('%', #{regionalName},
147
-                '%')
154
+            <if test="regionalName != null  and regionalName != ''">and regional_name like
155
+                concat('%', #{regionalName}, '%')
148 156
             </if>
149 157
             <if test="terminlCode != null ">and terminl_code = #{terminlCode}</if>
150
-            <if test="terminlName != null  and terminlName != ''">and terminl_name like concat('%', #{terminlName},
151
-                '%')
158
+            <if test="terminlName != null  and terminlName != ''">and terminl_name like
159
+                concat('%', #{terminlName}, '%')
152 160
             </if>
153
-            <if test="passengerName != null  and passengerName != ''">and passenger_name like concat('%',
154
-                #{passengerName}, '%')
161
+            <if test="passengerName != null  and passengerName != ''">and passenger_name like
162
+                concat('%', #{passengerName}, '%')
155 163
             </if>
156 164
             <if test="passengerGender != null  and passengerGender != ''">and passenger_gender = #{passengerGender}</if>
157 165
             <if test="passengerCard != null  and passengerCard != ''">and passenger_card = #{passengerCard}</if>
158 166
             <if test="passengerFlight != null  and passengerFlight != ''">and passenger_flight = #{passengerFlight}</if>
159 167
             <if test="inspectTeamId != null ">and inspect_team_id = #{inspectTeamId}</if>
160
-            <if test="inspectTeamName != null  and inspectTeamName != ''">and inspect_team_name like concat('%',
161
-                #{inspectTeamName}, '%')
168
+            <if test="inspectTeamName != null  and inspectTeamName != ''">and inspect_team_name like
169
+                concat('%', #{inspectTeamName}, '%')
162 170
             </if>
163 171
             <if test="inspectDepartmentId != null ">and inspect_department_id = #{inspectDepartmentId}</if>
164 172
             <if test="inspectDepartmentName != null  and inspectDepartmentName != ''">and inspect_department_name like
@@ -173,10 +181,18 @@
173 181
             <if test="passengerGenderDesc != null  and passengerGenderDesc != ''">and passenger_gender_desc =
174 182
                 #{passengerGenderDesc}
175 183
             </if>
176
-            <if test="inspectUserName != null  and inspectUserName != ''">and inspect_user_name like concat('%',
177
-                #{inspectUserName}, '%')
184
+            <if test="inspectUserName != null  and inspectUserName != ''">and inspect_user_name like
185
+                concat('%', #{inspectUserName}, '%')
178 186
             </if>
179 187
             <if test="processStatus != null  and processStatus != ''">and process_status = #{processStatus}</if>
188
+            <if test="attendanceBrigadeId != null ">and attendance_brigade_id = #{attendanceBrigadeId}</if>
189
+            <if test="attendanceBrigadeName != null  and attendanceBrigadeName != ''">and attendance_brigade_name like
190
+                concat('%', #{attendanceBrigadeName}, '%')
191
+            </if>
192
+            <if test="inspectBrigadeId != null ">and inspect_brigade_id = #{inspectBrigadeId}</if>
193
+            <if test="inspectBrigadeName != null  and inspectBrigadeName != ''">and inspect_brigade_name like
194
+                concat('%', #{inspectBrigadeName}, '%')
195
+            </if>
180 196
             <if test="beginTime !=null and endTime !=null ">
181 197
                 and seizure_time >= #{beginTime}
182 198
                 and seizure_time <![CDATA[ < ]]> date_add(#{endTime} , interval 1 day)
@@ -186,70 +202,70 @@
186 202
     </select>
187 203
 
188 204
     <select id="selectItemSeizureRecordListForExport" resultMap="ItemSeizureRecordExportResult">
189
-        SELECT 
190
-            isr.tenant_id,
191
-            isr.revision,
192
-            isr.create_by,
193
-            isr.create_time,
194
-            isr.update_by,
195
-            isr.update_time,
196
-            isr.inspect_user_id,
197
-            isr.channel_code,
198
-            isr.seizure_time,
199
-            isr.check_method,
200
-            isr.remark,
201
-            isr.attendance_id,
202
-            isr.id,
203
-            isr.attendance_team_id,
204
-            isr.attendance_team_name,
205
-            isr.attendance_department_id,
206
-            isr.attendance_department_name,
207
-            isr.attendance_station_id,
208
-            isr.attendance_station_name,
209
-            isr.channel_name,
210
-            isr.regional_code,
211
-            isr.regional_name,
212
-            isr.terminl_code,
213
-            isr.terminl_name,
214
-            isr.passenger_name,
215
-            isr.passenger_gender,
216
-            isr.passenger_card,
217
-            isr.passenger_flight,
218
-            isr.inspect_team_id,
219
-            isr.inspect_team_name,
220
-            isr.inspect_department_id,
221
-            isr.inspect_department_name,
222
-            isr.inspect_station_id,
223
-            isr.inspect_station_name,
224
-            isr.check_method_desc,
225
-            isr.passenger_gender_desc,
226
-            isr.inspect_user_name,
227
-            isr.process_status,
228
-            isi.id AS items_id,
229
-            isi.record_id,
230
-            isi.item_code,
231
-            isi.quantity,
232
-            isi.remark AS items_remark,
233
-            isi.check_position_code_one,
234
-            isi.is_active_concealment,
235
-            isi.check_position_code_two,
236
-            isi.check_position_specific,
237
-            isi.item_name,
238
-            isi.category_code_one,
239
-            isi.category_name_one,
240
-            isi.category_code_two,
241
-            isi.category_name_two,
242
-            isi.unit,
243
-            isi.check_position_name_one,
244
-            isi.check_position_name_two,
245
-            isi.unit_desc,
246
-            isi.handling_method,
247
-            isi.handling_method_desc,
248
-            isi.attachment_id,
249
-            isi.attachment_url,
250
-            isi.attachment_name,
251
-            isi.location,
252
-            isi.location_text
205
+        SELECT
206
+        isr.tenant_id,
207
+        isr.revision,
208
+        isr.create_by,
209
+        isr.create_time,
210
+        isr.update_by,
211
+        isr.update_time,
212
+        isr.inspect_user_id,
213
+        isr.channel_code,
214
+        isr.seizure_time,
215
+        isr.check_method,
216
+        isr.remark,
217
+        isr.attendance_id,
218
+        isr.id,
219
+        isr.attendance_team_id,
220
+        isr.attendance_team_name,
221
+        isr.attendance_department_id,
222
+        isr.attendance_department_name,
223
+        isr.attendance_station_id,
224
+        isr.attendance_station_name,
225
+        isr.channel_name,
226
+        isr.regional_code,
227
+        isr.regional_name,
228
+        isr.terminl_code,
229
+        isr.terminl_name,
230
+        isr.passenger_name,
231
+        isr.passenger_gender,
232
+        isr.passenger_card,
233
+        isr.passenger_flight,
234
+        isr.inspect_team_id,
235
+        isr.inspect_team_name,
236
+        isr.inspect_department_id,
237
+        isr.inspect_department_name,
238
+        isr.inspect_station_id,
239
+        isr.inspect_station_name,
240
+        isr.check_method_desc,
241
+        isr.passenger_gender_desc,
242
+        isr.inspect_user_name,
243
+        isr.process_status,
244
+        isi.id AS items_id,
245
+        isi.record_id,
246
+        isi.item_code,
247
+        isi.quantity,
248
+        isi.remark AS items_remark,
249
+        isi.check_position_code_one,
250
+        isi.is_active_concealment,
251
+        isi.check_position_code_two,
252
+        isi.check_position_specific,
253
+        isi.item_name,
254
+        isi.category_code_one,
255
+        isi.category_name_one,
256
+        isi.category_code_two,
257
+        isi.category_name_two,
258
+        isi.unit,
259
+        isi.check_position_name_one,
260
+        isi.check_position_name_two,
261
+        isi.unit_desc,
262
+        isi.handling_method,
263
+        isi.handling_method_desc,
264
+        isi.attachment_id,
265
+        isi.attachment_url,
266
+        isi.attachment_name,
267
+        isi.location,
268
+        isi.location_text
253 269
         FROM item_seizure_record isr
254 270
         LEFT JOIN item_seizure_items isi ON isi.record_id = isr.id
255 271
         <where>
@@ -269,33 +285,37 @@
269 285
                 isr.attendance_department_name like concat('%', #{attendanceDepartmentName}, '%')
270 286
             </if>
271 287
             <if test="attendanceStationId != null ">and isr.attendance_station_id = #{attendanceStationId}</if>
272
-            <if test="attendanceStationName != null  and attendanceStationName != ''">and isr.attendance_station_name like
273
-                concat('%', #{attendanceStationName}, '%')
288
+            <if test="attendanceStationName != null  and attendanceStationName != ''">and isr.attendance_station_name
289
+                like concat('%', #{attendanceStationName}, '%')
274 290
             </if>
275
-            <if test="channelName != null  and channelName != ''">and isr.channel_name like concat('%', #{channelName},
276
-                '%')
291
+            <if test="channelName != null  and channelName != ''">and isr.channel_name like
292
+                concat('%', #{channelName}, '%')
277 293
             </if>
278 294
             <if test="regionalCode != null ">and isr.regional_code = #{regionalCode}</if>
279
-            <if test="regionalName != null  and regionalName != ''">and isr.regional_name like concat('%', #{regionalName},
280
-                '%')
295
+            <if test="regionalName != null  and regionalName != ''">and isr.regional_name like
296
+                concat('%', #{regionalName}, '%')
281 297
             </if>
282 298
             <if test="terminlCode != null ">and isr.terminl_code = #{terminlCode}</if>
283
-            <if test="terminlName != null  and terminlName != ''">and isr.terminl_name like concat('%', #{terminlName},
284
-                '%')
299
+            <if test="terminlName != null  and terminlName != ''">and isr.terminl_name like
300
+                concat('%', #{terminlName}, '%')
285 301
             </if>
286
-            <if test="passengerName != null  and passengerName != ''">and isr.passenger_name like concat('%',
287
-                #{passengerName}, '%')
302
+            <if test="passengerName != null  and passengerName != ''">and isr.passenger_name like
303
+                concat('%', #{passengerName}, '%')
304
+            </if>
305
+            <if test="passengerGender != null  and passengerGender != ''">and isr.passenger_gender =
306
+                #{passengerGender}
288 307
             </if>
289
-            <if test="passengerGender != null  and passengerGender != ''">and isr.passenger_gender = #{passengerGender}</if>
290 308
             <if test="passengerCard != null  and passengerCard != ''">and isr.passenger_card = #{passengerCard}</if>
291
-            <if test="passengerFlight != null  and passengerFlight != ''">and isr.passenger_flight = #{passengerFlight}</if>
309
+            <if test="passengerFlight != null  and passengerFlight != ''">and isr.passenger_flight =
310
+                #{passengerFlight}
311
+            </if>
292 312
             <if test="inspectTeamId != null ">and isr.inspect_team_id = #{inspectTeamId}</if>
293
-            <if test="inspectTeamName != null  and inspectTeamName != ''">and isr.inspect_team_name like concat('%',
294
-                #{inspectTeamName}, '%')
313
+            <if test="inspectTeamName != null  and inspectTeamName != ''">and isr.inspect_team_name like
314
+                concat('%', #{inspectTeamName}, '%')
295 315
             </if>
296 316
             <if test="inspectDepartmentId != null ">and isr.inspect_department_id = #{inspectDepartmentId}</if>
297
-            <if test="inspectDepartmentName != null  and inspectDepartmentName != ''">and isr.inspect_department_name like
298
-                concat('%', #{inspectDepartmentName}, '%')
317
+            <if test="inspectDepartmentName != null  and inspectDepartmentName != ''">and isr.inspect_department_name
318
+                like concat('%', #{inspectDepartmentName}, '%')
299 319
             </if>
300 320
             <if test="inspectStationId != null ">and isr.inspect_station_id = #{inspectStationId}</if>
301 321
             <if test="inspectStationName != null  and inspectStationName != ''">and isr.inspect_station_name like
@@ -306,8 +326,8 @@
306 326
             <if test="passengerGenderDesc != null  and passengerGenderDesc != ''">and isr.passenger_gender_desc =
307 327
                 #{passengerGenderDesc}
308 328
             </if>
309
-            <if test="inspectUserName != null  and inspectUserName != ''">and isr.inspect_user_name like concat('%',
310
-                #{inspectUserName}, '%')
329
+            <if test="inspectUserName != null  and inspectUserName != ''">and isr.inspect_user_name like
330
+                concat('%', #{inspectUserName}, '%')
311 331
             </if>
312 332
             <if test="processStatus != null  and processStatus != ''">and isr.process_status = #{processStatus}</if>
313 333
             <if test="beginTime !=null and endTime !=null ">
@@ -363,6 +383,11 @@
363 383
             <if test="checkMethodDesc != null and checkMethodDesc != ''">check_method_desc,</if>
364 384
             <if test="passengerGenderDesc != null and passengerGenderDesc != ''">passenger_gender_desc,</if>
365 385
             <if test="inspectUserName != null and inspectUserName != ''">inspect_user_name,</if>
386
+            <if test="processStatus != null">process_status,</if>
387
+            <if test="attendanceBrigadeId != null">attendance_brigade_id,</if>
388
+            <if test="attendanceBrigadeName != null">attendance_brigade_name,</if>
389
+            <if test="inspectBrigadeId != null">inspect_brigade_id,</if>
390
+            <if test="inspectBrigadeName != null">inspect_brigade_name,</if>
366 391
         </trim>
367 392
         <trim prefix="values (" suffix=")" suffixOverrides=",">
368 393
             <if test="tenantId != null">#{tenantId},</if>
@@ -403,6 +428,11 @@
403 428
             <if test="checkMethodDesc != null and checkMethodDesc != ''">#{checkMethodDesc},</if>
404 429
             <if test="passengerGenderDesc != null and passengerGenderDesc != ''">#{passengerGenderDesc},</if>
405 430
             <if test="inspectUserName != null and inspectUserName != ''">#{inspectUserName},</if>
431
+            <if test="processStatus != null">#{processStatus},</if>
432
+            <if test="attendanceBrigadeId != null">#{attendanceBrigadeId},</if>
433
+            <if test="attendanceBrigadeName != null">#{attendanceBrigadeName},</if>
434
+            <if test="inspectBrigadeId != null">#{inspectBrigadeId},</if>
435
+            <if test="inspectBrigadeName != null">#{inspectBrigadeName},</if>
406 436
         </trim>
407 437
     </insert>
408 438
 
@@ -457,6 +487,11 @@
457 487
                 #{passengerGenderDesc},
458 488
             </if>
459 489
             <if test="inspectUserName != null and inspectUserName != ''">inspect_user_name = #{inspectUserName},</if>
490
+            <if test="processStatus != null">process_status = #{processStatus},</if>
491
+            <if test="attendanceBrigadeId != null">attendance_brigade_id = #{attendanceBrigadeId},</if>
492
+            <if test="attendanceBrigadeName != null">attendance_brigade_name = #{attendanceBrigadeName},</if>
493
+            <if test="inspectBrigadeId != null">inspect_brigade_id = #{inspectBrigadeId},</if>
494
+            <if test="inspectBrigadeName != null">inspect_brigade_name = #{inspectBrigadeName},</if>
460 495
         </trim>
461 496
         where id = #{id}
462 497
     </update>