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

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

import org.springframework.stereotype.Repository;

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

@Repository
@SuppressWarnings("deprecation")
public class BizDao extends SqlMapClientTemplateDao {

	public int selectListCount(HashMap<String, Object> param) throws Exception {
    	return (Integer)template.queryForObject("Biz.selectListCount", param);
    }	

	@SuppressWarnings("unchecked")
	public List<Map<String, Object>> selectList(HashMap<String, Object> param) throws Exception {
    	return (List<Map<String, Object>>)template.queryForList("Biz.selectList", param);
    }	

	@SuppressWarnings("unchecked")
	public HashMap<String, Object> selectDetail(HashMap<String, Object> param) throws Exception {
    	return (HashMap<String, Object>)template.queryForObject("Biz.selectDetail", param);
    }	

    public void insert(HashMap<String, Object> paramMap) throws Exception{
        this.template.insert("Biz.insert", paramMap);
    }      

    public void update(HashMap<String, Object> paramMap) throws Exception{
        this.template.update("Biz.update", paramMap);
    }

    public void delete(HashMap<String, Object> paramMap) throws Exception{
        this.template.delete("Biz.delete", paramMap);
    }
    
    public void deleteUserBizList(HashMap<String, Object> paramMap) throws Exception{
        this.template.delete("Biz.deleteUserBizList", paramMap);
    }
    
	@SuppressWarnings("unchecked")
	public List<HashMap<String, Object>> selectUserBizList(HashMap<String, Object> paramMap) throws Exception {
		return (List<HashMap<String, Object>>) this.template.queryForList("Biz.selectUserBizList", paramMap);
	}

	@SuppressWarnings("unchecked")
	public List<HashMap<String, Object>> selectBizList(HashMap<String, Object> paramMap) throws Exception {
		return (List<HashMap<String, Object>>) this.template.queryForList("Biz.selectBizList", paramMap);
	}
	
	@SuppressWarnings("unchecked")
	public List<HashMap<String, Object>> selectEaiBizList(HashMap<String, Object> paramMap) throws Exception {
		return (List<HashMap<String, Object>>) this.template.queryForList("Biz.selectEaiBizList", paramMap);
	}
	
	@SuppressWarnings("unchecked")
	public List<HashMap<String, Object>> selectExtBizList(HashMap<String, Object> paramMap) throws Exception {
		return (List<HashMap<String, Object>>) this.template.queryForList("Biz.selectExtBizList", paramMap);
	}
	
	@SuppressWarnings("unchecked")
	public List<HashMap<String, Object>> selectAdapterBizList(HashMap<String, Object> paramMap) throws Exception {
		return (List<HashMap<String, Object>>) this.template.queryForList("Biz.selectAdapterBizList", paramMap);
	}

	public void deleteUserBiz(HashMap<String, Object> paramMap) throws Exception {
		this.template.delete("Biz.deleteUserBiz", paramMap);
	}
	
	public void deleteUserBizCode(HashMap<String, Object> paramMap) throws Exception {
		this.template.delete("Biz.deleteUserBizCode", paramMap);
	}
	
	public void insertUserBiz(HashMap<String, Object> paramMap) throws Exception {
		this.template.insert("Biz.insertUserBiz", paramMap);
	}
	
	public void mergeRM06(HashMap<String, Object> paramMap) throws Exception{
    	this.template.insert("Biz.mergeRM06", paramMap);
	 }   
	
	public void insertMergeRM06(HashMap<String, Object> paramMap) throws Exception{
    	this.template.insert("Biz.insertMergeRM06", paramMap);
	 }   
	
	
	@SuppressWarnings("unchecked")
	public List<HashMap<String, Object>> selectUserBizCodes(HashMap<String, Object> paramMap) {
		return (List<HashMap<String, Object>>) this.template.queryForList("Biz.selectUserBizCodes", paramMap);
	}
	
	public List<HashMap<String, Object>> selectChgAdptUserBizCodes(HashMap<String, Object> paramMap) {
		return (List<HashMap<String, Object>>) this.template.queryForList("Biz.selectChgAdptUserBizCodes", paramMap);
	}
	
	
	public String selectGroupCoCdByEAIBzwkDstCd(HashMap<String, Object> paramMap) {
		return (String)this.template.queryForObject("Biz.selectGroupCoCdByEAIBzwkDstCd", paramMap);
	}
	
	public void deleteUserBizCodeRole(HashMap<String, Object> paramMap) throws Exception {
		this.template.delete("Biz.deleteUserBizCodeRole", paramMap);
	}
	
	
	public int selectChgAdptUserBizCode(HashMap<String, Object> param) throws Exception {
    	return (Integer)template.queryForObject("Biz.selectChgAdptUserBizCode", param);
    }	
	

	
}
