package com.aucma.production.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;

/**
 * 安灯事件对象 andon_event
 *
 * @author Yinq
 * @date 2025-10-28
 */
public class AndonEvent extends BaseEntity
        {
private static final long serialVersionUID=1L;

    /** 主键ID */
    private Long eventId;

    /** 安灯呼叫单号 */
            @Excel(name = "安灯呼叫单号")
    private String callCode;

    /** 呼叫类型编码（如质量/设备/物料/安全等） */
            @Excel(name = "呼叫类型编码", readConverterExp = "如=质量/设备/物料/安全等")
    private String callTypeCode;

    /** 触发源类型：工位/设备/报警/手动 */
            @Excel(name = "触发源类型：工位/设备/报警/手动")
    private String sourceType;

    /** 触发源引用ID（设备/报警/其他） */
            @Excel(name = "触发源引用ID", readConverterExp = "设=备/报警/其他")
    private Long sourceRefId;

    /** 产品线编码 */
            @Excel(name = "产品线编码")
    private String productLineCode;

    /** 工位/工序编码 */
            @Excel(name = "工位/工序编码")
    private String stationCode;

    /** 班组编码 */
            @Excel(name = "班组编码")
    private String teamCode;

    /** 工单号 */
            @Excel(name = "工单号")
    private String orderCode;

    /** 物料编码 */
            @Excel(name = "物料编码")
    private String materialCode;

    /** 设备ID */
            @Excel(name = "设备ID")
    private Long deviceId;

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

    /** 优先级（1最高，默认3） */
            @Excel(name = "优先级", readConverterExp = "1=最高，默认3")
    private Long priority;

    /** 事件状态（待处理/处理中/已解决/已取消） */
            @Excel(name = "事件状态", readConverterExp = "待=处理/处理中/已解决/已取消")
    private String eventStatus;

    /** 呼叫描述 */
            @Excel(name = "呼叫描述")
    private String description;

    /** 确认人 */
            @Excel(name = "确认人")
    private String ackBy;

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

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

    /** 处理完成/解决时间 */
            @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
            @Excel(name = "处理完成/解决时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date responseEndTime;

    /** 处理/解决措施 */
            @Excel(name = "处理/解决措施")
    private String resolution;

    /** 取消原因 */
            @Excel(name = "取消原因")
    private String cancelReason;

    /** 升级级别 */
            @Excel(name = "升级级别")
    private Long escalateLevel;

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

    /** 确认截止时间 */
            @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
            @Excel(name = "确认截止时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date ackDeadline;

    /** 解决截止时间 */
            @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
            @Excel(name = "解决截止时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date resolveDeadline;

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

    public void setEventId(Long eventId)
            {
            this.eventId = eventId;
            }

    public Long getEventId()
            {
            return eventId;
            }
    public void setCallCode(String callCode)
            {
            this.callCode = callCode;
            }

    public String getCallCode()
            {
            return callCode;
            }
    public void setCallTypeCode(String callTypeCode)
            {
            this.callTypeCode = callTypeCode;
            }

    public String getCallTypeCode()
            {
            return callTypeCode;
            }
    public void setSourceType(String sourceType)
            {
            this.sourceType = sourceType;
            }

    public String getSourceType()
            {
            return sourceType;
            }
    public void setSourceRefId(Long sourceRefId)
            {
            this.sourceRefId = sourceRefId;
            }

    public Long getSourceRefId()
            {
            return sourceRefId;
            }
    public void setProductLineCode(String productLineCode)
            {
            this.productLineCode = productLineCode;
            }

    public String getProductLineCode()
            {
            return productLineCode;
            }
    public void setStationCode(String stationCode)
            {
            this.stationCode = stationCode;
            }

    public String getStationCode()
            {
            return stationCode;
            }
    public void setTeamCode(String teamCode)
            {
            this.teamCode = teamCode;
            }

    public String getTeamCode()
            {
            return teamCode;
            }
    public void setOrderCode(String orderCode)
            {
            this.orderCode = orderCode;
            }

    public String getOrderCode()
            {
            return orderCode;
            }
    public void setMaterialCode(String materialCode)
            {
            this.materialCode = materialCode;
            }

    public String getMaterialCode()
            {
            return materialCode;
            }
    public void setDeviceId(Long deviceId)
            {
            this.deviceId = deviceId;
            }

    public Long getDeviceId()
            {
            return deviceId;
            }
    public void setDeviceCode(String deviceCode)
            {
            this.deviceCode = deviceCode;
            }

    public String getDeviceCode()
            {
            return deviceCode;
            }
    public void setPriority(Long priority)
            {
            this.priority = priority;
            }

    public Long getPriority()
            {
            return priority;
            }
    public void setEventStatus(String eventStatus)
            {
            this.eventStatus = eventStatus;
            }

    public String getEventStatus()
            {
            return eventStatus;
            }
    public void setDescription(String description)
            {
            this.description = description;
            }

    public String getDescription()
            {
            return description;
            }
    public void setAckBy(String ackBy)
            {
            this.ackBy = ackBy;
            }

    public String getAckBy()
            {
            return ackBy;
            }
    public void setAckTime(Date ackTime)
            {
            this.ackTime = ackTime;
            }

    public Date getAckTime()
            {
            return ackTime;
            }
    public void setResponseStartTime(Date responseStartTime)
            {
            this.responseStartTime = responseStartTime;
            }

    public Date getResponseStartTime()
            {
            return responseStartTime;
            }
    public void setResponseEndTime(Date responseEndTime)
            {
            this.responseEndTime = responseEndTime;
            }

    public Date getResponseEndTime()
            {
            return responseEndTime;
            }
    public void setResolution(String resolution)
            {
            this.resolution = resolution;
            }

    public String getResolution()
            {
            return resolution;
            }
    public void setCancelReason(String cancelReason)
            {
            this.cancelReason = cancelReason;
            }

    public String getCancelReason()
            {
            return cancelReason;
            }
    public void setEscalateLevel(Long escalateLevel)
            {
            this.escalateLevel = escalateLevel;
            }

    public Long getEscalateLevel()
            {
            return escalateLevel;
            }
    public void setEscalateTime(Date escalateTime)
            {
            this.escalateTime = escalateTime;
            }

    public Date getEscalateTime()
            {
            return escalateTime;
            }
    public void setAckDeadline(Date ackDeadline)
            {
            this.ackDeadline = ackDeadline;
            }

    public Date getAckDeadline()
            {
            return ackDeadline;
            }
    public void setResolveDeadline(Date resolveDeadline)
            {
            this.resolveDeadline = resolveDeadline;
            }

    public Date getResolveDeadline()
            {
            return resolveDeadline;
            }
    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("eventId",getEventId())
            .append("callCode",getCallCode())
            .append("callTypeCode",getCallTypeCode())
            .append("sourceType",getSourceType())
            .append("sourceRefId",getSourceRefId())
            .append("productLineCode",getProductLineCode())
            .append("stationCode",getStationCode())
            .append("teamCode",getTeamCode())
            .append("orderCode",getOrderCode())
            .append("materialCode",getMaterialCode())
            .append("deviceId",getDeviceId())
            .append("deviceCode",getDeviceCode())
            .append("priority",getPriority())
            .append("eventStatus",getEventStatus())
            .append("description",getDescription())
            .append("ackBy",getAckBy())
            .append("ackTime",getAckTime())
            .append("responseStartTime",getResponseStartTime())
            .append("responseEndTime",getResponseEndTime())
            .append("resolution",getResolution())
            .append("cancelReason",getCancelReason())
            .append("escalateLevel",getEscalateLevel())
            .append("escalateTime",getEscalateTime())
            .append("ackDeadline",getAckDeadline())
            .append("resolveDeadline",getResolveDeadline())
            .append("isFlag",getIsFlag())
            .append("remark",getRemark())
            .append("createBy",getCreateBy())
            .append("createTime",getCreateTime())
            .append("updateBy",getUpdateBy())
            .append("updateTime",getUpdateTime())
        .toString();
        }
        }
