package cn.im.trafficalarm.service;

 import cn.im.trafficalarm.dao.TrafficaccidentstateDao;

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.base.util.CommUtils;

@Service("trafficaccidentstateService")
public class TrafficaccidentstateService extends BaseService {
	
	private static Log log = LogFactory.getLog(TrafficaccidentstateService.class);
	
	@Autowired
	private TrafficaccidentstateDao trafficaccidentstateDao;
	
	/**
	 * 保存记录
	 */
	/*
	
	public void insert_Trafficaccidentstate(Map map) throws SQLException{
		CommUtils.addParams(map, false);
		trafficaccidentstateDao.insert_Trafficaccidentstate(map);
	}
	
	*/

	
	/**
	 * 修改记录
	 */
	/*
	
	public Integer update_Trafficaccidentstate(Map map) throws SQLException{
		CommUtils.validateUpdateParams(map);
		CommUtils.addParams(map, true);
		return trafficaccidentstateDao.update_Trafficaccidentstate(map);
	}
	
	*/
	
	/**
	 * 删除记录
	 */
	 
	/*
	
	public Integer delete_Trafficaccidentstate(Map map) throws SQLException{
		CommUtils.validateDeleteParams(map);
		return trafficaccidentstateDao.delete_Trafficaccidentstate(map);
	}
	
	*/
	public Integer delete_trafficaccidentstateByAPId(Map map) throws SQLException{
		CommUtils.validateDeleteParams(map);
		return trafficaccidentstateDao.delete_trafficaccidentstateByAPId(map);
	}
	
	/**
	 * 批处理删除记录
	 */
	 
	/*
	
	public Integer batch_delete_Trafficaccidentstate(Map map) throws SQLException{
		return trafficaccidentstateDao.batch_delete_Trafficaccidentstate(map);
	}
	
	*/
	
	/**
	 * 查询总数
	 */
	 
	/*
	
	public Integer count_Trafficaccidentstate(Map map) throws SQLException{
		return trafficaccidentstateDao.count_Trafficaccidentstate(map);
	}
	
	*/
	
	/**
	 * 查询列表记录SELECT
	 */
	/*
	
	public List<Map> query_Trafficaccidentstate(Map map) throws SQLException{
		return trafficaccidentstateDao.query_Trafficaccidentstate(map);
	}
	
	*/
	
	/**
	 * 查询一条
	 */
	public List get_Trafficaccidentstate(Map map) throws SQLException{
		return trafficaccidentstateDao.get_Trafficaccidentstate(map);
	}
	
	/**
	 * 导出EXCEL
	 */
	 
	/*
	
	public Map exportTrafficaccidentstate(Map map) throws SQLException{
		return this.listTrafficaccidentstateByPage(map);
	}
	
	*/
	
	/**
	 * Trafficaccidentstate 分页
	 */
	 
	/*
	
	public Map listTrafficaccidentstateByPage(Map map) throws SQLException {
		List<Map> list = trafficaccidentstateDao.query_Trafficaccidentstate(map);
		Integer totalCount = trafficaccidentstateDao.count_Trafficaccidentstate(map);
		map.clear();
		map.put("total", totalCount);
		map.put("rows", list);
		return map;
	}
	
	*/
	
	public void insert_Trafficaccidentstate_plan(Map map) throws SQLException{
		CommUtils.addParams(map, false);
		trafficaccidentstateDao.insert_Trafficaccidentstate_plan(map);
	}
	public void insert_Trafficaccidentstate_planExec(Map map) throws SQLException{
		CommUtils.addParams(map, false);
		trafficaccidentstateDao.insert_Trafficaccidentstate_planExec(map);
	}
	
	public List<Map> query_Trafficaccidentstate_plan(Map map) throws SQLException{
		return trafficaccidentstateDao.query_Trafficaccidentstate_plan(map);
	}
	public List<Map> getTrafficaccidentstateByAccidentId(Map map) throws SQLException{
		return trafficaccidentstateDao.getTrafficaccidentstateByAccidentId(map);
	}
	public List<Map> getStateInfosByAccidentId(Map map) throws SQLException{
		return trafficaccidentstateDao.getStateInfosByAccidentId(map);
	}
	public Map getPlanInfosByAccidentId(Map map) throws SQLException{
		return trafficaccidentstateDao.getPlanInfosByAccidentId(map);
	}
	public Map getExecStatePlanEnd(Map map) throws SQLException{
		return trafficaccidentstateDao.getExecStatePlanEnd(map);
	}
	
}
