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.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 = "MaterialBrokenUpAndDownDto", description = "关联破碎上料+破碎下料组托明细")
public class MaterialBrokenUpAndDownDto implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("破碎上料id")
    @ExcelIgnore
    private Integer upId;

    @ApiModelProperty("上料箱号")
    @ExcelProperty(value = "花篮号", index = 7)
    private String upBoxNo;

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

    @ApiModelProperty("上料时间")
    @ExcelProperty(value = "破碎上料时间", converter = LocalDateStringConverter.class, index = 8)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime upCreateTime;

    @ApiModelProperty("上料人")
    @ExcelProperty(value = "破碎上料人", index = 9)
    private String upCreateUser;

    @ApiModelProperty("分选pp批次")
    @ExcelProperty(value = "PP号", index = 0)
    private String productBatchNo;

    @ApiModelProperty("下料小箱盒号")
    @ExcelProperty(value = "下料箱号", index = 11)
    private String downBoxNo;

    @ApiModelProperty("下料id")
    @ExcelIgnore
    private Integer downId;

    @ApiModelProperty("下料重量")
    @ExcelProperty(value = "下料重量", index = 10)
    private BigDecimal downWeight;

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

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

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

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

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

    @ApiModelProperty("下料人")
    @ExcelProperty(value = "破碎下料人", index = 13)
    private String downUser;

    @ApiModelProperty("下料时间")
    @ExcelProperty(value = "破碎下料时间", converter = LocalDateStringConverter.class, index = 12)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime downCreateTime;

    @ApiModelProperty("组托号")
    @ExcelIgnore
    private String groupNo;

    @ApiModelProperty("组托id")
    @ExcelIgnore
    private Integer groupId;

//    @ApiModelProperty("重量差异")
//    @ExcelIgnore
//    private BigDecimal diffWeight ;

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