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

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableLogic;
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 = "MaterialUnpackingJoinPageDto对象", description = "分选拆箱列表页")
public class MaterialUnpackingJoinPageDto implements Serializable {

    //----------分选前

    //每日生产批次号(供给SAP报工使用)
    @ApiModelProperty(value = "分选前日生产批次号")
    @ExcelIgnore
    private String dateProduceBatchNo;

    @ApiModelProperty("回收料表-分选前-掺杂剂")
    @ExcelIgnore
    private String dopant;

    @ApiModelProperty("回收料表-分选前-成本中心")
    @ExcelIgnore
    private String kostl;

    @ApiModelProperty("回收料表-分选前-定向标识")
    @ExcelIgnore
    private String directionalSign;

    @ApiModelProperty("回收料表-分选前-导电型号")
    @ExcelIgnore
    private String conductionType;

    @ApiModelProperty("回收料表-分选前-车间")
    @ExcelIgnore
    private String workShop;

    //--------领料表
    @ApiModelProperty("领料表主键")
    @ExcelIgnore
    private Integer id;

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

    @ApiModelProperty("成箱箱号")
    @ExcelIgnore
    private String materialBoxNo;

    @ApiModelProperty("生产批次号")
    @ExcelProperty(value = "余料批次号", index = 1)
    private String productBatchNo;

    @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("物料型号")
    @ExcelIgnore
    private String materialModel;

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

    @ApiModelProperty("物料类型 1原生多晶2回收料3落地料4返工料5清洗料6破碎料")
    /**
     * {@link com.sw.mes.core.enums.ItemCleanEnums.MaterialType}
     */
    @ExcelIgnore
    private Integer materialType;

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

    @ApiModelProperty("是否被领料 1是 0否")
    /**
     * (被领料的才能进入加工工序)
     */
    @ExcelIgnore
    private Integer pickingStatus;

    @ApiModelProperty("创建人")
    @ExcelIgnore
    private String createUser;

    @ApiModelProperty("创建时间")
    @ExcelIgnore
    private LocalDateTime createTime;

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

    @ApiModelProperty("更新时间")
    @ExcelIgnore
    private LocalDateTime updateTime;

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

    @ApiModelProperty("是否成箱 0否 1是")
    @ExcelIgnore
    private Integer isPack;

    @ApiModelProperty("是否空箱 0否 1是")
    @ExcelIgnore
    private Integer isEmptyBox;

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

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

    @ApiModelProperty(value = "卡板箱号")
    @ExcelProperty(value = "回收料箱号", index = 0)
    private String boxNo;

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


    @ApiModelProperty("已使用重量")
    @ExcelIgnore
    private BigDecimal usedWeight;

    @ApiModelProperty("剩余重量")
    @ExcelIgnore
    private BigDecimal unusedWeight;

    @ApiModelProperty("审核状态 0 待审核 1 已接收 2已拒收")
    @ExcelIgnore
    private Integer status;

    @ApiModelProperty("使用状态 0未使用 1已使用 2合批 3分选 4已清空")
    @ExcelIgnore
    private Integer useStatus;

    @ApiModelProperty("合批父id")
    @ExcelIgnore
    Integer parentId;

    @ApiModelProperty("合批批次号")
    @ExcelIgnore
    private String blendingProductBatchNo;

    @ApiModelProperty("合批人")
    @ExcelIgnore
    private String blendingUser;

    @ApiModelProperty("合批时间")
    @ExcelIgnore
    private LocalDateTime blendingTime;

    @ApiModelProperty("审核人")
    @ExcelIgnore
    private String examineUser;

    @ApiModelProperty("审核时间")
    @ExcelIgnore
    private LocalDateTime examineTime;

    @ApiModelProperty("发起人")
    @ExcelIgnore
    private String initiateUser;

    @ApiModelProperty("发起时间")
    @ExcelIgnore
    private LocalDateTime initiateTime;

    @ApiModelProperty("去向")
    @ExcelIgnore
    private String hasGone;

    @ApiModelProperty(value = "物料主数据供应商")
    @ExcelIgnore
    private String supplier;

    @ApiModelProperty(value = "物料主数据供应商Code")
    @ExcelIgnore
    private String supplierCode;

    //分选后-分选表--------

    @ApiModelProperty("分选后-主键")
    @ExcelIgnore
    private Integer muId;

