package com.aucma.dms.domain;

import com.aucma.common.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;



/**
 * 设备报警记录对象 dms_record_alarm_info
 *
 * @author Yinq
 * @date 2024-08-13
 */
public class DmsRecordAlarmInfo extends DmsBaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键标识
     */
    private Long alarmId;

    /**
     * 设备台账id,关联dms_base_device_ledger的device_id
     */
    @Excel(name = "设备台账id")
    private Long deviceId;

    /**
     * 设备报警规则id,关联dms_base_alarm_rule的alarm_rule_id
     */
    @Excel(name = "设备报警规则id")
    private Long alarmRuleId;

    /**
     * 报警开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "报警开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date alarmBeginTime;

    /**
     * 报警结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "报警结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date alarmEndTime;

    /**
     * 报警持续时间（ms）
     */
    @Excel(name = "报警持续时间", readConverterExp = "m=s")
    private Long continueTime;

    /**
     * 报警原因
     */
    @Excel(name = "报警原因")
    private String alarmReason;

    /**
     * 报警数据
     */
    @Excel(name = "报警数据")
    private String alarmData;

    /**
     * 报警状态（0未处理 1人工已处理 2自动恢复）
     */
    @Excel(name = "报警状态", readConverterExp = "0=未处理,1=人工已处理,2=自动恢复")
    private String alarmStatus;

    /**
     * 处理建议
     */
    @Excel(name = "处理建议")
    private String handleSuggest;

    /**
     * 通知状态（0未通知 1已通知）
     */
    @Excel(name = "通知状态", readConverterExp = "0=未通知,1=已通知")
    private String noticeStatus;

    /**
     * 处理人员
     */
    @Excel(name = "处理人员")
    private String handleUser;

    /**
     * 处理时间
     */
    @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 causeAnalysis;

    /**
     * 报警类型（1AGV 2PLC 3其他设备）
     */
    @Excel(name = "报警类型", readConverterExp = "1=AGV,2=PLC,3=其他设备")
    private String alarmType;


    /**
     * 报警级别（1一级 2二级 3三级）
     */
    @Excel(name = "报警级别", readConverterExp = "1=一级,2=二级,3=三级")
    private String alarmLevel;

    /**
     * 通知方式（1WEB 2公众号 3PLC）可多选
     */
    @Excel(name = "通知方式", readConverterExp = "1=WEB,2=公众号,3=PLC")
    private String noticeType;

    /**
     * 自动恢复标识（0否 1是）
     */
    @Excel(name = "自动恢复标识", readConverterExp = "0=否,1=是")
    private String recoverType;

    /**
     * 报警状态字
     */
    @Excel(name = "报警状态字")
    private String alarmStatusWord;

    /** 设备编号 */
    @Excel(name = "设备编号")
    private String deviceCode;

    /** 设备名称 */
    @Excel(name = "设备名称")
    private String 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 getNoticeType() {
        return noticeType;
    }

    public void setNoticeType(String noticeType) {
        this.noticeType = noticeType;
    }

    public String getRecoverType() {
        return recoverType;
    }

    public void setRecoverType(String recoverType) {
        this.recoverType = recoverType;
    }

    public String getAlarmStatusWord() {
        return alarmStatusWord;
    }

    public void setAlarmStatusWord(String alarmStatusWord) {
        this.alarmStatusWord = alarmStatusWord;
    }

    public String getDeviceCode() {
        return deviceCode;
    }

    public void setDeviceCode(String deviceCode) {
        this.deviceCode = deviceCode;
    }

    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public void setAlarmId(Long alarmId) {
        this.alarmId = alarmId;
    }

    public Long getAlarmId() {
        return alarmId;
    }

    public void setDeviceId(Long deviceId) {
        this.deviceId = deviceId;
    }

    public Long getDeviceId() {
        return deviceId;
    }

    public void setAlarmRuleId(Long alarmRuleId) {
        this.alarmRuleId = alarmRuleId;
    }

    public Long getAlarmRuleId() {
        return alarmRuleId;
    }

    public void setAlarmBeginTime(Date alarmBeginTime) {
        this.alarmBeginTime = alarmBeginTime;
    }

    public Date getAlarmBeginTime() {
        return alarmBeginTime;
    }

    public void setAlarmEndTime(Date alarmEndTime) {
        this.alarmEndTime = alarmEndTime;
    }

    public Date getAlarmEndTime() {
        return alarmEndTime;
    }

    public void setContinueTime(Long continueTime) {
        this.continueTime = continueTime;
    }

    public Long getContinueTime() {
        return continueTime;
    }

    public void setAlarmReason(String alarmReason) {
        this.alarmReason = alarmReason;
    }

    public String getAlarmReason() {
        return alarmReason;
    }

    public void setAlarmData(String alarmData) {
        this.alarmData = alarmData;
    }

    public String getAlarmData() {
        return alarmData;
    }

    public void setAlarmStatus(String alarmStatus) {
        this.alarmStatus = alarmStatus;
    }

    public String getAlarmStatus() {
        return alarmStatus;
    }

    public void setHandleSuggest(String handleSuggest) {
        this.handleSuggest = handleSuggest;
    }

    public String getHandleSuggest() {
        return handleSuggest;
    }

    public void setNoticeStatus(String noticeStatus) {
        this.noticeStatus = noticeStatus;
    }

    public String getNoticeStatus() {
        return noticeStatus;
    }

    public void setHandleUser(String handleUser) {
        this.handleUser = handleUser;
    }

    public String getHandleUser() {
        return handleUser;
    }

    public void setHandleTime(Date handleTime) {
        this.handleTime = handleTime;
    }

    public Date getHandleTime() {
        return handleTime;
    }

    public void setCauseAnalysis(String causeAnalysis) {
        this.causeAnalysis = causeAnalysis;
    }

    public String getCauseAnalysis() {
        return causeAnalysis;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("alarmId", getAlarmId())
                .append("deviceId", getDeviceId())
                .append("alarmRuleId", getAlarmRuleId())
                .append("alarmBeginTime", getAlarmBeginTime())
                .append("alarmEndTime", getAlarmEndTime())
                .append("continueTime", getContinueTime())
                .append("alarmReason", getAlarmReason())
                .append("alarmData", getAlarmData())
                .append("alarmStatus", getAlarmStatus())
                .append("handleSuggest", getHandleSuggest())
                .append("noticeStatus", getNoticeStatus())
                .append("handleUser", getHandleUser())
                .append("handleTime", getHandleTime())
                .append("causeAnalysis", getCauseAnalysis())
                .append("remark", getRemark())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
