package cn.iocoder.yudao.module.course.service;

import cn.iocoder.yudao.module.course.entity.SchoolCommission;
import cn.iocoder.yudao.module.course.vo.CommissionExportVO;
import cn.iocoder.yudao.module.course.vo.CommissionStatisticsVO;
import cn.iocoder.yudao.module.course.vo.FinanceDeductInfoVO;
import cn.iocoder.yudao.module.course.vo.SchoolCommissionVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * 提成记录 Service 接口
 *
 * @author 若依
 */
public interface SchoolCommissionService extends IService<SchoolCommission> {


    /**
     * 分页查询提成记录
     *
     * @param page      分页参数
     * @param pageReqVO {@link SchoolCommissionVO}
     * @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.course.vo.SchoolCommissionVO>
     * @author PQZ
     * @date 14:00 2025/2/19
     **/
    IPage<SchoolCommissionVO> queryPage(Page<SchoolCommissionVO> page, SchoolCommissionVO pageReqVO);

    /**
     * 创建提成记录
     */
    boolean createSchoolCommission(SchoolCommissionVO entity);

    /**
     * 判断提成记录是否存在
     */
    boolean exists(SchoolCommission entity);

    /**
     * 根据id获取提成记录详细信息
     */
    SchoolCommissionVO getSchoolCommissionById(String id);

    /**
     * 出纳审核提成记录
     */
    boolean cashierConfirm(SchoolCommissionVO schoolCommissionVO);

    /**
     * 教练提成合计列表
     */
    List<SchoolCommissionVO> getCoachTotalCommission(SchoolCommissionVO schoolCommissionVO);

    /**
     * 教练提成列表
     */
    IPage<SchoolCommissionVO> getCommissionListByCoachId(SchoolCommissionVO schoolCommissionVO, Page<SchoolCommissionVO> page);

    IPage<CommissionExportVO> getAllCommissionPage(CommissionExportVO exportVO,Page<CommissionExportVO> page);
    CommissionStatisticsVO getCommissionStatistics(CommissionExportVO exportVO);

    public List<CommissionExportVO> getCommissionList(CommissionExportVO exportVO);
    public List<CommissionExportVO> getAllCommissionList(CommissionExportVO exportVO);
    public List<CommissionExportVO> getCommissionListByRange(CommissionExportVO exportVO);

    /**
     * 首页财务应付详情
     * @param entity
     * @return
     */
    List<FinanceDeductInfoVO> getFinanceDeductList(FinanceDeductInfoVO entity);
    IPage<FinanceDeductInfoVO> getFinanceDeductDetailsListByCoach(FinanceDeductInfoVO entity, Page<FinanceDeductInfoVO> page);

}
