package com.yihu.hos.system.service.intf;

import com.yihu.hos.system.model.SystemDict;
import com.yihu.hos.system.model.SystemDictList;
import com.yihu.hos.web.framework.model.ActionResult;
import com.yihu.hos.web.framework.model.DataGridResult;
import com.yihu.hos.web.framework.model.DictionaryResult;

/**
 * Created by hzp on 2016/1/11.
 */
public interface IBaseDictManager {

    /**
     * 获取字典数据(常用)
     * @return
     */
    DictionaryResult getDict(String name, String where, String type) throws Exception;

    /**
     * 获取字典列表
     * @return
     */
    DataGridResult getSystemDictList(String condition, Integer page, Integer rows) throws Exception;

    /**
     * 通过ID获取系统字典信息
     * @return
     */
    SystemDictList getSystemDictInfoById(String id) throws Exception;

    /**
     * 通过dictName获取字典信息
     * @return
     */
    SystemDictList getSystemDictInfoByName(String dictName) throws Exception;

    /**
     * 新增字典信息
     */
    ActionResult addDict(SystemDictList obj) throws Exception;

    /**
     * 修改字典信息
     */
    ActionResult updateDict(SystemDictList obj) throws Exception;

    /**
     * 删除字典信息
     */
    ActionResult deleteDict(SystemDictList obj) throws Exception;


    /**
     * 新增字典项
     */
    ActionResult addDictItem(SystemDict obj) throws Exception;

    /**
     * 修改字典项
     */
    ActionResult updateDictItem(SystemDict obj) throws Exception;

    /**
     * 删除字典项
     */
    ActionResult deleteDictItem(SystemDict obj) throws Exception;
}
