package com.iailab.module.data.channel.opcda.vo;
|
|
import com.alibaba.excel.annotation.ExcelProperty;
|
import com.iailab.framework.excel.core.annotations.DictFormat;
|
import com.iailab.framework.excel.core.annotations.ExcelColumnSelect;
|
import com.iailab.framework.excel.core.convert.DictConvert;
|
import com.iailab.framework.excel.core.function.ExcelColumnSelectFunction;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
import lombok.AllArgsConstructor;
|
import lombok.Data;
|
import lombok.NoArgsConstructor;
|
import lombok.experimental.Accessors;
|
import lombok.experimental.SuperBuilder;
|
import org.springframework.stereotype.Component;
|
|
import java.util.List;
|
|
/**
|
* 用户 Excel 导入 VO
|
* @author Jay
|
*/
|
@Data
|
@SuperBuilder
|
@AllArgsConstructor
|
@NoArgsConstructor
|
@Accessors(chain = false) // 设置 chain = false,避免用户导入有问题
|
@Component
|
public class OpcDaTagImportExcelVO implements ExcelColumnSelectFunction {
|
|
@ExcelProperty(value = "Tag名称")
|
private String tagName;
|
|
@ExcelProperty(value = "数据类型")
|
@ExcelColumnSelect(dictType = "tag_data_type")
|
@DictFormat("tag_data_type")
|
private String dataType;
|
|
@Schema(description = "是否启用")
|
@ExcelProperty(value = "是否启用", converter = DictConvert.class)
|
@ExcelColumnSelect(dictType = "com_is_int")
|
@DictFormat("com_is_int")
|
private Integer enabled;
|
|
@Override
|
public String getName() {
|
return null;
|
}
|
|
@Override
|
public List<String> getOptions() {
|
return null;
|
}
|
}
|