package com.casic.missiles.modular.system.dto;

import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;

import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author casic123
 * @since 2019-05-17
 */
public class AlarmNowView {

    private static final long serialVersionUID = 1L;

    /**
     * 报警记录ID
     */
    private Long alarmId;

    /**
     * 闸井ID
     */
    private Long wellId;

    /**
     * 设备ID
     */
    private Long deviceId;

    /**
     * 设备编号
     */
    private String devcode;

    /**
     * 闸井编号
     */
    private String wellCode;

    /**
     * 告警类型
     */
    private String alarmType;

    /**
     * 报警值
     */
    private String alarmValue;

    /**
     * 告警内容
     */
    private String alarmContent;
    /**
     * 告警时间
     */
    private Date alarmTimeDate;

    /**
     * 闸井位置
     */
    private String position;

    /**
     * 第三方坐标系X
     */
    private String coordinateX;
    /**
     * 第三方坐标Y
     */
    private String coordinateY;
    /**
     * 百度纬度
     */
    private String latBaidu;
    /**
     * 百度经度
     */
    private String lngBaidu;
    /**
     * 高德经度
     */
    private String lngGaode;
    /**
     * 高德纬度
     */
    private String latGaode;

    /**
     * 部门编号
     */
    private String deptid;

    /**
     * 井类型
     */
    private String wellType;

    private String wellTypeName;


    public Long getAlarmId() {
        return alarmId;
    }

    public void setAlarmId(Long alarmId) {
        this.alarmId = alarmId;
    }

    public Long getWellId() {
        return wellId;
    }

    public void setWellId(Long wellId) {
        this.wellId = wellId;
    }

    public Long getDeviceId() {
        return deviceId;
    }

    public String getDevcode() {
        return devcode;
    }

    public void setDevcode(String devcode) {
        this.devcode = devcode;
    }

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

    public String getWellCode() {
        return wellCode;
    }

    public void setWellCode(String wellCode) {
        this.wellCode = wellCode;
    }

    public String getAlarmType() {
        return alarmType;
    }

    public void setAlarmType(String alarmType) {
        this.alarmType = alarmType;
    }

    public String getAlarmValue() {
        return alarmValue;
    }

    public void setAlarmValue(String alarmValue) {
        this.alarmValue = alarmValue;
    }

    public String getAlarmContent() {
        return alarmContent;
    }

    public void setAlarmContent(String alarmContent) {
        this.alarmContent = alarmContent;
    }

    public Date getAlarmTimeDate() {
        return alarmTimeDate;
    }

    public void setAlarmTimeDate(Date alarmTimeDate) {
        this.alarmTimeDate = alarmTimeDate;
    }

    public String getAlarmTime() {
        DateTimeFormatter fmt = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss");
        if (null != this.alarmTimeDate) {
            return fmt.print(alarmTimeDate.getTime());
        } else {
            return "";
        }
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public String getCoordinateX() {
        return coordinateX;
    }

    public void setCoordinateX(String coordinateX) {
        this.coordinateX = coordinateX;
    }

    public String getCoordinateY() {
        return coordinateY;
    }

    public void setCoordinateY(String coordinateY) {
        this.coordinateY = coordinateY;
    }

    public String getLatBaidu() {
        return latBaidu;
    }

    public void setLatBaidu(String latBaidu) {
        this.latBaidu = latBaidu;
    }

    public String getLngBaidu() {
        return lngBaidu;
    }

    public void setLngBaidu(String lngBaidu) {
        this.lngBaidu = lngBaidu;
    }

    public String getLngGaode() {
        return lngGaode;
    }

    public void setLngGaode(String lngGaode) {
        this.lngGaode = lngGaode;
    }

    public String getLatGaode() {
        return latGaode;
    }

    public void setLatGaode(String latGaode) {
        this.latGaode = latGaode;
    }

    public String getDeptid() {
        return deptid;
    }

    public void setDeptid(String deptid) {
        this.deptid = deptid;
    }

    public String getWellType() {
        return wellType;
    }

    public void setWellType(String wellType) {
        this.wellType = wellType;
    }

    public String getWellTypeName() {
        return wellTypeName;
    }

    public void setWellTypeName(String wellTypeName) {
        this.wellTypeName = wellTypeName;
    }

    @Override
    public String toString() {
        return "AlarmNowView{" +
        "id=" + alarmId +
        ", deviceId=" + deviceId +
        ", wellId=" + wellId +
        ", wellCode=" + wellCode +
        ", alarmType=" + alarmType +
        ", alarmContent=" + alarmContent +
        ", alarmTime=" + getAlarmTime() +
        "}";
    }
}
