package com.qmth.distributed.print.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qmth.distributed.print.business.bean.result.TSyncExamStudentScoreResult;
import com.qmth.distributed.print.business.entity.TSyncExamStudentScore;
import org.apache.ibatis.annotations.Param;

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

/**
 * <p>
 * 同步考生成绩表 Mapper 接口
 * </p>
 *
 * @author wangliang
 * @since 2021-10-28
 */
public interface TSyncExamStudentScoreMapper extends BaseMapper<TSyncExamStudentScore> {

    /**
     * 同步成绩查询列表
     *
     * @param iPage
     * @param schoolId
     * @param semesterId
     * @param orgId
     * @param majorId
     * @param clazzId
     * @param courseCode
     * @return
     */
    public IPage<TSyncExamStudentScoreResult> list(IPage<Map> iPage,
                                                   @Param("schoolId") Long schoolId,
                                                   @Param("semesterId") Long semesterId,
                                                   @Param("examId") Long examId,
                                                   @Param("clazzId") Long clazzId,
                                                   @Param("courseCode") String courseCode);

    /**
     * 成绩导出
     *
     * @param schoolId
     * @param semesterId
     * @param orgId
     * @param majorId
     * @param clazzId
     * @param courseCode
     * @return
     */
    public List<TSyncExamStudentScoreResult> export(@Param("schoolId") Long schoolId,
                                                    @Param("semesterId") Long semesterId,
                                                    @Param("examId") Long examId,
                                                    @Param("clazzId") Long clazzId,
                                                    @Param("courseCode") String courseCode);

    /**
     * 成绩导出计数
     *
     * @param schoolId
     * @param semesterId
     * @param clazzId
     * @param courseCode
     * @return
     */
    public int exportCount(@Param("schoolId") Long schoolId,
                           @Param("semesterId") Long semesterId,
                           @Param("examId") Long examId,
                           @Param("clazzId") Long clazzId,
                           @Param("courseCode") String courseCode);
}
