package cn.im.trafficplan.service;

 import cn.im.trafficplan.dao.TrafficplanexeclogDao;

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("trafficplanexeclogService")
public class TrafficplanexeclogService extends BaseService {
	
	private static Log log = LogFactory.getLog(TrafficplanexeclogService.class);
	
	@Autowired
	private TrafficplanexeclogDao trafficplanexeclogDao;
	
	/**
	 * 保存记录
	 */
	public void insert_Trafficplanexeclog(Map map) throws SQLException{
		CommUtils.addParams(map, false);
		trafficplanexeclogDao.insert_Trafficplanexeclog(map);
	}
	public Integer updateExecLog(Map map) throws SQLException{
		CommUtils.addParams(map, false);
		return trafficplanexeclogDao.updateExecLog(map);
	}
	
	
	/**
	 * Trafficplanexeclog 分页
	 */
	public Map listTrafficplanexeclogByPage(Map map) throws SQLException {
		List<Map> list = trafficplanexeclogDao.query_Trafficplanexeclog(map);
		Integer totalCount = trafficplanexeclogDao.count_Trafficplanexeclog(map);
		map.clear();
		map.put("total", totalCount);
		map.put("rows", list);
		return map;
	}
	public List<Map> listTrafficplanexeclogByAPID(Map map) throws SQLException {
		
		return trafficplanexeclogDao.listTrafficplanexeclogByAPID(map);
	}
	
	// 查询录音记录
	public Map query_Ptlyjlb(Map map) throws SQLException {
		return trafficplanexeclogDao.query_Ptlyjlb(map);
	}
}
