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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

/**
 * @Author: xushu
 * @Date: 2022/08/17/16:20
 * @Description:
 */
@Data
@ApiModel(value = "回收料管理信息Dto")
public class RecycledMaterialManageDto {
    @ExcelIgnore
    private Long id;

    @ApiModelProperty(value = "托号")
    @ExcelProperty(value = "托号", index = 0)
    String trayNo;

    //回收料管理模块新增生产批次号
    @ApiModelProperty(value = "生产批次号")
    @ExcelProperty(value = "批次号", index = 1)
    String produceBatchNo;


    @ApiModelProperty(value = "炉次号")
    @ExcelIgnore
    String lotNo;

    @ApiModelProperty(value = "回收料类型", required = true)
    @ExcelIgnore
    String recycledMaterialType;

    @ApiModelProperty(value = "来源", required = true)
    @ExcelIgnore
    String source;

    @ApiModelProperty(value = "产品类别", required = true)
    @ExcelIgnore
    String productionCategory;

    @ApiModelProperty(value = "等级", required = true)
    @ExcelProperty(value = "等级", index = 6)
    String grade;

    @ApiModelProperty(value = "物料编号", required = true)
    @ExcelProperty(value = "物料编号", index = 4)
    String materialCode;

    @ApiModelProperty(value = "物料名称", required = true)
    @ExcelProperty(value = "物料名称", index = 3)
    String materialName;

    @ApiModelProperty(value = "厂区", required = true)
    @ExcelIgnore
    String factory;

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

    @ApiModelProperty(value = "电阻档位")
    @ExcelProperty(value = "电阻档位", index = 7)
    String gear;

    @ApiModelProperty(value = "个数")
    @ExcelIgnore
    Integer num;

    @ApiModelProperty(value = "单位名称")
    @ExcelIgnore
    String unitName;

    @ApiModelProperty(value = "重量")
    @ExcelProperty(value = "重量", index = 8)
    BigDecimal weight;

    @ApiModelProperty(value = "规格")
    @ExcelIgnore
    String specification;

    @ApiModelProperty(value = "状态(1待入库，2取消，3待确定，4已接收，5拒收)")
    @ExcelProperty(value = "状态", converter = RecycledMaterialmanagerStatusConverter.class, index = 11)
    Integer status;

    @ApiModelProperty(value = "创建人(组托人)")
    @ExcelProperty(value = "确认人", index = 12)
    String createBy;

    @ApiModelProperty(value = "创建时间(组托时间)")
    @ExcelProperty(value = "确认时间", index = 13)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    Date createTime;

    @ApiModelProperty(value = "修改人")
    @ExcelProperty(value = "修改人", index = 14)
    String updateBy;

    @ApiModelProperty(value = "修改时间")
    @ExcelProperty(value = "修改时间", index = 15)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    Date updateTime;

    @ApiModelProperty(value = "接收人")
    @ExcelIgnore
    String receiver;

    @ApiModelProperty(value = "接收时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ExcelIgnore
    Date receiveTime;

    @ApiModelProperty(value = "ERP工单")
    @ExcelIgnore
    private String erpOrder;

    @ApiModelProperty(value = "详情")
    @ExcelIgnore
    List<RecycledMaterialManageDetailDto> recycledMaterialMangeDetailDtos;

    @ApiModelProperty(value = "卡板箱号")
    @ExcelProperty(value = "料箱号", index = 2)
    private String boxNo;

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

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

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

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

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

    @ApiModelProperty(value = "成本中心")
    @ExcelProperty(value = "成本中心", index = 9)
    private String kostl;

    @ApiModelProperty(value = "工单号")
    @ExcelProperty(value = "工单号", index = 10)
    private String workOrderNo;

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

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

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

    @ApiModelProperty(value = "导电型号")
    @ExcelProperty(value = "导电型号", index = 5)
    String conductionType;

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

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

    @ApiModelProperty(value = "拉晶-炉台号")
    @ExcelProperty(value = "炉台号", index = 16)
    private String deviceNo;
    //每日生产批次号(供给SAP报工使用)
    @ApiModelProperty(value = "日生产批次号")
    @ExcelProperty(value = "日生产批次号", index = 17)
    private String dateProduceBatchNo;

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

    @ApiModelProperty("备注")
    @ExcelProperty(value = "备注", index = 18)
    private String remark;
}
