From e64092881cf829f965305092d655e2f37fcee482 Mon Sep 17 00:00:00 2001 From: goodmice Date: Wed, 13 Oct 2021 16:30:45 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=B5=D1=80=D0=B2=D0=B8=D1=81=D1=8B=20?= =?UTF-8?q?=D0=BE=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5=D0=BD=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/services/DrillParamsService.ts | 42 +++++++++++++++++-- .../api/services/WellOperationStatService.ts | 26 +++++++++++- 2 files changed, 62 insertions(+), 6 deletions(-) diff --git a/src/services/api/services/DrillParamsService.ts b/src/services/api/services/DrillParamsService.ts index 9c1cfd2..a7d0b09 100644 --- a/src/services/api/services/DrillParamsService.ts +++ b/src/services/api/services/DrillParamsService.ts @@ -15,15 +15,14 @@ export class DrillParamsService { * @throws ApiError */ public static async getDefault( - idWell?: number, + idWell: number, startDepth?: number, endDepth?: number, ): Promise { const result = await __request({ method: 'GET', - path: `/autoParams`, + path: `/api/drillParams/${idWell}/autoParams`, query: { - 'idWell': idWell, 'startDepth': startDepth, 'endDepth': endDepth, }, @@ -54,7 +53,7 @@ export class DrillParamsService { * @returns number Success * @throws ApiError */ - public static async save( + public static async insert( idWell: number, requestBody?: DrillParamsDto, ): Promise { @@ -106,4 +105,39 @@ export class DrillParamsService { return result.body; } + /** + * Добавляет массив объектов режимов бурений + * @param idWell id скважины + * @param requestBody Массив объектов параметров режима бурений для секции + * @returns number Success + * @throws ApiError + */ + public static async insertRange( + idWell: number, + requestBody?: Array, + ): Promise { + const result = await __request({ + method: 'POST', + path: `/api/drillParams/${idWell}/range`, + body: requestBody, + }); + return result.body; + } + + /** + * Возвращает значения для режимов бурения на композитной скважине + * @param idWell id скважины + * @returns DrillParamsDto Success + * @throws ApiError + */ + public static async getCompositeAll( + idWell: number, + ): Promise> { + const result = await __request({ + method: 'GET', + path: `/api/drillParams/${idWell}/composite`, + }); + return result.body; + } + } \ No newline at end of file diff --git a/src/services/api/services/WellOperationStatService.ts b/src/services/api/services/WellOperationStatService.ts index e7e0275..6019a8d 100644 --- a/src/services/api/services/WellOperationStatService.ts +++ b/src/services/api/services/WellOperationStatService.ts @@ -9,7 +9,8 @@ import { request as __request } from '../core/request'; export class WellOperationStatService { /** - * @param idCluster + * Получает статстику по скважинам куста + * @param idCluster id куста * @returns StatClusterDto Success * @throws ApiError */ @@ -24,7 +25,27 @@ export class WellOperationStatService { } /** - * @param idWell + * Получает статстику по списку скважин + * @param idWells список скважин + * @returns StatWellDto Success + * @throws ApiError + */ + public static async getWellsStat( + idWells?: Array, + ): Promise> { + const result = await __request({ + method: 'GET', + path: `/api/wellsStats`, + query: { + 'idWells': idWells, + }, + }); + return result.body; + } + + /** + * Получает статистику по скважине + * @param idWell id скважины * @returns StatWellDto Success * @throws ApiError */ @@ -39,6 +60,7 @@ export class WellOperationStatService { } /** + * Получает данные для графика глубина-днь * @param idWell * @returns WellOperationDtoPlanFactPredictBase Success * @throws ApiError