package cn.yw.video.videoalarm.service;

 import cn.base.bean.BaseService;
import cn.yw.video.videoalarm.dao.YwvideotaskrunresulthistoryDao;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

@Service("ywvideotaskrunresulthistoryService")
public class YwvideotaskrunresulthistoryService extends BaseService {
	
	private static Log log = LogFactory.getLog(YwvideotaskrunresulthistoryService.class);
	
	@Autowired
	private YwvideotaskrunresulthistoryDao ywvideotaskrunresulthistoryDao;
	
	/**
	 * 保存记录
	 */
	/*
	public void insert_Ywvideotaskrunresulthistory(Map map) throws SQLException{
		CommUtils.addParams(map, false);
		ywvideotaskrunresulthistoryDao.insert_Ywvideotaskrunresulthistory(map);
	}
	*/

	
	/**
	 * 修改记录
	 */
	/*
	public Integer update_Ywvideotaskrunresulthistory(Map map) throws SQLException{
		CommUtils.validateUpdateParams(map);
		CommUtils.addParams(map, true);
		return ywvideotaskrunresulthistoryDao.update_Ywvideotaskrunresulthistory(map);
	}
	*/
	
	/**
	 * 删除记录
	 */
	/*
	public Integer delete_Ywvideotaskrunresulthistory(Map map) throws SQLException{
		CommUtils.validateDeleteParams(map);
		return ywvideotaskrunresulthistoryDao.delete_Ywvideotaskrunresulthistory(map);
	}
	*/
	
	/**
	 * 批处理删除记录
	 */
	/*
	public Integer batch_delete_Ywvideotaskrunresulthistory(Map map) throws SQLException{
		return ywvideotaskrunresulthistoryDao.batch_delete_Ywvideotaskrunresulthistory(map);
	}
	*/
	
	/**
	 * 查询总数
	 */
	/*
	public Integer count_Ywvideotaskrunresulthistory(Map map) throws SQLException{
		return ywvideotaskrunresulthistoryDao.count_Ywvideotaskrunresulthistory(map);
	}
	*/
	
	/**
	 * 查询列表记录SELECT
	 */
	/*
	public List<Map> query_Ywvideotaskrunresulthistory(Map map) throws SQLException{
		return ywvideotaskrunresulthistoryDao.query_Ywvideotaskrunresulthistory(map);
	}
	*/
	
	/**
	 * 查询一条
	 */
	 
	/*
	public Map get_Ywvideotaskrunresulthistory(Map map) throws SQLException{
		return ywvideotaskrunresulthistoryDao.get_Ywvideotaskrunresulthistory(map);
	}
	*/
	
	/**
	 * 导出EXCEL
	 */
	 
	/*
	public Map exportYwvideotaskrunresulthistory(Map map) throws SQLException{
		return this.listYwvideotaskrunresulthistoryByPage(map);
	}
	*/
	
	/**
	 * Ywvideotaskrunresulthistory 分页
	 */
	public Map listYwvideotaskrunresulthistoryByPage(Map map) throws SQLException {
		List<Map> list = ywvideotaskrunresulthistoryDao.query_Ywvideotaskrunresulthistory(map);
		Integer totalCount = ywvideotaskrunresulthistoryDao.count_Ywvideotaskrunresulthistory(map);
		map.clear();
		map.put("total", totalCount);
		map.put("rows", list);
		return map;
	}

	public Map listYwvideotaskNoTaskVideoByPage(Map map) throws SQLException {
		List<Map> list = ywvideotaskrunresulthistoryDao.query_YwvideotaskNoTaskVideo(map);
		Integer totalCount = ywvideotaskrunresulthistoryDao.count_YwvideotaskNoTaskVideo(map);
		map.clear();
		map.put("total", totalCount);
		map.put("rows", list);
		return map;
	}

}
