package com.mortals.xhx.module.device.model;

import java.math.BigDecimal;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.device.model.vo.DeviceStatVo;
/**
 * 设备统计实体对象
 *
 * @author zxfei
 * @date 2022-08-22
 */

public class DeviceStatEntity extends DeviceStatVo {
    private static final long serialVersionUID = 1L;

    /**
     * 站点Id，来源基础服务平台
     */
    private Long siteId;
    /**
     * 设备总数
     */
    private Integer deviceTotalCount;
    /**
     * 昨日新增减少设备数量
     */
    private Integer deviceAddCount;
    /**
     * 监控站点数量
     */
    private Integer siteTotalCount;
    /**
     * 昨日新增站点数量
     */
    private Integer siteAddCount;
    /**
     * 在线设备数量
     */
    private Integer deviceOnlineCount;
    /**
     * 在线率
     */
    private BigDecimal deviceOnlineRatio;
    /**
     * 离线设备数量
     */
    private Integer deviceOfflineCount;
    /**
     * 离线率
     */
    private BigDecimal deviceOfflineRatio;
    /**
     * 停用设备数量
     */
    private Integer deviceStopCount;
    /**
     * 停用率
     */
    private BigDecimal deviceStopRatio;
    /**
     * 未激活设备数量
     */
    private Integer deviceUnActiveCount;
    /**
     * 未激活率
     */
    private BigDecimal deviceUnActiveRatio;
    /**
     * 今日告警数量
     */
    private Integer alarmTotalCount;
    /**
     * 昨日新增减少数量
     */
    private Integer alarmAddCount;
    /**
     * 今日消息推送数量
     */
    private Integer pushTotalCount;
    /**
     * 昨日新增减少数量
     */
    private Integer pushAddCount;
    /**
     * 今日上行消息数量
     */
    private Integer uploadMessageTotalCount;
    /**
     * 今日下行消息数量
     */
    private Integer downloadMessageTotalCount;
    /**
     * 年
     */
    private Integer year;
    /**
     * 月
     */
    private Integer month;
    /**
     * 日
     */
    private Integer day;



