// @ts-ignore
/* eslint-disable */

// 该文件自动生成，请勿手动修改！

// --------------------------------------------------------------------------
// 校考成绩上报管理服务
// --------------------------------------------------------------------------

import { request } from '@umijs/max';

/** 上传校考成绩 POST /api/exam/org/score/report/upload */
export async function upload(data: FormData, options?: { [key: string]: any }) {
    const url = '/api/exam/org/score/report/upload';
    const config = { method: 'POST', data, ...(options || {}) };
    const res = await request<API.ResponseType<API.UploadExamOrgScoreReportOutput>>(url, config);
    return res?.data;
}

/** 查询某科目校考成绩上报数据 POST /api/exam/org/score/report/query-one */
export async function queryOne(
    data: API.QueryExamOrgScoreReportInput,
    options?: { [key: string]: any },
) {
    const url = '/api/exam/org/score/report/query-one';
    const config = { method: 'POST', data, ...(options || {}) };
    const res = await request<API.ResponseType<API.ExamOrgScoreReportOutput>>(url, config);
    return res?.data;
}

/** 获取机构校考上报明细列表 GET /api/exam/org/score/report/get-list-by-exam-plan-id */
export async function getListByExamPlanId(
    params: {
        /**  */
        examplanid?: number;
    },
    options?: { [key: string]: any },
) {
    const url = '/api/exam/org/score/report/get-list-by-exam-plan-id';
    const config = { method: 'GET', params, ...(options || {}) };
    const res = await request<API.ResponseType<API.ExamOrgScoreReportItem[]>>(url, config);
    return res?.data;
}

/** 合并学校上报小题分 POST /api/exam/org/score/report/merge-minor-score */
export async function mergeMinorScore(
    params: {
        /**  */
        examplanid?: number;
    },
    options?: { [key: string]: any },
) {
    const url = '/api/exam/org/score/report/merge-minor-score';
    const config = { method: 'POST', params, ...(options || {}) };
    const res = await request<API.ResponseType<API.IActionResult>>(url, config);
    return res?.data;
}

export default {
    /** 上传校考成绩 POST /api/exam/org/score/report/upload */
    upload,
    /** 查询某科目校考成绩上报数据 POST /api/exam/org/score/report/query-one */
    queryOne,
    /** 获取机构校考上报明细列表 GET /api/exam/org/score/report/get-list-by-exam-plan-id */
    getListByExamPlanId,
    /** 合并学校上报小题分 POST /api/exam/org/score/report/merge-minor-score */
    mergeMinorScore,
};
