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

import com.baomidou.mybatisplus.extension.service.IService;
import com.qmth.distributed.print.business.entity.ExamDetailCourse;
import com.qmth.teachcloud.common.entity.BasicCourse;

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

/**
 * <p>
 * 考务数据（考场关联科目） 服务类
 * </p>
 *
 * @author xf
 * @since 2021-03-23
 */
public interface ExamDetailCourseService extends IService<ExamDetailCourse> {

    /**
     * 根据考务场次id查询卷袋数
     * @param examDetailId 考务数据场次id
     * @return 该场次下卷代数
     */
    double calculatePackagesByDetailId(Long examDetailId);

    List<Map<String, Object>> listByExamDetailId(Long examDetailId);

    void updatePaperNumber(List<Long> examDetailCourseIds, String paperNumber, String relatePaperType);

    List<ExamDetailCourse> listByExamDetailIdAndStatus(Long examDetailId);

    List<BasicCourse> listCoursesByPrintPlanId(String param, List<Long> printPlanIdList);

    List<String> listPaperNumberByPrintPlanId(String param, List<Long> printPlanIdList, Set<Long> orgIds);

    List<ExamDetailCourse> listByPrintPlanIdAndCourseCodeAndPaperNumber(Long schoolId, Long printPlanId, String courseCode, String paperNumber);

    List<ExamDetailCourse> listByCourseCodeAndPaperNumber(Long schoolId, String courseCode, String paperNumber);
}
