package com.sw.mes.yb.check.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 异常管理
 */
@Entity
@Table(name = "zhxx_operate_except_manage")
@DynamicUpdate
@DynamicInsert
public class ExceptManage {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
     * 设备编号
     */
    @Column(length = 100)
    @ApiModelProperty(value = "设备编号")
    private String deviceNo;

    /**
     * 异常等级：一级；二级
     */
    @Column(length = 20)
    @ApiModelProperty(value = "异常等级：一级；二级")
    private String exceptionGrade;

    /**
     * 炉次号
     */
    @Column(length = 100)
    @ApiModelProperty(value = "炉次号")
    private String lotNo;

    /**
     * 工号
     */
    @Column(length = 2000)
    @ApiModelProperty(value = "工号")
    private String workNo;

    /**
     * 操作人ID
     */
    @Column(length = 50)
    @ApiModelProperty(value = "操作人ID")
    private String userId;

    /**
     * 操作人
     */
    @Column(length = 50)
    @ApiModelProperty(value = "操作人")
    private String userName;

    /**
     * 操作时间
     */
    @Column(length = 19)
    @ApiModelProperty(value = "操作时间")
    @Temporal(TemporalType.TIMESTAMP)
    private Date operateDate;

    /**
     * 异常类型
     */
    @Column(length = 100)
    @ApiModelProperty(value = "异常类型")
    private String exceptionType;

    /**
     * 原因分类
     */
    @Column(length = 40)
    @ApiModelProperty(value = "原因分类")
    private String causeClassification;

    /**
     * 责任工序
     */
    @Column(length = 40)
    @ApiModelProperty(value = "责任工序")
    private String dutyProcess;

    /**
     * 区域
     */
    @Column(length = 40)
    @ApiModelProperty(value = "区域")
    private String area;

    /**
     * 区域1
     */
    @Column(length = 40)
    @ApiModelProperty(value = "区域1")
    private String areaOne;

    /**
     * 系列
     */
    @Column(length = 40)
    @ApiModelProperty(value = "系列")
    private String series;

    /**
     * 班次
     */
    @Column(length = 40)
    @ApiModelProperty(value = "班次")
    private String classesName;

    /**
     * 班组
     */
    @Column(length = 40)
    @ApiModelProperty(value = "班组")
    private String teamName;

    /**
     * 直接责任人
     */
    @Column(length = 40)
    @ApiModelProperty(value = "直接责任人")
    private String personLiable;

    /**
     * 负责人
     */
    @Column(length = 40)
    @ApiModelProperty(value = "负责人")
    private String responsiblePerson;

    /**
     * 石英坩埚厂家
     */
    @Column(length = 40)
    @ApiModelProperty(value = "石英坩埚厂家")
    private String quartzCrucibleManufacturer;

    /**
     * 坩埚材质
     */
    @Column(length = 40)
    @ApiModelProperty(value = "坩埚材质")
    private String crucibleMaterial;

    /**
     * 运行时间
     */
    @Column(length = 19)
    @ApiModelProperty(value = "运行时间")
    private BigDecimal runTime;

    /**
     * 剩料重量
     */
    @Column(length = 19)
    @ApiModelProperty(value = "剩料重量")
    private BigDecimal residualWeight;

    /**
     * 拉晶情况
     */
    @Column(length = 2000)
    @ApiModelProperty(value = "拉晶情况")
    private String crystalInfo;

    /**
     * 运行异常描述
     */
    @Column(length = 255)
    @ApiModelProperty(value = "运行异常描述")
    private String operationExceptionDescription;

    /**
     * 原因分析
     */
    @Column(length = 255)
    @ApiModelProperty(value = "原因分析")
    private String reasonAnalysis;


    /**
     * 措施
     */
    @Column(length = 255)
    @ApiModelProperty(value = "措施")
    private String measure;

    /**
     * 分析报告
     */
    @Column(length = 255)
    @ApiModelProperty(value = "分析报告")
    private String analysisReport;

    /**
     * 分析人
     */
    @Column(length = 40)
    @ApiModelProperty(value = "分析人")
    private String analyst;

    /**
     * 目标投料量
     */
    @Column(length = 20)
    @ApiModelProperty(value = "目标投料量")
    private BigDecimal targetMaterialsInput;

    /**
     * 实际投料量
     */
    @Column(length = 20)
    @ApiModelProperty(value = "实际投料量")
    private BigDecimal actualMaterialsInput;

    /**
     * 用料配比
     */
    @Column(length = 20)
    @ApiModelProperty(value = "用料配比")
    private BigDecimal ratioMaterials;

    @Column(length = 19)
    @ApiModelProperty(value = "操作时间")
    @Temporal(TemporalType.TIMESTAMP)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date occurredTime;
    /**
     * 具体类型
     */
    @Column(length = 100)
    @ApiModelProperty(value = "具体类型")
    private String detailType;

    /**
     * 备注
     */
    @Column(length = 2000)
    @ApiModelProperty(value = "备注")
    private String remark;


    /**
     * 备注
     */
    @Column(length = 255)
    @ApiModelProperty(value = "备注")
    private String beiZhu;

    /**
     * 修改人
     */
    @Column(length = 50)
    private String updateUser;

    /**
     * 修改时间
     */
    @Column(nullable = false, length = 19)
    @Temporal(TemporalType.TIMESTAMP)
    private Date updateTime;


