package com.qmth.teachcloud.mark.service;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.extension.service.IService;
import com.qmth.teachcloud.common.bean.dto.DataPermissionRule;
import com.qmth.teachcloud.common.enums.mark.MarkPaperStatus;
import com.qmth.teachcloud.common.enums.scan.ConditionType;
import com.qmth.teachcloud.mark.dto.*;
import com.qmth.teachcloud.mark.entity.ScanOmrTask;
import com.qmth.teachcloud.mark.enums.OmrTaskStatus;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author xf
 * @since 2023-09-22
 */
public interface ScanOmrTaskService extends IService<ScanOmrTask> {
	
	List<ScanOmrTask> buildTask(@Param("c") ConditionType c, @Param("studentId") Long studentId);

	ScanOmrStudent getTask(Long studentId);

	ScanOmrTaskSaveDto submitTask(List<ScanOmrTaskResultDto> result, Long userId);

	ScanOmrTaskStatusDto getStatus(Long examId, String courseCode, String coursePaperId);

	int getFinishStudentCountByExamAndUserId(Long examId, String courseCode, String coursePaperId, String status,DataPermissionRule dpr);

	void deleteByStudentId(Long examId, Long studentId);

	int getCount(Long examId, OmrTaskStatus status, String courseCode, String coursePaperId, MarkPaperStatus markPaperStatus, DataPermissionRule dpr);

	List<ScanStudentDto> list(Long examId, String courseCode, String coursePaperId, OmrTaskStatus status);

	void saveTask(Long studentId);

}
