package com.eactive.eai.rms.onl.statistics.management.condition;

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

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



/**
 * <pre>
 * 1. 기능 : 
 * 2. 처리 개요 : 
 *     - 
 * 3. 주의사항 : 
 * </pre>
 * @author  : music75
 * @version : $Revision: 1.1 $
 * @since : rts 1.0
 * @spring.bean id ="eaiBzwkDstcdDailyService" 
 * @spring.property name="eaiBzwkDstcdDailyDAO" ref="eaiBzwkDstcdDailyDAO"
 */
@Service("statisticsManagementService")
public class StatisticsManagementService {
	@Autowired
	@Qualifier("statisticsManagementDAO")
    private StatisticsManagementDAO dao ;
    
    public HashMap<String, Object> selectStatisticsManagement(int startNum,int endNum, HashMap<String,Object> param) throws Exception{
    	// 전체 목록수 얻기
		int totalCount = dao.selectStatisticsManagementCount(param);
	
		param.put("startNum" , startNum);// 시작 record
		param.put("endNum"   , endNum);// 끝 record
	
		List<HashMap<String, Object>> list = dao.selectStatisticsManagement(param);

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

		map.put("totalCount", totalCount);
		map.put("list", list);

		return map;    	
    }
    
    public HashMap<String, Object> selectDetail(HashMap<String,Object> param) throws Exception {
        return  dao.selectDetail(param);
    }
    
    public void insert(HashMap<String, Object> paramMap) throws Exception {
    	dao.insert( paramMap);
    }
    public void update(HashMap<String, Object> paramMap) throws Exception {
    	dao.update( paramMap);
    }
    public void delete(HashMap<String, Object> paramMap) throws Exception {
    	dao.delete( paramMap);
    }
    
    public HashMap selectListToExcel(HashMap<String, Object> paramMap ) throws Exception {

		List list = dao.selectListToExcel(paramMap);

		HashMap map = new HashMap();

		map.put("list", list);

		return map;
	}
    
}
