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.bean.result.TSyncExamStudentScoreResult;
import com.qmth.distributed.print.business.entity.TSyncExamStudentScore;
import com.qmth.distributed.print.business.enums.ImageTrajectoryEnum;

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

/**
 * <p>
 * 同步考生成绩表 服务类
 * </p>
 *
 * @author wangliang
 * @since 2021-10-28
 */
public interface TSyncExamStudentScoreService extends IService<TSyncExamStudentScore> {

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

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

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

    /**
     * 创建动态轨迹图
     *
     * @param tSyncExamStudentScore
     * @param imageTrajectoryEnum
     * @return
     */
    public TSyncExamStudentScore createImageTrajectory(TSyncExamStudentScore tSyncExamStudentScore, ImageTrajectoryEnum imageTrajectoryEnum);

    /**
     * 生成zip文件
     *
     * @param tSyncExamStudentScore
     * @throws IOException
     */
    public void createZipFile(TSyncExamStudentScore tSyncExamStudentScore) throws IOException;
}
