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

import com.baomidou.mybatisplus.extension.service.IService;
import com.qmth.distributed.print.business.bean.dto.open.PaperDimension;
import com.qmth.distributed.print.business.bean.params.analyze.GradePaperDimensionParam;
import com.qmth.distributed.print.business.bean.result.analyze.GradePaperDimensionResult;
import com.qmth.distributed.print.business.bean.result.analyze.SecondDimensionResult;
import com.qmth.distributed.print.business.entity.GradePaperDimension;
import com.qmth.teachcloud.common.enums.DimensionEnum;
import com.qmth.teachcloud.common.entity.SysUser;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

/**
 * <p>
 * 分析-考察点维度表 服务类
 * </p>
 *
 * @author wangliang
 * @since 2022-05-20
 */
public interface GradePaperDimensionService extends IService<GradePaperDimension> {

    /**
     * 查询分析试卷维度
     *
     * @param paperNumber 试卷编号
     * @param paperType   试卷类型
     * @param requestUser 请求用户
     * @return 结果集
     */
    List<GradePaperDimensionResult> findGradePaperDimensionList(String paperNumber, String paperType, SysUser requestUser);

    /**
     * 批量保存分析试卷维度数据
     *
     * @param gradePaperDimensionParam 维度数据参数集合
     * @param requestUser              请求的用户
     */
    void saveGradePaperDimensionBatch(GradePaperDimensionParam gradePaperDimensionParam, SysUser requestUser);

    /**
     * 分析 - 试卷知识维度数据导入
     *
     * @param file        excel 文件
     * @param paperNumber 试卷编号
     * @param paperType   试卷类型
     * @param paperName   试卷名称
     * @param requestUser 请求用户
     */
    void importGradePaperKnowledgeDimension(MultipartFile file, String paperNumber, String paperType, String paperName, SysUser requestUser) throws IOException, NoSuchFieldException;

    /**
     * 分析 - 试卷能力维度数据导入
     *
     * @param file        excel 文件
     * @param paperNumber 试卷编号
     * @param paperType   试卷类型
     * @param paperName   试卷名称
     * @param requestUser 请求用户
     */
    void importGradePaperAbilityDimension(MultipartFile file, String paperNumber, String paperType, String paperName, SysUser requestUser) throws IOException, NoSuchFieldException;

    /**
     * 分析 - 试卷维度模板导出
     *
     * @param courseCode    试卷编号
     * @param courseName    试卷名称
     * @param dimensionType 维度类型
     */
    void exportGradePaperDimensionTemplate(String courseCode, String courseName, DimensionEnum dimensionType) throws Exception;

    /**
     * 分析 - 查询二级维度集合
     *
     * @param paperNumber   试卷编号
     * @param paperType     试卷类型
     * @param dimensionType 维度类型
     * @param requestUser   请求用户
     * @return 结果
     */
    List<SecondDimensionResult> findSecondDimensionList(String paperNumber, String paperType, DimensionEnum dimensionType, SysUser requestUser);

    List<PaperDimension> findBySchoolIdAndPaperNumberAndPaperType(Long schoolId, String paperNumber, String paperType);
}
