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.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.List;

/**
 * @Description:
 * @Reference:
 * @Author: jessica.chen
 * @CreateDate: 2019\11\15 10:01
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_QC_ORDER")
@Api("MES_检验单")
public class MesQcOrder extends BaseBean implements Serializable {

    private static final long serialVersionUID = -5412635747424111476L;
    @Column(name = "ORDER_NO")
    @ApiParam("质检单号")
    private String orderNo;

    @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 = "FINISH_QTY", columnDefinition = "decimal(18,8)")
    @ColumnDefault("0")
    @ApiParam("已检数量")
    private Double finishQty = 0D;

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

    @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 = "RELATION_ORDER_NO")
    @ApiParam("关联单号")
    private String relationOrderNo;

    @Column(name = "UUID")
    @ApiParam("数据唯一编号")
    private String uuid;

    @Column(name = "STATUS")
    @ApiParam("状态")
    private Integer status;

    @Column(name = "CHECK_RESULT")
    @ApiParam("检测整体结果")
    private Integer checkResult = 0;

    @Column(name = "MEMO")
    @ApiParam("备注")
    private String memo;

    @Column(name = "CUSTOMER_CODE")
    @ApiParam("客户代码")
    private String customerCode;

    @Column(name = "DELIVERY_DATE")
    @ApiParam("发运时间")
    private String deliveryDate;

    @Column(name = "CUST_DELIERY_LOCATION")
    @ApiParam("客户发运地")
    private String custDelieryLocation;

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

    @Column(name = "SAMPLE_TYPE")
    @ApiParam("样本类型")
    private Integer sampleType;

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

    @Deprecated
    @ApiParam(value = "检测结果")
    @Transient
    private String resultStatus;

    @ApiParam(value = "显示按钮")
    @Transient
    private List<String> buttons;

    @ApiParam(value = "产品条码")
    @Transient
    private String serialNumber;

    @ApiParam(value = "工单号")
    @Transient
    private String mesWorkNo;

    @Transient
    @ApiParam("产品条码")
    private String productSn;

    @Transient
    @ApiParam("本批次生产总数")
    private Double locSrcLotNoQty;

    @Transient
    @ApiParam("客户名称")
    private String customerName;

    @Transient
    @ApiParam("班次")
    private String shiftName;

    @Transient
    @ApiParam("班长")
    private String squadLeader;
}
