package com.platform.service.impl;

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

import javax.annotation.Resource;

import com.platform.dao.DataInfoDao;
import com.platform.dao.IRegionalismCodeDao;
import com.platform.dao.ISystemCodeDao;
import com.platform.entities.RegionalismEntity;
import com.platform.entities.SystemEntity;
import com.platform.service.ICodeService;

public class CodeServiceImpl implements ICodeService {
	
	@Resource(name = "systemCodeDao")
	private ISystemCodeDao systemCodeDao;
	
	@Resource(name = "regionalismCodeDao")
	private IRegionalismCodeDao regionalismCodeDao;
	
	@Override
	public List<SystemEntity> findSystem(SystemEntity sys) throws Exception {
		List<SystemEntity> result = new ArrayList<SystemEntity>();
		result = systemCodeDao.findSubSystem(sys);
		return result;
	}

	@Override
	public List<RegionalismEntity> findRegionalism(RegionalismEntity region) throws Exception {
		List<RegionalismEntity> result = regionalismCodeDao.findSubRegionalism(region);
		
		return result;
	}

}
