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 com.sw.mes.enumvalue.EnumValuesServer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import java.math.BigDecimal;
import java.util.Date;

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

    @ExcelIgnore
    private Long id;
    @ApiModelProperty(value = "晶棒SN")
    @ExcelProperty(value = "晶棒SN", index = 2)
    String crystalNo;
    @ApiModelProperty(value = "批次号")
    @ExcelProperty(value = "批次号", index = 3)
    String batchNo;
    @ApiModelProperty(value = "设备号")
    @ExcelProperty(value = "设备号", index = 0)
    String equipmentCode;
    @ApiModelProperty(value = "炉次号")
    @ExcelProperty(value = "炉次号", index = 1)
    String lotNo;
    @ApiModelProperty(value = "炉次id")
    @ExcelIgnore
    String lotId;
    @ApiModelProperty(value = "所属系列")
    @ExcelProperty(value = "所属系列", index = 5)
    String series;
    @ApiModelProperty(value = "所属模块")
    @ExcelProperty(value = "所属模块", index = 6)
    String area;
    @ApiModelProperty(value = "收尾方式")
    @ExcelProperty(value = "收尾方式", index = 10)
    String windUp;
    @ApiModelProperty(value = "复投次数")
    @ExcelProperty(value = "复投次数", index = 11)
    Integer againNum;
    @ApiModelProperty(value = "炉数")
    @ExcelIgnore
    Integer lotTimes;
    @ApiModelProperty(value = "单晶颗数")
    @ExcelProperty(value = "单晶颗数", index = 12)
    Integer crystalNum;
    @ApiModelProperty(value = "重量")
    @ExcelProperty(value = "重量", index = 14)
    BigDecimal weight;
    @ApiModelProperty(value = "满锅重量")
    @ExcelIgnore
    BigDecimal fullPotWeight;
    @ApiModelProperty(value = "晶体长度")
    @ExcelProperty(value = "晶体长度", index = 13)
    BigDecimal length;
    @ApiModelProperty(value = "状态【0：默认；0-未送验；1-已绑定；2-已送验(呼叫AGV);3-已退料；9-待确认;4-异常（不流向送验绑定工步）】", required = true)
    @ExcelProperty(value = "状态", index = 23, converter = LongCrystalStatusConverter.class)
    Integer crystalStatus;
    @ApiModelProperty(value = "炉台类型【0:默认；0-常规;1-常规;2-研发;】", required = true)
    @ExcelProperty(value = "炉台类型", index = 15, converter = LongCrystalFurnceTypeConverter.class)
    Integer furnaceType;
    @ApiModelProperty(value = "料号")
    @ExcelProperty(value = "料号", index = 21)
    String productCode;
    @ApiModelProperty(value = "料号名称")
    @ExcelIgnore
    String productName;
    @ApiModelProperty(value = "产品等级")
    @ExcelProperty(value = "产品等级", index = 7)
    String productGrade;
    @ApiModelProperty(value = "订单号id")
    @ExcelIgnore
    Long orderId;
    @ApiModelProperty(value = "生产工单id")
    @ExcelIgnore
    Long scheduleId;
    @ApiModelProperty(value = "投料量")
    @ExcelIgnore
    Integer feedingCount;
    @ApiModelProperty(value = "单晶订单编号")
    @ExcelProperty(value = "单晶订单编号", index = 20)
    String orderNo;
    @ApiModelProperty(value = "产出确认订单编号")
    @ExcelProperty(value = "产出确认订单编号", index = 27)
    String advanceOrder;
    @ApiModelProperty(value = "订单类型")
    @ExcelIgnore
    String orderType;
    @ApiModelProperty(value = "规格")
    @ExcelProperty(value = "规格", index = 9)
    String specs;
    @ApiModelProperty(value = "掺杂剂")
    @ExcelProperty(value = "掺杂剂", index = 4)
    String dopant;
    @ApiModelProperty(value = "产品简称")
    @ExcelIgnore
    String simpleName;
    @ApiModelProperty(value = "型号")
    @ExcelIgnore
    String conductiveType;
    @ApiModelProperty(value = "产品类别")
    @ExcelProperty(value = "产品类别", index = 8)
    String productType;
    @ApiModelProperty(value = "单晶产出异常一级")
    @ExcelProperty(value = "单晶产出异常", index = 18)
    String crystalErrorLevelOne;
    @ApiModelProperty(value = "单晶产出异常2")
    @ExcelIgnore
    String crystalErrorLevelTwo;
    @ApiModelProperty(value = "产出时间", required = true)
    @ExcelProperty(value = "产出时间", index = 24)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    Date gmtCreate;

    @ExcelProperty(value = "创建人", index = 30)
    @ApiModelProperty(value = "创建人")
    String userCreate;

    @ApiModelProperty(value = "AGV送验任务编号")
    @ExcelIgnore
    String agvTaskCode;
    @ApiModelProperty(value = "确认信息")
    @ExcelIgnore
    Boolean confirmInfo;
    /**
     * 最大直径
     */
    @ApiModelProperty(value = "直径最大值")
    @ExcelProperty(value = "直径最大值", index = 16)
    private BigDecimal maxDiam;
    /**
     * 最小直径
     */
    @ApiModelProperty(value = "直径最小值")
    @ExcelProperty(value = "直径最小值", index = 17)
    private BigDecimal minDiam;

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

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

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

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

    @ApiModelProperty(value = "是否完结")
    @ExcelIgnore
    private Integer isDone = 0;

    @ApiModelProperty(value = "是否为单晶")
    @ExcelIgnore
    private Integer isCrystal = 1;

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

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

    @ApiModelProperty(value = "棒次时间", required = true)
    @ExcelProperty(value = "棒次时间", index = 28)
    private BigDecimal rodProductionTime;

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

    @ApiModelProperty(value = "溯源标识")
    @ExcelIgnore
    private String fromMark;

    @ApiModelProperty(value = "产品类型")
    @ExcelIgnore
    private String productCategory;

    @ApiModelProperty(value = "车间")
    @ExcelIgnore
    private String workShop;

    @ApiModelProperty(value = "基地")
    @ExcelIgnore
    private String baseMark;

    @ApiModelProperty(value = "发料编码")
    @ExcelIgnore
    String deliveryNo;

    @ApiModelProperty(value = "送检时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ExcelIgnore
    private Date inspectionTime;

    @ApiModelProperty(value = "取晶车任务编号")
    @ExcelIgnore
    String takeCrystalAgvTaskCode;

    @ApiModelProperty(value = "自动取晶响应")
    @ExcelIgnore
    String takeCrystalAgvTaskMsg;

    @ApiModelProperty(value = "取晶车是否到位1运行中2运行至目标炉台5已取消9已结束")
    @ExcelIgnore
    Integer crystalAgvTaskState;

    @ApiModelProperty(value = "是否呼叫取晶车0未呼叫1人工呼叫2自动呼叫")
    @ExcelIgnore
    Integer hasCall;

    @ApiModelProperty(value = "自动取晶时间")
    @ExcelIgnore
    Date autoTakeCrystal;

    @ApiModelProperty(value = "引晶埚转")
    @ExcelIgnore
    BigDecimal crystalCrucibleRotation;
}
