package cn.estsh.i3plus.ext.mes.pcn.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;

/**
 * @Description:
 * @Author: xiangming.liao
 * @Date: 2021/01/18 10:23
 * @Modify:
 */
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_PART_CHECK_DETAIL", indexes = {
        @Index(columnList = "WORK_ORDER_NO"),
        @Index(columnList = "PART_NO"),
        @Index(columnList = "ORDER_NO")
})
@Api("MES_物料点检明细")
public class MesPartCheckDetail extends BaseBean implements Serializable {

    private static final long serialVersionUID = 3536995464009135839L;

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

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

    @Column(name = "WORK_CELL_CODE")
    @ApiParam(value = "工作单元代码")
    public String workCellCode;

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

    @Column(name = "PROCESS_NAME")
    @ApiParam("工序名称")
    private String processName;

    @Column(name = "ITEM_PART_NO")
    @ApiParam("子零件")
    private String itemPartNo;

    @Column(name = "ITEM_PART_NAME")
    @ApiParam("原材料物料名称")
    private String itemPartName;

    @Column(name = "SHIFT_CODE")
    @ApiParam("班次")
    private String shiftCode;

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

    @Column(name = "PART_NAME_RDD")
    @ApiParam("物料名称")
    private String partNameRdd;

    @Column(name = "ORDER_NO")
    @ApiParam("单据编号")
    private String orderNo;

    @Column(name="ORDER_STATUS")
    @ApiParam(value ="单据状态")
    private Integer orderStatus;

    @Column(name = "ORDER_DATE")
    @ApiParam("单据日期")
    private String orderDate;

    @Column(name = "CHECK_USER")
    @ApiParam("点检人员")
    private String checkUser;

    @Column(name = "CHECK_TIME")
    @ApiParam("点检时间")
    private String checkTime;

    /**
     * 10=是，20=否
     */
    @Column(name = "SHIFT_GROUP_CHECK")
    @ApiParam("班组确认")
    private Integer shiftGroupCheck;

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

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

    /**
     * 10=是，20=否
     */
    @Column(name = "QUALITY_CHECK")
    @ApiParam("品质确认")
    private Integer qualityCheck;

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

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

    @Column(name = "GENERATE_TIME")
    @ApiParam("生成时间")
    private String generateTime;

    @Column(name = "COMPLATE_TIME")
    @ApiParam("完成时间")
    private String complateTime;

    @Transient
    @ApiParam(
            value = "点检开始日期查询用，查询截至日期",
            example = "2021-01-01 00:00:00"
    )
    public String checkStartTime;
    @Transient
    @ApiParam(
            value = "点检结束日期查询用，查询截至日期",
            example = "2022-01-01 00:00:00"
    )
    public String checkEndTime;
}
