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

import com.alibaba.excel.annotation.ExcelProperty;
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: xushu
 * @Date: 2022/08/17/15:51
 * @Description:回收物料管理表
 */
@Entity
@Data
@DynamicUpdate
@DynamicInsert
@Table(name = "recycled_material_manage")
public class RecycledMaterialManage {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
     * 托号
     */
    @Column(length = 100)
    private String trayNo;


    //回收料管理模块新增生产批次号
    @Column(length = 100)
    private String produceBatchNo;


    /**
     * 炉次号
     */
    @Column(length = 100)
    private String lotNo;


    /**
     * 回收料类型
     */
    @Column(length = 50)
    private String recycledMaterialType;

    /**
     * 来源
     */
    @Column(length = 50)
    private String source;


    /**
     * 产品类别
     */
    @Column(length = 50)
    private String productionCategory;

    /**
     * 等级
     */
    @Column(length = 50)
    private String grade;

    /**
     * 物料编号
     */
    @Column(length = 50)
    private String materialCode;

    /**
     * 物料名称
     */
    @Column(length = 50)
    private String materialName;

    /**
     * 个数
     */
    @Column(length = 20)
    private Integer num;


    /**
     * 状态(1待入库，2取消，3待确定，4已接收，5拒收)
     */
    @Column(length = 50)
    private Integer status = 1;

    /**
     * 厂区
     */
    @Column(length = 50)
    private String factory;

    /**
     * 挡位
     */
    @Column(length = 50)
    private String gear;

    /**
     * 单位名称
     */
    @Column(length = 10)
    private String unitName;

    /**
     * 重量
     */
    @Column(length = 20)
    private BigDecimal weight;

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


    /**
     * 创建人
     */
    @Column(length = 50)
    private String createBy;

    /**
     * 创建时间
     */
    @Column(length = 19)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 更新人
     */
    @Column(length = 50)
    private String updateBy;

    /**
     * 更新时间
     */
    @Column(length = 19)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;


    /**
     * 接收人
     */
    @Column(length = 50)
    private String receiver;

    /**
     * 接收时间
     */
    @Column(length = 19)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date receiveTime;

    /**
     * 删除状态(1：删除，0未删除 默认)
     */
    @Column(length = 2)
    private Integer del = 0;

    /**
     * ERP工单
     */
    @Column(length = 50)
    private String erpOrder;

    @ApiModelProperty(value = "卡板箱号")
    private String boxNo;

    @ApiModelProperty("追溯标识")
    private String fromMark;

    @ApiModelProperty(value = "片料")
    String sheetStock;


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


    /**
     * erp库位
     */
    @ApiModelProperty("erp库位")
    private String erpWarehouseCode;


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

    @ApiModelProperty(value = "载具箱重量")
    private BigDecimal boxWeight;

    @ApiModelProperty(value = "成本中心")
    private String kostl;

    @ApiModelProperty(value = "工单号")
    private String workOrderNo;

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

    @ApiModelProperty(value = "掺杂剂")
    private String dopant;

    @ApiModelProperty(value = "定向标识")
    private String directionalSign;

    @ApiModelProperty(value = "导电型号")
    private String conductionType;

    @ApiModelProperty(value = "清洗返工批次")
    private String reworkProduceBatchNo;

    @ApiModelProperty(value = "物料类别(1 余料(默认) 2 废料)")
    private Integer materialCategory;

    //每日生产批次号(供给SAP报工使用)
    @ApiModelProperty(value = "每日生产批次号")
    private String dateProduceBatchNo;

    @ApiModelProperty("去向:1(默认必传)硅料车间 2籽晶车间")
    private Integer hasGone;

    @ApiModelProperty("备注")
    private String remark;
}
