package com.eactive.eai.rms.onl.manage.comm.mapping;

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;

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

@Service("tranCodeMapService")
public class TranCodeMapService extends BaseService {

    @Autowired
    @Qualifier("tranCodeMapDao")
    private TranCodeMapDao dao;
    
    
	public HashMap selectList(int startNum,int endNum, String searchTranCode, String searchEaiSvcCode , String searchEaiSvcCodeDesc) throws Exception {
		HashMap paramMap = new HashMap();
		//검색 조건 
		paramMap.put("searchTranCode" , searchTranCode.toUpperCase());
		paramMap.put("searchEaiSvcCode" , searchEaiSvcCode.toUpperCase());
		paramMap.put("searchEaiSvcCodeDesc" , searchEaiSvcCodeDesc);

		// 전체 목록수 얻기
		int totalCount = dao.selectListCount(paramMap);

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

		List list = dao.selectList(paramMap);

		HashMap map = new HashMap();

		map.put("totalCount", totalCount);

		map.put("list", list);

		return map;
	}	

}