package cn.estsh.i3plus.pojo.mes.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.ColumnDefault;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;

/**
 * @author FutureSoldiers
 * @create 2021-08-12 14:45
 */
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Inheritance(strategy = InheritanceType.JOINED)
@Table(name = "Mes_Qc_Order_Reject")
@Api("MES_检验不合格审批单")
public class MesQcOrderReject extends BaseBean {
    private static final long serialVersionUID = 2462824203686021416L;

    @Column(name = "ORDER_NO")
    @ApiParam("质检单号")
    private String orderNo;

    @Column(name = "QC_ORDER_NO")
    @ApiParam("检验单号")
    private String qcOrderNo;

    @Column(name = "RECEIVE_DATE")
    @ApiParam("收货日期")
    private String receiveDate;

    @Column(name = "CHECK_TYPE")
    @ApiParam("检测类型")
    private Integer checkType;

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

    @Column(name = "PART_NAME")
    @ApiParam("物料名称")
    private String partName;

    @Column(name = "QTY", columnDefinition = "decimal(18,8)")
    @ColumnDefault("0")
    @ApiParam("收货数量")
    private Double qty = 0D;

    @Column(name = "SAMPLE_QTY")
    @ApiParam("检验数量")
    private double sampleQty;

    @Column(name = "STO_NO")
    @ApiParam("炉批号")
    private String stono;


    @Column(name = "UNIT")
    @ApiParam("单位")
    private String unit;

    @Column(name = "SUPPLIER_CODE")
    @ApiParam("供应商代码")
    private String supplierCode;

    @Column(name = "SRC_LOT_NO")
    @ApiParam("收货批次")
    private String srcLotNo;

    @Column(name = "FIX_LOT_NO")
    @ApiParam("特殊批次")
    private String fixLotNo;

    @Column(name = "WORK_CENTER_CODE")
    @ApiParam("产线")
    private String workCenterCode;

    @Column(name = "CHECK_ORDER_TYPE")
    @ApiParam("任务单类型")
    private String checkOrderType;

    // 10 来料任务质检单 20 外协件任务质检单
    @Column(name = "QC_ORDER_TYPE")
    @ApiParam("质检单类型")
    private Integer qcOrderType;

    @Column(name = "IF_QUALIFIED ")
    @ApiParam("是否合格")
    private String ifQualified;

    @Column(name = "FAIL_QTY")
    @ApiParam("不合格数量")
    private Double failQty;


    @Column(name = "FAIL_REASON")
    @ApiParam("不合格原因")
    private String failReason;

    @Column(name = "QUALITY_ENGINEER")
    @ApiParam("质量工程师")
    private String qualityEngineer;


    @Column(name = "QC_USER")
    @ApiParam("检验员")
    private String qcUser;

    @Column(name = "QC_DATE")
    @ApiParam(value = "检验日期")
    private String qcDate;

    @Column(name = "QC_TIME")
    @ApiParam(value = "检验时间")
    private String qcTime;



}
