Преглед изворни кода

草稿箱填写相关查获信息后,需要反写到语音后台

simonlll пре 4 месеци
родитељ
комит
ed96999c26

+ 32 - 0
.gitignore

@@ -51,6 +51,38 @@ CLAUDE.md
51 51
 *.curl
52 52
 nul
53 53
 
54
+######################################################################
55
+# Project-specific ignores
56
+
57
+# Documentation files
58
+.claude/
59
+docs/
60
+DEPLOY-HAIKOU.md
61
+FailedMatchItem-API-DOC.md
62
+HAIKOU-DEPLOYMENT-README.md
63
+README_DAILY_EXAM_INTEGRATION.md
64
+安检分级质控系统云服务信息安全保障方案.md
65
+安检分级质控系统信息安全保障说明书(精简版).md
66
+安检分级质控系统信息安全说明文档.md
67
+
68
+# Configuration and deployment scripts
69
+application-haikou.yml
70
+deploy-haikou.sh
71
+nginx-dual-env.conf
72
+nginx.conf.new
73
+
74
+# SQL scripts
75
+create_tables.sql
76
+debug_query.sql
77
+sql/add_department_fields_to_daily_task.sql
78
+sql/daily_question_answer.sql
79
+sql/edu_cs_weak_module_rule.sql
80
+sql/quartz_daily_task_expire_job.sql
81
+
82
+# Testing and utilities
83
+postman/
84
+stress-test/
85
+
54 86
 !*/build/*.java
55 87
 !*/build/*.html
56 88
 !*/build/*.xml

+ 224 - 0
airport-admin/src/main/java/com/sundot/airport/web/controller/item/FailedMatchItemController.java

@@ -0,0 +1,224 @@
1
+package com.sundot.airport.web.controller.item;
2
+
3
+import java.util.List;
4
+import java.util.Map;
5
+import javax.servlet.http.HttpServletResponse;
6
+
7
+import com.github.pagehelper.PageInfo;
8
+import com.sundot.airport.system.domain.SysPost;
9
+import com.sundot.airport.system.domain.BasePosition;
10
+import com.sundot.airport.system.service.ISysPostService;
11
+import com.sundot.airport.system.service.IBasePositionService;
12
+import org.springframework.security.access.prepost.PreAuthorize;
13
+import org.springframework.beans.factory.annotation.Autowired;
14
+import org.springframework.web.bind.annotation.*;
15
+import com.sundot.airport.common.annotation.Log;
16
+import com.sundot.airport.common.core.controller.BaseController;
17
+import com.sundot.airport.common.core.domain.AjaxResult;
18
+import com.sundot.airport.common.enums.BusinessType;
19
+import com.sundot.airport.item.domain.FailedMatchItem;
20
+import com.sundot.airport.item.service.IFailedMatchItemService;
21
+import com.sundot.airport.common.utils.poi.ExcelUtil;
22
+import com.sundot.airport.common.core.page.TableDataInfo;
23
+
24
+/**
25
+ * 匹配失败物品Controller
26
+ *
27
+ * @author airport
28
+ * @date 2025-11-21
29
+ */
30
+@RestController
31
+@RequestMapping("/item/failedMatch")
32
+public class FailedMatchItemController extends BaseController {
33
+    @Autowired
34
+    private IFailedMatchItemService failedMatchItemService;
35
+
36
+    @Autowired
37
+    private ISysPostService sysPostService;
38
+
39
+    @Autowired
40
+    private IBasePositionService basePositionService;
41
+
42
+    /**
43
+     * 查询当前用户的匹配失败物品列表(分页)
44
+     * 只查询未编辑的记录(app_edited=0或null)
45
+     */
46
+    @GetMapping("/myList")
47
+    public TableDataInfo getMyList(FailedMatchItem failedMatchItem) {
48
+        // 获取当前登录用户ID
49
+        Long currentUserId = getUserId();
50
+
51
+        // 设置查询条件为当前用户ID
52
+        failedMatchItem.setUserId(currentUserId);
53
+
54
+        // 只查询未编辑的记录(app_edited=0或null)
55
+        failedMatchItem.setAppEdited(false);
56
+
57
+        // 开启分页
58
+        startPage();
59
+
60
+        // 查询列表(按 update_time 降序排列)
61
+        List<FailedMatchItem> list = failedMatchItemService.selectFailedMatchItemList(failedMatchItem);
62
+
63
+        return getDataTable(list);
64
+    }
65
+
66
+    /**
67
+     * 查询匹配失败物品列表(管理员)
68
+     */
69
+    @PreAuthorize("@ss.hasPermi('item:failedMatch:list')")
70
+    @GetMapping("/list")
71
+    public TableDataInfo list(FailedMatchItem failedMatchItem) {
72
+        startPage();
73
+        List<FailedMatchItem> list = failedMatchItemService.selectFailedMatchItemList(failedMatchItem);
74
+        return getDataTable(list);
75
+    }
76
+
77
+    /**
78
+     * 导出匹配失败物品列表
79
+     */
80
+    @PreAuthorize("@ss.hasPermi('item:failedMatch:export')")
81
+    @Log(title = "匹配失败物品", businessType = BusinessType.EXPORT)
82
+    @PostMapping("/export")
83
+    public void export(HttpServletResponse response, FailedMatchItem failedMatchItem) {
84
+        List<FailedMatchItem> list = failedMatchItemService.selectFailedMatchItemList(failedMatchItem);
85
+        ExcelUtil<FailedMatchItem> util = new ExcelUtil<FailedMatchItem>(FailedMatchItem.class);
86
+        util.exportExcel(response, list, "匹配失败物品数据");
87
+    }
88
+
89
+    /**
90
+     * 获取匹配失败物品详细信息
91
+     */
92
+    @GetMapping(value = "/{id}")
93
+    public AjaxResult getInfo(@PathVariable("id") Integer id) {
94
+        return success(failedMatchItemService.selectFailedMatchItemById(id));
95
+    }
96
+
97
+    /**
98
+     * 新增匹配失败物品
99
+     */
100
+    @PreAuthorize("@ss.hasPermi('item:failedMatch:add')")
101
+    @Log(title = "匹配失败物品", businessType = BusinessType.INSERT)
102
+    @PostMapping
103
+    public AjaxResult add(@RequestBody FailedMatchItem failedMatchItem) {
104
+        return toAjax(failedMatchItemService.insertFailedMatchItem(failedMatchItem));
105
+    }
106
+
107
+    /**
108
+     * 修改匹配失败物品
109
+     */
110
+    @PreAuthorize("@ss.hasPermi('item:failedMatch:edit')")
111
+    @Log(title = "匹配失败物品", businessType = BusinessType.UPDATE)
112
+    @PutMapping
113
+    public AjaxResult edit(@RequestBody FailedMatchItem failedMatchItem) {
114
+        return toAjax(failedMatchItemService.updateFailedMatchItem(failedMatchItem));
115
+    }
116
+
117
+    /**
118
+     * 标记匹配失败物品为已编辑(App端提交后调用)
119
+     */
120
+    @Log(title = "标记匹配失败物品为已编辑", businessType = BusinessType.UPDATE)
121
+    @PutMapping("/markEdited/{id}")
122
+    public AjaxResult markEdited(@PathVariable Integer id, @RequestBody Map<String, Object> params) {
123
+        // 创建更新对象
124
+        FailedMatchItem failedMatchItem = new FailedMatchItem();
125
+        failedMatchItem.setId(id);
126
+
127
+        // 设置基本字段
128
+        if (params.containsKey("name")) {
129
+            failedMatchItem.setName(params.get("name").toString());
130
+        }
131
+        if (params.containsKey("categoryCode")) {
132
+            failedMatchItem.setCategoryCode(params.get("categoryCode").toString());
133
+        }
134
+        if (params.containsKey("categoryName")) {
135
+            failedMatchItem.setCategoryName(params.get("categoryName").toString());
136
+        }
137
+        if (params.containsKey("extractedQuantity")) {
138
+            failedMatchItem.setExtractedQuantity(params.get("extractedQuantity").toString());
139
+        }
140
+        if (params.containsKey("extractedLocation")) {
141
+            failedMatchItem.setExtractedLocation(params.get("extractedLocation").toString());
142
+        }
143
+        if (params.containsKey("teamId")) {
144
+            failedMatchItem.setTeamId(Long.valueOf(params.get("teamId").toString()));
145
+        }
146
+        if (params.containsKey("teamName")) {
147
+            failedMatchItem.setTeamName(params.get("teamName").toString());
148
+        }
149
+        if (params.containsKey("checkPointId")) {
150
+            failedMatchItem.setCheckPointId(Integer.valueOf(params.get("checkPointId").toString()));
151
+        }
152
+        if (params.containsKey("checkPointName")) {
153
+            failedMatchItem.setCheckPointName(params.get("checkPointName").toString());
154
+        }
155
+
156
+        // 处理 postCode:通过 postCode 查询 sys_post 表获取 position_id 和 position_name
157
+        if (params.containsKey("postCode")) {
158
+            String postCode = params.get("postCode").toString();
159
+            SysPost post = new SysPost();
160
+            post.setPostCode(postCode);
161
+            List<SysPost> postList = sysPostService.selectPostList(post);
162
+            if (postList != null && !postList.isEmpty()) {
163
+                SysPost foundPost = postList.get(0);
164
+                failedMatchItem.setPositionId(foundPost.getPostId());
165
+                failedMatchItem.setPositionName(foundPost.getPostName());
166
+            }
167
+        }
168
+
169
+        // 处理查获位置三层结构:航站楼、区域、通道
170
+        // terminalId, regionalId, channelId 前端传的是 base_position 的 code 字段
171
+        // 需要查询 base_position 表获取对应的 id 和 name
172
+        if (params.containsKey("terminalId") && params.get("terminalId") != null && !params.get("terminalId").toString().isEmpty()) {
173
+            String terminalCode = params.get("terminalId").toString();
174
+            BasePosition terminalQuery = new BasePosition();
175
+            terminalQuery.setCode(terminalCode);
176
+            List<BasePosition> terminalList = basePositionService.selectBasePositionList(terminalQuery);
177
+            if (terminalList != null && !terminalList.isEmpty()) {
178
+                BasePosition terminal = terminalList.get(0);
179
+                failedMatchItem.setTerminalId(terminal.getId());
180
+                failedMatchItem.setTerminalName(terminal.getName());
181
+            }
182
+        }
183
+
184
+        if (params.containsKey("regionalId") && params.get("regionalId") != null && !params.get("regionalId").toString().isEmpty()) {
185
+            String regionalCode = params.get("regionalId").toString();
186
+            BasePosition regionalQuery = new BasePosition();
187
+            regionalQuery.setCode(regionalCode);
188
+            List<BasePosition> regionalList = basePositionService.selectBasePositionList(regionalQuery);
189
+            if (regionalList != null && !regionalList.isEmpty()) {
190
+                BasePosition regional = regionalList.get(0);
191
+                failedMatchItem.setRegionalId(regional.getId());
192
+                failedMatchItem.setRegionalName(regional.getName());
193
+            }
194
+        }
195
+
196
+        if (params.containsKey("channelId") && params.get("channelId") != null && !params.get("channelId").toString().isEmpty()) {
197
+            String channelCode = params.get("channelId").toString();
198
+            BasePosition channelQuery = new BasePosition();
199
+            channelQuery.setCode(channelCode);
200
+            List<BasePosition> channelList = basePositionService.selectBasePositionList(channelQuery);
201
+            if (channelList != null && !channelList.isEmpty()) {
202
+                BasePosition channel = channelList.get(0);
203
+                failedMatchItem.setChannelId(channel.getId());
204
+                failedMatchItem.setChannelName(channel.getName());
205
+            }
206
+        }
207
+
208
+        // 标记为已编辑
209
+        failedMatchItem.setAppEdited(true);
210
+
211
+        // 更新记录
212
+        return toAjax(failedMatchItemService.updateFailedMatchItem(failedMatchItem));
213
+    }
214
+
215
+    /**
216
+     * 删除匹配失败物品
217
+     */
218
+//    @PreAuthorize("@ss.hasPermi('item:failedMatch:remove')")
219
+    @Log(title = "匹配失败物品", businessType = BusinessType.DELETE)
220
+    @DeleteMapping("/{ids}")
221
+    public AjaxResult remove(@PathVariable Integer[] ids) {
222
+        return toAjax(failedMatchItemService.deleteFailedMatchItemByIds(ids));
223
+    }
224
+}

