package incheon.ags.ias.rst.volu.mapper;

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

import org.apache.ibatis.annotations.Param;

import incheon.ags.ias.rst.volu.vo.AgsRstVoluVO;

@org.egovframe.rte.psl.dataaccess.mapper.Mapper @incheon.com.config.annotation.MainDB
public interface AgsRstVoluMapper {
	List<Map<String, Object>> getCrtrYmRange();
	
	List<String> getMonthsByYear(String year);
	
	List<Map<String, Object>> selectCrtrYmSummary(Map<String, Object> param);
	
	int selectCrtrYmSummaryCnt(Map<String, Object> param);
    
    List<Map<String, Object>> selectVoluMatrix(@Param("crtrYm") String crtrYm);
    
    int insertVolu(AgsRstVoluVO vo);
    
    int updateVoluBulk(Map<String, Object> param);
    
    void deleteVolu(@Param("crtrYm") String crtrYm);
    
    int existsVolu(@Param("crtrYm") String crtrYm,
            				@Param("sttySggCd") String sttySggCd,
        					@Param("hsTypeSeCd") String hsTypeSeCd);
    
    int existsSumVolu(@Param("crtrYm") String crtrYm,
									@Param("sttySggCd") String sttySggCd);
    
    List<Map<String, Object>> selectCtpvHsTypeSum(String crtrYm);

    int selectCtpvTotalSum(String crtrYm);
    
    void deleteVoluBySgg(
    	    @Param("crtrYm") String crtrYm,
    	    @Param("sttySggCd") String sttySggCd);
    
    int deleteVoluBySggAndHsType(
    		@Param("crtrYm") String crtrYm,
    		@Param("sttySggCd") String sttySggCd,
    		@Param("hsTypeSeCd") String hsTypeSeCd);

    int selectSggTotalSum(
    		@Param("crtrYm") String crtrYm,
    		@Param("sttySggCd") String sttySggCd);
}
