package com.szpg.db.data;

import java.util.Date;

import com.szpg.util.TimeFormat;

/**
 * 风机运行状态数据表
 * 
 * @author admin
 *
 */
public class PgFjStat implements java.io.Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -3826912263791110981L;
	
	private Integer id;
	private Date logtime;
	private Date uptime;
	private Integer pgdeviceid;
	private Boolean am; //就地/远控标志位
	private Boolean run; //运行状态标志位
	private Boolean flt; //故障报警
	private Boolean en; //手自动使能标志位
	private Boolean no; //禁止操作标志位
	private Boolean rout; //启停超时标志位

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Date getLogtime() {
		return logtime;
	}

	public void setLogtime(Date logtime) {
		this.logtime = logtime;
	}

	public Date getUptime() {
		return uptime;
	}

	public void setUptime(Date uptime) {
		this.uptime = uptime;
	}
	
	public Integer getPgdeviceid() {
		return pgdeviceid;
	}

	public void setPgdeviceid(Integer pgdeviceid) {
		this.pgdeviceid = pgdeviceid;
	}
	
	public Boolean getAm() {
		return am;
	}

	public void setAm(Boolean am) {
		this.am = am;
	}

	public Boolean getRun() {
		return run;
	}

	public void setRun(Boolean run) {
		this.run = run;
	}

	public Boolean getFlt() {
		return flt;
	}

	public void setFlt(Boolean flt) {
		this.flt = flt;
	}

	public Boolean getEn() {
		return en;
	}

	public void setEn(Boolean en) {
		this.en = en;
	}

	public Boolean getNo() {
		return no;
	}

	public void setNo(Boolean no) {
		this.no = no;
	}

	public Boolean getRout() {
		return rout;
	}

	public void setRout(Boolean rout) {
		this.rout = rout;
	}

	public void setTm(Date tm) {
		this.logtime = tm;
		this.uptime = tm;
	}
	
	public String getTmStr() {
		if (null != this.logtime) {
			return TimeFormat.formatTimestamp(logtime);
		} else {
			return "";
		}
	}
	
	public String getTmStrGB() {
		if (null != this.logtime) {
			return TimeFormat.format(logtime, "yyyyMMddHHmmss");
		} else {
			return "";
		}
	}

	@Override
	public String toString() {
		return "PgFjStat[run=" + run + ", flt=" + flt + ", logtime=" + TimeFormat.formatTimestamp(logtime) + "]";
	}
}
