package com.sw.mes.yb.production.dto;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @Author
 * @Description：
 * @Date: Create in
 * @Modified By:
 */
@Data
@ApiModel(value = "长晶棒信息Dto")
public class LongCrystalExcelDto {

    @ExcelIgnore
    private Long id;

    @ApiModelProperty(value = "炉次id")
    @ExcelIgnore
    String lotId;

    @ApiModelProperty(value = "设备号")
    @ExcelProperty(value = "设备号", index = 0)
    String equipmentCode;

    @ApiModelProperty(value = "炉次号")
    @ExcelProperty(value = "炉次号", index = 1)
    String lotNo;

    @ApiModelProperty(value = "晶棒SN")
    @ExcelProperty(value = "晶棒SN", index = 2)
    String crystalNo;


    @ApiModelProperty(value = "掺杂剂")
    @ExcelProperty(value = "掺杂剂", index = 3)
    String dopant;

    @ApiModelProperty(value = "所属系列")
    @ExcelProperty(value = "所属系列", index = 4)
    String series;


    @ApiModelProperty(value = "所属模块")
    @ExcelProperty(value = "所属模块", index = 5)
    String area;

    @ApiModelProperty(value = "产品等级")
    @ExcelProperty(value = "产品等级", index = 6)
    String productGrade;

    @ApiModelProperty(value = "产品类别")
    @ExcelProperty(value = "产品类别", index = 7)
    String productType;

    @ApiModelProperty(value = "规格")
    @ExcelProperty(value = "规格", index = 8)
    String specs;

    @ApiModelProperty(value = "产出时间", required = true)
    @ExcelProperty(value = "产出时间", index = 9)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    Date gmtCreate;

    @ExcelProperty(value = "产出日期", index = 10)
    @JsonFormat(pattern = "yyyy-MM-dd")
    Date gmtCreateDate;

    @ApiModelProperty(value = "收尾方式")
    @ExcelProperty(value = "收尾方式", index = 11)
    String windUp;

    @ApiModelProperty(value = "复投次数")
    @ExcelProperty(value = "复投次数", index = 12)
    Integer againNum;

    @ApiModelProperty(value = "单晶颗数")
    @ExcelProperty(value = "单晶颗数", index = 13)
    Integer crystalNum;

    @ApiModelProperty(value = "晶体长度")
    @ExcelProperty(value = "晶体长度", index = 14)
    BigDecimal length;

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

    /**
     * 最后一次重量
     */
    @ApiModelProperty(value = "最后一次重量")
    @ExcelProperty(value = "毛重", index = 16)
    private BigDecimal lastWeight;

    /**
     * 完结标识:
     * W 完结尾
     * V 完结棒
     */
    @ApiModelProperty(value = "完结标识")
    @ExcelProperty(value = "完结标识", index = 17)
    private String closureIdentification;

    @ApiModelProperty(value = "完结时间")
    @ExcelProperty(value = "完结时间", index = 18)
    private Date closureTime;

    @ApiModelProperty(value = "完结日期")
    @ExcelProperty(value = "完结日期", index = 19)
    private Date closureDate;


    @ApiModelProperty(value = "炉台类型【0:默认；0-常规;1-常规;2-研发;】", required = true)
    @ExcelProperty(value = "炉台类型", index = 20, converter = LongCrystalFurnceTypeConverter.class)
    Integer furnaceType;


    /**
     * 上月订单号
     */
    @ApiModelProperty(value = "上月单晶工单")
    @ExcelProperty(value = "上月单晶工单", index = 21)
    private String lastOrderNo;

    @ApiModelProperty(value = "单晶订单编号")
    @ExcelProperty(value = "单晶订单编号", index = 22)
    String orderNo;

    @ApiModelProperty(value = "料号")
    @ExcelProperty(value = "料号", index = 23)
    String productCode;

    @ApiModelProperty(value = "划线开始时间")
    @ExcelProperty(value = "划线时间", index = 24)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lineStartTime;

    @ApiModelProperty(value = "划线开始日期")
    @ExcelProperty(value = "划线日期", index = 25)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date lineStartTimeDate;

