package com.eactive.eai.rms.bap.manage.work.message;

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("bapMessageProcDao")
@SuppressWarnings({"deprecation","unchecked"})
public class BapMessageProcDao extends SqlMapClientTemplateDao {

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

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

	public HashMap<String, Object> selectDetail(HashMap<String, Object> param) throws Exception {
    	return (HashMap<String, Object>)template.queryForObject("BapMessageProc.selectDetail", param);
    }	
	public List<Map<String, Object>> getProps(HashMap<String, Object> param) throws Exception {
    	return (List<Map<String, Object>>)template.queryForList("BapMessageProc.getProps", param);
    }	
	public List<Map<String, Object>> selectOsidInstiDstcd(HashMap<String, Object> param) throws Exception {
    	return (List<Map<String, Object>>)template.queryForList("BapMessageProc.selectOsidInstiDstcd", param);
    }	
	
    public void insert(HashMap<String, Object> paramMap) throws Exception{
        this.template.insert("BapMessageProc.insert", paramMap);
    }

    public String generatePK(HashMap<String, Object> paramMap ) {
    	try {
            return (String)this.template.queryForObject("BapMessageProc.generatePK", paramMap);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
    }

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

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

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


    public void deletePropInfo(HashMap<String, Object> paramMap) throws Exception{
        this.template.delete("BapMessageProc.deletePropInfo", paramMap);
    }
    
	public List<Map<String, Object>> selectBjobMsgDstcd(HashMap<String, Object> param) throws Exception {
    	return (List<Map<String, Object>>)template.queryForList("BapMessageProc.selectBjobMsgDstcd", param);
    }

	public List<Map<String, Object>> selectBjobPtrnDstcd(HashMap<String, Object> param) throws Exception {
    	return (List<Map<String, Object>>)template.queryForList("BapMessageProc.selectBjobPtrnDstcd", param);
    }
	
    public String checkPK(HashMap<String, Object> param) {
    	return (String)this.template.queryForObject("BapMessageProc.checkPK", param);
    }

	public HashMap<String, Object> selectVerifyInfo(HashMap<String, Object> param) throws Exception {
    	return (HashMap<String, Object>)template.queryForObject("BapMessageProc.selectVerifyInfo", param);
    }	

	public int selectVerifyInfoCount(HashMap<String, Object> param) throws Exception {
    	return (Integer)template.queryForObject("BapMessageProc.selectVerifyInfoCount", param);
    }
	
    public void updateVerifyInfo(HashMap<String, Object> param) throws Exception{
        this.template.update("BapMessageProc.updateVerifyInfo", param);
    }
    
    public void deleteVerifyInfo(HashMap<String, Object> param) throws Exception{
    	this.template.delete("BapMessageProc.deleteVerifyInfo", param);
    }
    
    public void deleteBS01(HashMap<String, Object> param) throws Exception{
    	this.template.delete("BapMessageProc.deleteBS01", param);
    }
    
}