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

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qmth.distributed.print.business.bean.dto.*;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

public interface ClientService {
    IPage<ClientExamTaskDto> listTryTask(String machineCode, Long orgId, Long printPlanId, String courseCode, String paperNumber, Boolean isTry, Boolean isPass, Integer pageNumber, Integer pageSize);

    List<Map<String, String>> getPaperUrl(Long printPlanId, Long examTaskId);

    Boolean tagPass(Long printPlanId, String courseCode, String courseName, String paperNumber, String machineCode, Boolean isPass, Long userId);

    Boolean updatePrintProgress(Long examDetailId, String machineCode, Integer printProgress, Boolean isPrint);

    IPage<ClientExamStudentDto> listStudent(Long examDetailId, String ticketNumber, String studentName, String courseCode, Integer pageNumber, Integer pageSize);

    Map<String, Object> getReprintData(Long examDetailId, String ticketNumber, String type);

    IPage<ClientPrintTaskDto> listClientPrintTask(String machineCode, Long orgId, String printPlanId, String status, String courseCode, String paperNumber, String examPlace, String examRoom, Long examStartTime, Long examEndTime, Boolean isDownload, Boolean validate, Integer pageNumber, Integer pageSize);

    Map<String, Object> getPrintData(Long examDetailId, String machineCode, Boolean isPrint, String printUser);

    List<Map<String, Object>> getPrintDataBatch(String machineCode, Long orgId, String printPlanId, String status, String courseCode, String paperNumber, String examPlace, String examRoom, Long examStartTime, Long examEndTime, Boolean isDownload, Boolean validate);

    Map<String, Object> getUrlByExamDetailId(Long examDetailId);

    Boolean updateDownload(Long examDetailId, String machineCode, Boolean isDownload);

    Boolean validateData(Long examDetailId, String packageCode, String lastCode);

    List<Map<String, Object>> getBatchUrl(String machineCode, Long orgId, Long printPlanId, String courseCode, String paperNumber, Boolean isTry, Boolean isPass);

    void exportClientPrintTask(HttpServletResponse response, String machineCode, Long orgId, String printPlanId, String status, String courseCode, String paperNumber, String examPlace, String examRoom, Long examStartTime, Long examEndTime, Boolean isDownload, Boolean validate) throws Exception;

    ClientPrintTaskTotalDto taskTotalData(String printPlanId, Long orgId, String status, String courseCode, String paperNumber, String examPlace, String examRoom, Long examStartTime, Long examEndTime, Boolean isDownload, Boolean validate, String machineCode);

    IPage<ClientPrintStatisticsDto> listClientPrintStatistics(Long orgId, String printPlanId, String examPlace, Long examStartTime, Long examEndTime, String courseCode, String paperNumber, Integer pageNumber, Integer pageSize);

    ClientPrintStatisticsTotalDto clientStatisticsTotalData(Long orgId, String printPlanId, String examPlace, Long examStartTime, Long examEndTime, String courseCode, String paperNumber);

    void checkPrivilege(Long id);
}
