- 在 Device 实体类中新增 deviceName 字段及其 getter/setter 方法 - 更新 DeviceMapper.xml,支持 device_name 字段的查询、插入和更新操作 - 修改 InspectionTask 实体类,增加 deviceIp 字段用于联查返回设备 IP - 调整 InspectionTaskMapper.xml,通过左连接获取设备名称与 IP 信息- 移除冗余的 device_name 插入与更新逻辑 - 注释掉旧有的设备信息设置代码,避免重复赋值 - 更新 toString 方法以包含新的 deviceName 属性
179 lines
3.6 KiB
Java
179 lines
3.6 KiB
Java
package com.ruoyi.video.domain;
|
||
|
||
import com.ruoyi.common.core.domain.BaseEntity;
|
||
import java.math.BigDecimal;
|
||
import java.util.Date;
|
||
|
||
/**
|
||
* 巡检任务对象 v_inspection_task
|
||
*
|
||
* @author ruoyi
|
||
* @date 2025-09-27
|
||
*/
|
||
public class InspectionTask extends BaseEntity {
|
||
private static final long serialVersionUID = 1L;
|
||
|
||
/** 巡检任务ID */
|
||
private Long taskId;
|
||
|
||
/** 任务名称 */
|
||
private String taskName;
|
||
|
||
/** 设备ID */
|
||
private Long deviceId;
|
||
|
||
/** 设备名称(联查返回) */
|
||
private String deviceName;
|
||
|
||
/** 设备IP(联查返回) */
|
||
private String deviceIp;
|
||
|
||
/** Cron表达式 */
|
||
private String cronExpression;
|
||
|
||
/** 巡检时长(秒) */
|
||
private Integer duration;
|
||
|
||
/** 任务状态(0=启用,1=停用) */
|
||
private String status;
|
||
|
||
/** 是否启用检测(0=启用,1=停用) */
|
||
private String enableDetection;
|
||
|
||
/** 检测阈值 */
|
||
private BigDecimal threshold;
|
||
|
||
/** 最后执行时间 */
|
||
private Date lastExecuteTime;
|
||
|
||
/** 下次执行时间 */
|
||
private Date nextExecuteTime;
|
||
|
||
/** 执行次数 */
|
||
private Long executeCount;
|
||
|
||
/** 报警次数 */
|
||
private Long alarmCount;
|
||
|
||
private String modelName;
|
||
|
||
public void setModelName(String modelName) {
|
||
this.modelName = modelName;
|
||
}
|
||
|
||
public String getModelName() {
|
||
return modelName;
|
||
}
|
||
|
||
public void setTaskId(Long taskId) {
|
||
this.taskId = taskId;
|
||
}
|
||
|
||
public Long getTaskId() {
|
||
return taskId;
|
||
}
|
||
|
||
public void setTaskName(String taskName) {
|
||
this.taskName = taskName;
|
||
}
|
||
|
||
public String getTaskName() {
|
||
return taskName;
|
||
}
|
||
|
||
public void setDeviceId(Long deviceId) {
|
||
this.deviceId = deviceId;
|
||
}
|
||
|
||
public Long getDeviceId() {
|
||
return deviceId;
|
||
}
|
||
|
||
public void setDeviceName(String deviceName) {
|
||
this.deviceName = deviceName;
|
||
}
|
||
|
||
public String getDeviceName() {
|
||
return deviceName;
|
||
}
|
||
|
||
public String getDeviceIp() {
|
||
return deviceIp;
|
||
}
|
||
|
||
public void setDeviceIp(String deviceIp) {
|
||
this.deviceIp = deviceIp;
|
||
}
|
||
|
||
public void setCronExpression(String cronExpression) {
|
||
this.cronExpression = cronExpression;
|
||
}
|
||
|
||
public String getCronExpression() {
|
||
return cronExpression;
|
||
}
|
||
|
||
public void setDuration(Integer duration) {
|
||
this.duration = duration;
|
||
}
|
||
|
||
public Integer getDuration() {
|
||
return duration;
|
||
}
|
||
|
||
public void setStatus(String status) {
|
||
this.status = status;
|
||
}
|
||
|
||
public String getStatus() {
|
||
return status;
|
||
}
|
||
|
||
public void setEnableDetection(String enableDetection) {
|
||
this.enableDetection = enableDetection;
|
||
}
|
||
|
||
public String getEnableDetection() {
|
||
return enableDetection;
|
||
}
|
||
|
||
public void setThreshold(BigDecimal threshold) {
|
||
this.threshold = threshold;
|
||
}
|
||
|
||
public BigDecimal getThreshold() {
|
||
return threshold;
|
||
}
|
||
|
||
public void setLastExecuteTime(Date lastExecuteTime) {
|
||
this.lastExecuteTime = lastExecuteTime;
|
||
}
|
||
|
||
public Date getLastExecuteTime() {
|
||
return lastExecuteTime;
|
||
}
|
||
|
||
public void setNextExecuteTime(Date nextExecuteTime) {
|
||
this.nextExecuteTime = nextExecuteTime;
|
||
}
|
||
|
||
public Date getNextExecuteTime() {
|
||
return nextExecuteTime;
|
||
}
|
||
|
||
public void setExecuteCount(Long executeCount) {
|
||
this.executeCount = executeCount;
|
||
}
|
||
|
||
public Long getExecuteCount() {
|
||
return executeCount;
|
||
}
|
||
|
||
public void setAlarmCount(Long alarmCount) {
|
||
this.alarmCount = alarmCount;
|
||
}
|
||
|
||
public Long getAlarmCount() {
|
||
return alarmCount;
|
||
}
|
||
} |