package com.mvc.model.sldh;

import com.mvc.model.TAireadModel;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 水利大会读数模型
 */
public class SLDHReadingModel implements java.io.Serializable {
    /**
     * 设备sn
     */
    private String deviceSn;

    /**
     * 遥测站点
     */
    private String stationCode;

    /**
     * 最终结果值
     */
    private BigDecimal resultValue;

    /**
     * AI_识别结果(累计用水量)
     */
    private BigDecimal identValue;

    /**
     * 原始结果值
     */
    private BigDecimal rawValue;

    /**
     * 数据来源\功能码 32定时报；52补发报；
     */
    private String funCode;

    /**
     * 观测(采样)时间,
     */
    private Date sampleTime;

    /**
     * 发报时间
     */
    private Date rptTime;

    /**
     * 数据被服务器接收的时间
     */
    private Date revTime;

    /**
     * 电压
     */
    private BigDecimal voltage;

    /**
     * 温度
     */
    private BigDecimal temperature;

    /**
     * 剩余电量比
     */
    private BigDecimal socRate;

    /**
     * 主板运行次数
     */
    private Integer mcuRunNum;

    /**
     * 电池运行时间
     */
    private Integer batRumTime;

    /**
     * 信号质量
     */
    private Integer rsrp;

    /**
     * MCU软件版本
     */
    private String softVer;

    /**
     * 通讯卡号
     */
    private String ccid;

    /**
     * 信噪比
     */
    private Integer snr;

    /**
     * 硬件编号
     */
    private String hardwareCode;

    /**
     * nb版本
     */
    private String nbVersion;

    /**
     * 硬件版本
     */
    private String hardVersion;

    /**
     * 大图的URL地址
     */
    private String bigJpgUrl;

    /**
     * 数字识别值
     */
    private String szsbz;

    /**
     * 数字识别概率
     */
    private String szsbgl;

    /**
     * 上一次实际读数
     */
    private String preAmount;

    /**
     * 上一次实际读数时间
     */
    private Date preTime;

    /**
     * 本次工作时长（S）
     */
    private Integer operationTime;

    /**
     * 本次传输时长（S）
     */
    private Integer transmissionTime;

    /**
     * AI软件版本
     */
    private String aiVersion;

    /**
     * 读数的小数点位数
     */
    private Integer decimalDigits;

    /**
     * IP1发送状态(0无任务1成功2无应答11Socket错误12NB写入错误)
     */
    private Integer ip1SendStatus;

    /**
     * NB网络注册时位置信息(区码-小区ID)
     */
    private String nbRegLocation;

    /**
     * 设备序列号(与自来水公司设备关联)
     */
    private String imei;

    /**
     * 信号强度
     */
    private Integer csq;

    /**
     * 小区覆盖等级
     */
    private Integer ecl;

    /**
     * 通信模块类型(0:无,1:移远BC260Y,2中移ML307A)
     */
    private Integer communicationModuleType;

    /**
     * 服务侧识别值
     */
    private BigDecimal serverValue;

    /**
     * 流量卡到期日期
     */
    private String iotCardDuedate;

    /**
     * 剩余流量
     */
    private String iotCardRemaingprs;

    /**
     * 流量卡当前状态
     */
    private String iotCardWorkingcondition;

    public SLDHReadingModel() {
    }

