package com.mvc.model.forwarding;

import com.mvc.model.TAireadModel;
import com.mvc.utils.DateUtil;

/**
 * 丰台水务局请求对象
 */
public class FTRequestModel {
    private String deviceId;//设备唯一id，1-20位
    private String reportTime;//2020-01-02 23:04:01
    private Float flow;//表累积流量，单位m3

    /**
     * 根据读数对象构造请求对象
     * @param model
     */
    public FTRequestModel(TAireadModel model){
        this.deviceId = model.getStationCode();
        this.reportTime = DateUtil.formateDate(model.getSampleTime(), DateUtil.PATTERN_DATA_NORMAL);
        this.flow = model.getResultValue().floatValue();
    }

    public String getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    public String getReportTime() {
        return reportTime;
    }

    public void setReportTime(String reportTime) {
        this.reportTime = reportTime;
    }

    public Float getFlow() {
        return flow;
    }

    public void setFlow(Float flow) {
        this.flow = flow;
    }
}
