package com.jeeplus.test.reimbursementAccountant.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.reimbursementAccountant.domain.dto.AccountantReimbursementBusinessDTO;
import com.jeeplus.test.reimbursementAccountant.domain.dto.AccountantReimbursementDTO;
import com.jeeplus.test.reimbursementAccountant.domain.dto.AccountantReimbursementUserDTO;
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 AccountantReimbursementBusinessMapper extends BaseMapper<AccountantReimbursementUserDTO> {
    /**
     * 根据条件查询数据信息
     * @param page
     * @param reimbursementUser
     * @return
     */
    IPage<AccountantReimbursementUserDTO> findList(Page<AccountantReimbursementUserDTO> page, @Param("reimbursementUser")AccountantReimbursementUserDTO reimbursementUser);
    /**
     * 根据条件查询数据信息
     * @param reimbursementBusiness
     * @return
     */
    List<AccountantReimbursementBusinessDTO> findListByBusinessCodeId(AccountantReimbursementBusinessDTO reimbursementBusiness);
    /**
     * 根据条件查询数据信息
     * @param reimbursementBusiness
     * @return
     */
    List<AccountantReimbursementBusinessDTO> findListByUserIdAndYear(AccountantReimbursementBusinessDTO reimbursementBusiness);
    /**
     * 根据条件查询数据信息
     * @param page
     * @param reimbursementUser
     * @return
     */
    IPage<AccountantReimbursementUserDTO> getYearList(Page<AccountantReimbursementUserDTO> page, @Param("reimbursementUser")AccountantReimbursementUserDTO reimbursementUser);
    /**
     * 根据条件查询数据信息
     * @param reimbursementUser
     * @return
     */
    List<AccountantReimbursementUserDTO> getReimbursementMoneyByYear(AccountantReimbursementUserDTO reimbursementUser);

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

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

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

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

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

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

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

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

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

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