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

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qmth.distributed.print.business.entity.TCUsualScore;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 平常作业成绩表 服务类
 * </p>
 *
 * @author wangliang
 * @since 2024-02-18
 */
public interface TCUsualScoreService extends IService<TCUsualScore> {

    /**
     * 导入平时成绩excel
     *
     * @param file
     * @param examId
     * @param courseCode
     * @param paperNumber
     * @param teachCourseId
     * @return
     * @throws IOException
     */
    public Map<String, String> usualScoreExcelImport(MultipartFile file, Long examId, String courseCode, String paperNumber, Long teachCourseId) throws IOException;

    /**
     * 平时成绩列表（分页）
     *
     * @param iPage
     * @param examId
     * @param courseCode
     * @param paperNumber
     * @param teachCourseId
     * @return
     */
    public IPage<TCUsualScore> usualScoreList(IPage<Map> iPage, Long examId, String courseCode, String paperNumber, Long teachCourseId);

    /**
     * 根据考试id/课程编码/试卷编码查询数据库数据
     *
     * @param examId
     * @param courseCode
     * @param paperNumber
     * @param teachCourseId
     * @return
     */
    public List<TCUsualScore> queryUsualScore(Long examId, String courseCode, String paperNumber, Long teachCourseId);
}
