package com.aucma.base.domain;

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

import java.util.Date;

/**
 * 工艺预警对象 process_alert
 *
 * @author Yinq
 * @date 2025-12-30
 */
public class ProcessAlert extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 预警ID */
    private Long alertId;

    /** 预警编号 */
    @Excel(name = "预警编号")
    private String alertCode;

    /** 预警类型(参数超限/设备异常/质量异常) */
    @Excel(name = "预警类型")
    private String alertType;

    /** 预警级别(1一般/2重要/3紧急) */
    @Excel(name = "预警级别", readConverterExp = "1=一般,2=重要,3=紧急")
    private String alertLevel;

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

    /** 设备名称 */
    @Excel(name = "设备名称")
    private String deviceName;

    /** 参数编码 */
    @Excel(name = "参数编码")
    private String paramCode;

    /** 参数名称 */
    @Excel(name = "参数名称")
    private String paramName;

    /** 预警内容 */
    @Excel(name = "预警内容")
    private String alertContent;

    /** 预警值 */
    @Excel(name = "预警值")
    private String alertValue;

    /** 阈值 */
    @Excel(name = "阈值")
    private String thresholdValue;

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

    /** 预警状态(0未处理/1处理中/2已处理) */
    @Excel(name = "预警状态", readConverterExp = "0=未处理,1=处理中,2=已处理")
    private String alertStatus;

    /** 处理人 */
    @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 handleResult;

    /** 是否有效(1有效/0无效) */
    @Excel(name = "是否有效", readConverterExp = "1=有效,0=无效")
    private String isFlag;

    public void setAlertId(Long alertId) {
        this.alertId = alertId;
    }

    public Long getAlertId() {
        return alertId;
    }

    public void setAlertCode(String alertCode) {
        this.alertCode = alertCode;
    }

    public String getAlertCode() {
        return alertCode;
    }

    public void setAlertType(String alertType) {
        this.alertType = alertType;
    }

    public String getAlertType() {
        return alertType;
    }

    public void setAlertLevel(String alertLevel) {
        this.alertLevel = alertLevel;
    }

    public String getAlertLevel() {
        return alertLevel;
    }

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

    public String getDeviceCode() {
        return deviceCode;
    }

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

    public String getDeviceName() {
        return deviceName;
    }

    public void setParamCode(String paramCode) {
        this.paramCode = paramCode;
    }

    public String getParamCode() {
        return paramCode;
    }

    public void setParamName(String paramName) {
        this.paramName = paramName;
    }

    public String getParamName() {
        return paramName;
    }

    public void setAlertContent(String alertContent) {
        this.alertContent = alertContent;
    }

    public String getAlertContent() {
        return alertContent;
    }

    public void setAlertValue(String alertValue) {
        this.alertValue = alertValue;
    }

    public String getAlertValue() {
        return alertValue;
    }

    public void setThresholdValue(String thresholdValue) {
        this.thresholdValue = thresholdValue;
    }

    public String getThresholdValue() {
        return thresholdValue;
    }

    public void setAlertTime(Date alertTime) {
        this.alertTime = alertTime;
    }

    public Date getAlertTime() {
        return alertTime;
    }

    public void setAlertStatus(String alertStatus) {
        this.alertStatus = alertStatus;
    }

    public String getAlertStatus() {
        return alertStatus;
    }

    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 setHandleResult(String handleResult) {
        this.handleResult = handleResult;
    }

    public String getHandleResult() {
        return handleResult;
    }

    public void setIsFlag(String isFlag) {
        this.isFlag = isFlag;
    }

    public String getIsFlag() {
        return isFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("alertId", getAlertId())
                .append("alertCode", getAlertCode())
                .append("alertType", getAlertType())
                .append("alertLevel", getAlertLevel())
                .append("deviceCode", getDeviceCode())
                .append("deviceName", getDeviceName())
                .append("paramCode", getParamCode())
                .append("paramName", getParamName())
                .append("alertContent", getAlertContent())
                .append("alertValue", getAlertValue())
                .append("thresholdValue", getThresholdValue())
                .append("alertTime", getAlertTime())
                .append("alertStatus", getAlertStatus())
                .append("handleUser", getHandleUser())
                .append("handleTime", getHandleTime())
                .append("handleResult", getHandleResult())
                .append("isFlag", getIsFlag())
                .append("remark", getRemark())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
