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

import * as API from './types';

/** 获取阅卷进度 根据exam_subject_id查询阅卷进度，包括大题、小题、总分、评选方式、总任务量、已统分量和进度百分比 GET /marking-progress */
export async function markingProgressUsingGet({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.markingProgressUsingGetParams;
  options?: CustomRequestOptions;
}) {
  return request<
    API.Response & {
      data?: API.MarkingProgressResponse;
    }
  >('/marking-progress', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 导出阅卷进度 根据exam_subject_id导出阅卷进度Excel文件，包含学校、老师、已阅数、总任务数等详细信息 GET /marking-progress/export */
export async function markingProgressOpenApiExportUsingGet({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.markingProgressOpenApiExportUsingGetParams;
  options?: CustomRequestOptions;
}) {
  return request<
    API.Response & {
      data?: string;
    }
  >('/marking-progress/export', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 获取题目阅卷进度 根据question_id查询题目的阅卷进度，包括任务类型、学校、老师的阅卷情况 GET /marking-progress/question */
export async function markingProgressQuestionUsingGet({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.markingProgressQuestionUsingGetParams;
  options?: CustomRequestOptions;
}) {
  return request<
    API.Response & {
      data?: API.QuestionMarkingProgressResponse;
    }
  >('/marking-progress/question', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 暂停阅卷 根据suspend_type和id暂停阅卷，更新exam_subject_answer_sheet_template_question表中的marking_status字段为suspend POST /marking-progress/suspend */
export async function markingProgressSuspendUsingPost({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.markingProgressSuspendUsingPostParams;
  options?: CustomRequestOptions;
}) {
  return request<
    API.Response & {
      data?: API.SuspendMarkingResponse;
    }
  >('/marking-progress/suspend', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}
