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

import com.cm.central.control.pojo.dtos.projectleader.ClientProjectLeaderDTO;
import com.cm.central.control.pojo.dtos.projectleader.ProjectLeaderDTO;
import com.cm.central.control.pojo.vos.projectleader.ProjectLeaderVO;
import com.cm.common.exception.RemoveException;
import com.cm.common.exception.SearchException;
import com.cm.common.pojo.ListPage;
import com.cm.common.result.SuccessResult;
import com.cm.common.result.SuccessResultData;
import com.cm.common.result.SuccessResultList;

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

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

    /**
     * 新增项目负责人
     *
     * @param projectLeaderVO
     * @return
     * @throws Exception
     */
    SuccessResult saveProjectLeader(ProjectLeaderVO projectLeaderVO) throws Exception;

    /**
     * 新增项目负责人(APP)
     *
     * @param token
     * @param projectLeaderVO
     * @return
     * @throws Exception
     */
    SuccessResult saveProjectLeaderByToken(String token, ProjectLeaderVO projectLeaderVO) throws Exception;

    /**
     * 新增项目负责人
     *
     * @param projectLeaderVO
     * @return projectLeaderId
     * @throws Exception
     */
    String saveProjectLeaderReturnId(ProjectLeaderVO projectLeaderVO) throws Exception;

    /**
     * 新增项目负责人(APP)
     *
     * @param token
     * @param projectLeaderVO
     * @return projectLeaderId
     * @throws Exception
     */
    String saveProjectLeaderByTokenReturnId(String token, ProjectLeaderVO projectLeaderVO) throws Exception;

    /**
     * 删除项目负责人
     *
     * @param ids
     * @return
     * @throws RemoveException
     */
    SuccessResult removeProjectLeader(String ids) throws RemoveException;

    /**
     * 删除项目负责人（物理删除）
     *
     * @param ids
     * @throws RemoveException
     */
    void deleteProjectLeader(String ids) throws RemoveException;

    /**
     * 删除项目负责人(APP)
     *
     * @param token
     * @param ids
     * @return
     * @throws RemoveException
     */
    SuccessResult removeProjectLeaderByToken(String token, String ids) throws RemoveException;

    /**
     * 修改项目负责人
     *
     * @param projectLeaderId
     * @param projectLeaderVO
     * @return
     * @throws Exception
     */
    SuccessResult updateProjectLeader(String projectLeaderId, ProjectLeaderVO projectLeaderVO) throws Exception;

    /**
     * 修改项目负责人(APP)
     *
     * @param token
     * @param projectLeaderId
     * @param projectLeaderVO
     * @return
     * @throws Exception
     */
    SuccessResult updateProjectLeaderByToken(String token, String projectLeaderId, ProjectLeaderVO projectLeaderVO) throws Exception;

    /**
     * 项目负责人详情(通过ID)
     *
     * @param projectLeaderId
     * @return
     * @throws SearchException
     */
    ProjectLeaderDTO getProjectLeaderById(String projectLeaderId) throws SearchException;

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

    /**
     * 项目负责人分页列表
     *
     * @param page
     * @return
     * @throws SearchException
     */
    SuccessResultList<List<ProjectLeaderDTO>> listPageProjectLeader(ListPage page) throws SearchException;

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

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

    /**
     * 获取项目负责人
     *
     * @param clientId
     * @return
     * @throws SearchException
     */
    ClientProjectLeaderDTO getProjectLeaderByClientId(String clientId) throws SearchException;
}