    public DeviceStatEntity(){}
    /**
     * 获取 站点Id，来源基础服务平台
     * @return Long
     */
    public Long getSiteId(){
        return siteId;
    }
    /**
     * 设置 站点Id，来源基础服务平台
     * @param siteId
     */
    public void setSiteId(Long siteId){
        this.siteId = siteId;
    }
    /**
     * 获取 设备总数
     * @return Integer
     */
    public Integer getDeviceTotalCount(){
        return deviceTotalCount;
    }
    /**
     * 设置 设备总数
     * @param deviceTotalCount
     */
    public void setDeviceTotalCount(Integer deviceTotalCount){
        this.deviceTotalCount = deviceTotalCount;
    }
    /**
     * 获取 昨日新增减少设备数量
     * @return Integer
     */
    public Integer getDeviceAddCount(){
        return deviceAddCount;
    }
    /**
     * 设置 昨日新增减少设备数量
     * @param deviceAddCount
     */
    public void setDeviceAddCount(Integer deviceAddCount){
        this.deviceAddCount = deviceAddCount;
    }
    /**
     * 获取 监控站点数量
     * @return Integer
     */
    public Integer getSiteTotalCount(){
        return siteTotalCount;
    }
    /**
     * 设置 监控站点数量
     * @param siteTotalCount
     */
    public void setSiteTotalCount(Integer siteTotalCount){
        this.siteTotalCount = siteTotalCount;
    }
    /**
     * 获取 昨日新增站点数量
     * @return Integer
     */
    public Integer getSiteAddCount(){
        return siteAddCount;
    }
    /**
     * 设置 昨日新增站点数量
     * @param siteAddCount
     */
    public void setSiteAddCount(Integer siteAddCount){
        this.siteAddCount = siteAddCount;
    }
    /**
     * 获取 在线设备数量
     * @return Integer
     */
    public Integer getDeviceOnlineCount(){
        return deviceOnlineCount;
    }
    /**
     * 设置 在线设备数量
     * @param deviceOnlineCount
     */
    public void setDeviceOnlineCount(Integer deviceOnlineCount){
        this.deviceOnlineCount = deviceOnlineCount;
    }
    /**
     * 获取 在线率
     * @return BigDecimal
     */
    public BigDecimal getDeviceOnlineRatio(){
        return deviceOnlineRatio;
    }
    /**
     * 设置 在线率
     * @param deviceOnlineRatio
     */
    public void setDeviceOnlineRatio(BigDecimal deviceOnlineRatio){
        this.deviceOnlineRatio = deviceOnlineRatio;
    }
    /**
     * 获取 离线设备数量
     * @return Integer
     */
    public Integer getDeviceOfflineCount(){
        return deviceOfflineCount;
    }
    /**
     * 设置 离线设备数量
     * @param deviceOfflineCount
     */
    public void setDeviceOfflineCount(Integer deviceOfflineCount){
        this.deviceOfflineCount = deviceOfflineCount;
    }
    /**
     * 获取 离线率
     * @return BigDecimal
     */
    public BigDecimal getDeviceOfflineRatio(){
        return deviceOfflineRatio;
    }
    /**
     * 设置 离线率
     * @param deviceOfflineRatio
     */
    public void setDeviceOfflineRatio(BigDecimal deviceOfflineRatio){
        this.deviceOfflineRatio = deviceOfflineRatio;
    }
    /**
     * 获取 停用设备数量
     * @return Integer
     */
    public Integer getDeviceStopCount(){
        return deviceStopCount;
    }
    /**
     * 设置 停用设备数量
     * @param deviceStopCount
     */
    public void setDeviceStopCount(Integer deviceStopCount){
        this.deviceStopCount = deviceStopCount;
    }
    /**
     * 获取 停用率
     * @return BigDecimal
     */
    public BigDecimal getDeviceStopRatio(){
        return deviceStopRatio;
    }
    /**
     * 设置 停用率
     * @param deviceStopRatio
     */
    public void setDeviceStopRatio(BigDecimal deviceStopRatio){
        this.deviceStopRatio = deviceStopRatio;
    }
    /**
     * 获取 未激活设备数量
     * @return Integer
     */
    public Integer getDeviceUnActiveCount(){
        return deviceUnActiveCount;
    }
    /**
     * 设置 未激活设备数量
     * @param deviceUnActiveCount
     */
    public void setDeviceUnActiveCount(Integer deviceUnActiveCount){
        this.deviceUnActiveCount = deviceUnActiveCount;
    }
    /**
     * 获取 未激活率
     * @return BigDecimal
     */
    public BigDecimal getDeviceUnActiveRatio(){
        return deviceUnActiveRatio;
    }
    /**
     * 设置 未激活率
     * @param deviceUnActiveRatio
     */
    public void setDeviceUnActiveRatio(BigDecimal deviceUnActiveRatio){
        this.deviceUnActiveRatio = deviceUnActiveRatio;
    }
    /**
     * 获取 今日告警数量
     * @return Integer
     */
    public Integer getAlarmTotalCount(){
        return alarmTotalCount;
    }
    /**
     * 设置 今日告警数量
     * @param alarmTotalCount
     */
    public void setAlarmTotalCount(Integer alarmTotalCount){
        this.alarmTotalCount = alarmTotalCount;
    }
    /**
     * 获取 昨日新增减少数量
     * @return Integer
     */
    public Integer getAlarmAddCount(){
        return alarmAddCount;
    }
    /**
     * 设置 昨日新增减少数量
     * @param alarmAddCount
     */
    public void setAlarmAddCount(Integer alarmAddCount){
        this.alarmAddCount = alarmAddCount;
    }
    /**
     * 获取 今日消息推送数量
     * @return Integer
     */
    public Integer getPushTotalCount(){
        return pushTotalCount;
    }
    /**
     * 设置 今日消息推送数量
     * @param pushTotalCount
     */
    public void setPushTotalCount(Integer pushTotalCount){
        this.pushTotalCount = pushTotalCount;
    }
    /**
     * 获取 昨日新增减少数量
     * @return Integer
     */
    public Integer getPushAddCount(){
        return pushAddCount;
    }
    /**
     * 设置 昨日新增减少数量
     * @param pushAddCount
     */
    public void setPushAddCount(Integer pushAddCount){
        this.pushAddCount = pushAddCount;
    }
    /**
     * 获取 今日上行消息数量
     * @return Integer
     */
    public Integer getUploadMessageTotalCount(){
        return uploadMessageTotalCount;
    }
    /**
     * 设置 今日上行消息数量
     * @param uploadMessageTotalCount
     */
    public void setUploadMessageTotalCount(Integer uploadMessageTotalCount){
        this.uploadMessageTotalCount = uploadMessageTotalCount;
    }
    /**
     * 获取 今日下行消息数量
     * @return Integer
     */
    public Integer getDownloadMessageTotalCount(){
        return downloadMessageTotalCount;
    }
    /**
     * 设置 今日下行消息数量
     * @param downloadMessageTotalCount
     */
    public void setDownloadMessageTotalCount(Integer downloadMessageTotalCount){
        this.downloadMessageTotalCount = downloadMessageTotalCount;
    }
    /**
     * 获取 年
     * @return Integer
     */
    public Integer getYear(){
        return year;
    }
    /**
     * 设置 年
     * @param year
     */
    public void setYear(Integer year){
        this.year = year;
    }
    /**
     * 获取 月
     * @return Integer
     */
    public Integer getMonth(){
        return month;
    }
    /**
     * 设置 月
     * @param month
     */
    public void setMonth(Integer month){
        this.month = month;
    }
    /**
     * 获取 日
     * @return Integer
     */
    public Integer getDay(){
        return day;
    }
    /**
     * 设置 日
     * @param day
     */
    public void setDay(Integer day){
        this.day = day;
    }




