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

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.DeviceVo;

/**
 * 设备业务实体对象
 *
 * @author zxfei
 * @date 2023-04-14
 */

public class DeviceEntity extends DeviceVo {
    private static final long serialVersionUID = 1L;

    /**
     * 站点Id
     */
    private Long siteId;
    /**
     * 站点名称
     */
    private String siteName;
    /**
     * 设备ID，海康
     */
    private String deviceId;
    /**
     * 设备名称
     */
    private String deviceName;
    /**
     * 设备编码
     */
    private String deviceCode;
    /**
     * 设备的MAC地址
     */
    private String deviceMac;
    /**
     * 设备位置
     */
    private String deviceLocation;
    /**
     * 经度
     */
    private String lon;
    /**
     * 纬度
     */
    private String lati;
    /**
     * 楼层
     */
    private Integer floor;
    /**
     * 楼栋
     */
    private Integer build;
    /**
     * 负责人
     */
    private String leadingOfficial;
    /**
     * 联系电话
     */
    private String leadingOfficialTelephone;
    /**
     * 超时时间，单位天
     */
    private Integer timeOutPeriod;
    /**
     * 临近时间，单位天
     */
    private Integer nearTime;
    /**
     * 设备状态 (1.离线,2.在线)
     */
    private Integer deviceStatus;
    /**
     * 区域编码
     */
    private String regionIndexCode;
    /**
     * 类型名称
     */
    private String cameraTypeName;
    /**
     * 设备类型
     */
    private Integer cameraType;
    /**
     * 编码
     */
    private String encodeDevIndexCode;
    /**
     * 设备能力
     */
    private String capabilitySet;
    /**
     * 设备能力名称
     */
    private String capabilitySetName;
    /**
     * 备注
     */
    private String deviceRemark;


    public DeviceEntity() {
    }

    /**
     * 获取 站点Id
     *
     * @return Long
     */
    public Long getSiteId() {
        return siteId;
    }

    /**
     * 设置 站点Id
     *
     * @param siteId
     */
    public void setSiteId(Long siteId) {
        this.siteId = siteId;
    }

    /**
     * 获取 站点名称
     *
     * @return String
     */
    public String getSiteName() {
        return siteName;
    }

    /**
     * 设置 站点名称
     *
     * @param siteName
     */
    public void setSiteName(String siteName) {
        this.siteName = siteName;
    }

    /**
     * 获取 设备ID，海康
     *
     * @return String
     */
    public String getDeviceId() {
        return deviceId;
    }

    /**
     * 设置 设备ID，海康
     *
     * @param deviceId
     */
    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    /**
     * 获取 设备名称
     *
     * @return String
     */
    public String getDeviceName() {
        return deviceName;
    }

    /**
     * 设置 设备名称
     *
     * @param deviceName
     */
    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    /**
     * 获取 设备编码
     *
     * @return String
     */
    public String getDeviceCode() {
        return deviceCode;
    }

    /**
     * 设置 设备编码
     *
     * @param deviceCode
     */
    public void setDeviceCode(String deviceCode) {
        this.deviceCode = deviceCode;
    }

    /**
     * 获取 设备的MAC地址
     *
     * @return String
     */
    public String getDeviceMac() {
        return deviceMac;
    }

    /**
     * 设置 设备的MAC地址
     *
     * @param deviceMac
     */
    public void setDeviceMac(String deviceMac) {
        this.deviceMac = deviceMac;
    }

    /**
     * 获取 设备位置
     *
     * @return String
     */
    public String getDeviceLocation() {
        return deviceLocation;
    }

    /**
     * 设置 设备位置
     *
     * @param deviceLocation
     */
    public void setDeviceLocation(String deviceLocation) {
        this.deviceLocation = deviceLocation;
    }

    /**
     * 获取 经度
     *
     * @return String
     */
    public String getLon() {
        return lon;
    }

    /**
     * 设置 经度
     *
     * @param lon
     */
    public void setLon(String lon) {
        this.lon = lon;
    }

    /**
     * 获取 纬度
     *
     * @return String
     */
    public String getLati() {
        return lati;
    }

    /**
     * 设置 纬度
     *
     * @param lati
     */
    public void setLati(String lati) {
        this.lati = lati;
    }

    /**
     * 获取 楼层
     *
     * @return Integer
     */
    public Integer getFloor() {
        return floor;
    }

    /**
     * 设置 楼层
     *
     * @param floor
     */
    public void setFloor(Integer floor) {
        this.floor = floor;
    }

    /**
     * 获取 楼栋
     *
     * @return Integer
     */
    public Integer getBuild() {
        return build;
    }

    /**
     * 设置 楼栋
     *
     * @param build
     */
    public void setBuild(Integer build) {
        this.build = build;
    }

    /**
     * 获取 负责人
     *
     * @return String
     */
    public String getLeadingOfficial() {
        return leadingOfficial;
    }

    /**
     * 设置 负责人
     *
     * @param leadingOfficial
     */
    public void setLeadingOfficial(String leadingOfficial) {
        this.leadingOfficial = leadingOfficial;
    }

    /**
     * 获取 联系电话
     *
     * @return String
     */
    public String getLeadingOfficialTelephone() {
        return leadingOfficialTelephone;
    }

    /**
     * 设置 联系电话
     *
     * @param leadingOfficialTelephone
     */
    public void setLeadingOfficialTelephone(String leadingOfficialTelephone) {
        this.leadingOfficialTelephone = leadingOfficialTelephone;
    }

    /**
     * 获取 超时时间，单位天
     *
     * @return Integer
     */
    public Integer getTimeOutPeriod() {
        return timeOutPeriod;
    }

    /**
     * 设置 超时时间，单位天
     *
     * @param timeOutPeriod
     */
    public void setTimeOutPeriod(Integer timeOutPeriod) {
        this.timeOutPeriod = timeOutPeriod;
    }

