package com.kcim.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.kcim.dao.model.Responsibility;
import com.kcim.dao.model.UserResponsibilityRight;
import com.kcim.vo.UserResponsibilityRightVO;

import java.util.List;


/**
 * 用户责任中心权限
 * @author Administrator
 */
public interface UserResponsibilityRightService  extends IService<UserResponsibilityRight> {

    /**
     * 获取用户有权限的责任中心列表
     * @return
     */
    List<UserResponsibilityRight> getUserResponsibilityRight();


    /**
     * 获取用户的责任中心权限列表
     * @param userId
     * @param responsibilityName
     * @param hideFlag
     * @return
     */
    List<UserResponsibilityRightVO> getUserResponsibilityRights(Long userId,String responsibilityName, Integer hideFlag);

    /**
     * 编辑用户损益报表权限
     * @param uerResponsibilityRightVO
     */
    void editUserResponsibilityRight(UserResponsibilityRightVO uerResponsibilityRightVO);

    /**
     * 修改指定用户的责任中心权限
     * @param userId
     * @param responsibilityCode
     * @param status
     */
    void editUserResponsibilityRight(Long userId,String responsibilityCode,Integer status);

    /**
     * 给用户添加所有损益报表权限
     * @param userId
     * @param allRightFlag
     */
    void editAllUserResponsibilityRight(Long userId,Integer allRightFlag);

    /**
     * 获取授权的责任中心
     * @param fullResponsibilityList 需要去除非授权的完整的责任中心列表
     * @return
     */
    List<Responsibility> getAuthorizedResponsibility(List<Responsibility> fullResponsibilityList);


    /**
     * 是否开启用户损益报表数据权限功能
     * @return
     */
    boolean IsUserReportRightAble();

}

