package com.jeeplus.test.reimbursementAssess.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jeeplus.test.reimbursementAssess.domain.dto.AssessReimbursementBusinessDTO;
import com.jeeplus.test.reimbursementAssess.domain.dto.AssessReimbursementDTO;
import com.jeeplus.test.reimbursementAssess.domain.dto.AssessReimbursementUserDTO;
import com.jeeplus.test.reimbursementProject.domain.dto.ProjectReimbursementBusinessDTO;
import com.jeeplus.test.reimbursementsys.domain.dto.ReimbursementAddressDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author li-peike
 * @version 1.0.0
 * @ClassName ReimbursementSysMapper.java
 * @Description TODO
 * @createTime 2022年05月06日 10:40:00
 */
@Mapper
public interface AssessReimbursementBusinessMapper extends BaseMapper<AssessReimbursementUserDTO> {
    /**
     * 根据条件查询数据信息
     * @param page
     * @param reimbursementUser
     * @return
     */
    IPage<AssessReimbursementUserDTO> findList(Page<AssessReimbursementUserDTO> page, @Param("reimbursementUser")AssessReimbursementUserDTO reimbursementUser);
    /**
     * 根据条件查询数据信息
     * @param reimbursementBusiness
     * @return
     */
    List<AssessReimbursementBusinessDTO> findListByBusinessCodeId(AssessReimbursementBusinessDTO reimbursementBusiness);
    /**
     * 根据条件查询数据信息
     * @param reimbursementBusiness
     * @return
     */
    List<AssessReimbursementBusinessDTO> findListByUserIdAndYear(AssessReimbursementBusinessDTO reimbursementBusiness);
    /**
     * 根据条件查询数据信息
     * @param page
     * @param reimbursementUser
     * @return
     */
    IPage<AssessReimbursementUserDTO> getYearList(Page<AssessReimbursementUserDTO> page, @Param("reimbursementUser")AssessReimbursementUserDTO reimbursementUser);
    /**
     * 根据条件查询数据信息
     * @param reimbursementUser
     * @return
     */
    List<AssessReimbursementUserDTO> getReimbursementMoneyByYear(AssessReimbursementUserDTO reimbursementUser);

    /**
     * 保存人员报销信息
     * @param reimbursementUser
     */
    void save(AssessReimbursementBusinessDTO reimbursementUser);

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

    /**
     * 查询业务信息
     * @param id
     * @return
     */
    AssessReimbursementBusinessDTO queryById(String id);

    /**
     * 查询业务信息
     * @param reimbursementUser
     * @return
     */
    AssessReimbursementUserDTO reimbursementUserByUserIdAndYear(AssessReimbursementBusinessDTO reimbursementUser);

    /**
     * 查询报销信息(根据人员id和年份)
     * @param reimbursementUser
     * @return
     */
    AssessReimbursementUserDTO queryByUserIdAndYear(AssessReimbursementBusinessDTO reimbursementUser);

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

    /**
     * 根据人员id和年份查询该员工当年报销额度总额
     * @param reimbursementUser
     * @return
     */
    String getAlreadyReimbursementQuotaByUserIdAndYear(AssessReimbursementBusinessDTO reimbursementUser);

    /**
     * 根据人员id和年份查询该员工当年报销额度总额
     * @param reimbursementUser
     * @return
     */
    String getAlreadyReimbursementQuotaByBusinessCodeId(AssessReimbursementBusinessDTO reimbursementUser);

    /**
     * 根据业务id查询收款状态
     * @param reimbursementUser
     * @return
     */
    String getGatheringStatusById(AssessReimbursementBusinessDTO reimbursementUser);

    /**
     * 修改业务报销是否完成状态
     * @param reimbursementDTO
     */
    void updateReimbursementInfo(AssessReimbursementDTO reimbursementDTO);
    /**
     * 根据人员和年份获取实发类型信息
     * @param reimbursementBusiness
     * @return
     */
    List<ReimbursementAddressDTO> getReimbursementFsalaryByUserIdAndYear(AssessReimbursementBusinessDTO reimbursementBusiness);
}
