package com.prolog.upcloud.base.wh.operate.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Digits;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 移库明细
 *
 * @author wujunjie
 */
@Data
@ApiModel
public class WmsMoveDetailVO implements Serializable {

    private static final long serialVersionUID = 259945517944042568L;

    /**
     * 移出库位ID
     */
    @ApiModelProperty(value = "移出库位ID")
    @NotBlank(message = "{required}")
    private String outLocatorId;

    /**
     * 移出容器ID
     */
    @ApiModelProperty(value = "移出容器ID")
    private String outContainerCode = "N/A";

    /**
     * 移出货格
     */
    @ApiModelProperty(value = "移出货格")
    private String outGoodsCaseCode = "N/A";

    /**
     * 移入库位ID
     */
    @ApiModelProperty(value = "移入库位ID")
    @NotBlank(message = "{required}")
    private String inLocatorId;

    /**
     * 移入容器ID
     */
    @ApiModelProperty(value = "移入容器ID")
    private String inContainerCode = "N/A";

    /**
     * 移入货格
     */
    @ApiModelProperty(value = "移入货格")
    private String inGoodsCaseCode = "N/A";

    /**
     * 商品ID
     */
    @ApiModelProperty(value = "商品ID")
    @NotBlank(message = "{required}")
    private String itemId;

    /**
     * 单位
     */
    @ApiModelProperty(value = "单位")
    @NotBlank(message = "{required}")
    private String uom;

    /**
     * 批次ID
     */
    @ApiModelProperty(value = "批次ID")
    @NotBlank(message = "{required}")
    private String batchId;

    /**
     * 批号
     */
    @ApiModelProperty(value = "批号")
    private String batchNum;

    /**
     * 转换因子
     */
    //    @NotNull(message = "{required}")
    //    @Digits(integer = 14, fraction = 4, message = "{invalid}")
    @ApiModelProperty(value = "转换因子")
    private BigDecimal conversionRate;

    /**
     * 最大单位（箱单位）含量
     */
    @NotNull(message = "{required}")
    @ApiModelProperty(value = "最大单位（箱单位）含量")
    @Digits(integer = 30, fraction = 4, message = "{invalid}")
    private BigDecimal caseConversionRate;


    //    @NotNull(message = "{required}")
    //    @Digits(integer = 30, fraction = 4, message = "{invalid}")
    @ApiModelProperty(value = "最小含量")
    private BigDecimal pieceConversionRate;

    /**
     * 零散数
     */
    @NotNull(message = "{required}")
    @ApiModelProperty(value = "零散数")
    @Digits(integer = 30, fraction = 4, message = "{invalid}")
    private BigDecimal oddPieceQuantity;

    /**
     * 数量
     */
    @NotNull(message = "{required}")
    @ApiModelProperty(value = "整件数")
    @Digits(integer = 30, fraction = 4, message = "{invalid}")
    private BigDecimal caseQuantity;

    /**
     * 移动原因
     */
    @ApiModelProperty(value = "移动原因")
    private String reason;

    /**
     * 上架库存状态
     */
    @ApiModelProperty(value = "上架库存状态")
    @NotBlank(message = "{required}")
    @Length(max = 32, message = "{noMoreThan}")
    private String inStockStatus;

    /**
     * 下架库存状态
     */
    @ApiModelProperty(value = "下架库存状态")
    @NotBlank(message = "{required}")
    @Length(max = 32, message = "{noMoreThan}")
    private String outStockStatus;

    @ApiModelProperty(value = "ERP计划数量")
    private Integer erpPlanQuantity;

    @ApiModelProperty(value = "ERP移库原因")
    private String erpReason;

    @ApiModelProperty(value = "不合格原因")
    private String unqualifiedReason;

    /**
     * 移入库别拣货方式
     */
    @ApiModelProperty(value = "移入库别拣货方式")
    private String inPickMode;

    /**
     * 移出库别拣货方式
     */
    @ApiModelProperty(value = "移出库别拣货方式")
    private String outPickMode;

    /**
     * 移入库别
     */
    @ApiModelProperty(value = "移入库别")
    @NotBlank(message = "移入库别不能为空")
    private String inwarehouseAreaCategory;

    /**
     * 移出库别
     */
    @ApiModelProperty(value = "移出库别")
    @NotBlank(message = "移出库别不能为空")
    private String outwarehouseAreaCategory;
}
