leutu
2024-06-03 3ef35e6cd16bbfa206b26bb3271eac40ad020bcb
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
package com.fastbee.iot.domain;
 
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fastbee.iot.model.ThingsModelItem.*;
import com.fastbee.iot.model.ThingsModels.ThingsModelValueItemDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.fastbee.common.annotation.Excel;
import com.fastbee.common.core.domain.BaseEntity;
 
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
 
/**
 * 设备日志对象 iot_device_log
 *
 * @author kerwincui
 * @date 2022-01-13
 */
@ApiModel(value = "DeviceLog", description = "设备日志对象 iot_device_log")
public class DeviceLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;
 
    @Excel(name = "时间戳")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date ts;
    /** 设备日志ID */
    @ApiModelProperty("设备日志ID")
    private Long logId;
 
    /** 类型(1=属性上报,2=事件上报,3=调用功能,4=设备升级,5=设备上线,6=设备离线) */
    @ApiModelProperty(value = "类型", notes = "1=属性上报,2=事件上报,3=调用功能,4=设备升级,5=设备上线,6=设备离线")
    @Excel(name = "类型", readConverterExp = "1=属性上报,2=事件上报,3=调用功能,4=设备升级,5=设备上线,6=设备离线")
    private Integer logType;
 
    /** 日志值 */
    @ApiModelProperty("日志值")
    @Excel(name = "日志值")
    private String logValue;
 
    /** 物模型名称 */
    @ApiModelProperty("物模型名称")
    @Excel(name = "物模型名称")
    private String modelName;
 
    /** 设备ID */
    @ApiModelProperty("设备ID")
    @Excel(name = "设备ID")
    private Long deviceId;
 
    /** 设备名称 */
    @ApiModelProperty("设备名称")
    @Excel(name = "设备名称")
    private String deviceName;
 
    /** 设备编号 */
    @ApiModelProperty("设备编号")
    @Excel(name = "设备编号")
    private String serialNumber;
 
    /** 标识符 */
    @ApiModelProperty("标识符")
    @Excel(name = "标识符")
    private String identity;
 
    /** 是否监测数据(1=是,0=否) */
    @ApiModelProperty("是否监测数据(1=是,0=否)")
    @Excel(name = "是否监测数据", readConverterExp = "1=是,0=否")
    private Integer isMonitor;
 
    /** 模式 */
    @ApiModelProperty(value = "模式", notes = "1=影子模式,2=在线模式,3=其他")
    @Excel(name = "模式", readConverterExp = "1=影子模式,2=在线模式,3=其他")
    private Integer mode;
 
    /** 用户ID */
    @ApiModelProperty("用户ID")
    @Excel(name = "用户ID")
    private Long userId;
 
    /** 用户昵称 */
    @ApiModelProperty("用户昵称")
    @Excel(name = "用户昵称")
    private String userName;
 
    /** 租户ID */
    @ApiModelProperty("租户ID")
    @Excel(name = "租户ID")
    private Long tenantId;
 
    /** 租户名称 */
    @ApiModelProperty("租户名称")
    @Excel(name = "租户名称")
    private String tenantName;
 
    /** 查询用的开始时间 */
    @ApiModelProperty("查询用的开始时间")
    private String beginTime;
 
    /** 查询用的结束时间 */
    @ApiModelProperty("查询用的结束时间")
    private String endTime;
 
    /** 查询的总数 */
    @ApiModelProperty("查询的总数")
    private int total;
 
    /*消息ID,或消息流水号*/
    @ApiModelProperty("消息ID,或消息流水号")
    private String serNo;
 
    private String specs;
 
    private DataType dataType;
 
    private Integer slaveId;
    /**
     * 计算公式
     */
    private String formula;
 
    private Integer isParams;
 
    /*是否历史存储*/
    private Integer isHistory;
 
    public Integer getIsHistory() {
        return isHistory;
    }
 
    public void setIsHistory(Integer isHistory) {
        this.isHistory = isHistory;
    }
 
    public Integer getIsParams() {
        return isParams;
    }
 
    public void setIsParams(Integer isParams) {
        this.isParams = isParams;
    }
 
    public String getFormula() {
        return formula;
    }
 
    public void setFormula(String formula) {
        this.formula = formula;
    }
 
 
    public Integer getSlaveId() {
        return slaveId;
    }
 
    public void setSlaveId(Integer slaveId) {
        this.slaveId = slaveId;
    }
 
    public DataType getDataType() {
        return dataType;
    }
 
    public void setDataType(DataType dataType) {
        this.dataType = dataType;
    }
 
    public String getModelName() {
        return modelName;
    }
 
    public void setModelName(String modelName) {
        this.modelName = modelName;
    }
 
    public String getSpecs() {
        return specs;
    }
 
    public void setSpecs(String specs) {
        this.specs = specs;
    }
 
    public String getSerNo() {
        return serNo;
    }
 
    public void setSerNo(String serNo) {
        this.serNo = serNo;
    }
 
    public int getTotal() {
        return total;
    }
 
    public void setTotal(int total) {
        this.total = total;
    }
 
    public String getBeginTime() {
        return beginTime;
    }
 
    public void setBeginTime(String beginTime) {
        this.beginTime = beginTime;
    }
 
    public String getEndTime() {
        return endTime;
    }
 
    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }
 
    public Integer getMode() {
        return mode;
    }
 
    public void setMode(Integer mode) {
        this.mode = mode;
    }
 
    public Long getUserId() {
        return userId;
    }
 
    public void setUserId(Long userId) {
        this.userId = userId;
    }
 
    public String getUserName() {
        return userName;
    }
 
    public void setUserName(String userName) {
        this.userName = userName;
    }
 
    public Long getTenantId() {
        return tenantId;
    }
 
    public void setTenantId(Long tenantId) {
        this.tenantId = tenantId;
    }
 
    public String getTenantName() {
        return tenantName;
    }
 
    public void setTenantName(String tenantName) {
        this.tenantName = tenantName;
    }
 
    public Date getTs() {
        return ts;
    }
 
    public void setTs(Date ts) {
        this.ts = ts;
    }
 
    public String getSerialNumber() {
        return serialNumber;
    }
 
    public void setSerialNumber(String serialNumber) {
        this.serialNumber = serialNumber;
    }
 
    public void setLogId(Long logId)
    {
        this.logId = logId;
    }
 
    public Long getLogId() 
    {
        return logId;
    }
 
    public void setLogType(Integer logType) 
    {
        this.logType = logType;
    }
 
    public Integer getLogType() 
    {
        return logType;
    }
    public void setLogValue(String logValue) 
    {
        this.logValue = logValue;
    }
 
    public String getLogValue() 
    {
        return logValue;
    }
    public void setDeviceId(Long deviceId) 
    {
        this.deviceId = deviceId;
    }
 
    public Long getDeviceId() 
    {
        return deviceId;
    }
    public void setDeviceName(String deviceName) 
    {
        this.deviceName = deviceName;
    }
 
    public String getDeviceName() 
    {
        return deviceName;
    }
    public void setIdentity(String identity) 
    {
        this.identity = identity;
    }
 
    public String getIdentity() 
    {
        return identity;
    }
    public void setIsMonitor(Integer isMonitor) 
    {
        this.isMonitor = isMonitor;
    }
 
    public Integer getIsMonitor() 
    {
        return isMonitor;
    }
 
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("logId", getLogId())
            .append("logType", getLogType())
            .append("logValue", getLogValue())
            .append("deviceId", getDeviceId())
            .append("deviceName", getDeviceName())
            .append("identity", getIdentity())
            .append("createBy", getCreateBy())
            .append("isMonitor", getIsMonitor())
            .append("createTime", getCreateTime())
            .append("remark", getRemark())
            .toString();
    }
 
    @ApiModel
    public static class DataType{
        private String type;
        private String falseText;
        private String trueText;
        private Integer maxLength;
        private String arrayType;
        private String unit;
        private BigDecimal min;
        private BigDecimal max;
        private BigDecimal step;
        private List<EnumItem> enumList;
 
        public String getType() {
            return type;
        }
 
        public void setType(String type) {
            this.type = type;
        }
 
        public String getFalseText() {
            return falseText;
        }
 
        public void setFalseText(String falseText) {
            this.falseText = falseText;
        }
 
        public String getTrueText() {
            return trueText;
        }
 
        public void setTrueText(String trueText) {
            this.trueText = trueText;
        }
 
        public Integer getMaxLength() {
            return maxLength;
        }
 
        public void setMaxLength(Integer maxLength) {
            this.maxLength = maxLength;
        }
 
        public String getArrayType() {
            return arrayType;
        }
 
        public void setArrayType(String arrayType) {
            this.arrayType = arrayType;
        }
 
        public String getUnit() {
            return unit;
        }
 
        public void setUnit(String unit) {
            this.unit = unit;
        }
 
        public BigDecimal getMin() {
            return min;
        }
 
        public void setMin(BigDecimal min) {
            this.min = min;
        }
 
        public BigDecimal getMax() {
            return max;
        }
 
        public void setMax(BigDecimal max) {
            this.max = max;
        }
 
        public BigDecimal getStep() {
            return step;
        }
 
        public void setStep(BigDecimal step) {
            this.step = step;
        }
 
        public List<EnumItem> getEnumList() {
            return enumList;
        }
 
        public void setEnumList(List<EnumItem> enumList) {
            this.enumList = enumList;
        }
    }
 
    @ApiModel
    public static class EnumItem
    {
        private String text;
        private String value;
 
        public String getText() {
            return text;
        }
 
        public void setText(String text) {
            this.text = text;
        }
 
        public String getValue() {
            return value;
        }
 
        public void setValue(String value) {
            this.value = value;
        }
    }
}