DeviceVO.java 2.15 KB
package vion.vo;

import com.github.liaochong.myexcel.core.annotation.ExcelColumn;
import com.github.liaochong.myexcel.core.annotation.ExcelModel;
import com.github.liaochong.myexcel.core.annotation.Prompt;
import lombok.Getter;
import lombok.Setter;
import vion.model.DeviceLog;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

@Getter
@Setter
@ExcelModel(sheetName = "设备列表", includeAllField = false)
public class DeviceVO {
    private Long id;

    /**
     * 合同编号
     */
    @ExcelColumn(order = 0, title = "合同编号")
    private String contractNo;

    /**
     * 合同名称
     */
    @ExcelColumn(order = 1, title = "合同名称")
    private String contractName;

    /**
     * 设备序列号
     */
    @ExcelColumn(order = 2, title = "设备序列号")
    private String serialNum;

    /**
     * 设备mac地址
     */
    @ExcelColumn(order = 3, title = "mac")
    private String mac;

    /**
     * 设备id
     */
    @ExcelColumn(order = 4, title = "设备ID")
    private String deviceId;

    /**
     * 物料编号
     */
    @ExcelColumn(order = 5, title = "物料编号")
    private String materialNum;

    /**
     * 生产部门
     */
    @ExcelColumn(order = 6, title = "生产部门")
    private String prodSector;

    /**
     * 状态:入库1、出库2、维修3、借测4、废弃5
     */
    @ExcelColumn(order = 7, title = "状态", mapping = "1:入库,2:出库,3:维修,4:借测,5:废弃")
    private Integer status;

    /**
     * 入库日期,当状态为2时,该字段表示出库日期
     */
    @ExcelColumn(order = 8, title = "日期", format = "yyyy-MM-dd", prompt = @Prompt(text = " 入库日期,当状态为出库时,该字段表示出库日期"), style = {"title" +
            "->color" +
            ":red"})
    private LocalDate recDate;

    /**
     * 备注
     */
    @ExcelColumn(order = 9, title = "备注")
    private String remark;
    @ExcelColumn(order = 10, title = "创建时间")
    private LocalDateTime createTime;
    @ExcelColumn(order = 11, title = "更新时间")
    private LocalDateTime updateTime;

    private List<DeviceLog> logList;
}