package com.szpg.db.dao;

import java.util.List;

import com.szpg.db.data.PgTemphum;
import com.szpg.db.data.PgTemphumAlm;

/**
 * 温湿度相关参数读写的数据库接口
 * @author admin
 *
 */
public interface PgWsDao {

	/******** 温湿度监测值 ********/
	public List<PgTemphum> findAllWsdz();
	public PgTemphum findWsdzById(Integer id);
	
	public List<PgTemphum> findWsdzByDevice(Integer deviceid);
	public List<PgTemphum> findWsdzByDeviceAndTm(Integer deviceid, String start, String end);
	
	public int addWsdzRecord(PgTemphum wsdz);
	public int addWsdzRecord(float temp, float hum, String tm, int deviceid);
	
	
	/******** 温湿度报警状态 ********/
	public List<PgTemphumAlm> findAllWsdbj();
	public PgTemphumAlm findWsdbjById(Integer id);
	
	public List<PgTemphumAlm> findWsdbjByDevice(Integer deviceid);
	public List<PgTemphumAlm> findWsdbjByDeviceAndTm(Integer deviceid, String start, String end);
	
	public int addWsdbjRecord(PgTemphumAlm wsalm);
	public int addWsdbjRecord(boolean temp, boolean hum, String tm, int deviceid);
}