    /**
     * 异常记录状态： 2:已停炉
    */
    @Column(length = 2)
    @ApiModelProperty(value = "异常记录状态:2:已停炉")
    private Integer recordStatus;

    public Integer getRecordStatus() {
        return recordStatus;
    }

    public void setRecordStatus(Integer recordStatus) {
        this.recordStatus = recordStatus;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getDeviceNo() {
        return deviceNo;
    }

    public void setDeviceNo(String deviceNo) {
        this.deviceNo = deviceNo;
    }

    public String getLotNo() {
        return lotNo;
    }

    public void setLotNo(String lotNo) {
        this.lotNo = lotNo;
    }

    public String getWorkNo() {
        return workNo;
    }

    public void setWorkNo(String workNo) {
        this.workNo = workNo;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Date getOperateDate() {
        return operateDate;
    }

    public void setOperateDate(Date operateDate) {
        this.operateDate = operateDate;
    }

    public String getExceptionType() {
        return exceptionType;
    }

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

    public String getDetailType() {
        return detailType;
    }

    public void setDetailType(String detailType) {
        this.detailType = detailType;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getBeiZhu(){return beiZhu;}

    public void setBeiZhu(String beiZhu){this.beiZhu=beiZhu;}

    public String getExceptionGrade() {
        return exceptionGrade;
    }

    public void setExceptionGrade(String exceptionGrade) {
        this.exceptionGrade = exceptionGrade;
    }

    public String getCauseClassification() {
        return causeClassification;
    }

    public void setCauseClassification(String causeClassification) {
        this.causeClassification = causeClassification;
    }

    public String getDutyProcess() {
        return dutyProcess;
    }

    public void setDutyProcess(String dutyProcess) {
        this.dutyProcess = dutyProcess;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public String getAreaOne() {
        return areaOne;
    }

    public void setAreaOne(String areaOne) {
        this.areaOne = areaOne;
    }

    public String getSeries() {
        return series;
    }

    public void setSeries(String series) {
        this.series = series;
    }

    public String getClassesName() {
        return classesName;
    }

    public void setClassesName(String classesName) {
        this.classesName = classesName;
    }

    public String getTeamName() {
        return teamName;
    }

    public void setTeamName(String teamName) {
        this.teamName = teamName;
    }

    public String getPersonLiable() {
        return personLiable;
    }

    public void setPersonLiable(String personLiable) {
        this.personLiable = personLiable;
    }

    public String getResponsiblePerson() {
        return responsiblePerson;
    }

    public void setResponsiblePerson(String responsiblePerson) {
        this.responsiblePerson = responsiblePerson;
    }

    public String getQuartzCrucibleManufacturer() {
        return quartzCrucibleManufacturer;
    }

    public void setQuartzCrucibleManufacturer(String quartzCrucibleManufacturer) {
        this.quartzCrucibleManufacturer = quartzCrucibleManufacturer;
    }

    public String getCrucibleMaterial() {
        return crucibleMaterial;
    }

    public void setCrucibleMaterial(String crucibleMaterial) {
        this.crucibleMaterial = crucibleMaterial;
    }

    public BigDecimal getRunTime() {
        return runTime;
    }

    public void setRunTime(BigDecimal runTime) {
        this.runTime = runTime;
    }

    public BigDecimal getResidualWeight() {
        return residualWeight;
    }

    public void setResidualWeight(BigDecimal residualWeight) {
        this.residualWeight = residualWeight;
    }

    public String getCrystalInfo() {
        return crystalInfo;
    }

    public void setCrystalInfo(String crystalInfo) {
        this.crystalInfo = crystalInfo;
    }

    public String getOperationExceptionDescription() {
        return operationExceptionDescription;
    }

    public void setOperationExceptionDescription(String operationExceptionDescription) {
        this.operationExceptionDescription = operationExceptionDescription;
    }

    public String getReasonAnalysis() {
        return reasonAnalysis;
    }

    public void setReasonAnalysis(String reasonAnalysis) {
        this.reasonAnalysis = reasonAnalysis;
    }

    public String getMeasure() {
        return measure;
    }

    public void setMeasure(String measure) {
        this.measure = measure;
    }

    public String getAnalysisReport() {
        return analysisReport;
    }

    public void setAnalysisReport(String analysisReport) {
        this.analysisReport = analysisReport;
    }

    public String getAnalyst() {
        return analyst;
    }

    public void setAnalyst(String analyst) {
        this.analyst = analyst;
    }

    public BigDecimal getTargetMaterialsInput() {
        return targetMaterialsInput;
    }

    public void setTargetMaterialsInput(BigDecimal targetMaterialsInput) {
        this.targetMaterialsInput = targetMaterialsInput;
    }

    public BigDecimal getActualMaterialsInput() {
        return actualMaterialsInput;
    }

    public void setActualMaterialsInput(BigDecimal actualMaterialsInput) {
        this.actualMaterialsInput = actualMaterialsInput;
    }

    public BigDecimal getRatioMaterials() {
        return ratioMaterials;
    }

    public void setRatioMaterials(BigDecimal ratioMaterials) {
        this.ratioMaterials = ratioMaterials;
    }

    public Date getOccurredTime() {
        return occurredTime;
    }

    public void setOccurredTime(Date occurredTime) {
        this.occurredTime = occurredTime;
    }

    public String getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}
