/* eslint-disable */
// @ts-ignore
import request from '@/http/vue-query';
import { CustomRequestOptions } from '@/http/types';

import * as API from './types';

/** 获取试题统计 根据条件查询学科的试题统计数据，支持按班级、学校筛选，支持多种分析类型和指标 POST /exam-statistics/average-comparison */
export async function examStatisticsAverageComparisonUsingPost({
  body,
  options,
}: {
  body: API.QuestionAnalysisRequest;
  options?: CustomRequestOptions;
}) {
  return request<
    API.Response & {
      data?: API.QuestionAnalysisResponse;
    }
  >('/exam-statistics/average-comparison', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取总分分档上线人数分布 根据条件获取总分分档上线人数分布，支持按学校或班级分组统计 POST /exam-statistics/class-analysis */
export async function examStatisticsClassAnalysisUsingPost({
  body,
  options,
}: {
  body: API.ClassAnalysisRequest;
  options?: CustomRequestOptions;
}) {
  return request<
    API.Response & {
      data?: API.ClassAnalysisResponse;
    }
  >('/exam-statistics/class-analysis', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 按班级导出 按班级导出成绩数据，每个班级一个sheet，文件名使用考试名称+成绩表 POST /exam-statistics/export-by-classes */
export async function examStatisticsExportByClassesUsingPost({
  body,
  options,
}: {
  body: API.ClassExportRequest;
  options?: CustomRequestOptions;
}) {
  return request<string>('/exam-statistics/export-by-classes', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 分校导出 按学校分别导出成绩数据，返回压缩包，每个学校一个文件夹 POST /exam-statistics/export-by-schools */
export async function examStatisticsExportBySchoolsUsingPost({
  body,
  options,
}: {
  body: API.SchoolExportRequest;
  options?: CustomRequestOptions;
}) {
  return request<string>('/exam-statistics/export-by-schools', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 导出总分分档分析Excel 导出总分分档分析数据到Excel文件 POST /exam-statistics/export-class-analysis-excel */
export async function examStatisticsExportClassAnalysisExcelUsingPost({
  body,
  options,
}: {
  body: API.ClassAnalysisExcelExportRequest;
  options?: CustomRequestOptions;
}) {
  return request<string>('/exam-statistics/export-class-analysis-excel', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 导出班级成绩单 导出班级成绩单ZIP文件，每个班级一个Excel，每个科目一个sheet，包含小分排名的所有指标 POST /exam-statistics/export-class-reports */
export async function examStatisticsExportClassReportsUsingPost({
  body,
  options,
}: {
  body: API.ClassReportExportRequest;
  options?: CustomRequestOptions;
}) {
  return request<string>('/exam-statistics/export-class-reports', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 导出成绩排名Excel 根据条件导出学生成绩排名Excel文件，支持复合表头格式 POST /exam-statistics/export-excel */
export async function examStatisticsExportExcelUsingPost({
  body,
  options,
}: {
  body: API.ExcelExportRequest;
  options?: CustomRequestOptions;
}) {
  return request<string>('/exam-statistics/export-excel', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 导出试题分析Excel 导出试题分析数据到Excel文件，包含各题目的统计指标和对比数据 POST /exam-statistics/export-question-analysis-excel */
export async function examStatisticsExportQuestionAnalysisExcelUsingPost({
  body,
  options,
}: {
  body: API.QuestionAnalysisExcelExportRequest;
  options?: CustomRequestOptions;
}) {
  return request<string>('/exam-statistics/export-question-analysis-excel', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 导出题目排名Excel（小分排名） 根据条件导出学生题目级成绩排名Excel文件 POST /exam-statistics/export-question-ranking-excel */
export async function examStatisticsExportQuestionRankingExcelUsingPost({
  body,
  options,
}: {
  body: API.QuestionExcelExportRequest;
  options?: CustomRequestOptions;
}) {
  return request<string>('/exam-statistics/export-question-ranking-excel', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 导出小分表数据 导出小分表数据到Excel文件，包含学生基本信息、成绩和各题目得分 POST /exam-statistics/export-question-ranking-table */
export async function examStatisticsExportQuestionRankingTableUsingPost({
  body,
  options,
}: {
  body: API.QuestionRankingRequest;
  options?: CustomRequestOptions;
}) {
  return request<string>('/exam-statistics/export-question-ranking-table', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 导出均分对比Excel 导出均分分析数据到Excel文件，包含各班级/学校的统计指标对比 POST /exam-statistics/export-score-analysis-excel */
export async function examStatisticsExportScoreAnalysisExcelUsingPost({
  body,
  options,
}: {
  body: API.ScoreAnalysisExcelExportRequest;
  options?: CustomRequestOptions;
}) {
  return request<string>('/exam-statistics/export-score-analysis-excel', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 导出统计分析Excel 导出统计分析数据到Excel文件，支持名次统计、分数段统计、比例段统计 POST /exam-statistics/export-statistics-analysis-excel */
export async function examStatisticsExportStatisticsAnalysisExcelUsingPost({
  body,
  options,
}: {
  body: API.StatisticsAnalysisExcelExportRequest;
  options?: CustomRequestOptions;
}) {
  return request<string>('/exam-statistics/export-statistics-analysis-excel', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 导出学科分档分析Excel 导出学科分档分析数据到Excel文件 POST /exam-statistics/export-subject-class-analysis-excel */
export async function examStatisticsExportSubjectClassAnalysisExcelUsingPost({
  body,
  options,
}: {
  body: API.SubjectClassAnalysisExcelExportRequest;
  options?: CustomRequestOptions;
}) {
  return request<string>(
    '/exam-statistics/export-subject-class-analysis-excel',
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** 获取题目级排名（小分排名） 根据考试ID和学科ID查询学生的题目级成绩排名 POST /exam-statistics/question-ranking */
export async function examStatisticsQuestionRankingUsingPost({
  body,
  options,
}: {
  body: API.QuestionRankingRequest;
  options?: CustomRequestOptions;
}) {
  return request<
    API.Response & {
      data?: API.QuestionRankingResponse;
    }
  >('/exam-statistics/question-ranking', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取均分分析 根据条件查询学校或班级的均分分析数据，包括各类统计指标和排名 POST /exam-statistics/score-analysis */
export async function examStatisticsScoreAnalysisUsingPost({
  body,
  options,
}: {
  body: API.ScoreAnalysisRequest;
  options?: CustomRequestOptions;
}) {
  return request<
    API.Response & {
      data?: API.ScoreAnalysisResponse;
    }
  >('/exam-statistics/score-analysis', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取成绩排名 根据条件查询学生成绩排名，支持按班级、学校筛选，支持联考模式和赋分计算，支持按姓名、学号、考号搜索 POST /exam-statistics/score-ranking */
export async function examStatisticsScoreRankingUsingPost({
  body,
  options,
}: {
  body: API.ScoreRankingRequest;
  options?: CustomRequestOptions;
}) {
  return request<
    API.Response & {
      data?: API.ScoreRankingResponse;
    }
  >('/exam-statistics/score-ranking', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取统计配置 获取指定考试的统计配置信息，支持多种配置类型 GET /exam-statistics/statis-config */
export async function examStatisticsStatisConfigUsingGet({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.examStatisticsStatisConfigUsingGetParams;
  options?: CustomRequestOptions;
}) {
  return request<
    API.Response & {
      data?: unknown;
    }
  >('/exam-statistics/statis-config', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 设置统计配置 设置考试的统计配置，支持多种配置类型和规则 POST /exam-statistics/statis-config */
export async function examStatisticsStatisConfigUsingPost({
  body,
  options,
}: {
  body: API.SetLevelConfigRequest;
  options?: CustomRequestOptions;
}) {
  return request<
    API.Response & {
      data?: API.SetLevelConfigResponse;
    }
  >('/exam-statistics/statis-config', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取分段统计分析数据 根据分析类型获取统计分析数据，支持名次统计、分数段统计、比例段统计 POST /exam-statistics/statistics-analysis */
export async function examStatisticsStatisticsAnalysisUsingPost({
  body,
  options,
}: {
  body: API.StatisticsAnalysisRequest;
  options?: CustomRequestOptions;
}) {
  return request<
    API.Response & {
      data?: API.StatisticsAnalysisResponse;
    }
  >('/exam-statistics/statistics-analysis', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取学科分档上线人数分布 根据条件获取学科分档上线人数分布，支持按学校或班级分组统计 POST /exam-statistics/subject-class-analysis */
export async function examStatisticsSubjectClassAnalysisUsingPost({
  body,
  options,
}: {
  body: API.SubjectClassAnalysisRequest;
  options?: CustomRequestOptions;
}) {
  return request<
    API.Response & {
      data?: API.SubjectClassAnalysisResponse;
    }
  >('/exam-statistics/subject-class-analysis', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
