feat(video): 添加报警记录管理功能- 新增报警记录实体类 AlarmRecord 及相关字段定义
- 实现报警记录的增删改查接口与 Mapper 层逻辑 - 添加报警记录前端页面,支持列表展示、搜索、处理与忽略操作 - 支持批量处理报警记录及导出功能 - 增加报警记录详情查看弹窗,展示图片与视频信息- 配置定时任务白名单,允许访问 ruoyi.video 包 - 引入 JavaCV 依赖以支持视频处理功能 - 添加 testng 依赖用于测试支持
This commit is contained in:
@@ -0,0 +1,234 @@
|
||||
package com.ruoyi.video.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 报警记录对象 v_alarm_record
|
||||
*
|
||||
* @Author: orange
|
||||
* @CreateTime: 2025-01-16
|
||||
*/
|
||||
public class AlarmRecord extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 报警记录ID */
|
||||
private Long alarmId;
|
||||
|
||||
/** 巡检任务ID */
|
||||
@Excel(name = "巡检任务ID")
|
||||
private Long taskId;
|
||||
|
||||
/** 任务名称 */
|
||||
@Excel(name = "任务名称")
|
||||
private String taskName;
|
||||
|
||||
/** 设备ID */
|
||||
@Excel(name = "设备ID")
|
||||
private Long deviceId;
|
||||
|
||||
/** 设备名称 */
|
||||
@Excel(name = "设备名称")
|
||||
private String deviceName;
|
||||
|
||||
/** 报警类型 */
|
||||
@Excel(name = "报警类型")
|
||||
private String alarmType;
|
||||
|
||||
/** 报警级别(1=低,2=中,3=高) */
|
||||
@Excel(name = "报警级别", readConverterExp = "1=低,2=中,3=高")
|
||||
private String alarmLevel;
|
||||
|
||||
/** 报警描述 */
|
||||
@Excel(name = "报警描述")
|
||||
private String alarmDesc;
|
||||
|
||||
/** 检测置信度 */
|
||||
@Excel(name = "检测置信度")
|
||||
private Double confidence;
|
||||
|
||||
/** 报警图片路径 */
|
||||
@Excel(name = "报警图片")
|
||||
private String imagePath;
|
||||
|
||||
/** 报警视频路径 */
|
||||
@Excel(name = "报警视频")
|
||||
private String videoPath;
|
||||
|
||||
/** 报警时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "报警时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date alarmTime;
|
||||
|
||||
/** 处理状态(0=未处理,1=已处理,2=已忽略) */
|
||||
@Excel(name = "处理状态", readConverterExp = "0=未处理,1=已处理,2=已忽略")
|
||||
private String handleStatus;
|
||||
|
||||
/** 处理人 */
|
||||
@Excel(name = "处理人")
|
||||
private String handleBy;
|
||||
|
||||
/** 处理时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "处理时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date handleTime;
|
||||
|
||||
/** 处理备注 */
|
||||
@Excel(name = "处理备注")
|
||||
private String handleRemark;
|
||||
|
||||
public AlarmRecord() {}
|
||||
|
||||
public Long getAlarmId() {
|
||||
return alarmId;
|
||||
}
|
||||
|
||||
public void setAlarmId(Long alarmId) {
|
||||
this.alarmId = alarmId;
|
||||
}
|
||||
|
||||
public Long getTaskId() {
|
||||
return taskId;
|
||||
}
|
||||
|
||||
public void setTaskId(Long taskId) {
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public String getTaskName() {
|
||||
return taskName;
|
||||
}
|
||||
|
||||
public void setTaskName(String taskName) {
|
||||
this.taskName = taskName;
|
||||
}
|
||||
|
||||
public Long getDeviceId() {
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(Long deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public String getDeviceName() {
|
||||
return deviceName;
|
||||
}
|
||||
|
||||
public void setDeviceName(String deviceName) {
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public String getAlarmType() {
|
||||
return alarmType;
|
||||
}
|
||||
|
||||
public void setAlarmType(String alarmType) {
|
||||
this.alarmType = alarmType;
|
||||
}
|
||||
|
||||
public String getAlarmLevel() {
|
||||
return alarmLevel;
|
||||
}
|
||||
|
||||
public void setAlarmLevel(String alarmLevel) {
|
||||
this.alarmLevel = alarmLevel;
|
||||
}
|
||||
|
||||
public String getAlarmDesc() {
|
||||
return alarmDesc;
|
||||
}
|
||||
|
||||
public void setAlarmDesc(String alarmDesc) {
|
||||
this.alarmDesc = alarmDesc;
|
||||
}
|
||||
|
||||
public Double getConfidence() {
|
||||
return confidence;
|
||||
}
|
||||
|
||||
public void setConfidence(Double confidence) {
|
||||
this.confidence = confidence;
|
||||
}
|
||||
|
||||
public String getImagePath() {
|
||||
return imagePath;
|
||||
}
|
||||
|
||||
public void setImagePath(String imagePath) {
|
||||
this.imagePath = imagePath;
|
||||
}
|
||||
|
||||
public String getVideoPath() {
|
||||
return videoPath;
|
||||
}
|
||||
|
||||
public void setVideoPath(String videoPath) {
|
||||
this.videoPath = videoPath;
|
||||
}
|
||||
|
||||
public Date getAlarmTime() {
|
||||
return alarmTime;
|
||||
}
|
||||
|
||||
public void setAlarmTime(Date alarmTime) {
|
||||
this.alarmTime = alarmTime;
|
||||
}
|
||||
|
||||
public String getHandleStatus() {
|
||||
return handleStatus;
|
||||
}
|
||||
|
||||
public void setHandleStatus(String handleStatus) {
|
||||
this.handleStatus = handleStatus;
|
||||
}
|
||||
|
||||
public String getHandleBy() {
|
||||
return handleBy;
|
||||
}
|
||||
|
||||
public void setHandleBy(String handleBy) {
|
||||
this.handleBy = handleBy;
|
||||
}
|
||||
|
||||
public Date getHandleTime() {
|
||||
return handleTime;
|
||||
}
|
||||
|
||||
public void setHandleTime(Date handleTime) {
|
||||
this.handleTime = handleTime;
|
||||
}
|
||||
|
||||
public String getHandleRemark() {
|
||||
return handleRemark;
|
||||
}
|
||||
|
||||
public void setHandleRemark(String handleRemark) {
|
||||
this.handleRemark = handleRemark;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "AlarmRecord{" +
|
||||
"alarmId=" + alarmId +
|
||||
", taskId=" + taskId +
|
||||
", taskName='" + taskName + '\'' +
|
||||
", deviceId=" + deviceId +
|
||||
", deviceName='" + deviceName + '\'' +
|
||||
", alarmType='" + alarmType + '\'' +
|
||||
", alarmLevel='" + alarmLevel + '\'' +
|
||||
", alarmDesc='" + alarmDesc + '\'' +
|
||||
", confidence=" + confidence +
|
||||
", imagePath='" + imagePath + '\'' +
|
||||
", videoPath='" + videoPath + '\'' +
|
||||
", alarmTime=" + alarmTime +
|
||||
", handleStatus='" + handleStatus + '\'' +
|
||||
", handleBy='" + handleBy + '\'' +
|
||||
", handleTime=" + handleTime +
|
||||
", handleRemark='" + handleRemark + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,195 @@
|
||||
package com.ruoyi.video.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 巡检任务对象 v_inspection_task
|
||||
*
|
||||
* @Author: orange
|
||||
* @CreateTime: 2025-01-16
|
||||
*/
|
||||
public class InspectionTask extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 巡检任务ID */
|
||||
private Long taskId;
|
||||
|
||||
/** 任务名称 */
|
||||
@Excel(name = "任务名称")
|
||||
private String taskName;
|
||||
|
||||
/** 设备ID */
|
||||
@Excel(name = "设备ID")
|
||||
private Long deviceId;
|
||||
|
||||
/** 设备名称 */
|
||||
@Excel(name = "设备名称")
|
||||
private String deviceName;
|
||||
|
||||
/** Cron表达式 */
|
||||
@Excel(name = "Cron表达式")
|
||||
private String cronExpression;
|
||||
|
||||
/** 巡检时长(秒) */
|
||||
@Excel(name = "巡检时长")
|
||||
private Integer duration;
|
||||
|
||||
/** 任务状态(0=启用,1=停用) */
|
||||
@Excel(name = "任务状态", readConverterExp = "0=启用,1=停用")
|
||||
private String status;
|
||||
|
||||
/** 是否启用检测(0=启用,1=停用) */
|
||||
@Excel(name = "启用检测", readConverterExp = "0=启用,1=停用")
|
||||
private String enableDetection;
|
||||
|
||||
/** 检测阈值 */
|
||||
@Excel(name = "检测阈值")
|
||||
private Double threshold;
|
||||
|
||||
/** 最后执行时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "最后执行时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date lastExecuteTime;
|
||||
|
||||
/** 下次执行时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "下次执行时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date nextExecuteTime;
|
||||
|
||||
/** 执行次数 */
|
||||
@Excel(name = "执行次数")
|
||||
private Long executeCount;
|
||||
|
||||
/** 报警次数 */
|
||||
@Excel(name = "报警次数")
|
||||
private Long alarmCount;
|
||||
|
||||
public InspectionTask() {}
|
||||
|
||||
public Long getTaskId() {
|
||||
return taskId;
|
||||
}
|
||||
|
||||
public void setTaskId(Long taskId) {
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public String getTaskName() {
|
||||
return taskName;
|
||||
}
|
||||
|
||||
public void setTaskName(String taskName) {
|
||||
this.taskName = taskName;
|
||||
}
|
||||
|
||||
public Long getDeviceId() {
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(Long deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public String getDeviceName() {
|
||||
return deviceName;
|
||||
}
|
||||
|
||||
public void setDeviceName(String deviceName) {
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public String getCronExpression() {
|
||||
return cronExpression;
|
||||
}
|
||||
|
||||
public void setCronExpression(String cronExpression) {
|
||||
this.cronExpression = cronExpression;
|
||||
}
|
||||
|
||||
public Integer getDuration() {
|
||||
return duration;
|
||||
}
|
||||
|
||||
public void setDuration(Integer duration) {
|
||||
this.duration = duration;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getEnableDetection() {
|
||||
return enableDetection;
|
||||
}
|
||||
|
||||
public void setEnableDetection(String enableDetection) {
|
||||
this.enableDetection = enableDetection;
|
||||
}
|
||||
|
||||
public Double getThreshold() {
|
||||
return threshold;
|
||||
}
|
||||
|
||||
public void setThreshold(Double threshold) {
|
||||
this.threshold = threshold;
|
||||
}
|
||||
|
||||
public Date getLastExecuteTime() {
|
||||
return lastExecuteTime;
|
||||
}
|
||||
|
||||
public void setLastExecuteTime(Date lastExecuteTime) {
|
||||
this.lastExecuteTime = lastExecuteTime;
|
||||
}
|
||||
|
||||
public Date getNextExecuteTime() {
|
||||
return nextExecuteTime;
|
||||
}
|
||||
|
||||
public void setNextExecuteTime(Date nextExecuteTime) {
|
||||
this.nextExecuteTime = nextExecuteTime;
|
||||
}
|
||||
|
||||
public Long getExecuteCount() {
|
||||
return executeCount;
|
||||
}
|
||||
|
||||
public void setExecuteCount(Long executeCount) {
|
||||
this.executeCount = executeCount;
|
||||
}
|
||||
|
||||
public Long getAlarmCount() {
|
||||
return alarmCount;
|
||||
}
|
||||
|
||||
public void setAlarmCount(Long alarmCount) {
|
||||
this.alarmCount = alarmCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "InspectionTask{" +
|
||||
"taskId=" + taskId +
|
||||
", taskName='" + taskName + '\'' +
|
||||
", deviceId=" + deviceId +
|
||||
", deviceName='" + deviceName + '\'' +
|
||||
", cronExpression='" + cronExpression + '\'' +
|
||||
", duration=" + duration +
|
||||
", status='" + status + '\'' +
|
||||
", enableDetection='" + enableDetection + '\'' +
|
||||
", threshold=" + threshold +
|
||||
", lastExecuteTime=" + lastExecuteTime +
|
||||
", nextExecuteTime=" + nextExecuteTime +
|
||||
", executeCount=" + executeCount +
|
||||
", alarmCount=" + alarmCount +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user