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

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qmth.distributed.print.business.bean.dto.*;
import com.qmth.distributed.print.business.bean.result.PrintPlanBrief;
import com.qmth.distributed.print.business.bean.result.PrintPlanResult;
import com.qmth.distributed.print.business.entity.ExamPrintPlan;
import com.qmth.distributed.print.business.enums.PrintPlanStatusEnum;
import com.qmth.teachcloud.common.bean.dto.DataPermissionRule;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * <p>
 * 印刷计划管理 Mapper 接口
 * </p>
 *
 * @author xf
 * @since 2021-03-23
 */
public interface ExamPrintPlanMapper extends BaseMapper<ExamPrintPlan> {
    IPage<PrintPlanResult> findPrintPlanPage(@Param("iPage") Page<PrintPlanResult> iPage,
                                             @Param("schoolId") Long schoolId,
                                             @Param("semesterId") Long semesterId,
                                             @Param("examId") Long examId,
                                             @Param("printPlanIdList") List<Long> printPlanIdList,
                                             @Param("status") PrintPlanStatusEnum status,
                                             @Param("startTime") Long startTime,
                                             @Param("endTime") Long endTime,
                                             @Param("dpr") DataPermissionRule dpr);

    List<PrintPlanBrief> list(@Param("schoolId") Long schoolId, @Param("source") String source, @Param("module") String module, @Param("status") String[] status, @Param("dpr") DataPermissionRule dpr);

    IPage<ClientPrintStatisticsDto> listClientPrintStatistics(Page<ClientPrintStatisticsDto> page, @Param("schoolId") Long schoolId, @Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("printPlanId") String printPlanId, @Param("examPlace") String examPlace, @Param("examStartTime") Long examStartTime, @Param("examEndTime") Long examEndTime, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("orgId") Long orgId, @Param("examDetailStatus") String[] examDetailStatus);

    ClientPrintStatisticsTotalDto clientStatisticsTotalData(@Param("schoolId") Long schoolId, @Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("printPlanId") Long printPlanId, @Param("examPlace") String examPlace, @Param("examStartTime") Long examStartTime, @Param("examEndTime") Long examEndTime, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("orgId") Long orgId, @Param("examDetailStatus") String[] examDetailStatus);

    List<PrintPlanBrief> listToClient(@Param("schoolId") Long schoolId, @Param("source") String source, @Param("module") String module, @Param("status") String[] status, @Param("orgId") Long orgId);
}
