package egovframework.dbnt.kcsc.standardCode.service.impl;

import egovframework.com.cmm.service.EgovFileMngService;
import egovframework.com.cmm.service.FileVO;
import egovframework.dbnt.kcsc.standardCode.entity.TnDocumentInfoVO;
import egovframework.dbnt.kcsc.standardCode.service.StandardCodeListService;
import egovframework.let.cop.bbs.service.Board;
import egovframework.let.cop.bbs.service.BoardVO;
import egovframework.let.cop.bbs.service.EgovBBSManageService;
import egovframework.let.cop.bbs.service.impl.BBSManageDAO;
import egovframework.let.utl.fcc.service.EgovDateUtil;
import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
import org.egovframe.rte.fdl.property.EgovPropertyService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.*;

/**
 * 게시물 관리를 위한 서비스 구현 클래스
 * @author 공통 서비스 개발팀 한성곤
 * @since 2009.03.19
 * @version 1.0
 * @see
 *
 * <pre>
 * << 개정이력(Modification Information) >>
 *
 *   수정일      수정자          수정내용
 *  -------    --------    ---------------------------
 *  2009.03.19  이삼섭          최초 생성
 *  2011.08.31  JJY            경량환경 템플릿 커스터마이징버전 생성
 *
 *  </pre>
 */
@Service("StandardCodeListService")
public class StandardCodeListServiceImpl extends EgovAbstractServiceImpl implements StandardCodeListService {

	@Resource(name = "StandardCodeListDAO")
	private StandardCodeListDAO standardCodeListDAO;

	/**
	 * 조건에 맞는 게시물 목록을 조회 한다.
	 *
	 * @see
	 */
	@Override
	public Map<String, Object> selectStandardCodeList(TnDocumentInfoVO tnDocumentInfoVO) throws Exception {
		List<TnDocumentInfoVO> list = standardCodeListDAO.selectStandardCodeList(tnDocumentInfoVO);
		List<TnDocumentInfoVO> result = new ArrayList<TnDocumentInfoVO>();

		result = list;

		int cnt = standardCodeListDAO.selectStandardCodeListCnt(tnDocumentInfoVO);

		Map<String, Object> map = new HashMap<String, Object>();

		map.put("resultList", result);
		map.put("resultCnt", Integer.toString(cnt));

		return map;
	}

}