    @ApiModelProperty("分选后-成箱号-分选批号")
    @ExcelIgnore
    private String muMaterialBoxNo;

    @ApiModelProperty("分选后-成箱重量")
    @ExcelProperty(value = "分选后重量", index = 15)
    private BigDecimal muWeight;

    @ApiModelProperty("分选后-物料编号")
    @ExcelProperty(value = "分选后物料编号", index = 12)
    private String muMaterialCode;

    @ApiModelProperty("分选后-物料名称")
    @ExcelProperty(value = "分选后物料名称", index = 11)
    private String muMaterialName;

    @ApiModelProperty("分选后-物料等级")
    @ExcelProperty(value = "分选后等级", index = 13)
    private String muMaterialLevel;

    @ApiModelProperty("分选后-物料型号")
    @ExcelIgnore
    private String muMaterialModel;

    @ApiModelProperty("分选后-电阻档位")
    @ExcelProperty(value = "分选后档位", index = 14)
    private String muMaterialGear;

    @ApiModelProperty("分选后-领料的生产批次")
    @ExcelIgnore
    private String muProductBatchNo;

    @ApiModelProperty("分选后-分选生产批次")
    @ExcelProperty(value = "PP号", index = 7)
    private String muFxProductBatchNo;

    @ApiModelProperty("分选后-物料属性：1原生多晶、2回收料、3返工料、4落地料、5清洗料、6破碎料")
    /**
     * {@link com.sw.mes.core.enums.ItemCleanEnums.MaterialType}
     */
    @ExcelIgnore
    private Integer muMaterialType;

    @ApiModelProperty("分选后-暂存标记")
    @ExcelIgnore
    private Integer muStagingFlag;

    @ApiModelProperty("分选后-逻辑删除标记")
    @TableLogic
    @ExcelIgnore
    private Integer muDelFlag;

    @ApiModelProperty("分选后-创建人")
    @ExcelProperty(value = "分选人", index = 17)
    private String muCreateUser;

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

    @ApiModelProperty("分选后-更新人")
    @ExcelIgnore
    private String muUpdateUser;

    @ApiModelProperty("分选后-更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ExcelIgnore
    private LocalDateTime muUpdateTime;

    @ApiModelProperty(value = "分选后-卡板箱号")
    @ExcelProperty(value = "分选后载具箱号", index = 8)
    private String muBoxNo;

    @ApiModelProperty("分选后-载具皮重")
    @ExcelIgnore
    private String muBoxWeight;

    @ApiModelProperty("分选后-载具类型")
    @ExcelIgnore
    private String muTypeName;

    @ApiModelProperty("分选后-已使用重量")
    @ExcelIgnore
    private BigDecimal muUsedWeight;

    @ApiModelProperty("分选后-剩余重量")
    @ExcelIgnore
    private BigDecimal muUnusedWeight;

    @ApiModelProperty("分选后-领料表中拆箱箱号")
    @ExcelIgnore
    private String muUnpackingBoxNo;

    @ApiModelProperty("分选后-其他异物重量")
    @ExcelProperty(value = "分选后异物重量", index = 16)
    private BigDecimal muOtherWeight;

    @ApiModelProperty("分选后-使用状态 0未使用 1已使用 2已清空")
    @ExcelIgnore
    private Integer muUseStatus;

    @ApiModelProperty("分选后-ERP工单")
    @ExcelProperty(value = "分选后工单号", index = 9)
    private String muAufnr;

    @ApiModelProperty("分选后-去向")
    @ExcelProperty(value = "分选去向", index = 10)
    private String muHasGone;

    @ApiModelProperty("分选后-实际重量(分选后合批前)")
    @ExcelIgnore
    private BigDecimal muActualWeight;

    @ApiModelProperty("分选后-合批父id")
    @ExcelIgnore
    Integer muParentId;

    @ApiModelProperty("分选后-合批批次号")
    @ExcelIgnore
    private String muBlendingProductBatchNo;

    @ApiModelProperty("分选后-合批人")
    @ExcelIgnore
    private String muBlendingUser;

    @ApiModelProperty("分选后-合批时间")
    @ExcelIgnore
    private LocalDateTime muBlendingTime;

    @ApiModelProperty("分选备注")
    @ExcelProperty(value = "分选备注", index = 19)
    private String muRemark;
}