    public SLDHReadingModel(TAireadModel aireadModel) {
        this.deviceSn = aireadModel.getDeviceSn();
        this.stationCode = aireadModel.getStationCode();
        this.resultValue = aireadModel.getResultValue();
        this.identValue = aireadModel.getIdentValue();
        this.rawValue = aireadModel.getRawValue();
        this.funCode = aireadModel.getFunCode();
        this.sampleTime = aireadModel.getSampleTime();
        this.rptTime = aireadModel.getRptTime();
        this.revTime = aireadModel.getRevTime();
        this.voltage = aireadModel.getVoltage();
        this.temperature = aireadModel.getTemperature();
        this.socRate = aireadModel.getSocRate();
        this.mcuRunNum = aireadModel.getMcuRunNum();
        this.batRumTime = aireadModel.getBatRumTime();
        if (aireadModel.getRsrp() != null) {//转换
            this.rsrp = aireadModel.getRsrp() - 140;
        }
        this.rsrp = aireadModel.getRsrp();
        this.softVer = aireadModel.getSoftVer();
        this.ccid = aireadModel.getCcid();
        this.snr = aireadModel.getSnr();
        this.hardwareCode = aireadModel.getHardwareCode();
        this.nbVersion = aireadModel.getNbVersion();
        this.hardVersion = aireadModel.getHardVersion();
        this.bigJpgUrl = aireadModel.getBigJpgUrl();
        this.szsbz = aireadModel.getSzsbz();
        this.szsbgl = aireadModel.getSzsbgl();
        this.preAmount = aireadModel.getPreAmount();
        this.preTime = aireadModel.getPreTime();
        this.operationTime = aireadModel.getIntervalMinutes();
        this.transmissionTime = aireadModel.getTranDuration();
        this.aiVersion = aireadModel.getAiVersion();
        this.decimalDigits = aireadModel.getDecimalDigits();
        this.ip1SendStatus = aireadModel.getIp1SendStatus();
        this.nbRegLocation = aireadModel.getNbRegLocation();
        this.imei = aireadModel.getImei();
        this.csq = aireadModel.getCsq();
        this.ecl = aireadModel.getEcl();
        this.communicationModuleType = aireadModel.getCommunicationModuleType();
        this.iotCardDuedate = aireadModel.getIotCardDuedate();
        this.iotCardWorkingcondition = aireadModel.getIotCardWorkingcondition();
        this.iotCardRemaingprs = String.valueOf(aireadModel.getIotCardRemaingprs());
        if (aireadModel.getServerReadModel() != null) {
            this.serverValue = aireadModel.getServerReadModel().getIdentValue();
        }
    }

    public String getDeviceSn() {
        return deviceSn;
    }

    public void setDeviceSn(String deviceSn) {
        this.deviceSn = deviceSn;
    }

    public String getStationCode() {
        return stationCode;
    }

    public void setStationCode(String stationCode) {
        this.stationCode = stationCode;
    }

    public BigDecimal getResultValue() {
        return resultValue;
    }

    public void setResultValue(BigDecimal resultValue) {
        this.resultValue = resultValue;
    }

    public BigDecimal getIdentValue() {
        return identValue;
    }

    public void setIdentValue(BigDecimal identValue) {
        this.identValue = identValue;
    }

    public BigDecimal getRawValue() {
        return rawValue;
    }

    public void setRawValue(BigDecimal rawValue) {
        this.rawValue = rawValue;
    }

    public String getFunCode() {
        return funCode;
    }

    public void setFunCode(String funCode) {
        this.funCode = funCode;
    }

    public Date getSampleTime() {
        return sampleTime;
    }

    public void setSampleTime(Date sampleTime) {
        this.sampleTime = sampleTime;
    }

    public Date getRptTime() {
        return rptTime;
    }

    public void setRptTime(Date rptTime) {
        this.rptTime = rptTime;
    }

    public Date getRevTime() {
        return revTime;
    }

    public void setRevTime(Date revTime) {
        this.revTime = revTime;
    }

    public BigDecimal getVoltage() {
        return voltage;
    }

    public void setVoltage(BigDecimal voltage) {
        this.voltage = voltage;
    }

    public BigDecimal getTemperature() {
        return temperature;
    }

    public void setTemperature(BigDecimal temperature) {
        this.temperature = temperature;
    }

    public BigDecimal getSocRate() {
        return socRate;
    }

    public void setSocRate(BigDecimal socRate) {
        this.socRate = socRate;
    }

    public Integer getMcuRunNum() {
        return mcuRunNum;
    }

    public void setMcuRunNum(Integer mcuRunNum) {
        this.mcuRunNum = mcuRunNum;
    }

    public Integer getBatRumTime() {
        return batRumTime;
    }

    public void setBatRumTime(Integer batRumTime) {
        this.batRumTime = batRumTime;
    }

    public Integer getRsrp() {
        return rsrp;
    }

    public void setRsrp(Integer rsrp) {
        this.rsrp = rsrp;
    }

