package com.prolog.eis.dto.shelves;

import com.prolog.eis.utils.GoodsPropertyUtils;
import com.prolog.framework.core.annotation.Ignore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;

@Data
public class ConfirmAdjustDto {
    /*@ApiModelProperty("商品属性")
    @NotBlank(message = "商品属性不能为空")
    private String bizPropertyId;*/

    @ApiModelProperty("原货架号")
    @NotBlank(message = "原货架号不能为空")
    private String sourcePalletNo;

    @ApiModelProperty("原货位号")
    @NotBlank(message = "原货位号不能为空")
    private String sourcePalletLocation;

    @ApiModelProperty("目标货架号")
    @NotBlank(message = "目标货架号不能为空")
    private String targetPalletNo;

    @ApiModelProperty("目标货位号")
    @NotBlank(message = "目标货位号不能为空")
    private String targetPalletLocation;

    @ApiModelProperty("调整数量")
    @NotBlank(message = "调整数量不能为空")
    private BigDecimal adjustQty;

    @ApiModelProperty(value = "商品ID")
    private String itemId;

    @ApiModelProperty(value = "批次ID")
    private String lotId;

    @ApiModelProperty(value = "货主ID")
    private String ownerId;

    @ApiModelProperty(value = "包装ID")
    private String packId;

    private String goodsId;
    /**
     * 业务属性（多属性拼接）
     */
    @Ignore
    private String property;

    public String getProperty(){
        return GoodsPropertyUtils.getGoodsProperty(this.itemId,this.lotId,this.ownerId,this.packId);
    }
}
