package cn.com.countrygarden.bi.main.repository;

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

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import com.sunshine.common.repository.DataRepositoryJDBC;

/**
 * 系统的区域代码表
 * 
 * @author huangzhengjun
 *
 */
@Repository("sysOrganRepository")
public class SysOrganRepository extends DataRepositoryJDBC {

	protected final Logger log = LoggerFactory.getLogger(SysOrganRepository.class);

	public SysOrganRepository() {
		this.masterTable = "[HM_wygl_new_1853].[dbo].[tB_SYS_Organ]";// 表名
	}

	/**
	 * 获取所有的数据
	 * 
	 * @return
	 */
	public List<Map<String, Object>> getAllData() {

		List<Map<String, Object>> resultList = new ArrayList<Map<String, Object>>();
		String sql = "select * from " + this.masterTable;
		resultList = this.jdbcTemp.queryForList(sql);
		return resultList;
	}
}
