package com.aucma.report.domain;

import java.util.Date;

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

/**
 * 成品下线异常记录对象 record_exception
 *
 * @author Yinq
 * @date 2024-04-01
 */
public class RecordException extends BaseEntity {
    private static final long serialVersionUID = 1L;

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

    /**
     * 产品条码
     */
    @Excel(name = "产品条码")
    private String productSncode;

    /**
     * 异常信息
     */
    @Excel(name = "异常信息")
    private String exceptionMsg;

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

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

    /**
     * 异常类型（1=69码校验;2=重复扫描;3=未绑条码;4=未终检）
     */
    @Excel(name = "异常类型", readConverterExp = "1==69码校验;2=重复扫描;3=未绑条码;4=未终检")
    private Long exceptionType;

    /**
     * MES条码
     */
    @Excel(name = "MES条码")
    private String boxCode;

    public void setObjId(Long objId) {
        this.objId = objId;
    }

    public Long getObjId() {
        return objId;
    }

    public void setProductSncode(String productSncode) {
        this.productSncode = productSncode;
    }

    public String getProductSncode() {
        return productSncode;
    }

    public void setExceptionMsg(String exceptionMsg) {
        this.exceptionMsg = exceptionMsg;
    }

    public String getExceptionMsg() {
        return exceptionMsg;
    }

    public void setProductScantime(Date productScantime) {
        this.productScantime = productScantime;
    }

    public Date getProductScantime() {
        return productScantime;
    }

    public void setProductLineCode(String productLineCode) {
        this.productLineCode = productLineCode;
    }

    public String getProductLineCode() {
        return productLineCode;
    }

    public void setExceptionType(Long exceptionType) {
        this.exceptionType = exceptionType;
    }

    public Long getExceptionType() {
        return exceptionType;
    }

    public void setBoxCode(String boxCode) {
        this.boxCode = boxCode;
    }

    public String getBoxCode() {
        return boxCode;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("objId", getObjId())
                .append("productSncode", getProductSncode())
                .append("exceptionMsg", getExceptionMsg())
                .append("productScantime", getProductScantime())
                .append("productLineCode", getProductLineCode())
                .append("exceptionType", getExceptionType())
                .append("boxCode", getBoxCode())
                .toString();
    }
}
