package cmm.service;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import egovframework.rte.fdl.cmmn.exception.EgovBizException;
import egovframework.rte.fdl.cmmn.exception.FdlException;

@Service("schedulerService")
public class SchedulerService {
	@Resource(name = "extService")
	private ExtService extService;
	
	@Resource(name = "cmmService")
	private CmmService cmmService;
	
	public void setExtDfInfo() {
		// 국민건강보험공단 예측진료정보
		extService.insertExtDfInfo();
	}
	
	public void setMainInfo() throws EgovBizException, FdlException{
		// 이달의 지역문화정보
		String gubun = "G";
    	cmmService.insertCmmMainData(gubun);
	}
	
	public void setMediaHstInfo() {
		//월별 지방문화원 인기자료
		extService.insertMediaHstInfo();
	}
	
	public void setExtGiaInfo1() {
		// 관광정보[관광지]
		String gubun = "12";
		extService.insertExtGiaInfo(gubun);
	}
	
	public void setExtGiaInfo2() {
		// 관광정보[문화시설]
		String gubun = "14";
		extService.insertExtGiaInfo(gubun);
	}
	
	public void setExtGiaInfo3() {
		// 관광정보[축제/공연/행사]
		String gubun = "15";
		extService.insertExtGiaInfo(gubun);
	}
	
	public void setExtGiaInfo4() {
		// 관광정보[여행코스]
		String gubun = "25";
		extService.insertExtGiaInfo(gubun);
	}
	
	public void setExtGiaInfo5() {
		// 관광정보[레포츠]
		String gubun = "28";
		extService.insertExtGiaInfo(gubun);
	}
	
	public void setExtGiaInfo6() {
		// 관광정보[숙박]
		String gubun = "32";
		extService.insertExtGiaInfo(gubun);
	}
	
	public void setExtGiaInfo7() {
		// 관광정보[쇼핑]
		String gubun = "38";
		extService.insertExtGiaInfo(gubun);
	}
	
	public void setExtGiaInfo8() {
		// 관광정보[음식]
		String gubun = "39";
		extService.insertExtGiaInfo(gubun);
	}
	
	/*
	public void setExtFdInfo() {
		// 공연전시정보 
		DataMap schedulerHstMap = extService.insertExtFdInfo();
		try {
			cmmService.insertCmmSchedulerHst(schedulerHstMap);
		} catch (EgovBizException ex1) {
			LOGGER.error("fail in insertCmmSchedulerHst()", ex1);
		} catch (Exception ex2) {
			LOGGER.error("fail in insertCmmSchedulerHst()", ex2);
		}
	} 
	 */
}
