package com.dayou.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dayou.dto.CommissionDeclareDTO;
import com.dayou.entity.CommissionDeclare;
import com.dayou.dao.CustomBaseMapper;
import com.dayou.vo.CommissionDeclareTodoCheckVO;
import com.dayou.vo.CommissionDeclareVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 提成申报 Mapper 接口
 * </p>
 *
 * @author wucl
 * @since 2024-05-15
 */
public interface CommissionDeclareMapper extends CustomBaseMapper<CommissionDeclare> {

    Page<CommissionDeclareVO> majorMarketDeclarePage(Page page, @Param("declare") CommissionDeclareVO commissionDeclare,@Param("marketUserId") Long marketUserId);

    /**
     * 根据部门id查询大中型市场人员提成申报信息
     * @param page
     * @param commissionDeclare
     * @param departmentId
     * @return
     */
    Page<CommissionDeclareVO> majorMarketDeclarePageByDepartment(Page page, @Param("declare")CommissionDeclareVO commissionDeclare, @Param("departmentId")Long departmentId);

    /**
     * 根据部门id查询大中型市场人员提成申报信息导出excel
     * @param commissionDeclare
     * @param departmentId
     * @return
     */
    List<CommissionDeclareVO> majorMarketDeclarePageByDepartmentExport(@Param("declare")CommissionDeclareVO commissionDeclare, @Param("departmentId")Long departmentId);

    Page<CommissionDeclareVO> majorEvaluateDeclarePage(Page page, @Param("declare")CommissionDeclareVO commissionDeclare, @Param("evaluateUserId")Long currentEvaluateUserId);

    /**
     * 根据部门id查询大中型提成申报信息
     * @param page
     * @param commissionDeclare
     * @param departmentId
     * @return
     */
    Page<CommissionDeclareVO> majorEvaluateDeclarePageByDepartment(Page page, @Param("declare")CommissionDeclareVO commissionDeclare, @Param("departmentId")Long departmentId);

    /**
     * 根据部门id查询大中型提成申报信息导出excel
     * @param commissionDeclare
     * @param departmentId
     * @return
     */
    List<CommissionDeclareVO> majorEvaluateDeclarePageByDepartmentExport(@Param("declare")CommissionDeclareVO commissionDeclare, @Param("departmentId")Long departmentId);

    CommissionDeclareVO detail(@Param("id") Long id);

    Page<CommissionDeclareTodoCheckVO> todoCheckPage(Page page, @Param("checkVO")CommissionDeclareTodoCheckVO checkVO);

    List<CommissionDeclareTodoCheckVO> todoCheckList(@Param("checkVO")CommissionDeclareTodoCheckVO checkVO);

    /**
     * 更新大中型绩效申报
     * @param declareDTO dto
     * @return Boolean
     */
    Boolean updateMajorCommissionDeclare(@Param("declareDTO") CommissionDeclareDTO declareDTO);

    /**
     * 获取资产评估人员提成申报列表
     * @param page 分页参数
     * @param commissionDeclare 查询参数
     * @param currentEvaluateUserId 项目负责人id
     * @return Page<CommissionDeclareVO>
     */
    Page<CommissionDeclareVO> assetsEvaluateDeclarePage(Page page, @Param("declare")CommissionDeclareVO commissionDeclare, @Param("evaluateUserId")Long currentEvaluateUserId);

    /**
     * 获取资产市场人员提成申报列表
     * @param page 分页参数
     * @param commissionDeclare 查询参数
     * @param marketUserId 客户经理id
     * @return Page<CommissionDeclareVO>
     */
    Page<CommissionDeclareVO> assetsMarketDeclarePage(Page page, @Param("declare") CommissionDeclareVO commissionDeclare,@Param("marketUserId") Long marketUserId);

    /**
     * 资产待办绩效申报列表
     * @param page 分页参数
     * @param checkVO 查询参数
     * @return Page<CommissionDeclareTodoCheckVO>
     */
    Page<CommissionDeclareTodoCheckVO> assetsTodoCheckPage(Page page, @Param("checkVO")CommissionDeclareTodoCheckVO checkVO);

    /**
     * 资产待办绩效申报集合
     * @param checkVO 查询参数
     * @return List<CommissionDeclareTodoCheckVO>
     */
    List<CommissionDeclareTodoCheckVO> assetsTodoCheckList( @Param("checkVO")CommissionDeclareTodoCheckVO checkVO);

    /**
     * 更新资产绩效申报提成比列与下限信息
     * @param declareDTO dto
     * @return Boolean
     */
    Boolean updateAssetsCommissionDeclare(@Param("declareDTO") CommissionDeclareDTO declareDTO);
}
