package cn.estsh.i3plus.pojo.sweb.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;

/**
 * @Description :
 * @Reference :
 * @Author : jack.lv
 * @CreateDate : 2019-04-01 11:21
 * @Modify:
 **/
@Data
@Table(name = "SWEB_PURCHASE_ORDER_DETAILS")
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Api("采购订单表-明细表")
public class SwebPurchaseOrderDetails extends BaseBean {

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

    @ApiParam("供应商编号")
    @Column(name = "VENDOR_CODE")
    private String vendorCode;

    @ApiParam("供应商名称")
    @Column(name = "VENDOR_NAME")
    private String vendorName;

    @Column(name = "PART_VERSION")
    @ApiParam("零件版本")
    private Integer partVersion;

    @Column(name = "PART_NO")
    @ApiParam(value = "零件号")
    private String partNo;

    @Column(name = "PART_NAME")
    @ApiParam(value = "零件名称")
    private String partName;

    @ApiParam(value = "订单类型", example = "1")
    @Column(name = "ORDER_TYPE")
    public Integer orderType;

    @ApiParam("零件类型")
    @Column(name = "PART_TYPE")
    private Integer partType;

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

    @ApiParam(value = "行项目状态", example = "1")
    @Column(name = "ITEM_STATUS")
    private Integer itemStatus;

    @Column(name = "BOX_QTY")
    @ColumnDefault("0")
    @ApiParam(value = "箱数", example = "0")
    private Integer boxQty;

    @Column(name = "SNP_QTY")
    @ColumnDefault("0")
    @ApiParam(value = "默认包装规格", example = "0")
    private Double snpQty;

    @Column(name = "PRINT_QTY")
    @ColumnDefault("0")
    @ApiParam(value = "打印数", example = "0")
    private Double printQty;

    @Column(name = "REC_QTY")
    @ColumnDefault("0")
    @ApiParam(value = "收货数量", example = "0")
    private Double recQty;

    @Column(name = "REC_BOX_QTY")
    @ColumnDefault("0")
    @ApiParam(value = "已收箱数", example = "0")
    private Double recBoxQty;

    @Column(name = "UPLOAD_QTY")
    @ColumnDefault("0")
    @ApiParam(value = "上传数量", example = "0")
    private Double uploadQty;

    @Column(name = "ERP_WAREHOUSE")
    @ApiParam("库存地")
    private String erpWarehouse;

    // 停用
    @Column(name = "REF_QTY")
    @ColumnDefault("0")
    @ApiParam(value = "订单数量", example = "0")
    private Double refQty;

    @Column(name = "ORDER_QTY")
    @ColumnDefault("0")
    @ApiParam(value = "需求数", example = "0")
    private Double orderQty;

    @Column(name = "SHIP_QTY")
    @ColumnDefault("0")
    @ApiParam(value = "发运数量", example = "0")
    private Double shipQty;

    @Column(name = "PRINT_TIME")
    @ApiParam(value = "打印时间")
    private String printTime;

    @Column(name = "PRINT_USER_CODE")
    @ApiParam("打印用户code")
    private String printUserCode;

    @Column(name = "IS_STEEL")
    @ApiParam("是否为钢卷料")
    private Integer isSteel;

    @Column(name = "PLAN_DATE")
    @ApiParam("计划交货日期")
    private String planDate;

    @Column(name = "PLAN_TIME")
    @ApiParam("计划交货时间")
    private String planTime;

    /**
     * 不冗余主表数据
     */
    @Transient
    @ApiParam(value = "预计到货日期")
    public String expectedTime;

    @Column(name = "REMARK")
    @ApiParam("备注")
    private String remark;

    @ApiParam("是否同步")
    @Column(name = "IS_SYN")
    private String isSyn;

    @Column(name = "INSTOCK_QTY")
    @ColumnDefault("0")
    @ApiParam(value = "入库数量", example = "0")
    private Double instockQty;

    @Column(name = "INSTOCK_BOX_QTY")
    @ColumnDefault("0")
    @ApiParam(value = "入库箱数", example = "0")
    private Double instockBoxQty;

    @Column(name = "NC_QTY")
    @ColumnDefault("0")
    @ApiParam(value = "不良数", example = "0")
    private Double ncQty;

    @Column(name = "NC_BOX_QTY")
    @ColumnDefault("0")
    @ApiParam(value = "不良箱数", example = "0")
    private Double ncBoxQty;

    @Column(name = "ITEM_NO")
    @ColumnDefault("0")
    @ApiParam(value = "行号", example = "0")
    private Integer itemNo;

    @Column(name = "CONFIRM_TIME")
    @ApiParam(value = "确认时间")
    private String confirmTime;

    @Column(name = "DELIVERY_TIME")
    @ApiParam(value = "交货时间")
    public String deliveryTime;

    @Column(name = "REF_NO")
    @ApiParam(value = "合同号")
    private String refNo;

    @Transient
    @ApiParam(value = "关联单号")
    private String refOrderNo;

    @Transient
    @ApiParam(value = "条码")
    private String barCode;
}
