package com.jeeplus.test.reimbursementProject.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jeeplus.sys.service.dto.UserDTO;
import com.jeeplus.test.reimbursementProject.domain.dto.ProjectReimbursementBusinessReturnDTO;
import com.jeeplus.test.reimbursementProject.domain.dto.ProjectReimbursementUserDTO;

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

/**
 * @author li-peike
 * @version 1.0.0
 * @ClassName ReimbursementSysService.java
 * @Description TODO
 * @createTime 2022年05月06日 10:25:00
 */

public interface ProjectReimbursementUserService {
    /**
     * 查询报销人员信息
     * @param id
     * @return
     */
    ProjectReimbursementUserDTO queryById(String id);
    /**
     * 查询报销信息(根据人员id和年份)
     * @param reimbursementUser
     * @return
     */
    ProjectReimbursementUserDTO queryByUserIdAndYear(ProjectReimbursementUserDTO reimbursementUser);

    /**
     * 查询列表信息
     * @param page
     * @param reimbursementUser
     * @return
     */
    IPage<ProjectReimbursementUserDTO> findList(Page<ProjectReimbursementUserDTO> page, ProjectReimbursementUserDTO reimbursementUser);

    /**
     * 保存方法
     * @param reimbursementUser
     */
    Map<String,Object> save(ProjectReimbursementUserDTO reimbursementUser);

    /**
     * 修改报销人员信息
     * @param reimbursementUser
     */
    void update(ProjectReimbursementUserDTO reimbursementUser);

    /**
     * 根据id删除人员报销信息（物理删除）
     * @param idList
     */
    Map<String,Object> delete(List<String> idList);

    /**
     * 查询人员报销信息列表
     * @param reimbursementUserDTO
     * @return
     */
    ProjectReimbursementBusinessReturnDTO findListByUserId(ProjectReimbursementUserDTO reimbursementUserDTO, ProjectReimbursementBusinessReturnDTO reimbursementBusinessReturnDTO);

    /**
     * 根据部门和人员名称查询人员信息
     * @param reimbursementUserDTO
     * @return
     */
    List<UserDTO> getUserByNameAndOfficeName(ProjectReimbursementUserDTO reimbursementUserDTO);


    /**
     * 保存方法(批量导入)
     * @param reimbursementUserList
     */
    Map<String,Object> saveList(List<ProjectReimbursementUserDTO> reimbursementUserList);

    /**
     * 初始化部门人员报销数据信息（当年）
     * @param officeName 部门名称
     */
    Map<String,Object> initialize(String officeName,String officeType);
}