    public String getSoftVer() {
        return softVer;
    }

    public void setSoftVer(String softVer) {
        this.softVer = softVer;
    }

    public String getCcid() {
        return ccid;
    }

    public void setCcid(String ccid) {
        this.ccid = ccid;
    }

    public Integer getSnr() {
        return snr;
    }

    public void setSnr(Integer snr) {
        this.snr = snr;
    }

    public String getHardwareCode() {
        return hardwareCode;
    }

    public void setHardwareCode(String hardwareCode) {
        this.hardwareCode = hardwareCode;
    }

    public String getNbVersion() {
        return nbVersion;
    }

    public void setNbVersion(String nbVersion) {
        this.nbVersion = nbVersion;
    }

    public String getHardVersion() {
        return hardVersion;
    }

    public void setHardVersion(String hardVersion) {
        this.hardVersion = hardVersion;
    }

    public String getBigJpgUrl() {
        return bigJpgUrl;
    }

    public void setBigJpgUrl(String bigJpgUrl) {
        this.bigJpgUrl = bigJpgUrl;
    }

    public String getSzsbz() {
        return szsbz;
    }

    public void setSzsbz(String szsbz) {
        this.szsbz = szsbz;
    }

    public String getSzsbgl() {
        return szsbgl;
    }

    public void setSzsbgl(String szsbgl) {
        this.szsbgl = szsbgl;
    }

    public String getPreAmount() {
        return preAmount;
    }

    public void setPreAmount(String preAmount) {
        this.preAmount = preAmount;
    }

    public Date getPreTime() {
        return preTime;
    }

    public void setPreTime(Date preTime) {
        this.preTime = preTime;
    }

    public Integer getOperationTime() {
        return operationTime;
    }

    public void setOperationTime(Integer operationTime) {
        this.operationTime = operationTime;
    }

    public Integer getTransmissionTime() {
        return transmissionTime;
    }

    public void setTransmissionTime(Integer transmissionTime) {
        this.transmissionTime = transmissionTime;
    }

    public String getAiVersion() {
        return aiVersion;
    }

    public void setAiVersion(String aiVersion) {
        this.aiVersion = aiVersion;
    }

    public Integer getDecimalDigits() {
        return decimalDigits;
    }

    public void setDecimalDigits(Integer decimalDigits) {
        this.decimalDigits = decimalDigits;
    }

    public Integer getIp1SendStatus() {
        return ip1SendStatus;
    }

    public void setIp1SendStatus(Integer ip1SendStatus) {
        this.ip1SendStatus = ip1SendStatus;
    }

    public String getNbRegLocation() {
        return nbRegLocation;
    }

    public void setNbRegLocation(String nbRegLocation) {
        this.nbRegLocation = nbRegLocation;
    }

    public String getImei() {
        return imei;
    }

    public void setImei(String imei) {
        this.imei = imei;
    }

    public Integer getCsq() {
        return csq;
    }

    public void setCsq(Integer csq) {
        this.csq = csq;
    }

    public Integer getEcl() {
        return ecl;
    }

    public void setEcl(Integer ecl) {
        this.ecl = ecl;
    }

    public Integer getCommunicationModuleType() {
        return communicationModuleType;
    }

    public void setCommunicationModuleType(Integer communicationModuleType) {
        this.communicationModuleType = communicationModuleType;
    }

    public BigDecimal getServerValue() {
        return serverValue;
    }

    public void setServerValue(BigDecimal serverValue) {
        this.serverValue = serverValue;
    }

    public String getIotCardDuedate() {
        return iotCardDuedate;
    }

    public void setIotCardDuedate(String iotCardDuedate) {
        this.iotCardDuedate = iotCardDuedate;
    }

    public String getIotCardRemaingprs() {
        return iotCardRemaingprs;
    }

    public void setIotCardRemaingprs(String iotCardRemaingprs) {
        this.iotCardRemaingprs = iotCardRemaingprs;
    }

    public String getIotCardWorkingcondition() {
        return iotCardWorkingcondition;
    }

    public void setIotCardWorkingcondition(String iotCardWorkingcondition) {
        this.iotCardWorkingcondition = iotCardWorkingcondition;
    }
}
