package com.sw.mes.yb.accessory.dto;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.sw.mes.core.entity.EasyExcelOneAndZeroConverter;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author liuzemin
 * @date 2022/6/9 10:54
 * @description
 */
@Data
public class EquipmentAccessoryExportDto {

    @ExcelProperty(value = "批次号", index = 0)
    String batchNo;

    @ExcelProperty(value = "设备编号", index = 1)
    String deviceNo; //设备编号

    @ExcelProperty(value = "所属区域", index = 2)
    String area; //区域

    @ExcelProperty(value = "辅料类型", index = 3)
    String mtype; //辅料类型

    @ExcelProperty(value = "料号", index = 4)
    String mcode; //料号

    @ExcelProperty(value = "料号名称", index = 5)
    String mname; //辅料名称

    @ExcelProperty(value = "唯一码", index = 6)
    String goodsCode; //热场条码

    @ExcelProperty(value = "数量", index = 7)
    Integer num; //数量

    @ExcelProperty(value = "辅料规格", index = 8)
    String norms; //辅料规格

    @ExcelProperty(value = "厂家", index = 9)
    String factory; //厂家

    @ExcelProperty(value = "额定寿命", index = 10)
    Double museLife; //使用寿命/额定寿命

    @ExcelProperty(value = "有效运行时间", index = 11)
    Double useTime; //有效运行时间

    @ExcelProperty(value = "已使用时间", index = 12)
    Double usedTime; //已使用时间

    @ExcelProperty(value = "是否预警", index = 13, converter = EasyExcelOneAndZeroConverter.class)
    Integer mwarning; //是否预警 1是 0否

    @ExcelProperty(value = "预警时间", index = 14)
    Double mwarnTime; //预警时间

    @ExcelProperty(value = "预警日期", index = 15)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    Date warningDate; //预警日期

    @ExcelProperty(value = "更换时间", index = 16)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    Date operateDate; //更改时间

    @ExcelIgnore
    Double remainLife; //剩余寿命

    /**
     * 刻码
     */
    @ExcelProperty(value = "刻码", index = 17)
    String engraving;

    /**
     * 碳毡
     */
    @ExcelProperty(value = "碳毡", index = 18)
    String carbonFelt;

    /**
     * 辅料类型
     */
    @ExcelProperty(value = "辅料类型", index = 19)
    String accessoryType;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注", index = 20)
    String remark;
}