    /**
     * 获取 临近时间，单位天
     *
     * @return Integer
     */
    public Integer getNearTime() {
        return nearTime;
    }

    /**
     * 设置 临近时间，单位天
     *
     * @param nearTime
     */
    public void setNearTime(Integer nearTime) {
        this.nearTime = nearTime;
    }

    /**
     * 获取 设备状态 (1.离线,2.在线)
     *
     * @return Integer
     */
    public Integer getDeviceStatus() {
        return deviceStatus;
    }

    /**
     * 设置 设备状态 (1.离线,2.在线)
     *
     * @param deviceStatus
     */
    public void setDeviceStatus(Integer deviceStatus) {
        this.deviceStatus = deviceStatus;
    }

    /**
     * 获取 区域编码
     *
     * @return String
     */
    public String getRegionIndexCode() {
        return regionIndexCode;
    }

    /**
     * 设置 区域编码
     *
     * @param regionIndexCode
     */
    public void setRegionIndexCode(String regionIndexCode) {
        this.regionIndexCode = regionIndexCode;
    }

    /**
     * 获取 类型名称
     *
     * @return String
     */
    public String getCameraTypeName() {
        return cameraTypeName;
    }

    /**
     * 设置 类型名称
     *
     * @param cameraTypeName
     */
    public void setCameraTypeName(String cameraTypeName) {
        this.cameraTypeName = cameraTypeName;
    }

    /**
     * 获取 设备类型
     *
     * @return Integer
     */
    public Integer getCameraType() {
        return cameraType;
    }

    /**
     * 设置 设备类型
     *
     * @param cameraType
     */
    public void setCameraType(Integer cameraType) {
        this.cameraType = cameraType;
    }

    /**
     * 获取 编码
     *
     * @return String
     */
    public String getEncodeDevIndexCode() {
        return encodeDevIndexCode;
    }

    /**
     * 设置 编码
     *
     * @param encodeDevIndexCode
     */
    public void setEncodeDevIndexCode(String encodeDevIndexCode) {
        this.encodeDevIndexCode = encodeDevIndexCode;
    }

    /**
     * 获取 设备能力
     *
     * @return String
     */
    public String getCapabilitySet() {
        return capabilitySet;
    }

    /**
     * 设置 设备能力
     *
     * @param capabilitySet
     */
    public void setCapabilitySet(String capabilitySet) {
        this.capabilitySet = capabilitySet;
    }

    /**
     * 获取 设备能力名称
     *
     * @return String
     */
    public String getCapabilitySetName() {
        return capabilitySetName;
    }

    /**
     * 设置 设备能力名称
     *
     * @param capabilitySetName
     */
    public void setCapabilitySetName(String capabilitySetName) {
        this.capabilitySetName = capabilitySetName;
    }

    /**
     * 获取 备注
     *
     * @return String
     */
    public String getDeviceRemark() {
        return deviceRemark;
    }

    /**
     * 设置 备注
     *
     * @param deviceRemark
     */
    public void setDeviceRemark(String deviceRemark) {
        this.deviceRemark = deviceRemark;
    }


    @Override
    public int hashCode() {
        return this.getDeviceId().hashCode();
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof DeviceEntity) {
            DeviceEntity tmp = (DeviceEntity) obj;
            if (this.getDeviceId().equals(tmp.getDeviceId())) {
                return true;
            }
        }
        return false;
    }

    public String toString() {
        StringBuilder sb = new StringBuilder("");
        sb.append(",siteId:").append(getSiteId());
        sb.append(",siteName:").append(getSiteName());
        sb.append(",deviceId:").append(getDeviceId());
        sb.append(",deviceName:").append(getDeviceName());
        sb.append(",deviceCode:").append(getDeviceCode());
        sb.append(",deviceMac:").append(getDeviceMac());
        sb.append(",deviceLocation:").append(getDeviceLocation());
        sb.append(",lon:").append(getLon());
        sb.append(",lati:").append(getLati());
        sb.append(",floor:").append(getFloor());
        sb.append(",build:").append(getBuild());
        sb.append(",leadingOfficial:").append(getLeadingOfficial());
        sb.append(",leadingOfficialTelephone:").append(getLeadingOfficialTelephone());
        sb.append(",timeOutPeriod:").append(getTimeOutPeriod());
        sb.append(",nearTime:").append(getNearTime());
        sb.append(",deviceStatus:").append(getDeviceStatus());
        sb.append(",regionIndexCode:").append(getRegionIndexCode());
        sb.append(",cameraTypeName:").append(getCameraTypeName());
        sb.append(",cameraType:").append(getCameraType());
        sb.append(",encodeDevIndexCode:").append(getEncodeDevIndexCode());
        sb.append(",capabilitySet:").append(getCapabilitySet());
        sb.append(",capabilitySetName:").append(getCapabilitySetName());
        sb.append(",deviceRemark:").append(getDeviceRemark());
        return sb.toString();
    }

    public void initAttrValue() {

        this.siteId = null;

        this.siteName = "";

        this.deviceId = "";

        this.deviceName = "";

        this.deviceCode = "";

        this.deviceMac = "";

        this.deviceLocation = "";

        this.lon = "";

        this.lati = "";

        this.floor = null;

        this.build = null;

        this.leadingOfficial = "";

        this.leadingOfficialTelephone = "";

        this.timeOutPeriod = 0;

        this.nearTime = 0;

        this.deviceStatus = 2;

        this.regionIndexCode = "";

        this.cameraTypeName = "";

        this.cameraType = null;

        this.encodeDevIndexCode = "";

        this.capabilitySet = "";

        this.capabilitySetName = "";

        this.deviceRemark = "";
    }
}