    @ApiModelProperty(value = "状态【0：默认；0-未送验；1-已绑定；2-已送验(呼叫AGV);3-已退料；9-待确认;4-异常（不流向送验绑定工步）】", required = true)
    @ExcelProperty(value = "状态", index = 26, converter = LongCrystalStatusConverter.class)
    Integer crystalStatus;


    @ApiModelProperty(value = "一检等径长度")
    @ExcelProperty(value = "一检等径长度(MM)", index = 27)
    BigDecimal YiJianDengJinglength;

    @ApiModelProperty(value = "一检合格有效长度")
    @ExcelProperty(value = "一检合格有效长度(MM)", index = 28)
    BigDecimal YiJianHeGeYouXiaolength;


    @ApiModelProperty(value = "成晶重量")
    @ExcelProperty(value = "成晶重量", index = 29)
    private BigDecimal ChengJingWeight;


    /**
     * 最大直径
     */
    @ApiModelProperty(value = "直径最大值")
    @ExcelProperty(value = "直径最大值", index = 30)
    private BigDecimal maxDiam;
    /**
     * 最小直径
     */
    @ApiModelProperty(value = "直径最小值")
    @ExcelProperty(value = "直径最小值", index = 31)
    private BigDecimal minDiam;

    @ApiModelProperty(value = "单晶产出异常一级")
    @ExcelProperty(value = "单晶产出异常", index = 32)
    String crystalErrorLevelOne;


    @ApiModelProperty(value = "方棒边长")
    @ExcelProperty(value = "方棒边长", index = 33)
    private String sideLengthRange;

    @ApiModelProperty(value = "投料总量")
    @ExcelProperty(value = "投料总量", index = 34)
    private BigDecimal touLiaoTotalWeight;

    @ApiModelProperty(value = "长晶棒总重")
    @ExcelProperty(value = "长晶棒总重", index = 35)
    private BigDecimal longCrystalTotalWeight;

    @ApiModelProperty(value = "提渣盖")
    @ExcelProperty(value = "提渣盖", index = 36)
    private BigDecimal tiZhaGai;

    @ApiModelProperty(value = "提肩料")
    @ExcelProperty(value = "提肩料", index = 37)
    private BigDecimal tiJianLiao;

    @ApiModelProperty(value = "埚底料")
    @ExcelProperty(value = "埚底料", index = 38)
    private BigDecimal guoDiLiao;

    @ApiModelProperty(value = "墩埚料")
    @ExcelProperty(value = "墩埚料", index = 39)
    private BigDecimal dunGuoLiao;

    @ApiModelProperty(value = "炉次损耗")
    @ExcelProperty(value = "炉次损耗", index = 40)
    private BigDecimal HeatLoss;


    @ApiModelProperty(value = "料号名称")
    @ExcelIgnore
    String productName;

    @ApiModelProperty(value = "订单号id")
    @ExcelIgnore
    Long orderId;
    @ApiModelProperty(value = "生产工单id")
    @ExcelIgnore
    Long scheduleId;
    @ApiModelProperty(value = "投料量")
    @ExcelIgnore
    Integer feedingCount;
    @ApiModelProperty(value = "订单类型")
    @ExcelIgnore
    String orderType;


    @ApiModelProperty(value = "单晶产出异常2")
    @ExcelIgnore
    String crystalErrorLevelTwo;


    @ApiModelProperty(value = "AGV送验任务编号")
    @ExcelIgnore
    String agvTaskCode;
    @ApiModelProperty(value = "确认信息")
    @ExcelIgnore
    Boolean confirmInfo;

    /**
     * 上月订单类型
     */
    @ApiModelProperty(value = "上月订单类型")
    @ExcelIgnore
    private String lastOrderType;

    // 上月订单号id
    @ApiModelProperty(value = "上月订单号id")
    @ExcelIgnore
    private Long lastOrderId;


    @ApiModelProperty(value = "复投次数")
    @ExcelIgnore
    private Integer isDone = 0;


}
