package com.saye.hrs.service.system.impl;

import com.saye.hrs.mapper.system.DicinfoMapper;
import com.saye.hrs.model.Dicinfo;
import com.saye.hrs.service.system.DicinfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.HashMap;
import java.util.List;


@Service
@Transactional
public class DicinfoServiceImpl implements DicinfoService {
	@Autowired
	private DicinfoMapper dicinfoMapper;
	
	/**
	 * @description 查询字典表
	 * @author thuang       
	 * @created 2019年11月12日 下午3:53:20
	 */
	@Override
	public List<Dicinfo>  findDicinfoTreeNodeList(String parentCode) {
		List<Dicinfo> list = dicinfoMapper.findDicinfoTreeNodeList(parentCode);
		return list;

	}
	@Override
	public List<Dicinfo> findDicinfoBydiccode(String diccode) {
		// TODO Auto-generated method stub
		return dicinfoMapper.findDicinfoBydiccode(diccode);
	}
	@Override
	@Transactional
	public int addDicinfo(HashMap<String, String> map)throws Exception {
		// TODO Auto-generated method stub
		return dicinfoMapper.addDicinfo(map);
	}


	@Override
	@Transactional
	public int modifyDicinfo(HashMap<String, String> map) throws Exception  {
		// TODO Auto-generated method stub
		return dicinfoMapper.modifyDicinfo(map);
	}

	@Override
	@Transactional
	public int deleteDicinfo(String diccode) throws Exception {
		// TODO Auto-generated method stub
		return dicinfoMapper.deleteDicinfo(diccode);
	}

	@Override
	public List<HashMap<Object, Object>> selectDicinfoListByCode(String parent_code) {
		// TODO Auto-generated method stub
		return dicinfoMapper.selectDicinfoListByCode(parent_code);
	}

	@Override
	public List<Dicinfo> findDicinfoTreeByCode(HashMap<String, String> map) {
		// TODO Auto-generated method stub
		return dicinfoMapper.findDicinfoTreeByCode(map);
	}
	@Override
	public List<HashMap<Object, Object>> selectDicinfoListByCondition(HashMap<String, String> map) {
		
		return dicinfoMapper.selectDicinfoListByCondition(map);
	}
	@Override
	public HashMap<Object, Object> getMaxDicValue(HashMap<String, String> map) throws Exception {
		// TODO Auto-generated method stub
		return dicinfoMapper.getMaxDicValue(map);
	}

	

}
