package com.cm.central.control.dao.projectleader;

import com.cm.central.control.pojo.dtos.projectleader.ClientProjectLeaderDTO;
import com.cm.common.exception.RemoveException;
import com.cm.common.exception.SaveException;
import com.cm.common.exception.SearchException;
import com.cm.common.exception.UpdateException;
import com.cm.common.result.SuccessResultList;
import com.cm.central.control.pojo.dtos.projectleader.ProjectLeaderDTO;
import org.springframework.stereotype.Repository;

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

/**
 * @ClassName: IProjectLeaderDao
 * @Description: 项目负责人
 * @Author: WenG
 * @Date: 2020-07-30 19:04
 * @Version: 1.0
 **/
@Repository
public interface IProjectLeaderDao {

    /**
     * 新增项目负责人
     *
     * @param params
     * @throws SaveException
     */
    void saveProjectLeader(Map<String, Object> params) throws SaveException;

    /**
     * 删除项目负责人
     *
     * @param params
     * @throws RemoveException
     */
    void removeProjectLeader(Map<String, Object> params) throws RemoveException;

    /**
     * 删除项目负责人（物理）
     *
     * @param params
     * @throws RemoveException
     */
    void deleteProjectLeader(Map<String, Object> params) throws RemoveException;

    /**
     * 修改项目负责人
     *
     * @param params
     * @throws UpdateException
     */
    void updateProjectLeader(Map<String, Object> params) throws UpdateException;

    /**
     * 项目负责人详情
     *
     * @param params
     * @return
     * @throws SearchException
     */
    ProjectLeaderDTO getProjectLeader(Map<String, Object> params) throws SearchException;

    /**
     * 项目负责人列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<ProjectLeaderDTO> listProjectLeader(Map<String, Object> params) throws SearchException;

    /**
     * 项目负责人统计
     *
     * @param params
     * @return
     * @throws SearchException
     */
    Integer countProjectLeader(Map<String, Object> params) throws SearchException;

    /**
     * 获取项目负责人（通过客户端ID）
     *
     * @param clientId
     * @return
     * @throws SearchException
     */
    ClientProjectLeaderDTO getProjectLeaderByClientId(String clientId) throws SearchException;
}