import httpClient from '@/utils/http';

import {
  AnswerSheetScanRecordModelPagingResultApiResult,
  AnswerSheetScanRecordSumaryModelListApiResult,
  AnswerSheetScanRecordTotalSumaryModelApiResult,
  AnswerSheetStatus,
  ApiResult,
  BatchOperationResponseApiResult,
  BatchReIdentificationRequest
} from './data-contracts';
export default {
  /**
   * No description
   */
  answerSheetScanRecordGetPagedRecordsList: (query: {
    /**
     * 学校ID
     * @format int32
     */
    SchoolId?: number;
    /**
     * 考试科目ID
     * @format int32
     */
    ExamSubjectId?: number;
    /** 扫描任务ID */
    ScanTaskId?: string;
    /** 答题卡状态 */
    Status?: AnswerSheetStatus;
    /** 关键词搜索 */
    Keywords?: string;
    /** @format int32 */
    Page?: number;
    /** @format int32 */
    PageSize?: number;
  }) => {
    return httpClient.get<AnswerSheetScanRecordModelPagingResultApiResult>(
      `/api/answerSheetScanRecord/getPagedRecords`,
      { query: query }
    );
  },
  /**
   * No description
   */
  answerSheetScanRecordGetBatchListList: (query: {
    /** @format int32 */
    schoolId?: number;
    /** @format int32 */
    examSubjectId?: number;
  }) => {
    return httpClient.get<AnswerSheetScanRecordSumaryModelListApiResult>(
      `/api/answerSheetScanRecord/getBatchList`,
      { query: query }
    );
  },
  /**
   * No description
   */
  answerSheetScanRecordBatchDeleteDelete: (
    query: {
      /** 扫描任务ID */
      scanTaskId?: string;
    },
    data: string[]
  ) => {
    return httpClient.delete<ApiResult>(`/api/answerSheetScanRecord/batchDelete`, {
      query: query,
      params: data
    });
  },
  /**
   * No description
   */
  answerSheetScanRecordGetLocalSumaryCountList: (query: {
    /**
     * 学校id
     * @format int32
     */
    shcoolId?: number;
    /**
     * 考试科目id
     * @format int32
     */
    examSubjectId?: number;
  }) => {
    return httpClient.get<AnswerSheetScanRecordTotalSumaryModelApiResult>(
      `/api/answerSheetScanRecord/getLocalSumaryCount`,
      { query: query }
    );
  },
  /**
   * No description
   */
  answerSheetScanRecordReIdentificationCreate: (data: BatchReIdentificationRequest) => {
    return httpClient.post<BatchOperationResponseApiResult>(
      `/api/answerSheetScanRecord/reIdentification`,
      { params: data }
    );
  }
};
