gongchunyi
4 天以前 e9b4ceeea014f9d81263672f3d9c46a567c39591
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
package com.ruoyi.energymeter.pojo;
 
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
 
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
 
/**
 * 水电表本地绑定档案。
 */
@Data
@TableName("energy_meter_device")
@Schema(description = "水电表绑定设备")
public class EnergyMeterDevice implements Serializable {
 
    private static final long serialVersionUID = 1L;
 
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
 
    @Schema(description = "租户ID")
    @TableField(fill = FieldFill.INSERT)
    private Long tenantId;
 
    @Schema(description = "能源类型 WATER/ELECTRIC/GAS")
    private String meterType;
 
    @Schema(description = "数据来源 PROVIDER第三方接入/MANUAL手工抄表")
    private String sourceType;
 
    @Schema(description = "第三方通信地址或表号,保留前导零")
    private String meterAddress;
 
    @Schema(description = "第三方设备ID")
    private String providerMeterId;
 
    @Schema(description = "第三方设备名称")
    private String providerName;
 
    @Schema(description = "本系统显示名称")
    private String displayName;
 
    @Schema(description = "第三方区域ID")
    private Long providerAreaId;
 
    @Schema(description = "第三方区域名称")
    private String providerAreaName;
 
    @Schema(description = "第三方总表ID")
    private String parentProviderId;
 
    @Schema(description = "本地总表ID")
    private Long parentMeterId;
 
    @Schema(description = "安装位置")
    private String location;
 
    @Schema(description = "在线状态 1在线 0离线")
    private Integer onlineStatus;
 
    @Schema(description = "绑定状态 VERIFIED/INVALID")
    private String bindStatus;
 
    @Schema(description = "是否启用 1启用 0停用")
    private Integer enabled;
 
    @Schema(description = "是否初始化设备 1是(禁止删除)0否")
    private Integer isSeed;
 
    @Schema(description = "是否演示数据 1是(每日同步时生成模拟用量)0否")
    private Integer simulated;
 
    @Schema(description = "手工抄表起始表码")
    private BigDecimal initialReading;
 
    @Schema(description = "手工抄表起始表码日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate initialReadingDate;
 
    @Schema(description = "最早需要同步的业务日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate syncStartDate;
 
    @Schema(description = "最近成功采集时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime lastSuccessAt;
 
    @Schema(description = "最近采集错误类别")
    private String lastErrorCode;
 
    @Schema(description = "最近采集错误摘要")
    private String lastErrorMessage;
 
    @TableField(fill = FieldFill.INSERT)
    private Long createUser;
 
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
 
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateUser;
 
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
 
    /* ---------------- 列表展示用非持久化字段 ---------------- */
 
    @Schema(description = "最近一次任务状态")
    @TableField(exist = false)
    private String lastTaskStatus;
 
    @Schema(description = "最近一次任务时间")
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime lastTaskTime;
 
    @Schema(description = "最近一天用量")
    @TableField(exist = false)
    private BigDecimal lastDayUsage;
 
    @Schema(description = "最新表码读数")
    @TableField(exist = false)
    private BigDecimal latestReading;
 
    @Schema(description = "上期表码读数")
    @TableField(exist = false)
    private BigDecimal previousReading;
 
    @Schema(description = "最近一天用量的业务日期")
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate lastDayUsageDate;
 
    @Schema(description = "采集状态说明")
    @TableField(exist = false)
    private String collectStateText;
 
    @Schema(description = "能源类型中文名")
    @TableField(exist = false)
    private String meterTypeName;
 
    @Schema(description = "数据来源中文名")
    @TableField(exist = false)
    private String sourceTypeName;
 
    @Schema(description = "指标单位")
    @TableField(exist = false)
    private String unit;
 
    @Schema(description = "是否允许删除")
    @TableField(exist = false)
    private Boolean deletable;
}