package cn.estsh.i3plus.ext.mes.pcn.api.busi;

import cn.estsh.i3plus.pojo.mes.bean.MesConfig;
import io.swagger.annotations.ApiOperation;

import java.util.List;

/**
 * @Description:
 * @CreateDate: 2021/9/9 下午3:24
 * @Author: simon.song
 */
public interface IMesConfigService {

    @ApiOperation(value = "获取系统参数")
    String getCfgValue(String org, String key);

    @ApiOperation(value = "获取系统参数")
    MesConfig getMesConfig(String organizeCode, String key);

    @ApiOperation(value = "获取系统参数")
    MesConfig getMesConfigNoError(String organizeCode, String cfgKey);

    @ApiOperation(value = "获取系统配置集合")
    List<MesConfig> getConfigList(String organizeCode, String cfgCode, String cfgKey, String cfgType);

    @ApiOperation(value = "根据分隔符验证是否存在元素的配置")
    Boolean checkCfgValueIsContainItem(String organizeCode, String cfgCode, String cfgKey, String cfgType, String splitStr, String item);

    @ApiOperation(value = "验证分表配置")
    Boolean checkShardingTablesObjectCfg(String organizeCode, String cfgKey, String item);

    @ApiOperation(value = "根据分隔符查询存在元素的配置")
    List<String> findCfgValueContainItem(String organizeCode, String cfgCode, String cfgKey, String cfgType, String splitStr, List<String> itemList);

    @ApiOperation(value = "查询分表配置")
    List<String> findShardingTablesObjectCfg(String organizeCode, String cfgKey, List<String> itemList);

    @ApiOperation(value = "获取配置信息")
    List<MesConfig> findMesConfigList(String organizeCode, String cfgCode);

    @ApiOperation(value = "获取配置信息")
    MesConfig getCfgValueByCode(String organizeCode, String cfgCode);

}
