feat(video): 添加巡检任务记录关联任务ID功能

- 在巡检任务记录表中新增 task_id 字段并建立关联关系
- 移除巡检任务实体中的冗余 recordId 字段及相关映射配置- 更新数据库查询语句以适配新的字段结构
- 为 InspectionTaskRecord 实体类增加 taskId 属性及对应 getter/setter 方法- 新增根据任务ID查询记录列表的接口方法
- 修改 MyBatis 映射文件支持 task_id 的增删改查操作
- 调整 toString 方法输出内容以包含 taskId 信息
This commit is contained in:
2025-09-30 11:55:55 +08:00
parent c63e130729
commit fe422241c8
6 changed files with 31 additions and 18 deletions

View File

@@ -1277,6 +1277,7 @@ INSERT INTO `v_inspection_task` VALUES (5, '垃圾巡检测试', 3, '192.168.1.2
DROP TABLE IF EXISTS `v_inspection_task_record`;
CREATE TABLE `v_inspection_task_record` (
`record_id` bigint NOT NULL AUTO_INCREMENT COMMENT '记录ID主键',
`task_id` bigint NOT NULL COMMENT '关联的巡检任务ID',
`execute_time` datetime NOT NULL COMMENT '执行时间',
`duration` int NULL DEFAULT NULL COMMENT '执行时长(秒)',
`accessory` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '附件路径,可存储相关图片或文件',