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

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

// --------------------------------------------------------------------------
// 监测年级管理服务
// --------------------------------------------------------------------------

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

/** 批量添加监测年级 POST /api/exam/grade/add-list */
export async function addList(data: API.AddExamGradeListInput, options?: { [key: string]: any }) {
    const url = '/api/exam/grade/add-list';
    const config = { method: 'POST', data, ...(options || {}) };
    const res = await request<API.ResponseType<any>>(url, config);
    return res?.data;
}

/** 移出监测年级 POST /api/exam/grade/remove */
export async function remove(data: API.DelExamGradeInput, options?: { [key: string]: any }) {
    const url = '/api/exam/grade/remove';
    const config = { method: 'POST', data, ...(options || {}) };
    const res = await request<API.ResponseType<any>>(url, config);
    return res?.data;
}

/** 保存监测年级设置 POST /api/exam/grade/save-setting */
export async function saveSetting(
    data: API.ExamGradeSettingInput,
    options?: { [key: string]: any },
) {
    const url = '/api/exam/grade/save-setting';
    const config = { method: 'POST', data, ...(options || {}) };
    const res = await request<API.ResponseType<any>>(url, config);
    return res?.data;
}

/** 根据ID获取监测年级 GET /api/exam/grade/get-by-id */
export async function getById(
    params: {
        /**  */
        id?: number;
    },
    options?: { [key: string]: any },
) {
    const url = '/api/exam/grade/get-by-id';
    const config = { method: 'GET', params, ...(options || {}) };
    const res = await request<API.ResponseType<API.ExamGradeOutput>>(url, config);
    return res?.data;
}

/** 根据监测计划ID获取全部监测年级 GET /api/exam/grade/get-list-by-exam-plan-id */
export async function getListByExamPlanId(
    params: {
        /**  */
        examplanid: number;
    },
    options?: { [key: string]: any },
) {
    const url = '/api/exam/grade/get-list-by-exam-plan-id';
    const config = { method: 'GET', params, ...(options || {}) };
    const res = await request<API.ResponseType<API.ExamGradeOutput[]>>(url, config);
    return res?.data;
}

export default {
    /** 批量添加监测年级 POST /api/exam/grade/add-list */
    addList,
    /** 移出监测年级 POST /api/exam/grade/remove */
    remove,
    /** 保存监测年级设置 POST /api/exam/grade/save-setting */
    saveSetting,
    /** 根据ID获取监测年级 GET /api/exam/grade/get-by-id */
    getById,
    /** 根据监测计划ID获取全部监测年级 GET /api/exam/grade/get-list-by-exam-plan-id */
    getListByExamPlanId,
};
