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

/**
 * @Description : WMS_拉动计划任务明细表
 * @Reference :
 * @Author : jessica.chen
 * @CreateDate : 2019-11-10 14:21
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="WMS_PULL_TASK_DETAILS")
@Api("WMS_拉动计划任务明细表")
public class WmsPullTaskDetails extends BaseBean{

    private static final long serialVersionUID = 9214639813072592736L;

    @Column(name="WROKORDER_NO")
    @ApiParam("工单号")
    private String woekorderNo;

    @Column(name="ITEM")
    @ApiParam(value = "行号", example = "0")
    private Integer item = 0;

    @Column(name="TERMINAL_NO")
    @ApiParam("工位代码")
    private String terminalNo;

    @Column(name="LOCATE_NO")
    @ApiParam("库位代码")
    private String locateNo;

    @Column(name="LOCATE_CAPACITY", nullable = false)
    @ApiParam(value = "库位容量", example = "0")
    @ColumnDefault("0")
    private Integer locateCapacity = 0;

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

    @Column(name="PART_NAME_RDD")
    @ApiParam("零件名称")
    private String partNameRdd;

    @Column(name="PLAN_PACK_QTY", nullable = false)
    @ApiParam(value = "计划数量", example = "0d")
    @ColumnDefault("0")
    private Double planPackQty = 0d;

    @Column(name="PLAN_PACK_COUNT", nullable = false)
    @ApiParam(value = "计划容器数", example = "0d")
    @ColumnDefault("0")
    private Double planPackCount = 0d;

    @Column(name="FIRST_BATCH_QTY", nullable = false)
    @ApiParam(value = "首批批量", example = "0d")
    @ColumnDefault("0")
    private Double firstBatchQty = 0d;

    @Column(name="FIRST_PACK_COUNT", nullable = false)
    @ApiParam(value = "首批容器数", example = "0d")
    @ColumnDefault("0")
    private Double firstPackCount = 0d;

    @Column(name="REQUEST_QTY", nullable = false)
    @ApiParam(value = "补货批量", example = "0d")
    @ColumnDefault("0")
    private Double requestQty = 0d;

    @Column(name="REQUEST_PACK_COUNT", nullable = false)
    @ApiParam(value = "补货容器数", example = "0d")
    @ColumnDefault("0")
    private Double requestPackCount = 0d;

    @Column(name="REQUEST_LOT_NO", nullable = false)
    @ApiParam(value = "补货批次", example = "0d")
    @ColumnDefault("0")
    private Double requestLotNo = 0d;

    @Column(name="REQUEST_TOTAL_COUNT", nullable = false)
    @ApiParam(value = "补货累加次数", example = "0d")
    @ColumnDefault("0")
    private Double requestTotalCount = 0d;

    @Column(name="LAST_REQUEST_TIME")
    @ApiParam("上一次补货时间")
    private String lastRequestTtime;

    @Column(name="BOOT_QTY", nullable = false)
    @ApiParam(value = "尾箱批量", example = "0d")
    @ColumnDefault("0")
    private Double bootQty = 0d;

    @Column(name="BOOT_PACK_COUNT", nullable = false)
    @ApiParam(value = "尾箱容器数", example = "0d")
    @ColumnDefault("0")
    private Double bootPackCount = 0d;

    @Column(name="BOOT_LOT_NO", nullable = false)
    @ApiParam(value = "尾箱批次", example = "0d")
    @ColumnDefault("0")
    private Double bootLotNo = 0d;

    @Column(name="ORDER_STATUS")
    @ApiParam(value = "明细状态", example = "0")
    private Integer orderStatus = 0;

    @Column(name="PART_GROUP_NO")
    @ApiParam("零件组号")
    public String partGroupNo;

    public Integer getOrderStatus() {
        return orderStatus == null ? 0 : this.orderStatus.intValue();
    }

    public Double getBootLotNo() {
        return bootLotNo == null ? 0d : this.bootLotNo.doubleValue();
    }

    public Double getBootPackCount() {
        return bootPackCount == null ? 0d : this.bootPackCount.doubleValue();
    }

    public Double getBootQty() {
        return bootQty == null ? 0d : this.bootQty.doubleValue();
    }

    public Double getRequestTotalCount() {
        return requestTotalCount == null ? 0d : this.requestTotalCount.doubleValue();
    }

    public Double getRequestLotNo() {
        return requestLotNo == null ? 0d : this.requestLotNo.doubleValue();
    }

    public Double getRequestPackCount() {
        return requestPackCount == null ? 0d : this.requestPackCount.doubleValue();
    }

    public Double getRequestQty() {
        return requestQty == null ? 0d : this.requestQty.doubleValue();
    }

    public Double getFirstPackCount() {
        return firstPackCount == null ? 0d : this.firstPackCount.doubleValue();
    }

    public Double getFirstBatchQty() {
        return firstBatchQty == null ? 0d : this.firstBatchQty.doubleValue();
    }

    public Double getPlanPackCount() {
        return planPackCount == null ? 0d : this.planPackCount.doubleValue();
    }

    public Integer getItem() {
        return item == null ? 0 : this.item.intValue();
    }

    public Double getLocateCapacity() {
        return locateCapacity == null ? 0d : this.locateCapacity.doubleValue();
    }

    public Double getPlanPackQty() {
        return planPackQty == null ? 0d : this.planPackQty.doubleValue();
    }

}