package com.sw.mes.fb.turnstore.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

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

/**
 * @Author
 * @Description：
 * @Date: Create in
 * @Modified By:
 */
@Data
@Entity
@Table(name = "fb_turnstore_tray_item")
@DynamicUpdate
@DynamicInsert
public class FbTurnstoreTrayItem {
    /**
     * 单据号
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    /**
     * 组托主表ID
     */
    @Column(length = 10)
    private Integer trayId;

    /**
     * 组托主表托号
     */
    @Column(length = 50)
    private String trayNo;

    /**
     * 编号(方棒)
     */
    @Column(length = 50)
    private String sectionNo;

    /**
     * 单晶组合
     */
    @Column(length = 150)
    private String sectionCompose;

    /**
     * 检验时间
     */
    @Column(length = 19)
    @Temporal(TemporalType.TIMESTAMP)
    private Date checkTime;

    // 计划物料编码
    @Column(length = 50)
    private String planMaterialCode;

    /**
     * 规格
     */
    @Column(length = 50)
    private String specification;

    /**
     * 方棒长度
     */
    @Column(length = 19)
    private BigDecimal length;


    /**
     * 产品等级
     */
    @Column(length = 10)
    private String productLevel;


    /**
     * 边长max
     */
    @Column(length = 19)
    private BigDecimal sideLengthMax;

    /**
     * 边长min
     */
    @Column(length = 19)
    private BigDecimal sideLengthMin;

    /**
     * 组托新增字段 20220823
     */

    /**
     * 直径max
     */
    @Column(length = 19)
    private BigDecimal diameterMax;

    /**
     * 直径min
     */
    @Column(length = 19)
    private BigDecimal diameterMin;

    /**
     * 崩边扣减上
     */
    @Column(length=19)
    private BigDecimal collapseLossSh;


    /**
     * 崩边扣减中
     */
    @Column(length=19)
    private BigDecimal collapseLossZh;


    /**
     * 崩边扣减下
     */
    @Column(length=19)
    private BigDecimal collapseLossXia;

    /**
     * 崩损(mm)  扣减崩缺长度
     */
    @Column(length = 19)
    private BigDecimal collapseLoss;

    /**
     * 有效切片长度
     */
    @Column(length=19)
    private BigDecimal effectiveLength;

    /**
     * 头部少子
     */
    @Column(length=19)
    private BigDecimal life;

    /**
     * W寿命min　　合格品尾部合格少子
     */
    @Column(length = 19)
    private BigDecimal wLifeMin;

    /**
     * T氧含量中心
     */
    @Column(length = 19)
    private BigDecimal oxygenContentHead;

    /**
     * W碳含量中心
     */
    @Column(length = 19)
    private BigDecimal carbonContentTail;

    /**
     * 掺杂剂
     */
    @Column(length = 10)
    private String dopant;

    /**
     * 产品类型
     */
    @Column(length=80)
    private String productType;

    /**
     * 操作人
     */
    @Column(length = 80)
    private String user;

    /**
     * 操作时间
     */
    @Column(length = 19)
    @Temporal(TemporalType.TIMESTAMP)
    private Date operationTime;

    /**
     * 组托时间
     */
    @Column(length = 19)
    @Temporal(TemporalType.TIMESTAMP)
    private Date time;

    /**
     * 出库到WMS时间
     */
    @Column(length = 19)
    @Temporal(TemporalType.TIMESTAMP)
    private Date toWmsTime;

    /**
     * 入库状态  【10：退库】
     */
    @Column(length = 10)
    private Integer state;

    /**
     * 是否出库到WMS 0否 1是
     */
    @Column(length = 10)
    private Integer isToWms;

    /**
     * 确认时间
     */
    @Column(length = 19)
    @Temporal(TemporalType.TIMESTAMP)
    private Date confirmTime;

    /**
     * 去向
     */
    @Column(length = 40)
    private String hasGone;

    /**
     * 方棒备注
     */
    @Column(length = 150)
    private String squareRodRemark;


    /**
     * 电阻类型
     */
    @Column(length = 150)
    private String resistanceType;

    /**
     * 试验
     */
    @Column(length = 150)
    private String testZt;













