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

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

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

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

	public HashMap<String, Object> selectDetail(String bjobBzwkDstcd) throws Exception {
		HashMap<String, Object> param = new HashMap<String, Object>();
		param.put("bjobBzwkDstcd", bjobBzwkDstcd);
    	return (HashMap<String, Object>)template.queryForObject("BapBizGbn.selectDetail", param);
    }
	
	public List<Map<String, Object>> jobpropinfo(String bjobBzwkDstcd) throws Exception {
		HashMap<String, Object> param = new HashMap<String, Object>();
		param.put("bjobBzwkDstcd", bjobBzwkDstcd);
    	return (List<Map<String, Object>>)template.queryForList("BapBizGbn.jobpropinfo", param);
    }

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

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

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

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

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

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

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

	public List<Map<String, Object>> selectBjobPtrnDstcd(HashMap<String, Object> param) throws Exception {
		return (List<Map<String, Object>>)template.queryForList("BapBizGbn.selectBjobPtrnDstcd", param);
	}
	
	public int checkExists(HashMap<String, Object> param) throws Exception {
		return (Integer)template.queryForObject("BapBizGbn.checkExists", param);
	}

	public void insertClone(HashMap<String, Object> param) throws Exception {
		this.template.insert("BapBizGbn.cloneBjob", param);
		this.template.insert("BapBizGbn.cloneBjobPropInfo", param);
	}
}