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
package com.dy.pipIrrGlobal.pojoRm;
 
import com.alibaba.fastjson2.annotation.JSONField;
import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dy.common.mw.protocol.p206V1_0_0.DataV1_0_1;
import com.dy.common.mw.protocol.p206V1_0_0.upVos.DataCd84Vo;
import com.dy.common.mw.protocol.p206V202404.DataV202404;
import com.dy.common.mw.protocol.p206V202404.upVos.DataCd80_5BVo;
import com.dy.common.po.BaseEntity;
import com.dy.common.util.DateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
 
import java.util.Date;
 
/**
 * @Author: liurunyu
 * @Date: 2024/6/14 10:11
 * @Description 控制器阀开工作报最新数据
 */
@TableName(value="rm_work_report_last", autoResultMap = true)
@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "终端阀开工作报最新数据")
public class RmWorkReportLast  implements BaseEntity {
    public static final long serialVersionUID = 202402280855001L;
    /**
     * 主键
     */
    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @TableId(type = IdType.INPUT)
    public Long id;
 
    /**
     * 农户实体ID(外键)
     */
    @Schema(description = "农户实体外键", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long clientId;
 
    /**
     * 农户姓名
     */
    @Schema(description = "农户姓名", requiredMode = Schema.RequiredMode.REQUIRED)
    public String clientName;
 
    /**
     * 控制器实体ID(外键)
     */
    @Schema(description = "控制器实体外键", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long controllerId;
 
    /**
     * 取水口实体ID(外键)
     */
    @Schema(description = "取水口实体外键", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long intakeId;
 
    /**
     * 控制器地址
     */
    @Schema(description = "控制器地址", requiredMode = Schema.RequiredMode.REQUIRED)
    public String rtuAddr;
 
    /**
     * 数据接收日期时间
     */
    @Schema(description = "上报日期时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date dt;
 
    /**
     * 开阀时控制器时钟
     */
    @Schema(description = "控制器时钟", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date rtuDt;
 
    /**
     * 订单号(16位数字)
     */
    @Schema(hidden=true)
    @JSONField(serialize = false)
    public String orderNo;
 
    /**
     * IC卡地址(远程开泵/阀时全为0)
     */
    @Schema(description = "IC卡地址", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public String icCardAddr;
 
    /**
     * IC卡编号
     */
    @Schema(description = "IC卡编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public String icCardNo;
 
    /**
     * 水位(单位0.001米)
     */
    @Schema(description = "水位(单位0.001米)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double waterLevel;
 
    /**
     * 水压(单位0.01千帕)
     */
    @Schema(description = "水压(单位0.01千帕)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double waterPress;
 
    /**
     * 瞬时流量(单位0.01m3/小时)
     */
    @Schema(description = "瞬时流量(单位0.01m3/小时)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double waterInstant;
 
    /**
     * 水表累计流量(单位0.01m3)
     */
    @Schema(description = "水表累计流量(单位0.01m3)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double waterTotal;
 
    /**
     * 电表累计电量(单位0.01度)
     */
    @Schema(description = "电表累计电量(单位0.01度)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double eleTotal;
 
    /**
     * 用户剩余金额(单位0.01元)
     */
    @Schema(description = "用户剩余金额(单位0.01元)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double moneyRemain;
 
    /**
     * 用户剩余水量(单位0.01m3)
     */
    @Schema(description = "用户剩余水量(单位0.01m3)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double waterRemain;
 
    /**
     * 本次使用电量(单位0.01度)
     */
    @Schema(description = "本次使用电量(单位0.01度)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double thisEle;
 
    /**
     * 本次使用水量(单位0.01m3)
     */
    @Schema(description = "本次使用水量(单位0.01m3)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double thisWater;
 
    /**
     * 本次使用金额(单位0.01元)
     */
    @Schema(description = "本次使用金额(单位0.01元)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double thisMoney;
 
    /**
     * 本次使用时长(单位:分钟  最大9999分钟)
     */
    @Schema(description = "本次使用时长(单位:分钟  最大9999分钟)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Integer thisDuration;
 
    /**
     * 当前水量单价(单位0.01元 最大99.99元)
     */
    @Schema(description = "当前水量单价(单位0.01元 最大99.99元)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double waterPrice;
 
    /**
     * 当前电量单价(单位0.01元 最大99.99元)
     */
    @Schema(description = "当前电量单价(单位0.01元 最大99.99元)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double elePrice;
 
    /**
     * 交流A相电压(单位0.1伏特)
     */
    @Schema(description = "交流A相电压(单位0.1伏特)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double aVolt;
 
    /**
     * 交流B相电压(单位0.1伏特)
     */
    @Schema(description = "交流B相电压(单位0.1伏特)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double bVolt;
 
    /**
     * 交流C相电压(单位0.1伏特)
     */
    @Schema(description = "交流C相电压(单位0.1伏特)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double cVolt;
 
    /**
     * 交流A相电流(单位0.1安培)
     */
    @Schema(description = "交流A相电流(单位0.1安培)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double aCurrent;
 
    /**
     * 交流B相电流数据(单位0.1安培)
     */
    @Schema(description = "交流B相电流数据(单位0.1安培)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double bCurrent;
 
    /**
     * 交流C相电流(单位0.1安培)
     */
    @Schema(description = "交流C相电流(单位0.1安培)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double cCurrent;
 
    /**
     * 后备电池电压(单位0.01伏特)
     */
    @Schema(description = "后备电池电压(单位0.01伏特)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double batteryVolt;
 
    /**
     * 水表远传电压(单位0.01伏特)
     */
    @Schema(description = "水表远传电压(单位0.01伏特)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double waterMeterTransVolt;
 
    /**
     * 水表工作电压(单位0.01伏特)
     */
    @Schema(description = "水表工作电压(单位0.01伏特)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double waterMeterWorkVolt;
 
    public void valueFrom(DataV202404 dataV202404, DataCd80_5BVo cdData) throws Exception{
         this.dt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataV202404.dt);
         this.rtuDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(cdData.rtuDt);
         this.orderNo = cdData.orderNo ;
         this.icCardAddr = cdData.icCardAddr ;
         this.icCardNo = cdData.icCardNo ;
         this.waterLevel = cdData.waterLevel ;
         this.waterPress = cdData.waterPress ;
         this.waterInstant = cdData.waterInstant ;
         this.waterTotal = cdData.waterTotal ;
         this.eleTotal = cdData.eleTotal ;
         this.moneyRemain = cdData.moneyRemain ;
         this.waterRemain = cdData.waterRemain ;
         this.thisEle = cdData.thisEle ;
         this.thisWater = cdData.thisWater ;
         this.thisMoney = cdData.thisMoney ;
         this.thisDuration = cdData.thisDuration ;
         this.waterPrice = cdData.waterPrice ;
         this.elePrice = cdData.elePrice ;
         this.aVolt = cdData.aVolt ;
         this.bVolt = cdData.bVolt ;
         this.cVolt = cdData.cVolt ;
         this.aCurrent = cdData.aCurrent ;
         this.bCurrent = cdData.bCurrent ;
         this.cCurrent = cdData.cCurrent ;
         this.batteryVolt = cdData.batteryVolt ;
         this.waterMeterTransVolt = cdData.waterMeterTransVolt ;
         this.waterMeterWorkVolt = cdData.waterMeterWorkVolt ;
    }
 
 
    public void valueFrom(DataV1_0_1 dV1_0_1, DataCd84Vo cdData) throws Exception{
        this.dt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV1_0_1.dt);
        this.rtuDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(cdData.rtuDt);
        //this.orderNo = cdData.orderNo ;
        this.icCardAddr = cdData.cardAddr ;
        this.icCardNo = cdData.cardNo ;
        //this.waterLevel = cdData.waterLevel ;
        //this.waterPress = cdData.waterPress ;
        this.waterInstant = cdData.instantAmount ;
        this.waterTotal = cdData.totalAmount ;
        //this.eleTotal = cdData.eleTotal ;
        this.moneyRemain = cdData.remainMoney ;
        //this.waterRemain = cdData.waterRemain ;
        //this.thisEle = cdData.thisEle ;
        //this.thisWater = cdData.thisWater ;
        //this.thisMoney = cdData.thisMoney ;
        //this.thisDuration = cdData.thisDuration ;
        //this.waterPrice = cdData.waterPrice ;
        //this.elePrice = cdData.elePrice ;
        //this.aVolt = cdData.aVolt ;
        //this.bVolt = cdData.bVolt ;
        //this.cVolt = cdData.cVolt ;
        //this.aCurrent = cdData.aCurrent ;
        //this.bCurrent = cdData.bCurrent ;
        //this.cCurrent = cdData.cCurrent ;
        //this.batteryVolt = cdData.batteryVolt ;
        //this.waterMeterTransVolt = cdData.waterMeterTransVolt ;
        //this.waterMeterWorkVolt = cdData.waterMeterWorkVolt ;
    }
}