    /**
     * 入库类别(方棒评级)
     */
    @Column(length = 10)
    private String productLevelFb;

    /**
     * 方棒实验等级
     */
    @Column(length = 50)
    private String fbExperiLevel;



    /**
     * 入库长度(mm)
     */
    @Column(length = 19)
    private BigDecimal instoreLengthFb;

    /**
     * 理论重量(KG)
     */
    @Column(length = 19)
    private BigDecimal theoryWeightFb;

    /**
     * 实际重量(KG)
     */
    @Column(length = 19)
    private BigDecimal actualWeightFb;


    /**
     * 方棒称重
     */
    @Column(length = 19)
    private BigDecimal weight;



    /**
     * 导电型号
     */
    @Column(length = 10)
    private String conductionType;


    /**
     * 长度斜(mm)
     */
    @Column(length = 19)
    private BigDecimal lengthSlope;

    /**
     * 晶体灰皮长度(mm)
     */
    @Column(length = 19)
    private BigDecimal crystalGrayness;

    /**
     * 方棒灰皮长度(mm)
     */
    @Column(length = 19)
    private BigDecimal squareRodGrayness;

    /**
     * 线痕长度(mm)
     */
    @Column(length = 19)
    private BigDecimal lineScratch;

    /**
     * 划痕长度(mm)
     */
    @Column(length = 19)
    private BigDecimal scratch;

    /**
     * 未磨到长度(mm)
     */
    @Column(length = 19)
    private BigDecimal noFriction;

    /**
     * 尺寸异常长度(mm)
     */
    @Column(length = 19)
    private BigDecimal sizeException;



    /**
     * 检验类型
     */
    @Column(length = 50)
    private String checkoutName;

    /**
     * 退料备注
     */
    @Column(length = 150)
    private String returnRemark;

    /**
     * 退料类型
     */
    @Column(length = 10)
    private String quitType;

    /**
     * 料号
     */
    @Column(length = 50)
    private String materialNumber;

    /**
     * 托盘号
     */
    @Column(length = 50)
    private String code;



    /**
     * 工厂
     */
    @Column(length = 50)
    private String factoryName;

    /**
     * 库存地点
     */
    @Column(length = 150)
    private String stockPlace;

    /**
     * 客户类别
     */
    @Column(length = 32)
    private String customerType;

    /**
     * 订单号
     */
    @Column(length = 50)
    private String orderNo;

    /**
     * 长度斜(方棒)
     */
    @Column(length = 19)
    private BigDecimal bevel;

    /**
     * 刀痕
     */
    @Column(length = 19)
    private BigDecimal knifeScratch;

    /**
     * 阴阳面
     */
    @Column(length = 19)
    private BigDecimal yinYangFace;

    /**
     * 水印
     */
    @Column(length = 19)
    private BigDecimal waterMark;

    /**
     * 平面手感
     */
    @Column(length = 19)
    private BigDecimal flatHandle;

    /**
     * 砂轮印
     */
    @Column(length = 19)
    private BigDecimal wheelMark;

    /**
     * 外圆手感
     */
    @Column(length = 19)
    private BigDecimal roundHandle;

    /**
     * 亮斑
     */
    @Column(length = 19)
    private BigDecimal hotSpot;

    /**
     * 棱崩
     */
    @Column(length = 19)
    private BigDecimal ridgeBroken;

    /**
     * 砂轮亮点
     */
    @Column(length = 19)
    private BigDecimal wheelHighLights;

    /**
     * 拼缝宽
     */
    @Column(length = 19)
    private BigDecimal crackWidth;

    /**
     * 减异常入库长度
     */
    @Column(length = 19)
    private BigDecimal abnormalLength;

    /**
     * 一二三类方行(异常)长度
     */
    @Column(length = 19)
    private BigDecimal classAbnormalLength;

    /**
     * 一二三类方行(异常)长度理论
     */
    @Column(length = 19)
    private BigDecimal theoryAbnormalLength;

    /**
     * 合计长度
     */
    @Column(length = 19)
    private BigDecimal totalLength;

    /**
     * 合计理论重量
     */
    @Column(length = 19)
    private BigDecimal theoryTotalLength;





