package cn.yw.machinemanage.service;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;
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 cn.base.bean.BaseService;
import cn.yw.machinemanage.dao.YwmachinehistorystateDao;

@Service("ywmachinehistorystateService")
public class YwmachinehistorystateService extends BaseService {
	
	private static Log log = LogFactory.getLog(YwmachinehistorystateService.class);
	
	@Autowired
	private YwmachinehistorystateDao ywmachinehistorystateDao;
	
	
	/**
	 * 查询总数
	 */
	public Integer count_Ywmachinehistorystate(Map map) throws SQLException{
		return ywmachinehistorystateDao.count_Ywmachinehistorystate(map);
	}
	
	
	/**
	 * 查询列表记录SELECT
	 */
	public List<Map> query_Ywmachinehistorystate(Map map) throws SQLException{
		return ywmachinehistorystateDao.query_Ywmachinehistorystate(map);
	}
	
	
	/**
	 * 查询一条
	 */
	public Map get_Ywmachinehistorystate(Map map) throws SQLException{
		return ywmachinehistorystateDao.get_Ywmachinehistorystate(map);
	}
	
	
	/**
	 * 导出EXCEL
	 */
	 
	/*
	public Map exportYwmachinehistorystate(Map map) throws SQLException{
		return this.listYwmachinehistorystateByPage(map);
	}
	*/
	
	/**
	 * Ywmachinehistorystate 分页
	 */
	
	public Map listYwmachinehistorystateByPage(Map map) throws SQLException {
		List<Map> list = ywmachinehistorystateDao.query_Ywmachinehistorystate(map);
		Integer totalCount = ywmachinehistorystateDao.count_Ywmachinehistorystate(map);
		map.clear();
		map.put("total", totalCount);
		map.put("rows", list);
		return map;
	}
	
}
