diff --git a/src/services/api/services/FileService.ts b/src/services/api/services/FileService.ts index cd51ab2..7d591b5 100644 --- a/src/services/api/services/FileService.ts +++ b/src/services/api/services/FileService.ts @@ -51,7 +51,7 @@ companyName?: string, fileName?: string, begin?: string, end?: string, -skip?: number, +skip: number = 0, take: number = 32, ): Promise { const result = await __request({ diff --git a/src/services/api/services/WellOperationService.ts b/src/services/api/services/WellOperationService.ts index 0fdbd49..dccf339 100644 --- a/src/services/api/services/WellOperationService.ts +++ b/src/services/api/services/WellOperationService.ts @@ -48,7 +48,7 @@ begin?: string, end?: string, minDepth: number = -1.7976931348623157e+308, maxDepth: number = 1.7976931348623157e+308, -skip?: number, +skip: number = 0, take: number = 32, ): Promise { const result = await __request({ @@ -145,4 +145,60 @@ idOperation: number, return result.body; } + /** + * Импортирует операции из excel (xlsx) файла + * @param idWell id скважины + * @param deleteWellOperationsBeforeImport Удалить операции перед импортом, если фал валидный + * @param requestBody + * @returns any Success + * @throws ApiError + */ + public static async import( +idWell: number, +deleteWellOperationsBeforeImport: boolean = false, +requestBody?: any, +): Promise { + const result = await __request({ + method: 'POST', + path: `/api/well/${idWell}/wellOperations/import`, + query: { + 'deleteWellOperationsBeforeImport': deleteWellOperationsBeforeImport, + }, + body: requestBody, + }); + return result.body; + } + + /** + * Создает excel файл с операциями по скважине + * @param idWell id скважины + * @returns string Success + * @throws ApiError + */ + public static async export( +idWell: number, +): Promise { + const result = await __request({ + method: 'GET', + path: `/api/well/${idWell}/wellOperations/export`, + }); + return result.body; + } + + /** + * Возвращает шаблон файла импорта + * @param idWell + * @returns string Success + * @throws ApiError + */ + public static async getTamplate( +idWell: string, +): Promise { + const result = await __request({ + method: 'GET', + path: `/api/well/${idWell}/wellOperations/tamplate`, + }); + return result.body; + } + } \ No newline at end of file