package com.szpg.db.dao;

import java.util.List;

import com.szpg.db.data.PgZmRt;
import com.szpg.db.data.PgZmStat;

/**
 * 照明运行相关参数读写的数据库接口
 * @author admin
 *
 */
public interface PgZmDao {

	/******** 照明累计运行时长 ********/
	public PgZmRt findLatestRtByDevice(Integer deviceid);
	
	public int addRtRecord(PgZmRt zmrt);
	public int addRtRecord(int second, int hour, String tm, int deviceid);
	
	
	/******** 照明运行状态 ********/
	public List<PgZmStat> findAllStat();
	public PgZmStat findStatById(Integer id);
	
	public List<PgZmStat> findStatByDevice(Integer deviceid);
	public List<PgZmStat> findStatByDeviceAndTm(Integer deviceid, String start, String end);
	public PgZmStat findLatestStatByDevice(Integer deviceid);
	
	public int addStatRecord(PgZmStat zmstat);
	public int addStatRecord(boolean run, String tm, int deviceid);
	public int addStatRecord(boolean run, boolean flt, String tm, int deviceid);
}
