提交 | 用户 | 时间
|
03e8ac
|
1 |
package com.iailab.module.data.channel.opcua.vo; |
J |
2 |
|
|
3 |
import com.alibaba.excel.annotation.ExcelProperty; |
|
4 |
import com.iailab.framework.excel.core.annotations.DictFormat; |
|
5 |
import com.iailab.framework.excel.core.annotations.ExcelColumnSelect; |
|
6 |
import com.iailab.framework.excel.core.convert.DictConvert; |
|
7 |
import com.iailab.framework.excel.core.function.ExcelColumnSelectFunction; |
|
8 |
import io.swagger.v3.oas.annotations.media.Schema; |
|
9 |
import lombok.AllArgsConstructor; |
|
10 |
import lombok.Data; |
|
11 |
import lombok.NoArgsConstructor; |
|
12 |
import lombok.experimental.Accessors; |
|
13 |
import lombok.experimental.SuperBuilder; |
|
14 |
import org.springframework.stereotype.Component; |
|
15 |
|
|
16 |
import java.util.List; |
|
17 |
|
|
18 |
/** |
|
19 |
* 用户 Excel 导入 VO |
|
20 |
* @author Jay |
|
21 |
*/ |
|
22 |
@Data |
|
23 |
@SuperBuilder |
|
24 |
@AllArgsConstructor |
|
25 |
@NoArgsConstructor |
|
26 |
@Accessors(chain = false) // 设置 chain = false,避免用户导入有问题 |
|
27 |
@Component |
|
28 |
public class OpcUaTagImportExcelVO implements ExcelColumnSelectFunction { |
|
29 |
|
|
30 |
@ExcelProperty(value = "Tag名称") |
|
31 |
private String tagName; |
|
32 |
|
|
33 |
@ExcelProperty(value = "数据类型") |
|
34 |
@ExcelColumnSelect(dictType = "tag_data_type") |
|
35 |
@DictFormat("tag_data_type") |
|
36 |
private String dataType; |
|
37 |
|
|
38 |
@Schema(description = "地址") |
|
39 |
@ExcelProperty(value = "地址") |
|
40 |
private String address; |
|
41 |
|
|
42 |
@Schema(description = "采集频率") |
|
43 |
@ExcelProperty(value = "采集频率") |
|
44 |
private Integer samplingRate; |
|
45 |
|
|
46 |
@Schema(description = "是否启用") |
|
47 |
@ExcelProperty(value = "是否启用", converter = DictConvert.class) |
|
48 |
@ExcelColumnSelect(dictType = "com_is_int") |
|
49 |
@DictFormat("com_is_int") |
|
50 |
private Integer enabled; |
|
51 |
|
|
52 |
@Override |
|
53 |
public String getName() { |
|
54 |
return null; |
|
55 |
} |
|
56 |
|
|
57 |
@Override |
|
58 |
public List<String> getOptions() { |
|
59 |
return null; |
|
60 |
} |
|
61 |
} |