package com.qmth.teachcloud.mark.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qmth.teachcloud.mark.dto.mark.manage.MarkGroupClassProgressDto;
import com.qmth.teachcloud.mark.dto.mark.manage.MarkGroupQuestionsDto;
import com.qmth.teachcloud.mark.dto.mark.manage.MarkGroupSummaryProgressDto;
import com.qmth.teachcloud.mark.dto.mark.setting.MarkGroupSingleDto;
import com.qmth.teachcloud.mark.dto.mark.setting.MarkGroupTaskDto;
import com.qmth.teachcloud.common.bean.params.mark.setting.GroupPictureConfigParams;
import com.qmth.teachcloud.mark.entity.MarkGroup;

import java.util.List;

/**
 * <p>
 * 评卷分组表 服务类
 * </p>
 *
 * @author xf
 * @since 2023-09-22
 */
public interface MarkGroupService extends IService<MarkGroup> {

    MarkGroupTaskDto listGroupTaskByExamIdAndPaperNumber(Long examId, String paperNumber);
    List<MarkGroup> listGroupByExamIdAndPaperNumber(Long examId, String paperNumber);

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

    void updatePicListByExamIdAndPaperNumberAndGroupNumber(GroupPictureConfigParams groupPictureConfigParams);

    void updateOpenMarkClassByExamIdAndPaperNumber(Long examId, String paperNumber, Boolean openMarkClass);

    MarkGroup getByExamIdAndPaperNumberAndGroupNumber(Long examId, String paperNumber, Integer groupNumber);

    MarkGroupSummaryProgressDto summaryGroupProgress(Long examId, String paperNumber);

    IPage<MarkGroupClassProgressDto> summaryGroupClassProgress(Long examId, String paperNumber, String className, Integer pageNumber, Integer pageSize);

    void updateMarkedCount(Long examId, String paperNumber, Integer groupNumber, int count);

    MarkGroup saveGroup(MarkGroupSingleDto markGroupSingleDto);

    MarkGroup updateGroup(MarkGroupSingleDto markGroupSingleDto);

    void updateTaskCount(Long examId, String paperNumber, Integer groupNumber, int taskCount);

    List<MarkGroupQuestionsDto> listGroupQuestions(Long examId, String paperNumber);

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

    long countByExamIdAndPaperNumber(Long examId, String paperNumber);

    void updateTotalScore(Long examId, String paperNumber, Integer groupNumber, Double totalScore);
}
