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

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

// --------------------------------------------------------------------------
// 被监测机构管理服务
// --------------------------------------------------------------------------

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

/** 添加机构 POST /api/exam/org/add-list */
export async function addList(data: API.AddExamOrgListInput, options?: { [key: string]: any }) {
    const url = '/api/exam/org/add-list';
    const config = { method: 'POST', data, ...(options || {}) };
    const res = await request<API.ResponseType<any>>(url, config);
    return res?.data;
}

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

/** 切换机构是否参与区统一监测 POST /api/exam/org/switch-required-sample */
export async function switchRequiredSample(
    data: API.SwitchExamOrgRequiredSampleInput,
    options?: { [key: string]: any },
) {
    const url = '/api/exam/org/switch-required-sample';
    const config = { method: 'POST', data, ...(options || {}) };
    const res = await request<API.ResponseType<any>>(url, config);
    return res?.data;
}

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

/** 分页查询监测机构列表 POST /api/exam/org/query-page-list */
export async function queryPageList(data: API.ExamOrgPageInput, options?: { [key: string]: any }) {
    const url = '/api/exam/org/query-page-list';
    const config = { method: 'POST', data, ...(options || {}) };
    const res = await request<API.ResponseType<API.PageResponse<API.ExamOrgOutput>>>(url, config);
    return res?.data;
}

/** 分页查询未加入的机构 POST /api/exam/org/query-not-in-sys-org-page-list */
export async function queryNotInSysOrgPageList(
    data: API.ExamOrgNotInPageInput,
    options?: { [key: string]: any },
) {
    const url = '/api/exam/org/query-not-in-sys-org-page-list';
    const config = { method: 'POST', data, ...(options || {}) };
    const res = await request<API.ResponseType<API.PageResponse<API.SysOrgLiteOutput>>>(
        url,
        config,
    );
    return res?.data;
}

/** 分页查询机构监测计划列表 POST /api/exam/org/query-exam-plan-page-list */
export async function queryExamPlanPageList(
    data: API.ExamPlanPageInput,
    options?: { [key: string]: any },
) {
    const url = '/api/exam/org/query-exam-plan-page-list';
    const config = { method: 'POST', data, ...(options || {}) };
    const res = await request<API.ResponseType<API.PageResponse<API.ExamPlanOutput>>>(url, config);
    return res?.data;
}

export default {
    /** 添加机构 POST /api/exam/org/add-list */
    addList,
    /** 移出机构 POST /api/exam/org/remove */
    remove,
    /** 切换机构是否参与区统一监测 POST /api/exam/org/switch-required-sample */
    switchRequiredSample,
    /** 根据监测计划ID获取监测机构列表 GET /api/exam/org/get-list-by-exam-plan-id */
    getListByExamPlanId,
    /** 分页查询监测机构列表 POST /api/exam/org/query-page-list */
    queryPageList,
    /** 分页查询未加入的机构 POST /api/exam/org/query-not-in-sys-org-page-list */
    queryNotInSysOrgPageList,
    /** 分页查询机构监测计划列表 POST /api/exam/org/query-exam-plan-page-list */
    queryExamPlanPageList,
};
