package cn.estsh.i3plus.pojo.wms.bean;

import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.base.enumutil.WmsEnumUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
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;

/**
 * @Description : 库存交易条码信息（移库类的交易需要记录2笔交易数据，正负各一笔）
 * @Reference :
 * @Author : silliter.yuan
 * @CreateDate : 2018-11-06 15:58
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Inheritance(strategy = InheritanceType.JOINED)
@Table(name="WMS_TRANS_SN")
@Api("库存交易条码信息")
public class WmsTransSn extends BaseBean {

    private static final long serialVersionUID = -5303085479813153054L;
    @Column(name="WH_NO")
    @ApiParam("仓库代码")
    public String whNo;

    @Column(name="ZONE_NO")
    @ApiParam("存储区编号")
    public String zoneNo;

    @Column(name="LOCATE_NO")
    @ApiParam("库位编号")
    public String locateNo;

    @Column(name="PART_NO")
    @ApiParam("物料编码")
    public String partNo;

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

    @Column(name="SN")
    @ApiParam("条码")
    public String sn;

    @Column(name="PACKAGE_NO")
    @ApiParam("容器编号")
    public String packageNo;

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

    @Column(name="TRANS_CODE")
    @ApiParam("事务代码")
    public String transCode;

    @Column(name="QTY", columnDefinition = "decimal(18,8)", nullable = false)
    @ColumnDefault("0")
    @ApiParam(value = "交易数量", example = "0")
    public Double qty;

    @Column(name="REJECT_QTY", columnDefinition = "decimal(18,8)", nullable = false)
    @ColumnDefault("0")
    @ApiParam(value = "不合格交易数量", example = "0")
    public Double rejectQty;

    @Column(name="TRANS_NO")
    @ApiParam("事务编号")
    public String transNo;

    @Column(name = "QC_STATUS")
    @ApiParam(value = "质检状态", example = "0")
    private Integer qcStatus;

    @Column(name = "SN_STATUS")
    @ApiParam(value = "条码状态", example = "0")
    private Integer snStatus;

    @Column(name = "TRANS_QTY", columnDefinition = "decimal(18,8)")
    @ColumnDefault("0")
    @ApiParam(value = "交易数量")
    public Double transQty;

    @Column(name = "SRC_PART_NO")
    @ApiParam("源物料编码")
    public String srcPartNo;

    @Column(name = "NEW_PART_NO")
    @ApiParam("新物料编码")
    public String newPartNo;

    @Column(name = "SRC_QTY", columnDefinition = "decimal(18,8)")
    @ColumnDefault("0")
    @ApiParam(value = "源数量")
    public Double srcQty;

    @Column(name = "NEW_QTY", columnDefinition = "decimal(18,8)")
    @ColumnDefault("0")
    @ApiParam(value = "新数量")
    public Double newQty;

    @Column(name = "SRC_SN_STATUS")
    @ApiParam(value = "源条码状态")
    @AnnoOutputColumn(refClass = WmsEnumUtil.STOCK_SN_STATUS.class)
    public Integer srcSnStatus;

    @Column(name = "NEW_SN_STATUS")
    @ApiParam(value = "目的条码状态")
    @AnnoOutputColumn(refClass = WmsEnumUtil.STOCK_SN_STATUS.class)
    public Integer newSnStatus;

    @Column(name = "SRC_QC_STATUS")
    @ApiParam(value = "源质量状态")
    @AnnoOutputColumn(refClass = WmsEnumUtil.STOCK_SN_QC_STATUS.class)
    public Integer srcQcStatus;

    @Column(name = "NEW_QC_STATUS")
    @ApiParam(value = "目的质量状态")
    @AnnoOutputColumn(refClass = WmsEnumUtil.STOCK_SN_QC_STATUS.class)
    public Integer descQcStatus;

    @Column(name = "SRC_WH_NO")
    @ApiParam("源仓库代码")
    public String srcWhNo;

    @Column(name = "NEW_WH_NO")
    @ApiParam("新仓库代码")
    public String newWhNo;

    @Column(name = "SRC_ZONE_NO")
    @ApiParam("源存储区代码")
    public String srcZoneNo;

    @Column(name = "NEW_ZONE_NO")
    @ApiParam("新存储区代码")
    public String newZoneNo;

    @Column(name = "NEW_LOCATE_NO")
    @ApiParam("新库位代码")
    public String newLocateNo;

    @Column(name = "SRC_LOCATE_NO")
    @ApiParam("源库位代码")
    public String srcLocateNo;

    @Column(name = "SRC_ORGANIZE_CODE")
    @ApiParam("源工厂代码")
    public String srcOrganizeCode;

    @Column(name = "NEW_ORGANIZE_CODE")
    @ApiParam("新工厂代码")
    public String newOrganizeCode;

    @Column(name = "SRC_IS_DELETED")
    @ApiParam("旧软删标识")
    public Integer srcIsDeleted;

    @Column(name = "NEW_IS_DELETED")
    @ApiParam("新软删标识")
    public Integer newIsDeleted;

    @Column(name = "SRC_IS_VALID")
    @ApiParam("旧有效标识")
    public Integer srcIsValid;

    @Column(name = "NEW_IS_VALID")
    @ApiParam("新有效标识")
    public Integer newIsValid;
}
