package com.prolog.eis.dto.outbound;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @desc:
 * @author: zhangJie
 * @date: 2023/6/8 14:51
 */
@Data
public class OutBoundMainDto {

    private String msgId;
    private Integer groupOrderPolicy;
    private String warehouseId;

    @ApiModelProperty("作业类型")
    @NotBlank(message = "作业类型不能为空")
    private String workType;

    @ApiModelProperty("业务类型")
    @NotBlank(message = "业务类型不能为空")
    private String businessType;

    @ApiModelProperty("波次号")
    private String waveNo;

    @ApiModelProperty("Wms任务单号")
    private String taskId;

    @ApiModelProperty("WMS订单号")
    @NotBlank(message = "WMS订单号不能为空")
    private String billNo;

    @ApiModelProperty("是否打印首营、质检报告单\n")
    @NotBlank(message = "不能为空")
    private String str1;

    @ApiModelProperty("是否打印发票、出库清单\n")
    @NotBlank(message = "不能为空")
    private String str2;

    @ApiModelProperty("客户ID\n")
    @NotBlank(message = "客户ID不能为空")
    private String companyId;

    @ApiModelProperty("客户名称")
    private String companyName;

    @ApiModelProperty("容器编号")
    private String containerNo;

    @ApiModelProperty("WMS任务行号")
    @NotBlank(message = "任务行号不能为空")
    private String taskLineId;

    @ApiModelProperty("订单优先级")
    @NotNull(message = "订单优先级不能为空")
    private Integer priority;

    @ApiModelProperty("物料ID")
    private String itemId;

    @NotBlank(message = "企业ID不能为空")
    @ApiModelProperty("企业ID")
    private String enterpriseId;
    @ApiModelProperty("批次ID")
    private String lotId;
    @ApiModelProperty("货主ID")
    private String ownerId;
    @ApiModelProperty("包装ID")
    private String packId;

    @ApiModelProperty("数量（最小库存单位）")
    private BigDecimal qty;

    @ApiModelProperty("源区域")
    private String originalArea;

    @ApiModelProperty("货位")
    private String locNo;

    @ApiModelProperty("目标区域（WMS货位）")
    private String targetArea;

    @ApiModelProperty("目标点位")
    private String targetLocation;

    @ApiModelProperty("wms大货位")
    @NotBlank(message = "wms大货位不能为空")
    private String wmsLocationCode;

    @ApiModelProperty("WMS出库任务下发增加库存缺货策略字段：0：优先库存出库-满足订单部分数量出库原则 1：优先订单整单出库-订单部分库存不足整单挂起取消原则 2：优先订单整单出库-订单部分库存不足挂起，等待整单库存全部命中后在出库--配置超时时间，超出后EIS取消订单，调用库存异常通知接口回告WMS")
    private Integer inventoryShortageType;


    @ApiModelProperty("是否允许超发")
    private Integer isOver;
    @ApiModelProperty("盘点是否审核")
    private Integer isCheck;

    @ApiModelProperty("1明盘 2暗盘")
    private Integer checkType;

    @ApiModelProperty("省份名称")
    private Integer province;

    @ApiModelProperty("订单销售时间")
    private LocalDateTime orderCreateTime;

    @ApiModelProperty("1：当前商品为药品\n" +
            "2：当前商品为物料，物料不参与库存计算\n")
    @NotNull(message = "商品类型不能为空")
    private Integer isMaterial;

    @ApiModelProperty("明细集合")
    private List<OutBoundDetailDto> subList;

}
