package com.prolog.eis.service.shelves;

import com.prolog.eis.model.shelves.DataDictionary;
import com.prolog.eis.model.shelves.DataDictionaryMaster;
import com.prolog.framework.core.pojo.Page;

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

public interface DataDictionaryService {

    /**
     * 数据字典主页面查询给定状态的信息
     * @param dictionariesNumber
     * @param dictionariesName
     * @param enable
     * @return
     */
    Page<DataDictionaryMaster> query(String dictionariesNumber, String dictionariesName, Integer enable, Integer pageNum, Integer pageSize);

    /**
     *主表保存
     * @return
     */
    Long saveMaster(DataDictionaryMaster dataDictionaryMaster);

    /**
     * 批量删除
     * @param ids
     * @return
     */
    Long deleteMasterBatch(Integer[] ids);

    /**
     * 修改
     * @param dataDictionaryMaster
     * @return
     */
    Long updateMaster(DataDictionaryMaster dataDictionaryMaster);

    /**
     * 查主表id字典明细表
     * @param id
     * @return
     */
    Page<DataDictionary> queryDataDictionarySlaveByMasterId(Integer id, Integer pageNum, Integer pageSize);


    /**
     *
     * @param stateVlues
     * @param stateDescription
     * @param pageNum
     * @param pageSize
     * @return
     */
    Page<DataDictionary> queryDataDictionarySlave(Integer dataDictionaryMasterId,String stateVlues, String stateDescription, Integer pageNum, Integer pageSize);


    /**
     *主表保存
     * @return
     */
    Long saveSlave( DataDictionary dataDictionarySlave);

    /**
     * 批量删除
     * @param ids
     * @return
     */
    Long deleteSlaveBatch(Integer[] ids);

    /**
     * 修改
     * @param dataDictionarySlave
     * @return
     */
    Long updateSlave( DataDictionary dataDictionarySlave);


    /**
     * 依据字典类型查询明细
     * @param code
     * @return
     */
    List<Map<String,Object>> queryDataDictionaryByCode(String code);
}
