// @ts-ignore
/* eslint-disable */
import request from "../request";

/** 对账完成 POST /operation/completeReconciliation */
export async function completeReconciliation(
  body: BusinessAPI.ReconciliationCompleteCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseReconciliationVO>(
    "/operation/completeReconciliation",
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 创建对账 POST /operation/createReconciliation */
export async function createReconciliation(
  body: BusinessAPI.ReconciliationCreateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseReconciliationVO>(
    "/operation/createReconciliation",
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 对账删除 DELETE /operation/destroyReconciliation */
export async function destroyReconciliation(
  body: BusinessAPI.ReconciliationDestroyCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.Response>("/operation/destroyReconciliation", {
    method: "DELETE",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 对账列表 GET /operation/listReconciliation */
export async function listReconciliation(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.listReconciliationParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.MultiResponseReconciliationVO>(
    "/operation/listReconciliation",
    {
      method: "GET",
      params: {
        ...params,
        reconciliationListQry: undefined,
        ...params["reconciliationListQry"],
      },
      ...(options || {}),
    },
  );
}

/** 对账列表 GET /operation/pageReconciliation */
export async function pageReconciliation(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.pageReconciliationParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.PageResponseReconciliationVO>(
    "/operation/pageReconciliation",
    {
      method: "GET",
      params: {
        ...params,
        reconciliationPageQry: undefined,
        ...params["reconciliationPageQry"],
      },
      ...(options || {}),
    },
  );
}

/** 对账详情 GET /operation/showReconciliation */
export async function showReconciliation(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.showReconciliationParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseReconciliationVO>(
    "/operation/showReconciliation",
    {
      method: "GET",
      params: {
        ...params,
        reconciliationShowQry: undefined,
        ...params["reconciliationShowQry"],
      },
      ...(options || {}),
    },
  );
}

/** 对账更新 PUT /operation/updateReconciliation */
export async function updateReconciliation(
  body: BusinessAPI.ReconciliationUpdateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseReconciliationVO>(
    "/operation/updateReconciliation",
    {
      method: "PUT",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 对账更新 PATCH /operation/updateReconciliation */
export async function updateReconciliation1(
  body: BusinessAPI.ReconciliationUpdateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseReconciliationVO>(
    "/operation/updateReconciliation",
    {
      method: "PATCH",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}
