package com.sw.mes.itemclean.clean.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.sw.mes.itemclean.clean.utils.LocalDateStringConverter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 领料单
 * </p>
 *
 * @author liuzemin
 * @since 2022-11-10
 */
@Getter
@Setter
@ApiModel(value = "MaterialApplyOrder对象", description = "领料单")
public class MaterialApplyOrderDto implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")@ExcelProperty(value = "主键")
    private Integer id;

    @ApiModelProperty("生产批次号")@ExcelProperty(value = "生产批次号")
    private String productBatchNo;

    //清洗批次号
    @ApiModelProperty("清洗批次号")@ExcelProperty(value = "清洗批次号")
    private String clanProductBatchNo;

    @ApiModelProperty("物料箱号")@ExcelProperty(value = "物料箱号")
    private String materialBoxNo;

    @ApiModelProperty("回收料载具号")@ExcelProperty(value = "回收料载具号")
    private String boxNo;

    @ApiModelProperty("去向")@ExcelProperty(value = "去向")
    private String hasGone;

    @ApiModelProperty("物料编号")@ExcelProperty(value = "物料编号")
    private String materialCode;

    @ApiModelProperty("物料名称")@ExcelProperty(value = "物料名称")
    private String materialName;

    @ApiModelProperty("物料等级")@ExcelProperty(value = "物料等级")
    private String materialLevel;

    @ApiModelProperty("物料型号")@ExcelProperty(value = "物料型号")
    private String materialModel;

    @ApiModelProperty("物料型号编码")@ExcelProperty(value = "物料型号编码")
    private String materialModelCode;

    @ApiModelProperty("物料档位")@ExcelProperty(value = "物料档位")
    private String materialGear;

    @ApiModelProperty("重量")@ExcelProperty(value = "重量")
    private BigDecimal weight;

    @ApiModelProperty("已使用重量")@ExcelProperty(value = "已使用重量")
    private BigDecimal usedWeight;

    @ApiModelProperty("未使用重量")@ExcelProperty(value = "未使用重量")
    private BigDecimal unusedWeight;

    @ApiModelProperty("厂家")@ExcelProperty(value = "厂家")
    private String materialComp;

    @ApiModelProperty("物料来源 1：清洗 2：循环料破碎 3：多晶破碎 4：分选")@ExcelProperty(value = "物料来源")
    private Integer materialSource;

    @ApiModelProperty("物料属性：1原生多晶、2回收料、3落地料、4返工、5分选拆箱、6分选成箱")@ExcelProperty(value = "物料属性：1原生多晶、2回收料、3落地料、4返工、5分选拆箱、6分选成箱")
    private Integer materialProp;

    @ApiModelProperty("领料人")@ExcelProperty(value = "领料人")
    private String applyName;

    @ApiModelProperty("领料时间")@ExcelProperty(value = "领料时间",converter = LocalDateStringConverter.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime applyTime;

    @ApiModelProperty("领料单类型：1：原生多晶 2：回收料 3：落地料 4：返工料")@ExcelProperty(value = "领料单类型：1：原生多晶 2：回收料 3：落地料 4：返工料")
    private Integer orderType;

    /*@ApiModelProperty("儿子id  -  拆箱再成箱的id")//@ExcelProperty(value = "儿子id  -  拆箱再成箱的id")
    private Integer sonId;

    @ApiModelProperty("儿子id  -  拆箱再成箱的id  ,可能有多个子箱")@ExcelProperty(value = "儿子id  -  拆箱再成箱的ids")
    private String sonIds;*/

    @ApiModelProperty("儿子箱号-拆箱再成箱的箱号,可能有多个子箱")@ExcelProperty(value = "儿子箱号-拆箱再成箱的箱号")
    private String materialBoxNoSons;

    @ApiModelProperty("逻辑删除标记")@ExcelProperty(value = "逻辑删除标记")
    private Integer delFlag;

    @ApiModelProperty("创建人")@ExcelProperty(value = "创建人")
    private String createUser;

    @ApiModelProperty("创建时间")@ExcelProperty(value = "创建时间",converter = LocalDateStringConverter.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @ApiModelProperty("更新人")@ExcelProperty(value = "更新人")
    private String updateUser;

    @ApiModelProperty("更新时间")@ExcelProperty(value = "更新时间",converter = LocalDateStringConverter.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @ApiModelProperty("ERP工单")@ExcelProperty(value = "ERP工单")
    private String aufnr;

    /**
     * erp库位
     */
    @ApiModelProperty("erp库位")
    private String erpWarehouseCode;
}
