package cn.yw.video.videostate.dao;

import java.sql.SQLException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import com.ibatis.sqlmap.client.SqlMapClient;

import cn.base.dao.BaseSqlMapDAO;

@Repository("ywvideocurrentstateDao")
public class YwvideocurrentstateDao   extends BaseSqlMapDAO{

	public Map statisticsVideoOnlineRate(Map param) throws SQLException{
		return (Map) this.queryForObject("statisticsVideoOnlineRate", param);
	}
	public Map statisticsVideoIntactRate() throws SQLException{
		return (Map) this.queryForObject("statisticsVideoIntactRate",new HashMap());
	}
	public List<Map> getDpIntact(Map map) throws SQLException{
		return (List<Map>) this.queryForList("getDpIntact",map);
	}
	public List<Map> getDpVideoByXzbh(Map map) throws SQLException{
		return (List<Map>) this.queryForList("getDpVideoByXzbh",map);
	}
	public Map statisticsRecordIntactRate() throws SQLException{
		return (Map) this.queryForObject("statisticsRecordIntactRate",new HashMap());
	}
	public List<Map> videoCurrentStateStatistics(Map map) throws SQLException{
		return (List<Map>) this.queryForList("videoCurrentStateStatistics",map);
	}
	public List<Map> vdqStatisticsRegion(Map map) throws SQLException{
		return (List<Map>) this.queryForPage("vdqStatisticsRegion",map);
	}
	/**
	 * 增加记录
	 */
	/*
	public void insert_Ywvideocurrentstate(Map map) throws SQLException{
		this.insert("insert_Ywvideocurrentstate",map);
	}
	*/
	
	/**
	 * 批处理增加记录
	 */
	/*
	public void batch_insert_Ywvideocurrentstate(List batch) throws SQLException{
		this.insert("batch_insert_Ywvideocurrentstate",batch);
	}
	*/
	 
	/**
	 * 修改记录
	 */
	public Integer update_Ywvideocurrentstate(Map map) throws SQLException{
		return this.update("update_Ywvideocurrentstate",map);
	}
	public Integer update_Ywvideocurrentstate_WorkOrder(Map map) throws SQLException{
		return this.update("update_Ywvideocurrentstate_WorkOrder",map);
	}
	
	
	/**
	 * 删除记录
	 */
	/*
	public Integer delete_Ywvideocurrentstate(Map map) throws SQLException{
		return this.delete("delete_Ywvideocurrentstate",map);
	}
	*/
	
	/**
	 * 批处理删除记录
	 */
	
	/*
	public Integer batch_delete_Ywvideocurrentstate(Map map) throws SQLException{
		return this.delete("batch_delete_Ywvideocurrentstate",map);
	}
	*/
	
	/**
	 * 查询总数
	 */
	public Integer count_Ywvideocurrentstate(Map map) throws SQLException{
		return (Integer)this.queryForObject("count_Ywvideocurrentstate",map);
	}
	public Integer count_Ywvideocurrentstate_detail(Map map) throws SQLException{
		return (Integer)this.queryForObject("count_Ywvideocurrentstate_detail",map);
	}
	public Integer count_vdqStatisticsRegion(Map map) throws SQLException{
		return (Integer)this.queryForObject("count_vdqStatisticsRegion",map);
	}
	
	/**
	 * 查询列表记录
	 */
	
	public List<Map> query_Ywvideocurrentstate(Map map) throws SQLException{
		return this.queryForPage("query_Ywvideocurrentstate",map);
	}
	public List<Map> query_Ywvideocurrentstate_detail(Map map) throws SQLException{
		return this.queryForPage("query_Ywvideocurrentstate_detail",map);
	}
	
	/**
	 * 查询列表记录
	 */
	public Map get_Ywvideocurrentstate(Map map) throws SQLException{
		return (Map) this.queryForObject("query_Ywvideocurrentstate",map);
	}
	
	// 区域在线率统计        ================== start
	public List<Map> query_areaOnline(Map map) throws SQLException{
		return this.queryForPage("query_areaOnline",map);
	}	
	public Integer count_areaOnline(Map map) throws SQLException{
		return (Integer)this.queryForObject("count_areaOnline",map);
	}
	
	public List<Map> query_AreaNotonlineDetail(Map map) throws SQLException{
		return this.queryForPage("query_AreaNotonlineDetail",map);
	}	
	public Integer count_AreaNotonlineDetail(Map map) throws SQLException{
		return (Integer)this.queryForObject("count_AreaNotonlineDetail",map);
	}
	// 区域在线率统计        ================== end
	
	// 首页统计
	public Map count_HomepageFalultType(Map map) throws SQLException{
		return (Map)this.queryForObject("count_HomepageFalultType",map);
	}
	// 首页  中间查询设备
	public List<Map> query_videoState(Map map) throws SQLException{
		return this.queryForPage("query_videoState",map);
	}	
	public Integer count_videoState(Map map) throws SQLException{
		return (Integer)this.queryForObject("count_videoState", map);
	}
}