+ 1 - 1
airport-admin/src/main/java/com/sundot/airport/web/controller/system/SysAppController.java

@@ -114,7 +114,7 @@ public class SysAppController extends BaseController {
114 114
      * 移动端查询全部应用列表
115 115
      * homePage:0-非首页应用;1-首页应用
116 116
      */
117
-    @PreAuthorize("@ss.hasPermi('system:app:list')")
117
+//    @PreAuthorize("@ss.hasPermi('system:app:list')")
118 118
     @GetMapping("/listBy")
119 119
     public AjaxResult listBy(SysApp sysApp) {
120 120
         List<SysApp> list = sysAppService.listBy(sysApp);

+ 1 - 1
airport-admin/src/main/resources/application.yml

@@ -84,7 +84,7 @@ spring:
84 84
     # 数据库索引
85 85
     database: 2
86 86
     # 密码
87
-    password: Qwer+1234
87
+#    password: Qwer+1234
88 88
     # 连接超时时间
89 89
     timeout: 10s
90 90
     lettuce:

+ 573 - 0
airport-item/src/main/java/com/sundot/airport/item/domain/FailedMatchItem.java

@@ -0,0 +1,573 @@
1
+package com.sundot.airport.item.domain;
2
+
3
+import java.util.Date;
4
+import com.baomidou.mybatisplus.annotation.IdType;
5
+import com.baomidou.mybatisplus.annotation.TableId;
6
+import com.baomidou.mybatisplus.annotation.TableName;
7
+import com.fasterxml.jackson.annotation.JsonFormat;
8
+import org.apache.commons.lang3.builder.ToStringBuilder;
9
+import org.apache.commons.lang3.builder.ToStringStyle;
10
+import com.sundot.airport.common.annotation.Excel;
11
+import com.sundot.airport.common.core.domain.BaseEntity;
12
+
13
+/**
14
+ * 匹配失败物品对象 failed_match_item
15
+ *
16
+ * @author airport
17
+ * @date 2025-11-21
18
+ */
19
+@TableName("failed_match_item")
20
+public class FailedMatchItem extends BaseEntity {
21
+    private static final long serialVersionUID = 1L;
22
+
23
+    /** 主键 */
24
+    @TableId(type = IdType.AUTO)
25
+    private Integer id;
26
+
27
+    /** 租户号 */
28
+    private String tenantId;
29
+
30
+    /** 乐观锁 */
31
+    private Integer revision;
32
+
33
+    /** 物品名称 */
34
+    @Excel(name = "物品名称")
35
+    private String name;
36
+
37
+    /** 编码 */
38
+    @Excel(name = "编码")
39
+    private String code;
40
+
41
+    /** 分类编码 */
42
+    @Excel(name = "分类编码")
43
+    private String categoryCode;
44
+
45
+    /** 分类名称 */
46
+    @Excel(name = "分类名称")
47
+    private String categoryName;
48
+
49
+    /** 危险等级 */
50
+    @Excel(name = "危险等级", readConverterExp = "LOW=低,MEDIUM=中,HIGH=高")
51
+    private String dangerLevel;
52
+
53
+    /** 危险等级名称 */
54
+    @Excel(name = "危险等级名称")
55
+    private String dangerLevelDesc;
56
+
57
+    /** 用户ID */
58
+    @Excel(name = "用户ID")
59
+    private Long userId;
60
+
61
+    /** 用户姓名 */
62
+    @Excel(name = "用户姓名")
63
+    private String userName;
64
+
65
+    /** 岗位ID */
66
+    private Long positionId;
67
+
68
+    /** 岗位名称 */
69
+    @Excel(name = "岗位名称")
70
+    private String positionName;
71
+
72
+    /** 完整岗位路径 */
73
+    private String fullPositionPath;
74
+
75
+    /** 班组ID */
76
+    private Long teamId;
77
+
78
+    /** 班组名称 */
79
+    @Excel(name = "班组名称")
80
+    private String teamName;
81
+
82
+    /** 岗位字典编码 */
83
+    private Long postDictCode;
84
+
85
+    /** 岗位标签 */
86
+    @Excel(name = "岗位标签")
87
+    private String postLabel;
88
+
89
+    /** 航站楼ID */
90
+    private Long terminalId;
91
+
92
+    /** 航站楼名称 */
93
+    @Excel(name = "航站楼")
94
+    private String terminalName;
95
+
96
+    /** 区域ID */
97
+    private Long regionalId;
98
+
99
+    /** 区域名称 */
100
+    @Excel(name = "区域")
101
+    private String regionalName;
102
+
103
+    /** 通道ID */
104
+    private Long channelId;
105
+
106
+    /** 通道名称 */
107
+    @Excel(name = "通道")
108
+    private String channelName;
109
+
110
+    /** 音频文件路径 */
111
+    private String audioFilePath;
112
+
113
+    /** 音频文件大小 */
114
+    private Long audioFileSize;
115
+
116
+    /** 音频格式 */
117
+    private String audioFormat;
118
+
119
+    /** 是否匹配 */
120
+    private Boolean isMatched;
121
+
122
+    /** 匹配文本 */
123
+    private String matchedText;
124
+
125
+    /** 原始文本 */
126
+    @Excel(name = "原始文本")
127
+    private String originalText;
128
+
129
+    /** 纠正后的文本 */
130
+    private String correctedText;
131
+
132
+    /** 纠正是否已保存 */
133
+    private Boolean correctedSaved;
134
+
135
+    /** app端已编辑 */
136
+    @Excel(name = "app端已编辑", readConverterExp = "0=未编辑,1=已编辑")
137
+    private Boolean appEdited;
138
+
139
+    /** 纠正记录ID */
140
+    private Long correctedRecordId;
141
+
142
+    /** 纠正保存时间 */
143
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
144
+    private Date correctedSaveTime;
145
+
146
+    /** 提取的位置 */
147
+    private String extractedLocation;
148
+
149
+    /** 提取的数量 */
150
+    private String extractedQuantity;
151
+
152
+    /** 处理时间(毫秒) */
153
+    private Long processingTimeMs;
154
+
155
+    /** 相似度分数 */
156
+    private Double similarityScore;
157
+
158
+    /** 来源类型 */
159
+    @Excel(name = "来源类型")
160
+    private String sourceType;
161
+
162
+    /** 关联的位置关键词ID */
163
+    private Long locationKeywordId;
164
+
165
+    /** 关联的违禁品关键词ID */
166
+    private Long prohibitedItemKeywordId;
167
+
168
+    /** 关联的违禁品类别ID */
169
+    private Long prohibitedItemCategoryId;
170
+
171
+    /** 查获位置ID */
172
+    @Excel(name = "查获位置ID")
173
+    private Integer checkPointId;
174
+
175
+    /** 查获位置名称 */
176
+    @Excel(name = "查获位置名称")
177
+    private String checkPointName;
178
+
179
+    public Integer getId() {
180
+        return id;
181
+    }
182
+
183
+    public void setId(Integer id) {
184
+        this.id = id;
185
+    }
186
+
187
+    public String getTenantId() {
188
+        return tenantId;
189
+    }
190
+
191
+    public void setTenantId(String tenantId) {
192
+        this.tenantId = tenantId;
193
+    }
194
+
195
+    public Integer getRevision() {
196
+        return revision;
197
+    }
198
+
199
+    public void setRevision(Integer revision) {
200
+        this.revision = revision;
201
+    }
202
+
203
+    public String getName() {
204
+        return name;
205
+    }
206
+
207
+    public void setName(String name) {
208
+        this.name = name;
209
+    }
210
+
211
+    public String getCode() {
212
+        return code;
213
+    }
214
+
215
+    public void setCode(String code) {
216
+        this.code = code;
217
+    }
218
+
219
+    public String getCategoryCode() {
220
+        return categoryCode;
221
+    }
222
+
223
+    public void setCategoryCode(String categoryCode) {
224
+        this.categoryCode = categoryCode;
225
+    }
226
+
227
+    public String getCategoryName() {
228
+        return categoryName;
229
+    }
230
+
231
+    public void setCategoryName(String categoryName) {
232
+        this.categoryName = categoryName;
233
+    }
234
+
235
+    public String getDangerLevel() {
236
+        return dangerLevel;
237
+    }
238
+
239
+    public void setDangerLevel(String dangerLevel) {
240
+        this.dangerLevel = dangerLevel;
241
+    }
242
+
243
+    public String getDangerLevelDesc() {
244
+        return dangerLevelDesc;
245
+    }
246
+
247
+    public void setDangerLevelDesc(String dangerLevelDesc) {
248
+        this.dangerLevelDesc = dangerLevelDesc;
249
+    }
250
+
251
+    public Long getUserId() {
252
+        return userId;
253
+    }
254
+
255
+    public void setUserId(Long userId) {
256
+        this.userId = userId;
257
+    }
258
+
259
+    public String getUserName() {
260
+        return userName;
261
+    }
262
+
263
+    public void setUserName(String userName) {
264
+        this.userName = userName;
265
+    }
266
+
267
+    public Long getPositionId() {
268
+        return positionId;
269
+    }
270
+
271
+    public void setPositionId(Long positionId) {
272
+        this.positionId = positionId;
273
+    }
274
+
275
+    public String getPositionName() {
276
+        return positionName;
277
+    }
278
+
279
+    public void setPositionName(String positionName) {
280
+        this.positionName = positionName;
281
+    }
282
+
283
+    public String getFullPositionPath() {
284
+        return fullPositionPath;
285
+    }
286
+
287
+    public void setFullPositionPath(String fullPositionPath) {
288
+        this.fullPositionPath = fullPositionPath;
289
+    }
290
+
291
+    public Long getTeamId() {
292
+        return teamId;
293
+    }
294
+
295
+    public void setTeamId(Long teamId) {
296
+        this.teamId = teamId;
297
+    }
298
+
299
+    public String getTeamName() {
300
+        return teamName;
301
+    }
302
+
303
+    public void setTeamName(String teamName) {
304
+        this.teamName = teamName;
305
+    }
306
+
307
+    public Long getPostDictCode() {
308
+        return postDictCode;
309
+    }
310
+
311
+    public void setPostDictCode(Long postDictCode) {
312
+        this.postDictCode = postDictCode;
313
+    }
314
+
315
+    public String getPostLabel() {
316
+        return postLabel;
317
+    }
318
+
319
+    public void setPostLabel(String postLabel) {
320
+        this.postLabel = postLabel;
321
+    }
322
+
323
+    public Long getTerminalId() {
324
+        return terminalId;
325
+    }
326
+
327
+    public void setTerminalId(Long terminalId) {
328
+        this.terminalId = terminalId;
329
+    }
330
+
331
+    public String getTerminalName() {
332
+        return terminalName;
333
+    }
334
+
335
+    public void setTerminalName(String terminalName) {
336
+        this.terminalName = terminalName;
337
+    }
338
+
339
+    public Long getRegionalId() {
340
+        return regionalId;
341
+    }
342
+
343
+    public void setRegionalId(Long regionalId) {
344
+        this.regionalId = regionalId;
345
+    }
346
+
347
+    public String getRegionalName() {
348
+        return regionalName;
349
+    }
350
+
351
+    public void setRegionalName(String regionalName) {
352
+        this.regionalName = regionalName;
353
+    }
354
+
355
+    public Long getChannelId() {
356
+        return channelId;
357
+    }
358
+
359
+    public void setChannelId(Long channelId) {
360
+        this.channelId = channelId;
361
+    }
362
+
363
+    public String getChannelName() {
364
+        return channelName;
365
+    }
366
+
367
+    public void setChannelName(String channelName) {
368
+        this.channelName = channelName;
369
+    }
370
+
371
+    public String getAudioFilePath() {
372
+        return audioFilePath;
373
+    }
374
+
375
+    public void setAudioFilePath(String audioFilePath) {
376
+        this.audioFilePath = audioFilePath;
377
+    }
378
+
379
+    public Long getAudioFileSize() {
380
+        return audioFileSize;
381
+    }
382
+
383
+    public void setAudioFileSize(Long audioFileSize) {
384
+        this.audioFileSize = audioFileSize;
385
+    }
386
+
387
+    public String getAudioFormat() {
388
+        return audioFormat;
389
+    }
390
+
391
+    public void setAudioFormat(String audioFormat) {
392
+        this.audioFormat = audioFormat;
393
+    }
394
+
395
+    public Boolean getIsMatched() {
396
+        return isMatched;
397
+    }
398
+
399
+    public void setIsMatched(Boolean isMatched) {
400
+        this.isMatched = isMatched;
401
+    }
402
+
403
+    public String getMatchedText() {
404
+        return matchedText;
405
+    }
406
+
407
+    public void setMatchedText(String matchedText) {
408
+        this.matchedText = matchedText;
409
+    }
410
+
411
+    public String getOriginalText() {
412
+        return originalText;
413
+    }
414
+
415
+    public void setOriginalText(String originalText) {
416
+        this.originalText = originalText;
417
+    }
418
+
419
+    public String getCorrectedText() {
420
+        return correctedText;
421
+    }
422
+
423
+    public void setCorrectedText(String correctedText) {
424
+        this.correctedText = correctedText;
425
+    }
426
+
427
+    public Boolean getCorrectedSaved() {
428
+        return correctedSaved;
429
+    }
430
+
431
+    public void setCorrectedSaved(Boolean correctedSaved) {
432
+        this.correctedSaved = correctedSaved;
433
+    }
434
+
435
+    public Boolean getAppEdited() {
436
+        return appEdited;
437
+    }
438
+
439
+    public void setAppEdited(Boolean appEdited) {
440
+        this.appEdited = appEdited;
441
+    }
442
+
443
+    public Long getCorrectedRecordId() {
444
+        return correctedRecordId;
445
+    }
446
+
447
+    public void setCorrectedRecordId(Long correctedRecordId) {
448
+        this.correctedRecordId = correctedRecordId;
449
+    }
450
+
451
+    public Date getCorrectedSaveTime() {
452
+        return correctedSaveTime;
453
+    }
454
+
455
+    public void setCorrectedSaveTime(Date correctedSaveTime) {
456
+        this.correctedSaveTime = correctedSaveTime;
457
+    }
458
+
459
+    public String getExtractedLocation() {
460
+        return extractedLocation;
461
+    }
462
+
463
+    public void setExtractedLocation(String extractedLocation) {
464
+        this.extractedLocation = extractedLocation;
465
+    }
466
+
467
+    public String getExtractedQuantity() {
468
+        return extractedQuantity;
469
+    }
470
+
471
+    public void setExtractedQuantity(String extractedQuantity) {
472
+        this.extractedQuantity = extractedQuantity;
473
+    }
474
+
475
+    public Long getProcessingTimeMs() {
476
+        return processingTimeMs;
477
+    }
478
+
479
+    public void setProcessingTimeMs(Long processingTimeMs) {
480
+        this.processingTimeMs = processingTimeMs;
481
+    }
482
+
483
+    public Double getSimilarityScore() {
484
+        return similarityScore;
485
+    }
486
+
487
+    public void setSimilarityScore(Double similarityScore) {
488
+        this.similarityScore = similarityScore;
489
+    }
490
+
491
+    public String getSourceType() {
492
+        return sourceType;
493
+    }
494
+
495
+    public void setSourceType(String sourceType) {
496
+        this.sourceType = sourceType;
497
+    }
498
+
499
+    public Long getLocationKeywordId() {
500
+        return locationKeywordId;
501
+    }
502
+
503
+    public void setLocationKeywordId(Long locationKeywordId) {
504
+        this.locationKeywordId = locationKeywordId;
505
+    }
506
+
507
+    public Long getProhibitedItemKeywordId() {
508
+        return prohibitedItemKeywordId;
509
+    }
510
+
511
+    public void setProhibitedItemKeywordId(Long prohibitedItemKeywordId) {
512
+        this.prohibitedItemKeywordId = prohibitedItemKeywordId;
513
+    }
514
+
515
+    public Long getProhibitedItemCategoryId() {
516
+        return prohibitedItemCategoryId;
517
+    }
518
+
519
+    public void setProhibitedItemCategoryId(Long prohibitedItemCategoryId) {
520
+        this.prohibitedItemCategoryId = prohibitedItemCategoryId;
521
+    }
522
+
523
+    public Integer getCheckPointId() {
524
+        return checkPointId;
525
+    }
526
+
527
+    public void setCheckPointId(Integer checkPointId) {
528
+        this.checkPointId = checkPointId;
529
+    }
530
+
531
+    public String getCheckPointName() {
532
+        return checkPointName;
533
+    }
534
+
535
+    public void setCheckPointName(String checkPointName) {
536
+        this.checkPointName = checkPointName;
537
+    }
538
+
539
+    @Override
540
+    public String toString() {
541
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
542
+                .append("id", getId())
543
+                .append("tenantId", getTenantId())
544
+                .append("revision", getRevision())
545
+                .append("createBy", getCreateBy())
546
+                .append("createTime", getCreateTime())
547
+                .append("updateBy", getUpdateBy())
548
+                .append("updateTime", getUpdateTime())
549
+                .append("name", getName())
550
+                .append("code", getCode())
551
+                .append("categoryCode", getCategoryCode())
552
+                .append("categoryName", getCategoryName())
553
+                .append("dangerLevel", getDangerLevel())
554
+                .append("dangerLevelDesc", getDangerLevelDesc())
555
+                .append("userId", getUserId())
556
+                .append("userName", getUserName())
557
+                .append("positionId", getPositionId())
558
+                .append("positionName", getPositionName())
559
+                .append("fullPositionPath", getFullPositionPath())
560
+                .append("teamId", getTeamId())
561
+                .append("teamName", getTeamName())
562
+                .append("postDictCode", getPostDictCode())
563
+                .append("postLabel", getPostLabel())
564
+                .append("terminalId", getTerminalId())
565
+                .append("terminalName", getTerminalName())
566
+                .append("regionalId", getRegionalId())
567
+                .append("regionalName", getRegionalName())
568
+                .append("channelId", getChannelId())
569
+                .append("channelName", getChannelName())
570
+                .append("remark", getRemark())
571
+                .toString();
572
+    }
573
+}

+ 69 - 0
airport-item/src/main/java/com/sundot/airport/item/mapper/FailedMatchItemMapper.java

@@ -0,0 +1,69 @@
1
+package com.sundot.airport.item.mapper;
2
+
3
+import java.util.List;
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+import com.sundot.airport.item.domain.FailedMatchItem;
6
+
7
+/**
8
+ * 匹配失败物品Mapper接口
9
+ *
10
+ * @author airport
11
+ * @date 2025-11-21
12
+ */
13
+public interface FailedMatchItemMapper extends BaseMapper<FailedMatchItem> {
14
+    /**
15
+     * 查询匹配失败物品
16
+     *
17
+     * @param id 匹配失败物品主键
18
+     * @return 匹配失败物品
19
+     */
20
+    public FailedMatchItem selectFailedMatchItemById(Integer id);
21
+
22
+    /**
23
+     * 查询匹配失败物品列表
24
+     *
25
+     * @param failedMatchItem 匹配失败物品
26
+     * @return 匹配失败物品集合
27
+     */
28
+    public List<FailedMatchItem> selectFailedMatchItemList(FailedMatchItem failedMatchItem);
29
+
30
+    /**
31
+     * 根据用户ID查询匹配失败物品列表(按更新时间降序)
32
+     *
33
+     * @param userId 用户ID
34
+     * @return 匹配失败物品集合
35
+     */
36
+    public List<FailedMatchItem> selectFailedMatchItemListByUserId(Long userId);
37
+
38
+    /**
39
+     * 新增匹配失败物品
40
+     *
41
+     * @param failedMatchItem 匹配失败物品
42
+     * @return 结果
43
+     */
44
+    public int insertFailedMatchItem(FailedMatchItem failedMatchItem);
45
+
46
+    /**
47
+     * 修改匹配失败物品
48
+     *
49
+     * @param failedMatchItem 匹配失败物品
50
+     * @return 结果
51
+     */
52
+    public int updateFailedMatchItem(FailedMatchItem failedMatchItem);
53
+
54
+    /**
55
+     * 删除匹配失败物品
56
+     *
57
+     * @param id 匹配失败物品主键
58
+     * @return 结果
59
+     */
60
+    public int deleteFailedMatchItemById(Integer id);
61
+
62
+    /**
63
+     * 批量删除匹配失败物品
64
+     *
65
+     * @param ids 需要删除的数据主键集合
66
+     * @return 结果
67
+     */
68
+    public int deleteFailedMatchItemByIds(Integer[] ids);
69
+}

+ 69 - 0
airport-item/src/main/java/com/sundot/airport/item/service/IFailedMatchItemService.java

@@ -0,0 +1,69 @@
1
+package com.sundot.airport.item.service;
2
+
3
+import java.util.List;
4
+import com.baomidou.mybatisplus.extension.service.IService;
5
+import com.sundot.airport.item.domain.FailedMatchItem;
6
+
7
+/**
8
+ * 匹配失败物品Service接口
9
+ *
10
+ * @author airport
11
+ * @date 2025-11-21
12
+ */
13
+public interface IFailedMatchItemService extends IService<FailedMatchItem> {
14
+    /**
15
+     * 查询匹配失败物品
16
+     *
17
+     * @param id 匹配失败物品主键
18
+     * @return 匹配失败物品
19
+     */
20
+    public FailedMatchItem selectFailedMatchItemById(Integer id);
21
+
22
+    /**
23
+     * 查询匹配失败物品列表
24
+     *
25
+     * @param failedMatchItem 匹配失败物品
26
+     * @return 匹配失败物品集合
27
+     */
28
+    public List<FailedMatchItem> selectFailedMatchItemList(FailedMatchItem failedMatchItem);
29
+
30
+    /**
31
+     * 根据用户ID查询匹配失败物品列表(按更新时间降序)
32
+     *
33
+     * @param userId 用户ID
34
+     * @return 匹配失败物品集合
35
+     */
36
+    public List<FailedMatchItem> selectFailedMatchItemListByUserId(Long userId);
37
+
38
+    /**
39
+     * 新增匹配失败物品
40
+     *
41
+     * @param failedMatchItem 匹配失败物品
42
+     * @return 结果
43
+     */
44
+    public int insertFailedMatchItem(FailedMatchItem failedMatchItem);
45
+
46
+    /**
47
+     * 修改匹配失败物品
48
+     *
49
+     * @param failedMatchItem 匹配失败物品
50
+     * @return 结果
51
+     */
52
+    public int updateFailedMatchItem(FailedMatchItem failedMatchItem);
53
+
54
+    /**
55
+     * 批量删除匹配失败物品
56
+     *
57
+     * @param ids 需要删除的匹配失败物品主键集合
58
+     * @return 结果
59
+     */
60
+    public int deleteFailedMatchItemByIds(Integer[] ids);
61
+
62
+    /**
63
+     * 删除匹配失败物品信息
64
+     *
65
+     * @param id 匹配失败物品主键
66
+     * @return 结果
67
+     */
68
+    public int deleteFailedMatchItemById(Integer id);
69
+}

+ 102 - 0
airport-item/src/main/java/com/sundot/airport/item/service/impl/FailedMatchItemServiceImpl.java

@@ -0,0 +1,102 @@
1
+package com.sundot.airport.item.service.impl;
2
+
3
+import java.util.List;
4
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
5
+import com.sundot.airport.common.utils.DateUtils;
6
+import org.springframework.beans.factory.annotation.Autowired;
7
+import org.springframework.stereotype.Service;
8
+import com.sundot.airport.item.mapper.FailedMatchItemMapper;
9
+import com.sundot.airport.item.domain.FailedMatchItem;
10
+import com.sundot.airport.item.service.IFailedMatchItemService;
11
+
12
+/**
13
+ * 匹配失败物品Service业务层处理
14
+ *
15
+ * @author airport
16
+ * @date 2025-11-21
17
+ */
18
+@Service
19
+public class FailedMatchItemServiceImpl extends ServiceImpl<FailedMatchItemMapper, FailedMatchItem> implements IFailedMatchItemService {
20
+    @Autowired
21
+    private FailedMatchItemMapper failedMatchItemMapper;
22
+
23
+    /**
24
+     * 查询匹配失败物品
25
+     *
26
+     * @param id 匹配失败物品主键
27
+     * @return 匹配失败物品
28
+     */
29
+    @Override
30
+    public FailedMatchItem selectFailedMatchItemById(Integer id) {
31
+        return failedMatchItemMapper.selectFailedMatchItemById(id);
32
+    }
33
+
34
+    /**
35
+     * 查询匹配失败物品列表
36
+     *
37
+     * @param failedMatchItem 匹配失败物品
38
+     * @return 匹配失败物品
39
+     */
40
+    @Override
41
+    public List<FailedMatchItem> selectFailedMatchItemList(FailedMatchItem failedMatchItem) {
42
+        return failedMatchItemMapper.selectFailedMatchItemList(failedMatchItem);
43
+    }
44
+
45
+    /**
46
+     * 根据用户ID查询匹配失败物品列表(按更新时间降序)
47
+     *
48
+     * @param userId 用户ID
49
+     * @return 匹配失败物品集合
50
+     */
51
+    @Override
52
+    public List<FailedMatchItem> selectFailedMatchItemListByUserId(Long userId) {
53
+        return failedMatchItemMapper.selectFailedMatchItemListByUserId(userId);
54
+    }
55
+
56
+    /**
57
+     * 新增匹配失败物品
58
+     *
59
+     * @param failedMatchItem 匹配失败物品
60
+     * @return 结果
61
+     */
62
+    @Override
63
+    public int insertFailedMatchItem(FailedMatchItem failedMatchItem) {
64
+        failedMatchItem.setCreateTime(DateUtils.getNowDate());
65
+        failedMatchItem.setUpdateTime(DateUtils.getNowDate());
66
+        return failedMatchItemMapper.insertFailedMatchItem(failedMatchItem);
67
+    }
68
+
69
+    /**
70
+     * 修改匹配失败物品
71
+     *
72
+     * @param failedMatchItem 匹配失败物品
73
+     * @return 结果
74
+     */
75
+    @Override
76
+    public int updateFailedMatchItem(FailedMatchItem failedMatchItem) {
77
+        failedMatchItem.setUpdateTime(DateUtils.getNowDate());
78
+        return failedMatchItemMapper.updateFailedMatchItem(failedMatchItem);
79
+    }
80
+
81
+    /**
82
+     * 批量删除匹配失败物品
83
+     *
84
+     * @param ids 需要删除的匹配失败物品主键
85
+     * @return 结果
86
+     */
87
+    @Override
88
+    public int deleteFailedMatchItemByIds(Integer[] ids) {
89
+        return failedMatchItemMapper.deleteFailedMatchItemByIds(ids);
90
+    }
91
+
92
+    /**
93
+     * 删除匹配失败物品信息
94
+     *
95
+     * @param id 匹配失败物品主键
96
+     * @return 结果
97
+     */
98
+    @Override
99
+    public int deleteFailedMatchItemById(Integer id) {
100
+        return failedMatchItemMapper.deleteFailedMatchItemById(id);
101
+    }
102
+}

+ 315 - 0
airport-item/src/main/resources/mapper/item/FailedMatchItemMapper.xml

@@ -0,0 +1,315 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper
3
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5
+<mapper namespace="com.sundot.airport.item.mapper.FailedMatchItemMapper">
6
+
7
+    <resultMap type="FailedMatchItem" id="FailedMatchItemResult">
8
+        <result property="id" column="id"/>
9
+        <result property="tenantId" column="tenant_id"/>
10
+        <result property="revision" column="revision"/>
11
+        <result property="createBy" column="create_by"/>
12
+        <result property="createTime" column="create_time"/>
13
+        <result property="updateBy" column="update_by"/>
14
+        <result property="updateTime" column="update_time"/>
15
+        <result property="name" column="name"/>
16
+        <result property="code" column="code"/>
17
+        <result property="categoryCode" column="category_code"/>
18
+        <result property="categoryName" column="category_name"/>
19
+        <result property="dangerLevel" column="danger_level"/>
20
+        <result property="dangerLevelDesc" column="danger_level_desc"/>
21
+        <result property="userId" column="user_id"/>
22
+        <result property="userName" column="user_name"/>
23
+        <result property="positionId" column="position_id"/>
24
+        <result property="positionName" column="position_name"/>
25
+        <result property="fullPositionPath" column="full_position_path"/>
26
+        <result property="teamId" column="team_id"/>
27
+        <result property="teamName" column="team_name"/>
28
+        <result property="postDictCode" column="post_dict_code"/>
29
+        <result property="postLabel" column="post_label"/>
30
+        <result property="terminalId" column="terminal_id"/>
31
+        <result property="terminalName" column="terminal_name"/>
32
+        <result property="regionalId" column="regional_id"/>
33
+        <result property="regionalName" column="regional_name"/>
34
+        <result property="channelId" column="channel_id"/>
35
+        <result property="channelName" column="channel_name"/>
36
+        <result property="audioFilePath" column="audio_file_path"/>
37
+        <result property="audioFileSize" column="audio_file_size"/>
38
+        <result property="audioFormat" column="audio_format"/>
39
+        <result property="isMatched" column="is_matched"/>
40
+        <result property="matchedText" column="matched_text"/>
41
+        <result property="originalText" column="original_text"/>
42
+        <result property="correctedText" column="corrected_text"/>
43
+        <result property="correctedSaved" column="corrected_saved"/>
44
+        <result property="correctedRecordId" column="corrected_record_id"/>
45
+        <result property="correctedSaveTime" column="corrected_save_time"/>
46
+        <result property="extractedLocation" column="extracted_location"/>
47
+        <result property="extractedQuantity" column="extracted_quantity"/>
48
+        <result property="processingTimeMs" column="processing_time_ms"/>
49
+        <result property="similarityScore" column="similarity_score"/>
50
+        <result property="sourceType" column="source_type"/>
51
+        <result property="locationKeywordId" column="location_keyword_id"/>
52
+        <result property="prohibitedItemKeywordId" column="prohibited_item_keyword_id"/>
53
+        <result property="prohibitedItemCategoryId" column="prohibited_item_category_id"/>
54
+        <result property="checkPointId" column="check_point_id"/>
55
+        <result property="checkPointName" column="check_point_name"/>
56
+        <result property="appEdited" column="app_edited"/>
57
+        <result property="remark" column="remark"/>
58
+    </resultMap>
59
+
60
+    <sql id="selectFailedMatchItemVo">
61
+        select id,
62
+               tenant_id,
63
+               revision,
64
+               create_by,
65
+               create_time,
66
+               update_by,
67
+               update_time,
68
+               name,
69
+               code,
70
+               category_code,
71
+               category_name,
72
+               danger_level,
73
+               danger_level_desc,
74
+               user_id,
75
+               user_name,
76
+               position_id,
77
+               position_name,
78
+               full_position_path,
79
+               team_id,
80
+               team_name,
81
+               post_dict_code,
82
+               post_label,
83
+               terminal_id,
84
+               terminal_name,
85
+               regional_id,
86
+               regional_name,
87
+               channel_id,
88
+               channel_name,
89
+               audio_file_path,
90
+               audio_file_size,
91
+               audio_format,
92
+               is_matched,
93
+               matched_text,
94
+               original_text,
95
+               corrected_text,
96
+               corrected_saved,
97
+               corrected_record_id,
98
+               corrected_save_time,
99
+               extracted_location,
100
+               extracted_quantity,
101
+               processing_time_ms,
102
+               similarity_score,
103
+               source_type,
104
+               location_keyword_id,
105
+               prohibited_item_keyword_id,
106
+               prohibited_item_category_id,
107
+               check_point_id,
108
+               check_point_name,
109
+               app_edited,
110
+               remark
111
+        from failed_match_item
112
+    </sql>
113
+
114
+    <select id="selectFailedMatchItemList" parameterType="FailedMatchItem" resultMap="FailedMatchItemResult">
115
+        <include refid="selectFailedMatchItemVo"/>
116
+        <where>
117
+            <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
118
+            <if test="code != null and code != ''">and code = #{code}</if>
119
+            <if test="categoryCode != null and categoryCode != ''">and category_code = #{categoryCode}</if>
120
+            <if test="dangerLevel != null and dangerLevel != ''">and danger_level = #{dangerLevel}</if>
121
+            <if test="userId != null">and user_id = #{userId}</if>
122
+            <if test="userName != null and userName != ''">and user_name like concat('%', #{userName}, '%')</if>
123
+            <if test="positionId != null">and position_id = #{positionId}</if>
124
+            <if test="teamId != null">and team_id = #{teamId}</if>
125
+            <if test="terminalId != null">and terminal_id = #{terminalId}</if>
126
+            <if test="regionalId != null">and regional_id = #{regionalId}</if>
127
+            <if test="channelId != null">and channel_id = #{channelId}</if>
128
+            <if test="sourceType != null and sourceType != ''">and source_type = #{sourceType}</if>
129
+            <if test="appEdited != null">and app_edited = #{appEdited}</if>
130
+        </where>
131
+        order by update_time desc
132
+    </select>
133
+
134
+    <select id="selectFailedMatchItemListByUserId" parameterType="Long" resultMap="FailedMatchItemResult">
135
+        <include refid="selectFailedMatchItemVo"/>
136
+        where user_id = #{userId}
137
+        order by update_time desc
138
+    </select>
139
+
140
+    <select id="selectFailedMatchItemById" parameterType="Integer" resultMap="FailedMatchItemResult">
141
+        <include refid="selectFailedMatchItemVo"/>
142
+        where id = #{id}
143
+    </select>
144
+
145
+    <insert id="insertFailedMatchItem" parameterType="FailedMatchItem" useGeneratedKeys="true" keyProperty="id">
146
+        insert into failed_match_item
147
+        <trim prefix="(" suffix=")" suffixOverrides=",">
148
+            <if test="tenantId != null">tenant_id,</if>
149
+            <if test="revision != null">revision,</if>
150
+            <if test="createBy != null">create_by,</if>
151
+            <if test="createTime != null">create_time,</if>
152
+            <if test="updateBy != null">update_by,</if>
153
+            <if test="updateTime != null">update_time,</if>
154
+            <if test="name != null and name != ''">name,</if>
155
+            <if test="code != null and code != ''">code,</if>
156
+            <if test="categoryCode != null and categoryCode != ''">category_code,</if>
157
+            <if test="categoryName != null and categoryName != ''">category_name,</if>
158
+            <if test="dangerLevel != null and dangerLevel != ''">danger_level,</if>
159
+            <if test="dangerLevelDesc != null and dangerLevelDesc != ''">danger_level_desc,</if>
160
+            <if test="userId != null">user_id,</if>
161
+            <if test="userName != null">user_name,</if>
162
+            <if test="positionId != null">position_id,</if>
163
+            <if test="positionName != null">position_name,</if>
164
+            <if test="fullPositionPath != null">full_position_path,</if>
165
+            <if test="teamId != null">team_id,</if>
166
+            <if test="teamName != null">team_name,</if>
167
+            <if test="postDictCode != null">post_dict_code,</if>
168
+            <if test="postLabel != null">post_label,</if>
169
+            <if test="terminalId != null">terminal_id,</if>
170
+            <if test="terminalName != null">terminal_name,</if>
171
+            <if test="regionalId != null">regional_id,</if>
172
+            <if test="regionalName != null">regional_name,</if>
173
+            <if test="channelId != null">channel_id,</if>
174
+            <if test="channelName != null">channel_name,</if>
175
+            <if test="audioFilePath != null">audio_file_path,</if>
176
+            <if test="audioFileSize != null">audio_file_size,</if>
177
+            <if test="audioFormat != null">audio_format,</if>
178
+            <if test="isMatched != null">is_matched,</if>
179
+            <if test="matchedText != null">matched_text,</if>
180
+            <if test="originalText != null">original_text,</if>
181
+            <if test="correctedText != null">corrected_text,</if>
182
+            <if test="correctedSaved != null">corrected_saved,</if>
183
+            <if test="correctedRecordId != null">corrected_record_id,</if>
184
+            <if test="correctedSaveTime != null">corrected_save_time,</if>
185
+            <if test="extractedLocation != null">extracted_location,</if>
186
+            <if test="extractedQuantity != null">extracted_quantity,</if>
187
+            <if test="processingTimeMs != null">processing_time_ms,</if>
188
+            <if test="similarityScore != null">similarity_score,</if>
189
+            <if test="sourceType != null">source_type,</if>
190
+            <if test="locationKeywordId != null">location_keyword_id,</if>
191
+            <if test="prohibitedItemKeywordId != null">prohibited_item_keyword_id,</if>
192
+            <if test="prohibitedItemCategoryId != null">prohibited_item_category_id,</if>
193
+            <if test="checkPointId != null">check_point_id,</if>
194
+            <if test="checkPointName != null">check_point_name,</if>
195
+            <if test="remark != null">remark,</if>
196
+        </trim>
197
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
198
+            <if test="tenantId != null">#{tenantId},</if>
199
+            <if test="revision != null">#{revision},</if>
200
+            <if test="createBy != null">#{createBy},</if>
201
+            <if test="createTime != null">#{createTime},</if>
202
+            <if test="updateBy != null">#{updateBy},</if>
203
+            <if test="updateTime != null">#{updateTime},</if>
204
+            <if test="name != null and name != ''">#{name},</if>
205
+            <if test="code != null and code != ''">#{code},</if>
206
+            <if test="categoryCode != null and categoryCode != ''">#{categoryCode},</if>
207
+            <if test="categoryName != null and categoryName != ''">#{categoryName},</if>
208
+            <if test="dangerLevel != null and dangerLevel != ''">#{dangerLevel},</if>
209
+            <if test="dangerLevelDesc != null and dangerLevelDesc != ''">#{dangerLevelDesc},</if>
210
+            <if test="userId != null">#{userId},</if>
211
+            <if test="userName != null">#{userName},</if>
212
+            <if test="positionId != null">#{positionId},</if>
213
+            <if test="positionName != null">#{positionName},</if>
214
+            <if test="fullPositionPath != null">#{fullPositionPath},</if>
215
+            <if test="teamId != null">#{teamId},</if>
216
+            <if test="teamName != null">#{teamName},</if>
217
+            <if test="postDictCode != null">#{postDictCode},</if>
218
+            <if test="postLabel != null">#{postLabel},</if>
219
+            <if test="terminalId != null">#{terminalId},</if>
220
+            <if test="terminalName != null">#{terminalName},</if>
221
+            <if test="regionalId != null">#{regionalId},</if>
222
+            <if test="regionalName != null">#{regionalName},</if>
223
+            <if test="channelId != null">#{channelId},</if>
224
+            <if test="channelName != null">#{channelName},</if>
225
+            <if test="audioFilePath != null">#{audioFilePath},</if>
226
+            <if test="audioFileSize != null">#{audioFileSize},</if>
227
+            <if test="audioFormat != null">#{audioFormat},</if>
228
+            <if test="isMatched != null">#{isMatched},</if>
229
+            <if test="matchedText != null">#{matchedText},</if>
230
+            <if test="originalText != null">#{originalText},</if>
231
+            <if test="correctedText != null">#{correctedText},</if>
232
+            <if test="correctedSaved != null">#{correctedSaved},</if>
233
+            <if test="correctedRecordId != null">#{correctedRecordId},</if>
234
+            <if test="correctedSaveTime != null">#{correctedSaveTime},</if>
235
+            <if test="extractedLocation != null">#{extractedLocation},</if>
236
+            <if test="extractedQuantity != null">#{extractedQuantity},</if>
237
+            <if test="processingTimeMs != null">#{processingTimeMs},</if>
238
+            <if test="similarityScore != null">#{similarityScore},</if>
239
+            <if test="sourceType != null">#{sourceType},</if>
240
+            <if test="locationKeywordId != null">#{locationKeywordId},</if>
241
+            <if test="prohibitedItemKeywordId != null">#{prohibitedItemKeywordId},</if>
242
+            <if test="prohibitedItemCategoryId != null">#{prohibitedItemCategoryId},</if>
243
+            <if test="checkPointId != null">#{checkPointId},</if>
244
+            <if test="checkPointName != null">#{checkPointName},</if>
245
+            <if test="remark != null">#{remark},</if>
246
+        </trim>
247
+    </insert>
248
+
249
+    <update id="updateFailedMatchItem" parameterType="FailedMatchItem">
250
+        update failed_match_item
251
+        <trim prefix="SET" suffixOverrides=",">
252
+            <if test="tenantId != null">tenant_id = #{tenantId},</if>
253
+            <if test="revision != null">revision = #{revision},</if>
254
+            <if test="updateBy != null">update_by = #{updateBy},</if>
255
+            <if test="updateTime != null">update_time = #{updateTime},</if>
256
+            <if test="name != null and name != ''">name = #{name},</if>
257
+            <if test="code != null and code != ''">code = #{code},</if>
258
+            <if test="categoryCode != null and categoryCode != ''">category_code = #{categoryCode},</if>
259
+            <if test="categoryName != null and categoryName != ''">category_name = #{categoryName},</if>
260
+            <if test="dangerLevel != null and dangerLevel != ''">danger_level = #{dangerLevel},</if>
261
+            <if test="dangerLevelDesc != null and dangerLevelDesc != ''">danger_level_desc = #{dangerLevelDesc},</if>
262
+            <if test="userId != null">user_id = #{userId},</if>
263
+            <if test="userName != null">user_name = #{userName},</if>
264
+            <if test="positionId != null">position_id = #{positionId},</if>
265
+            <if test="positionName != null">position_name = #{positionName},</if>
266
+            <if test="fullPositionPath != null">full_position_path = #{fullPositionPath},</if>
267
+            <if test="teamId != null">team_id = #{teamId},</if>
268
+            <if test="teamName != null">team_name = #{teamName},</if>
269
+            <if test="postDictCode != null">post_dict_code = #{postDictCode},</if>
270
+            <if test="postLabel != null">post_label = #{postLabel},</if>
271
+            <if test="terminalId != null">terminal_id = #{terminalId},</if>
272
+            <if test="terminalName != null">terminal_name = #{terminalName},</if>
273
+            <if test="regionalId != null">regional_id = #{regionalId},</if>
274
+            <if test="regionalName != null">regional_name = #{regionalName},</if>
275
+            <if test="channelId != null">channel_id = #{channelId},</if>
276
+            <if test="channelName != null">channel_name = #{channelName},</if>
277
+            <if test="audioFilePath != null">audio_file_path = #{audioFilePath},</if>
278
+            <if test="audioFileSize != null">audio_file_size = #{audioFileSize},</if>
279
+            <if test="audioFormat != null">audio_format = #{audioFormat},</if>
280
+            <if test="isMatched != null">is_matched = #{isMatched},</if>
281
+            <if test="matchedText != null">matched_text = #{matchedText},</if>
282
+            <if test="originalText != null">original_text = #{originalText},</if>
283
+            <if test="correctedText != null">corrected_text = #{correctedText},</if>
284
+            <if test="correctedSaved != null">corrected_saved = #{correctedSaved},</if>
285
+            <if test="correctedRecordId != null">corrected_record_id = #{correctedRecordId},</if>
286
+            <if test="correctedSaveTime != null">corrected_save_time = #{correctedSaveTime},</if>
287
+            <if test="extractedLocation != null">extracted_location = #{extractedLocation},</if>
288
+            <if test="extractedQuantity != null">extracted_quantity = #{extractedQuantity},</if>
289
+            <if test="processingTimeMs != null">processing_time_ms = #{processingTimeMs},</if>
290
+            <if test="similarityScore != null">similarity_score = #{similarityScore},</if>
291
+            <if test="sourceType != null">source_type = #{sourceType},</if>
292
+            <if test="locationKeywordId != null">location_keyword_id = #{locationKeywordId},</if>
293
+            <if test="prohibitedItemKeywordId != null">prohibited_item_keyword_id = #{prohibitedItemKeywordId},</if>
294
+            <if test="prohibitedItemCategoryId != null">prohibited_item_category_id = #{prohibitedItemCategoryId},</if>
295
+            <if test="checkPointId != null">check_point_id = #{checkPointId},</if>
296
+            <if test="checkPointName != null">check_point_name = #{checkPointName},</if>
297
+            <if test="appEdited != null">app_edited = #{appEdited},</if>
298
+            <if test="remark != null">remark = #{remark},</if>
299
+        </trim>
300
+        where id = #{id}
301
+    </update>
302
+
303
+    <delete id="deleteFailedMatchItemById" parameterType="Integer">
304
+        delete
305
+        from failed_match_item
306
+        where id = #{id}
307
+    </delete>
308
+
309
+    <delete id="deleteFailedMatchItemByIds" parameterType="Integer">
310
+        delete from failed_match_item where id in
311
+        <foreach item="id" collection="array" open="(" separator="," close=")">
312
+            #{id}
313
+        </foreach>
314
+    </delete>
315
+</mapper>