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

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.sw.mes.core.annotation.Jinko;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

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

/**
* 退料记录表
*/

@Jinko(value = "退料记录", author = "wxl")
@Data
@Entity
@Table(name="production_material_return_record")
@DynamicUpdate
@DynamicInsert
public class ProductionMaterialReturnRecord {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
    * 配料灌料任务ID
    */
    private Long taskId;

    /**
    * 配料灌料记录ID
    */
    private Long taskRecordId;

    /**
    * 设备号
    */
    @ExcelProperty(value = "设备号")
    private String equipmentNo;

    /**
    * 炉次号
    */
    @ExcelProperty(value = "炉次号")
    private String lotNo;

    /**
    * 复投次数
    */
    @ExcelProperty(value = "复投次数")
    private Integer againNum;

    /**
    * 料号
    */
    @ExcelProperty(value = "料号")
    private String productCode;

    /**
    * 物料条码
    */
    @ExcelProperty(value = "物料条码")
    private String materialCode;

    /**
    * 物料名称
    */
    @ExcelProperty(value = "物料名称")
    private String materialName;

    /**
    * 批次号
    */
    @ExcelProperty(value = "批次号")
    private String batchNo;

    /**
    * 退料重量
    */
    @ExcelProperty(value = "退料重量")
    private BigDecimal weight;

    /**
    * 物料类型名称
    */
    @ExcelProperty(value = "物料类型名称")
    private String materialTypeName;

    /**
    * 供应商
    */
    @ExcelProperty(value = "供应商")
    private String supplierName;

    /**
    * 原因
    */
    @ExcelProperty(value = "原因")
    private String reason;

    /**
    * 退料时间
    */
    @ExcelProperty(value = "退料时间")
    @Temporal(TemporalType.TIMESTAMP)
    private Date createTime;

    /**
    * 灌料时间
    */
    @ExcelProperty(value = "灌料时间")
    @Temporal(TemporalType.TIMESTAMP)
    private Date installTime;

    /**
    * 退料人
    */
    @ExcelProperty(value = "退料人")
    private String createUser;

    /**
    * 灌料人
    */
    @ExcelProperty(value = "灌料人")
    private String installUser;

    /**
    * sap订单单号
    */
    @ExcelProperty(value = "sap订单单号")
    private String sapOrderNo;

    /**
    * sap料号
    */
    @ExcelProperty(value = "sap料号")
    private String sapProductCode;

    /**
    * 灌料桶数
    */
    @ExcelProperty(value = "灌料桶数")
    private String pailNum;

    /**
    * 载具号
    */
    @ExcelProperty(value = "载具号")
    private String carrierNo;

    /**
     * 桶号
     */
    @ExcelProperty(value = "桶号")
    private String bucketNo;

    /**
     * 班次
     */
    @ExcelIgnore
    private String classNo;


    /**
     * 班组
     */
    @ExcelIgnore
    private String teamGroup;



}