package cn.estsh.i3plus.ext.mes.pojo.bean;

import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @author yumingxing
 * @version 1.0
 * @date 2021/2/2 13:23
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_FAIL_CASE_CHECK_DETAIL", indexes = {
        @Index(columnList = "ORDER_JOB_NO"),
        @Index(columnList = "ORDER_NO")
})
@Api("MES_失败事例点检")
public class MesFailCaseCheckDetail extends BaseBean implements Serializable {
    private static final long serialVersionUID = 4854127389456124072L;

    @Column(name = "ORDER_JOB_NO")
    @ApiParam("单据编号")
    private String orderJobNo;

    @Column(name = "ORDER_NO")
    @ApiParam("生产工单号")
    private String orderNo;

    @Column(name = "WORK_CELL_CODE")
    @ApiParam("工位号")
    private String workCellCode;

    @Column(name = "WORK_CENTER_CODE")
    @ApiParam("工作中心代码")
    private String workCenterCode;

    @Column(name = "PROCESS_CODE")
    @ApiParam(value = "工序代码")
    public String processCode;

    @Column(name = "WORK_PERSON")
    @ApiParam(value = "作业人员")
    public String workPerson;

    @Column(name = "PROCESS_NAME")
    @ApiParam("工序描述")
    private String processName;

    @Column(name = "PART_NO")
    @ApiParam("物料")
    private String partNo;

    @Column(name = "BAD_CONTENT")
    @ApiParam("不良内容")
    private String badContent;

    @Column(name = "STRATEGIES")
    @ApiParam("对应策略")
    private String strategies;

    @Column(name = "PUT_FORWARD")
    @ApiParam("提出方")
    private String putForward;

    @Column(name = "IMPL_DATE")
    @ApiParam("实施日")
    private String implDate;

    @Column(name = "CHECK_Result")
    @ApiParam("点检结果")
    private Integer checkResult;

    @Column(name = "SPOT_CHECK_USER")
    @ApiParam("点检人员")
    private String spotCheckUser;

    @Column(name = "SPOT_CHECK_TIME")
    @ApiParam("点检时间")
    private String spotCheckTime;

    @Column(name = "TEAM_CONFIRM_USER")
    @ApiParam("班组确认人")
    private String teamConfirmUser;

    @Column(name = "TEAM_CONFIRM_TIME")
    @ApiParam("班组确认时间")
    private String teamConfirmTime;

    @Column(name = "QUALITY_CONFIRM_USER")
    @ApiParam("品质确认人")
    private String qualityConfirmUser;

    @Column(name = "QUALITY_CONFIRM_TIME")
    @ApiParam("品质确认时间")
    private String qualityConfirmTime;

    @Column(name = "IS_TEAM_CONFIRM")
    @ApiParam("是否班组确认")
    private Integer isTeamConfirm = 20;

    @Column(name = "IS_QUALITY_CONFIRM")
    @ApiParam("是否品质确认")
    private Integer isQualityConfirm = 20;

    @Column(name = "SHIFT_CODE")
    @ApiParam(value = "班次编号")
    public String shiftCode;

    @Transient
    @ApiParam(value = "班组确认名称")
    public String shiftGroupCheckName;

    @Transient
    @ApiParam(value = "品质确认名称")
    public String qualityCheckName;

    @Transient
    @ApiParam("点检结果名称")
    private String checkResultName;

}
