package com.eactive.eai.rms.bap.tansaction.transactionStatus;

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

	public List<Map<String, Object>> findStatusList(HashMap<String, Object> param) throws Exception {
    	return (List<Map<String, Object>>)template.queryForList("BapTranStatus.list_normal", param);
    }
	public int findStatusListCount(HashMap<String, Object> param) throws Exception {
		return (Integer)template.queryForObject("BapTranStatus.list_normal_count", param);
	}
	public List<Map<String, Object>> findErrorList(HashMap<String, Object> param) throws Exception {
    	return (List<Map<String, Object>>)template.queryForList("BapTranStatus.list_e", param);
    }
	public int findErrorListCount(HashMap<String, Object> param) throws Exception {
		return (Integer)template.queryForObject("BapTranStatus.list_e_count", param);
	}	
	public List<Map<String, Object>> findFutureList(HashMap<String, Object> param) throws Exception {
    	return (List<Map<String, Object>>)template.queryForList("BapTranStatus.list_f", param);
    }
	public int findFutureListCount(HashMap<String, Object> param) throws Exception {
		return (Integer)template.queryForObject("BapTranStatus.list_f_count", param);
	}
	public List<Map<String, Object>> findDelayList(HashMap<String, Object> param) throws Exception {
    	return (List<Map<String, Object>>)template.queryForList("BapTranStatus.list_l", param);
    }
	public List<Map<String, Object>> findSpecList(HashMap<String, Object> param) throws Exception {
    	return (List<Map<String, Object>>)template.queryForList("BapTranStatus.speclist", param);
    }	
	public int findSpecListCount(HashMap<String, Object> param) throws Exception {
		return (Integer)template.queryForObject("BapTranStatus.speclist_count", param);
	}
	

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

	public List<Map<String, Object>> getFilelog(HashMap<String, Object> param) throws Exception {
    	return (List<Map<String, Object>>)template.queryForList("BapTranStatus.filelog", param);
    }
	
	public List<Map<String, Object>> getStagelog(HashMap<String, Object> param) throws Exception {
    	return (List<Map<String, Object>>)template.queryForList("BapTranStatus.stagelog", param);
    }
	
	public int getFileLogCount(HashMap<String, Object> param) throws Exception {
    	return (Integer)template.queryForObject("BapTranStatus.filelogcount", param);
    }

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

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

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