feat(video): 添加巡检任务记录功能及相关接口
- 在 InspectionTask 实体中新增 recordId 字段及其 getter/setter 方法 - 更新 InspectionTask 的 toString 方法以包含 recordId - 修改 InspectionTaskMapper.xml,增加 record_id 的映射和查询字段 - 新增巡检任务记录实体类 InspectionTaskRecord 及其相关属性与方法 - 创建巡检任务记录的控制器、服务层和数据访问层(Controller, Service, Mapper)- 实现巡检任务记录的增删改查接口,并支持导出 Excel 功能 - 配置 MyBatis XML 映射文件,完成数据库操作语句的编写
This commit is contained in:
@@ -18,6 +18,10 @@ public class InspectionTask extends BaseEntity {
|
||||
/** 巡检任务ID */
|
||||
private Long taskId;
|
||||
|
||||
/** 最近记录ID */
|
||||
@Excel(name = "记录ID")
|
||||
private Long recordId;
|
||||
|
||||
/** 任务名称 */
|
||||
@Excel(name = "任务名称")
|
||||
private String taskName;
|
||||
@@ -78,6 +82,14 @@ public class InspectionTask extends BaseEntity {
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public Long getRecordId() {
|
||||
return recordId;
|
||||
}
|
||||
|
||||
public void setRecordId(Long recordId) {
|
||||
this.recordId = recordId;
|
||||
}
|
||||
|
||||
public String getTaskName() {
|
||||
return taskName;
|
||||
}
|
||||
@@ -178,6 +190,7 @@ public class InspectionTask extends BaseEntity {
|
||||
public String toString() {
|
||||
return "InspectionTask{" +
|
||||
"taskId=" + taskId +
|
||||
", recordId=" + recordId +
|
||||
", taskName='" + taskName + '\'' +
|
||||
", deviceId=" + deviceId +
|
||||
", deviceName='" + deviceName + '\'' +
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
package com.ruoyi.video.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 巡检任务记录对象 v_inspection_task_record
|
||||
*
|
||||
* @author generated
|
||||
* @date 2025-09-30
|
||||
*/
|
||||
public class InspectionTaskRecord extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录ID,主键 */
|
||||
private Long recordId;
|
||||
|
||||
/** 执行时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "执行时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date executeTime;
|
||||
|
||||
/** 执行时长(秒) */
|
||||
@Excel(name = "执行时长(秒)")
|
||||
private Integer duration;
|
||||
|
||||
/** 附件路径 */
|
||||
@Excel(name = "附件路径")
|
||||
private String accessory;
|
||||
|
||||
/** 巡检结果详情 */
|
||||
@Excel(name = "巡检结果")
|
||||
private String result;
|
||||
|
||||
/** 执行状态(0=成功,1=失败,2=部分成功) */
|
||||
@Excel(name = "执行状态", readConverterExp = "0=成功,1=失败,2=部分成功")
|
||||
private Integer status;
|
||||
|
||||
/** 删除标志(0=存在 2=删除) */
|
||||
private String delFlag;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
public Long getRecordId() {
|
||||
return recordId;
|
||||
}
|
||||
|
||||
public void setRecordId(Long recordId) {
|
||||
this.recordId = recordId;
|
||||
}
|
||||
|
||||
public Date getExecuteTime() {
|
||||
return executeTime;
|
||||
}
|
||||
|
||||
public void setExecuteTime(Date executeTime) {
|
||||
this.executeTime = executeTime;
|
||||
}
|
||||
|
||||
public Integer getDuration() {
|
||||
return duration;
|
||||
}
|
||||
|
||||
public void setDuration(Integer duration) {
|
||||
this.duration = duration;
|
||||
}
|
||||
|
||||
public String getAccessory() {
|
||||
return accessory;
|
||||
}
|
||||
|
||||
public void setAccessory(String accessory) {
|
||||
this.accessory = accessory;
|
||||
}
|
||||
|
||||
public String getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(String result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getDelFlag() {
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
public void setDelFlag(String delFlag) {
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "InspectionTaskRecord{" +
|
||||
"recordId=" + recordId +
|
||||
", executeTime=" + executeTime +
|
||||
", duration=" + duration +
|
||||
", accessory='" + accessory + '\'' +
|
||||
", result='" + result + '\'' +
|
||||
", status=" + status +
|
||||
", delFlag='" + delFlag + '\'' +
|
||||
", remark='" + remark + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user