package cn.com.tenlion.staff.service.basicstaffinfo;


import cn.com.tenlion.staff.pojo.dtos.basicstaffinfo.BasicStaffInfoDTO;
import cn.com.tenlion.staff.pojo.vos.basicstaffinfo.BasicStaffInfoVO;
import ink.wgink.exceptions.RemoveException;
import ink.wgink.exceptions.SaveException;
import ink.wgink.exceptions.SearchException;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultData;
import ink.wgink.pojo.result.SuccessResultList;

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

/**
 * @ClassName: IBasePopulationInfoService
 * @Description: 人员信息基础表
 * @Author: WenG
 * @Date: 2020-11-16 17:17
 * @Version: 1.0
 **/
public interface IBasicStaffInfoService {

    /**
     * 新增人员信息基础表
     *
     * @param basicStaffInfoVO
     * @param token
     * @return
     * @throws SaveException
     */
    SuccessResultData save(String token, BasicStaffInfoVO basicStaffInfoVO) throws SaveException;


    /**
     * 删除人员信息基础表
     *
     * @param ids
     * @param token
     * @return
     * @throws RemoveException
     */
    SuccessResult remove(String token, String ids) throws RemoveException;

    /**
     * 删除人员信息基础表（物理删除）
     *
     * @param ids
     * @throws RemoveException
     */
    SuccessResult delete(String ids) throws RemoveException;

    /**
     * 修改人员信息基础表
     *
     * @param basicStaffInfoId
     * @param basicStaffInfoVO
     * @param token
     * @return
     * @throws Exception
     */
    SuccessResult update(String token, String basicStaffInfoId, BasicStaffInfoVO basicStaffInfoVO) throws Exception;

    /**
     * 人员信息基础表详情(通过ID)
     *
     * @param basicStaffInfoId
     * @return
     * @throws SearchException
     */
    BasicStaffInfoDTO getById(String basicStaffInfoId) throws SearchException;

    /**
     * 人员信息基础表列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<BasicStaffInfoDTO> list(Map<String, Object> params) throws SearchException;

    /**
     * 人员信息基础表分页列表
     *
     * @param page
     * @return
     * @throws SearchException
     */
    SuccessResultList<List<BasicStaffInfoDTO>> listPage(ListPage page) throws SearchException;

    /**
     * 根据token查询个人信息
     * @param token
     * @return
     */
    BasicStaffInfoDTO getBindUserAccount(String token);
}