package com.sw.mes.plan.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.sw.mes.base.workinprocess.dto.CompletionStatusDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

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

/**
 * @Author
 * @Description：
 * @Date: Create in
 * @Modified By:
 */
@Data
@ApiModel(value = "加工工单列表返回对象DTO")
public class ProductionOrderDto {
    @ExcelProperty(value = "id")
    private Long id;
    @ApiModelProperty(value = "SAP 订单编号 SAP中最多12位")
    @ExcelProperty(value = "订单编号")
    @Length(max = 30, message = "订单编号，最多30位")
    String aufnr;
    @ApiModelProperty(value = "FAB Name工厂编码")
    @ExcelProperty(value = "工厂编码")
    String werks;
    @ApiModelProperty(value = "订单类型")
    @ExcelProperty(value = "订单类型")
    String auart;
    @ApiModelProperty(value = " 产品料号")
    @ExcelProperty(value = "产品料号")
    String matnr;
    @ApiModelProperty(value = "数量")
    @ExcelProperty(value = "数量")
    Long menge;
    @ApiModelProperty(value = "单位")
    @ExcelProperty(value = "单位")
    String meins;
    @ApiModelProperty(value = "1 ~ 9，优先级")
    @ExcelProperty(value = "优先级")
    String aprio;
    @ApiModelProperty(value = "客户信息")
    @ExcelProperty(value = "客户信息")
    String customerid;
    @ApiModelProperty(value = "销售订单信息")
    @ExcelProperty(value = "销售订单信息")
    String salesorder;
    @ApiModelProperty(value = "负责人")
    @ExcelProperty(value = "负责人")
    String ownerengineer;
    @ApiModelProperty(value = " 计划开始时间")
    @ExcelProperty(value = "计划开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    Date gstrp;
    @ApiModelProperty(value = "计划结束时间")
    @ExcelProperty(value = "计划结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    Date gltrp;
    @ApiModelProperty(value = "订单状态 (正常:REL) 其他则为关闭状态")
    @ExcelProperty(value = "订单状态")
    String status;
    @ApiModelProperty(value = "Comment 订单备注")
    @ExcelProperty(value = "订单备注")
    String comment;
    @ApiModelProperty(value = "保税号")
    @ExcelProperty(value = "保税号")
    String bonded;
    @ApiModelProperty(value = "研发项目编号")
    @ExcelProperty(value = "研发项目编号")
    String rdNum;
    @ApiModelProperty(value = "晶体板块用来标注特殊圆棒或方棒的字段")
    @ExcelProperty(value = "晶体板块用来标注特殊圆棒或方棒的字段")
    String rdInd;
    @ApiModelProperty(value = "预留字段")
    @ExcelProperty(value = "预留字段")
    String field1;
    @ApiModelProperty(value = "预留字段")
    @ExcelProperty(value = "预留字段")
    String field2;
    @ApiModelProperty(value = "预留字段")
    @ExcelProperty(value = "预留字段")
    String field3;
    @ApiModelProperty(value = "预留字段")
    @ExcelProperty(value = "预留字段")
    String field4;
    @ApiModelProperty(value = "预留字段")
    @ExcelProperty(value = "预留字段")
    String field5;
    @ApiModelProperty(value = "创建时间")
    @ExcelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    Date createDate;
    @ApiModelProperty(value = "创建人id")
    @ExcelProperty(value = "创建人id")
    Integer createUserId;
    @ApiModelProperty(value = "创建人姓名")
    @ExcelProperty(value = "创建人姓名")
    String createUserName;

    /**
     * 产品模型规格
     */
    @ExcelProperty(value = "产品模型规格")
    String fbProductModelSpecs;
    /**
     * 长度
     */
    @ExcelProperty(value = "长度")
    String fbProductModelLength;
    /**
     * 方棒产评级
     */
    @ExcelProperty(value = "方棒产品评级")
    String fbProductModelProductLevel;
    /**
     * 掺杂剂
     */
    @ExcelProperty(value = "掺杂剂")
    String fbProductModelDopant;
    /**
     * 拼数
     */
    @ExcelProperty(value = "拼数")
    String fbProductModelSpellNo;

    /**
     * 导电型号
     */
    @ExcelProperty(value = "导电型号")
    String fbProductModelConductiveType;

    /**
     * 边长
     */
    @ExcelProperty(value = "边长")
    BigDecimal fbProductModelSideLength;

    @ApiModelProperty(value = " 是否生产")
    @ExcelProperty(value = "是否生产")
    Boolean productionStatus;

    @ApiModelProperty(value = "加工能力编码")
    @ExcelProperty(value = "加工能力编码")
    Integer capacityKfinfoId;
    /**
     * 排程属性
     */
    @ApiModelProperty(value = "排程数量")
    @ExcelProperty(value = "排程数量")
    Long sumCount;
    @ApiModelProperty(value = "排程设备数量")
    @ExcelProperty(value = "排程设备数量")
    Long counts;

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

    /**
     * 电阻类型
     */
    @ApiModelProperty(value = "电阻类型")
    @ExcelProperty(value = "电阻类型")
    private String resistanceType;

    /**
     * 订单完成情况
     */
    @ExcelProperty(value = "订单完成情况")
    LinkedList<CompletionStatusDto> completionStatusDtos;


    @ApiModelProperty(value = "边长范围")@ExcelProperty(value = "边长范围")
    String sideLengthRange;


    @ExcelProperty(value = "编码名称")
    String deptName;

    @ExcelProperty(value = "部门编号")
    String deptCode;
    @ApiModelProperty(value = "工单定向标识")
    String zorientationind;
}
