parent
e58c456ee0
commit
c06c681318
12 changed files with 329 additions and 66 deletions
@ -0,0 +1,128 @@ |
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package org.springblade.modules.monitor.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import com.fasterxml.jackson.annotation.JsonIgnore; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import java.io.Serializable; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* 设备报警记录表实体类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2022-01-13 |
||||
*/ |
||||
@Data |
||||
@TableName("t_data_warn") |
||||
@ApiModel(value = "DataWarn对象", description = "设备报警记录表") |
||||
public class DataWarn implements Serializable { |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
public DataWarn() { |
||||
} |
||||
|
||||
|
||||
private Long id; |
||||
/** |
||||
* 设备code |
||||
*/ |
||||
@ApiModelProperty(value = "设备code") |
||||
private String equipCode; |
||||
/** |
||||
* 设备名称 |
||||
*/ |
||||
@ApiModelProperty(value = "设备名称") |
||||
private String equipName; |
||||
/** |
||||
* 设备种类 |
||||
*/ |
||||
@ApiModelProperty(value = "设备种类") |
||||
private String classCode; |
||||
/** |
||||
* 位置 |
||||
*/ |
||||
@ApiModelProperty(value = "位置") |
||||
private String location; |
||||
/** |
||||
* 设备名称 |
||||
*/ |
||||
@ApiModelProperty(value = "区域") |
||||
private String area; |
||||
|
||||
/** |
||||
* 报警类型,报警类型,0:无报警,1:事件报警,2:设备报警 |
||||
*/ |
||||
@ApiModelProperty(value = "报警类型,报警类型,0:无报警,1:事件报警,2:设备报警") |
||||
private Integer warnType; |
||||
/** |
||||
* 报警标识(系统中自定义的值) |
||||
*/ |
||||
@ApiModelProperty(value = "报警标识(系统中自定义的值)") |
||||
private Integer warnCode; |
||||
/** |
||||
* 报警值(设备实际的报警值) |
||||
*/ |
||||
@ApiModelProperty(value = "报警值(设备实际的报警值)") |
||||
private String warnValue; |
||||
/** |
||||
* 报警内容 |
||||
*/ |
||||
@ApiModelProperty(value = "报警内容") |
||||
private String warnContent; |
||||
/** |
||||
* 报警时间 |
||||
*/ |
||||
@ApiModelProperty(value = "报警时间") |
||||
private Date warnDate; |
||||
/** |
||||
* 恢复类型, 0自动, 1手动 |
||||
*/ |
||||
@ApiModelProperty(value = "恢复类型, 0自动, 1手动") |
||||
private Integer recoveryType; |
||||
/** |
||||
* 恢复人 |
||||
*/ |
||||
@ApiModelProperty(value = "恢复人") |
||||
private String recoveryPerson; |
||||
/** |
||||
* 恢复时间 |
||||
*/ |
||||
@ApiModelProperty(value = "恢复时间") |
||||
private Date recoveryDate; |
||||
/** |
||||
* 状态:1:报警 2:恢复 |
||||
*/ |
||||
@ApiModelProperty(value = "状态") |
||||
private Integer status; |
||||
/** |
||||
* 确认状态:0:未确认, 1:已确认 |
||||
*/ |
||||
@ApiModelProperty(value = "确认状态") |
||||
private Integer confirmStatus; |
||||
/** |
||||
* 通知人 |
||||
*/ |
||||
@JsonIgnore |
||||
@ApiModelProperty(value = "通知人") |
||||
private Long notifier; |
||||
} |
||||
@ -0,0 +1,18 @@ |
||||
|
||||
package org.springblade.modules.monitor.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import org.springblade.modules.monitor.entity.DataWarn; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 设备报警记录表 Mapper 接口 |
||||
* |
||||
* @author |
||||
* @since 2022-01-07 |
||||
*/ |
||||
public interface DataWarnMapper extends BaseMapper<DataWarn> { |
||||
|
||||
|
||||
} |
||||
@ -0,0 +1,25 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="org.springblade.modules.monitor.mapper.DataWarnMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="dataWarnResultMap" type="org.springblade.modules.monitor.entity.DataWarn"> |
||||
<id column="id" property="id"/> |
||||
<result column="equip_code" property="equipCode"/> |
||||
<result column="equip_name" property="equipName"/> |
||||
<result column="class_code" property="classCode"/> |
||||
<result column="location" property="location"/> |
||||
<result column="area" property="area"/> |
||||
<result column="warn_type" property="warnType"/> |
||||
<result column="warn_code" property="warnCode"/> |
||||
<result column="warn_value" property="warnValue"/> |
||||
<result column="warn_content" property="warnContent"/> |
||||
<result column="warn_date" property="warnDate"/> |
||||
<result column="recovery_date" property="recoveryDate"/> |
||||
<result column="status" property="status"/> |
||||
<result column="notifier" property="notifier"/> |
||||
<result column="confirm_status" property="confirmStatus"/> |
||||
</resultMap> |
||||
|
||||
|
||||
</mapper> |
||||
@ -0,0 +1,19 @@ |
||||
|
||||
package org.springblade.modules.monitor.service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
import org.springblade.modules.monitor.entity.DataWarn; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 设备报警记录表 服务类 |
||||
* |
||||
* @author |
||||
* @since 2022-01-07 |
||||
*/ |
||||
public interface IDataWarnService extends IService<DataWarn> { |
||||
|
||||
|
||||
|
||||
} |
||||
@ -0,0 +1,23 @@ |
||||
|
||||
package org.springblade.modules.monitor.service.impl; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.modules.monitor.entity.DataWarn; |
||||
import org.springblade.modules.monitor.mapper.DataWarnMapper; |
||||
import org.springblade.modules.monitor.service.IDataWarnService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
|
||||
/** |
||||
* 设备报警记录表 服务实现类 |
||||
* |
||||
* @author |
||||
* @since 2022-01-07 |
||||
*/ |
||||
@Service |
||||
@AllArgsConstructor |
||||
public class DataWarnServiceImpl extends ServiceImpl<DataWarnMapper, DataWarn> implements IDataWarnService { |
||||
|
||||
|
||||
} |
||||
Loading…
Reference in new issue