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

/** 创建费用项目 POST /operation/createCostItem */
export async function createCostItem(
	body: BusinessAPI.CostItemCreateCmd,
	options?: { [key: string]: any },
) {
	return request<BusinessAPI.SingleResponseCostItemVO>(
		'/operation/createCostItem',
		{
			method: 'POST',
			headers: {
				'Content-Type': 'application/json',
			},
			data: body,
			...(options || {}),
		},
	);
}

/** 费用项目删除 DELETE /operation/destroyCostItem */
export async function destroyCostItem(
	body: BusinessAPI.CostItemDestroyCmd,
	options?: { [key: string]: any },
) {
	return request<BusinessAPI.Response>('/operation/destroyCostItem', {
		method: 'DELETE',
		headers: {
			'Content-Type': 'application/json',
		},
		data: body,
		...(options || {}),
	});
}

/** 费用项目拖拽排序 PUT /operation/dragCostItem */
export async function dragCostItem(
	body: BusinessAPI.CostItemDragCmd,
	options?: { [key: string]: any },
) {
	return request<BusinessAPI.Response>('/operation/dragCostItem', {
		method: 'PUT',
		headers: {
			'Content-Type': 'application/json',
		},
		data: body,
		...(options || {}),
	});
}

/** 费用项目拖拽排序 PATCH /operation/dragCostItem */
export async function dragCostItem1(
	body: BusinessAPI.CostItemDragCmd,
	options?: { [key: string]: any },
) {
	return request<BusinessAPI.Response>('/operation/dragCostItem', {
		method: 'PATCH',
		headers: {
			'Content-Type': 'application/json',
		},
		data: body,
		...(options || {}),
	});
}

/** 费用项目列表 GET /operation/listCostItem */
export async function listCostItem(
	// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
	params: BusinessAPI.listCostItemParams,
	options?: { [key: string]: any },
) {
	return request<BusinessAPI.MultiResponseCostItemVO>(
		'/operation/listCostItem',
		{
			method: 'GET',
			params: {
				...params,
				costItemListQry: undefined,
				...params['costItemListQry'],
			},
			...(options || {}),
		},
	);
}

/** 费用项目列表 GET /operation/pageCostItem */
export async function pageCostItem(
	// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
	params: BusinessAPI.pageCostItemParams,
	options?: { [key: string]: any },
) {
	return request<BusinessAPI.PageResponseCostItemVO>(
		'/operation/pageCostItem',
		{
			method: 'GET',
			params: {
				...params,
				costItemPageQry: undefined,
				...params['costItemPageQry'],
			},
			...(options || {}),
		},
	);
}

/** 费用项目详情 GET /operation/showCostItem */
export async function showCostItem(
	// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
	params: BusinessAPI.showCostItemParams,
	options?: { [key: string]: any },
) {
	return request<BusinessAPI.SingleResponseCostItemVO>(
		'/operation/showCostItem',
		{
			method: 'GET',
			params: {
				...params,
				costItemShowQry: undefined,
				...params['costItemShowQry'],
			},
			...(options || {}),
		},
	);
}

/** 费用项目更新 PUT /operation/updateCostItem */
export async function updateCostItem(
	body: BusinessAPI.CostItemUpdateCmd,
	options?: { [key: string]: any },
) {
	return request<BusinessAPI.SingleResponseCostItemVO>(
		'/operation/updateCostItem',
		{
			method: 'PUT',
			headers: {
				'Content-Type': 'application/json',
			},
			data: body,
			...(options || {}),
		},
	);
}

/** 费用项目更新 PATCH /operation/updateCostItem */
export async function updateCostItem1(
	body: BusinessAPI.CostItemUpdateCmd,
	options?: { [key: string]: any },
) {
	return request<BusinessAPI.SingleResponseCostItemVO>(
		'/operation/updateCostItem',
		{
			method: 'PATCH',
			headers: {
				'Content-Type': 'application/json',
			},
			data: body,
			...(options || {}),
		},
	);
}