    /**
     * 确认人
     */
    @Column(length = 20)
    private String confirmUser;

    /**
     * 拼数
     */
    @Column(length = 32)
    private String sticksCount;



    /**
     * 顺序号
     */
    @Column(length = 10)
    private Integer orderNum;

    /**
     * 一体机编号
     */
    @Column(length = 40)
    private String deviceNo;

    /**
     * 色差
     */
    @Column(length = 19)
    private BigDecimal colourDifference;

    /**
     * 裂纹
     */
    @Column(length = 19)
    private BigDecimal crack;

    /**
     * 方棒减长
     */
    @Column(length = 19)
    private BigDecimal lengthPrep;

    /**
     * 计划导电型号
     */
    @Column(length = 8)
    private String planConductiveType;

    /**
     * 计划掺杂剂
     */
    @Column(length = 20)
    private String planDopant;

    /**
     * 计划产品等级
     */
    @Column(length = 20)
    private String planGrade;

    /**
     * 计划长度范围
     */
    @Column(length = 20)
    private String planLenRange;

    /**
     * 计划订单号
     */
    @Column(length = 50)
    private String planOrderNo;

    /**
     * 计划电祖率
     */
    @Column(length = 20)
    private String planResistivity;

    /**
     * 计划规格
     */
    @Column(length = 20)
    private String planSpecs;

    /**
     * 复检类型
     */
    @Column(length = 40)
    private String reCheckType;

    /**
     * 滚轮印
     */
    @Column(length = 19)
    private BigDecimal rollerPrint;

    /**
     * 拼棒总长
     */
    @Column(length = 19)
    private BigDecimal spellBarLength;

    // 订单类型
    @Column(length = 50)
    private String orderType;

    // 计划订单类型
    @Column(length = 20)
    private String planOrderType;



    /**
     * 复投次数
     */
    @Column(length = 10)
    private Integer againNum;

    /**
     * 模块
     */
    @Column(length = 50)
    private String crystalWorkshop;



    /**
     * T缺陷
     */
    @Column(length = 150)
    private String headDefectGrade;

    /**
     * 头尾识别
     */
    @Column(length = 50)
    private String headTailRecognition;

    /**
     * T寿命min
     */
    @Column(length = 19)
    private BigDecimal tLifeMin;



    /**
     * T中心寿命
     */
    @Column(length = 19)
    private BigDecimal tCentreLife;

    /**
     * W中心寿命
     */
    @Column(length = 19)
    private BigDecimal wCentreLife;



    /**
     * W氧含量中心
     */
    @Column(length = 19)
    private BigDecimal oxygenContentTail;

    /**
     * T碳含量中心
     */
    @Column(length = 19)
    private BigDecimal carbonContentHead;



    /**
     * 径向电阻率T中心点
     */
    @Column(length = 19)
    private BigDecimal tRadialCentre;

    /**
     * 径向电阻率T边缘
     */
    @Column(length = 19)
    private BigDecimal tRadialEdge;

    /**
     * 径向电阻率W中心点
     */
    @Column(length = 19)
    private BigDecimal wRadialCentre;

    /**
     * 径向电阻率W边缘
     */
    @Column(length = 19)
    private BigDecimal wRadialEdge;



    /**
     * 单晶段号
     */
    @Column(length = 10)
    private Integer piecewiseNum;

    /**
     * 组号
     */
    private String groupNo;

    /**
     * 新增组号
     */
    @Column(length = 10)
    private String batchNoGroup;

    /**
     * 层号
     */
    private String floorNo;

    /**
     * ERP上报状态，0 未上报，1 已上报
     */
    @Column(length=3)
    private Integer reportedState = 0;

    /**
     * ERP订单编号
     */
    @Column(length = 30)
    private String erpOrder;

    @ApiModelProperty("erp上报时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date erpTime;


    /**
     * 批次号
     */
    @Column(length = 20)
    private String batchNo;
    /**
     * 退货复检状态 0未退货1已退货未重新组托2已退货并且已经组托 默认0
     */
    @Column(length = 20)
    private Integer returnInspectionStatus;

    public FbTurnstoreTrayItem() {
    }

    public FbTurnstoreTrayItem(Integer id) {
        this.id = id;
    }
}
