package com.qmth.teachcloud.mark.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qmth.teachcloud.mark.dto.mark.manage.MarkArbitrateDto;
import com.qmth.teachcloud.mark.dto.mark.manage.MarkArbitrateMarkerDto;
import com.qmth.teachcloud.mark.dto.mark.manage.MarkArbitrateSettingDto;
import com.qmth.teachcloud.mark.dto.mark.manage.Task;
import com.qmth.teachcloud.mark.entity.MarkArbitrateHistory;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qmth.teachcloud.mark.params.MarkResult;

import java.util.List;

/**
 * <p>
 * 仲裁记录表 服务类
 * </p>
 *
 * @author xf
 * @since 2023-09-22
 */
public interface MarkArbitrateHistoryService extends IService<MarkArbitrateHistory> {

    IPage<MarkArbitrateDto> pageArbitrate(Long examId, String paperNumber, Integer groupNumber, String status, String className, Integer pageNumber, Integer pageSize);

    void clearArbitrate(Long arbitrateId);

    List<MarkArbitrateMarkerDto> listMarkerArbitrateRecord(Long arbitrateId);

    MarkArbitrateSettingDto getArbitrateSetting(Long arbitrateId, Long examId, String paperNumber, Integer groupNumber);

    Task getArbitrateTask(Long arbitrateId, Long examId, String paperNumber, Integer groupNumber);

    void saveArbitrateTask(MarkResult markResult);

    void deleteByStudentId(Long studentId);

    void deleteByExamIdAndPaperNumberAndGroupNumber(Long examId, String paperNumber, Integer groupNumber);

    JSONObject getArbitrateStatus(Long examId, String paperNumber, Integer groupNumber);

    List<Task> getHistory(Long examId, String paperNumber, Integer groupNumber, Integer pageNumber, Integer pageSize);

    Integer waitArbitrateCount(Long examId, String paperNumber, Integer groupNumber, String className);
}
