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

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.sw.mes.itemclean.clean.utils.MaterialGroupStatusConverter;
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.util.Date;

/**
 * <p>
 * 组托入库
 * </p>
 *
 * @author liuzemin
 * @since 2022-11-10
 */
@Getter
@Setter
@ApiModel(value = "MaterialGroup对象", description = "组托入库")
public class MaterialGroupVo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @ExcelIgnore
    private Integer id;

    @ApiModelProperty("重量（上料总计）")
    @ExcelProperty(value = "重量",index = 7)
    private BigDecimal weight;

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

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

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

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

    @ApiModelProperty("电阻档位")
    @ExcelProperty(value = "档位",index = 5)
    private String materialGear;

    @ApiModelProperty("设备号")
    @ExcelIgnore
    private String deviceNo;

    @ApiModelProperty("生产分选批次")
    @ExcelIgnore
    private String productBatchNo;

    @ApiModelProperty(value = "日批次号")
    @ExcelProperty(value = "日批次号",index = 1)
    private String dateProduceBatchNo;

    @ApiModelProperty("托号")
    @ExcelProperty(value = "托号",index = 0)
    private String groupNo;

    @ApiModelProperty("创建人-组托人")
    @ExcelProperty(value = "组托人",index = 8)
    private String createUser;

    @ApiModelProperty("创建时间-组托时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ExcelProperty(value = "组托时间",index = 9)
    private Date createTime;

    @ApiModelProperty("更新人")
    @ExcelIgnore
    private String updateUser;

    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ExcelIgnore
    private Date updateTime;

    @ApiModelProperty("逻辑删除标记")
    @ExcelIgnore
    private Integer delFlag;

    @ApiModelProperty("0 =未入库,1 =已入库,2= 调拨成功")
    @ExcelProperty(value = "状态", converter = MaterialGroupStatusConverter.class, index = 12)
    private Integer status;

    @ApiModelProperty("ERP工单")
    @ExcelIgnore
    private String aufnr;

    @ApiModelProperty("ERP订单编号")
    @ExcelIgnore
    private String erpOrder;

    @ApiModelProperty("erp库位")
    @ExcelIgnore
    private String erpWarehouseCode;

    /**
     * ERP上报状态，0 未上报，1 已上报
     */
    @ApiModelProperty("ERP上报状态，0 未上报，1 已上报")
    @ExcelIgnore
    private Integer reportedState;

    @ApiModelProperty("成品编号")
    @ExcelIgnore
    private String finishedCode;

    @ApiModelProperty("erp上报时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ExcelIgnore
    private Date erpTime;

    @ApiModelProperty("发起入库人")
    @ExcelProperty(value = "发起入库人",index = 10)
    private String warehousingUser;

    @ApiModelProperty("发起入库时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ExcelProperty(value = "发起入库时间",index = 11)
    private Date warehousingTime;

    @ApiModelProperty("打托备注")
    @ExcelIgnore
    private String remark;

    @ApiModelProperty(value = "粒径范围")
    @ExcelIgnore
    private String suppliesGrain;

    @ApiModelProperty(value = "箱号")
    @ExcelIgnore
    private String boxNo;
}
