package com.hw.ems.record.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hw.common.core.annotation.Excel;
import com.hw.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

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

/**
 * 水实时数据对象 record_water_instant
 *
 * @author YinQ
 * @date 2023-04-08
 */
public class RecordWaterInstant extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 自增标识
     */
    private Long objid;

    /**
     * 计量设备编号
     */
    @Excel(name = "计量设备编号")
    private String monitorId;


    /**
     * 计量设备名称
     */
    @Excel(name = "计量设备名称")
    private String monitorName;

    /**
     * 采集时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "采集时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date collectTime;

    /**
     * 计量设备地址
     */
    @Excel(name = "计量设备地址")
    private String address;

    /**
     * 瞬时流量
     */
    @Excel(name = "瞬时流量")
    private BigDecimal fluxFlow;

    /**
     * 累计流量
     */
    @Excel(name = "累计流量")
    private BigDecimal waterFlow;

    /**
     * 记录时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "记录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date recordTime;

    /**
     * 采集方式
     */
    @Excel(name = "采集方式", dictType = "collect_type")
    private Long collectType;

    /**
     * 权限标识（部门）
     */
//    @Excel(name = "权限标识", readConverterExp = "部=门")
    private Long deptId;

    /**
     * 权限标识（用户）
     */
//    @Excel(name = "权限标识", readConverterExp = "用=户")
    private Long userId;

    /**
     * 耗量
     */
    private String consumption;

    /**
     * 查询子集
     */
    private String monitorSubset;

    /**
     * 在线状态
     */
    private Integer onlineState;

    public Integer getOnlineState() {
        return onlineState;
    }

    public void setOnlineState(Integer onlineState) {
        this.onlineState = onlineState;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getConsumption() {
        return consumption;
    }

    public void setConsumption(String consumption) {
        this.consumption = consumption;
    }

    public String getMonitorName() {
        return monitorName;
    }

    public void setMonitorName(String monitorName) {
        this.monitorName = monitorName;
    }

    public String getMonitorSubset() {
        return monitorSubset;
    }

    public void setMonitorSubset(String monitorSubset) {
        this.monitorSubset = monitorSubset;
    }

    public void setObjid(Long objid) {
        this.objid = objid;
    }

    public Long getObjid() {
        return objid;
    }

    public void setMonitorId(String monitorId) {
        this.monitorId = monitorId;
    }

    public String getMonitorId() {
        return monitorId;
    }

    public void setCollectTime(Date collectTime) {
        this.collectTime = collectTime;
    }

    public Date getCollectTime() {
        return collectTime;
    }

    public void setFluxFlow(BigDecimal fluxFlow) {
        this.fluxFlow = fluxFlow;
    }

    public BigDecimal getFluxFlow() {
        return fluxFlow;
    }

    public void setWaterFlow(BigDecimal waterFlow) {
        this.waterFlow = waterFlow;
    }

    public BigDecimal getWaterFlow() {
        return waterFlow;
    }

    public void setRecordTime(Date recordTime) {
        this.recordTime = recordTime;
    }

    public Date getRecordTime() {
        return recordTime;
    }

    public void setCollectType(Long collectType) {
        this.collectType = collectType;
    }

    public Long getCollectType() {
        return collectType;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getUserId() {
        return userId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("objid", getObjid())
                .append("monitorId", getMonitorId())
                .append("collectTime", getCollectTime())
                .append("fluxFlow", getFluxFlow())
                .append("waterFlow", getWaterFlow())
                .append("recordTime", getRecordTime())
                .append("collectType", getCollectType())
                .append("deptId", getDeptId())
                .append("userId", getUserId())
                .toString();
    }
}