    @Override
    public int hashCode() {
        return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof DeviceStatEntity) {
            DeviceStatEntity tmp = (DeviceStatEntity) obj;
            if (this.getId() == tmp.getId()) {
                return true;
            }
        }
        return false;
    }

    public String toString(){
        StringBuilder sb = new StringBuilder("");
        sb.append(",siteId:").append(getSiteId());
        sb.append(",deviceTotalCount:").append(getDeviceTotalCount());
        sb.append(",deviceAddCount:").append(getDeviceAddCount());
        sb.append(",siteTotalCount:").append(getSiteTotalCount());
        sb.append(",siteAddCount:").append(getSiteAddCount());
        sb.append(",deviceOnlineCount:").append(getDeviceOnlineCount());
        sb.append(",deviceOnlineRatio:").append(getDeviceOnlineRatio());
        sb.append(",deviceOfflineCount:").append(getDeviceOfflineCount());
        sb.append(",deviceOfflineRatio:").append(getDeviceOfflineRatio());
        sb.append(",deviceStopCount:").append(getDeviceStopCount());
        sb.append(",deviceStopRatio:").append(getDeviceStopRatio());
        sb.append(",deviceUnActiveCount:").append(getDeviceUnActiveCount());
        sb.append(",deviceUnActiveRatio:").append(getDeviceUnActiveRatio());
        sb.append(",alarmTotalCount:").append(getAlarmTotalCount());
        sb.append(",alarmAddCount:").append(getAlarmAddCount());
        sb.append(",pushTotalCount:").append(getPushTotalCount());
        sb.append(",pushAddCount:").append(getPushAddCount());
        sb.append(",uploadMessageTotalCount:").append(getUploadMessageTotalCount());
        sb.append(",downloadMessageTotalCount:").append(getDownloadMessageTotalCount());
        sb.append(",year:").append(getYear());
        sb.append(",month:").append(getMonth());
        sb.append(",day:").append(getDay());
        return sb.toString();
    }

    public void initAttrValue(){

        this.siteId = null;

        this.deviceTotalCount = 0;

        this.deviceAddCount = 0;

        this.siteTotalCount = 0;

        this.siteAddCount = 0;

        this.deviceOnlineCount = 0;

        this.deviceOnlineRatio = BigDecimal.valueOf(0.00);

        this.deviceOfflineCount = 0;

        this.deviceOfflineRatio = BigDecimal.valueOf(0.00);

        this.deviceStopCount = 0;

        this.deviceStopRatio = BigDecimal.valueOf(0.00);

        this.deviceUnActiveCount = 0;

        this.deviceUnActiveRatio = BigDecimal.valueOf(0.00);

        this.alarmTotalCount = 0;

        this.alarmAddCount = 0;

        this.pushTotalCount = 0;

        this.pushAddCount = 0;

        this.uploadMessageTotalCount = 0;

        this.downloadMessageTotalCount = 0;

        this.year = null;

        this.month = null;

        this.day = null;
    }
}