package com.ozs.kpim.service.kpiconfig;

import com.ozs.kpim.dto.kpiconfig.KpiConfigDTO;
import com.ozs.kpim.dto.kpiconfig.KpiConfigForListDTO;
import com.ozs.kpim.dto.kpiconfig.KpiPrivilegeControlDTO;
import com.ozs.kpim.service.common.IBaseService;
import com.ozs.kpim.util.R;

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

/* *
 * @Author jade
 * @Description KPI配置Service接口
 * @Date 2019/2/22
**/
public interface KpiConfigService extends IBaseService<KpiConfigDTO> {
    /* *
     * @Author jade
     * @Description 批量新增方法
     * @Date 2019/2/22
     * @Param [kpiList]
     * @return R<?>
    **/
    R<?> batchSave(List<KpiConfigDTO> kpiList) throws Exception;

    /* *
     * @Author jade
     * @Description KPI配置列表查询
     * @Date 2019/2/22
     * @Param [params, order, page, pageSize]
     * @return R<?>
    **/
    R<List<KpiConfigForListDTO>> listKpiConfigs(Map<String, Object> params, String sort,String order, Integer page, Integer pageSize) throws Exception;
    
    /* *
     * @Author jade
     * @Description 字段是否在使用中
     * @Date 2019/2/22
     * @Param [id]
     * @return java.lang.String
    **/
    String ifColumnInUse(String columnId) throws Exception;
    
    /* *
     * @Author jade
     * @Description 判断字段是否在使用中
     * @Date 2019/2/27
     * @Param [columnIds]
     * @return java.util.Map<java.lang.String,java.lang.Object>
    **/
    Map<String,Object> ifColumnsInUse(List<String> columnIds) throws Exception;

    /* *
     * @Author jade
     * @Description 查询启用状态的KPI列表
     * @Date 2019/2/26
     * @Param [topicId]
     * @return R<?>
    **/
    R<List<KpiConfigForListDTO>> listKpiConfigsByTopic(String topicId, String topicCode,Integer enableStatus) throws Exception;
    
    /* *
     * @Author jade
     * @Description 保存权限关系
     * @Date 2019/2/26
     * @Param [kpiPrivilegeControlDTO]
     * @return R<?>
    **/
    R<?> savePrivilegeControlRelations(KpiPrivilegeControlDTO kpiPrivilegeControlDTO) throws Exception;

    /* *
     * @Author jade
     * @Description 启用/停用
     * @Date 2019/3/6
     * @Param [kpiConfigDTO]
     * @return R<?>
    **/
    R<?> updateEnableStatus(KpiConfigDTO kpiConfigDTO) throws Exception;

    /* *
     * @Author jade
     * @Description 根据KPIId列表得到详细内容
     * @Date 2019/3/11
     * @Param [ids]
     * @return java.util.List<KpiConfigDTO>
    **/
    List<KpiConfigDTO> listKpiConfigByKpiIds(List<String> ids) throws Exception;
}
