package com.eactive.eai.rms.common.acl.sendsmslog;

import java.util.HashMap;
import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.eactive.eai.rms.common.base.BaseService;

@Service("tranErrorSmsLogService")
@SuppressWarnings("unchecked")
public class TranErrorSmsLogService extends BaseService {

    @Autowired
    private TranErrorSmsLogDao dao;

    
    public HashMap<String, Object> selectList(int startNum,int endNum,HashMap paramMap) throws Exception {
		
		// 전체 목록수 얻기
		int totalCount = dao.selectListCount(paramMap);

		paramMap.put("startNum" , startNum);// 시작 record
		paramMap.put("endNum"   , endNum);// 끝 record

		List list = dao.selectList(paramMap);
		

		HashMap<String, Object> map = new HashMap<String, Object>();

		map.put("totalCount", totalCount);

		map.put("list", list);

		return map;    	
    }

    
    public HashMap<String, Object> selectRecvTranList(int startNum,int endNum,HashMap paramMap) throws Exception {
		
		// 전체 목록수 얻기
		int totalCount = dao.selectRecvTranListCount(paramMap);

		paramMap.put("startNum" , startNum);// 시작 record
		paramMap.put("endNum"   , endNum);// 끝 record

		List list = dao.selectRecvTranList(paramMap);
		

		HashMap<String, Object> map = new HashMap<String, Object>();

		map.put("totalCount", totalCount);

		map.put("list", list);

		return map;    	
    }
    
    public HashMap selectListToExcel(HttpServletRequest request,HashMap<String, Object> paramMap ) throws Exception {

		List list = dao.selectListToExcel(paramMap);

		HashMap map = new HashMap();

		map.put("list", list);

		return map;
	}
    
    public HashMap selectListToExcel2(HttpServletRequest request,HashMap<String, Object> paramMap ) throws Exception {

		List list = dao.selectListToExcel2(paramMap);

		HashMap map = new HashMap();

		map.put("list", list);

		return map;
	}
    
    
    
}