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

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qmth.distributed.print.business.entity.TBTaskPdf;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qmth.teachcloud.common.bean.result.TaskPdfResult;
import com.qmth.teachcloud.common.bean.result.TbTaskDetailResult;
import com.qmth.teachcloud.common.entity.SysUser;
import com.qmth.teachcloud.common.enums.CreatePdfTypeEnum;
import com.qmth.teachcloud.common.enums.TaskResultEnum;
import com.qmth.teachcloud.common.enums.TaskStatusEnum;
import com.qmth.teachcloud.common.enums.TaskTypeEnum;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 导入导出任务表 服务类
 * </p>
 *
 * @author xf
 * @since 2024-02-06
 */
public interface TBTaskPdfService extends IService<TBTaskPdf> {

    boolean updateStatusById(TaskStatusEnum status, TaskResultEnum result, String summary, Long id);

    TBTaskPdf saveTask(TbTaskDetailResult tbTaskDetailResult, Long printPlanId, SysUser user, Long id);

    void resetRunningCreatePdf(Long id, CreatePdfTypeEnum type);

    int countRunningByExamDetailIds(List<Long> examDetailIds);

    IPage<TaskPdfResult> pageData(Page<TaskPdfResult> page, Long examId, String printPlanId, String courseCode, String paperNumber, TaskStatusEnum status, TaskResultEnum result, String examPlace, String examRoom, Long examStartTime, Long examEndTime);

    List<TBTaskPdf> listWaitingTask();

    boolean countByPrintPlanIdAndEntityId(Long schoolId, Long printPlanId);
}
