diff --git a/src/services/api/index.ts b/src/services/api/index.ts index 92aad3d..22666fb 100644 --- a/src/services/api/index.ts +++ b/src/services/api/index.ts @@ -9,7 +9,7 @@ export type { ClusterDto } from './models/ClusterDto'; export type { CompanyDto } from './models/CompanyDto'; export type { DatesRangeDto } from './models/DatesRangeDto'; export type { DepositDto } from './models/DepositDto'; -export type { DrillFlowChartParamsDto } from './models/DrillFlowChartParamsDto'; +export type { DrillFlowChartDto } from './models/DrillFlowChartDto'; export type { DrillParamsDto } from './models/DrillParamsDto'; export type { EventDto } from './models/EventDto'; export type { FileInfoDto } from './models/FileInfoDto'; diff --git a/src/services/api/models/DrillFlowChartParamsDto.ts b/src/services/api/models/DrillFlowChartDto.ts similarity index 91% rename from src/services/api/models/DrillFlowChartParamsDto.ts rename to src/services/api/models/DrillFlowChartDto.ts index 9f94708..11e104c 100644 --- a/src/services/api/models/DrillFlowChartParamsDto.ts +++ b/src/services/api/models/DrillFlowChartDto.ts @@ -2,7 +2,7 @@ /* tslint:disable */ /* eslint-disable */ -export type DrillFlowChartParamsDto = { +export type DrillFlowChartDto = { id?: number; idWell?: number; lastUpdate?: string; diff --git a/src/services/api/services/DepositService.ts b/src/services/api/services/DepositService.ts index ed5f426..2bfdce1 100644 --- a/src/services/api/services/DepositService.ts +++ b/src/services/api/services/DepositService.ts @@ -20,6 +20,19 @@ export class DepositService { return result.body; } + /** + * Получает список доступных пользователю месторождений (только скважины с параметрами бурения) + * @returns DepositDto Success + * @throws ApiError + */ + public static async getDepositsDrillParams(): Promise> { + const result = await __request({ + method: 'GET', + path: `/api/deposit/drillParamsWells`, + }); + return result.body; + } + /** * Получает список доступных пользователю кустов месторождения * @param depositId diff --git a/src/services/api/services/DrillFlowChartService.ts b/src/services/api/services/DrillFlowChartService.ts index 057efd7..13da462 100644 --- a/src/services/api/services/DrillFlowChartService.ts +++ b/src/services/api/services/DrillFlowChartService.ts @@ -1,7 +1,7 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { DrillFlowChartParamsDto } from '../models/DrillFlowChartParamsDto'; +import type { DrillFlowChartDto } from '../models/DrillFlowChartDto'; import { request as __request } from '../core/request'; export class DrillFlowChartService { @@ -9,35 +9,19 @@ export class DrillFlowChartService { /** * Возвращает все значения для корридоров бурения по id скважины * @param idWell id скважины - * @returns DrillFlowChartParamsDto Success + * @param updateFrom Дата, с которой следует искать новые параметры + * @returns DrillFlowChartDto Success * @throws ApiError */ - public static async getAll( + public static async get( idWell: number, - ): Promise> { + updateFrom?: string, + ): Promise> { const result = await __request({ method: 'GET', - path: `/api/drillFlowChartParams/${idWell}/paramsByIdWell`, - }); - return result.body; - } - - /** - * Возвращает все значения для корридоров бурения по uid панели - * @param idWell - * @param uid uid панели - * @returns DrillFlowChartParamsDto Success - * @throws ApiError - */ - public static async getAll1( - idWell: string, - uid?: string, - ): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/drillFlowChartParams/${idWell}`, + path: `/api/well/${idWell}/drillFlowChart`, query: { - 'uid': uid, + 'updateFrom': updateFrom, }, }); return result.body; @@ -52,11 +36,11 @@ export class DrillFlowChartService { */ public static async insert( idWell: number, - requestBody?: DrillFlowChartParamsDto, + requestBody?: DrillFlowChartDto, ): Promise { const result = await __request({ method: 'POST', - path: `/api/drillFlowChartParams/${idWell}`, + path: `/api/well/${idWell}/drillFlowChart`, body: requestBody, }); return result.body; @@ -71,11 +55,11 @@ export class DrillFlowChartService { */ public static async edit( idWell: number, - requestBody?: DrillFlowChartParamsDto, + requestBody?: DrillFlowChartDto, ): Promise { const result = await __request({ method: 'PUT', - path: `/api/drillFlowChartParams/${idWell}`, + path: `/api/well/${idWell}/drillFlowChart`, body: requestBody, }); return result.body; @@ -94,7 +78,7 @@ export class DrillFlowChartService { ): Promise { const result = await __request({ method: 'DELETE', - path: `/api/drillFlowChartParams/${idWell}`, + path: `/api/well/${idWell}/drillFlowChart`, query: { 'drillFlowChartParamsId': drillFlowChartParamsId, }, @@ -102,6 +86,27 @@ export class DrillFlowChartService { return result.body; } + /** + * Возвращает все значения для корридоров бурения по uid панели + * @param uid uid панели + * @param updateFrom Дата, с которой следует искать новые параметры + * @returns DrillFlowChartDto Success + * @throws ApiError + */ + public static async getByTelemetry( + uid: string, + updateFrom?: string, + ): Promise> { + const result = await __request({ + method: 'GET', + path: `/api/telemetry/${uid}/drillFlowChart`, + query: { + 'updateFrom': updateFrom, + }, + }); + return result.body; + } + /** * Добавляет массив объектов корридоров бурения * @param idWell id скважины @@ -111,11 +116,11 @@ export class DrillFlowChartService { */ public static async insertRange( idWell: number, - requestBody?: Array, + requestBody?: Array, ): Promise { const result = await __request({ method: 'POST', - path: `/api/drillFlowChartParams/${idWell}/range`, + path: `/api/well/${idWell}/drillFlowChart/range`, body: requestBody, }); return result.body; diff --git a/src/services/api/services/DrillParamsService.ts b/src/services/api/services/DrillParamsService.ts index 3b1539a..001b630 100644 --- a/src/services/api/services/DrillParamsService.ts +++ b/src/services/api/services/DrillParamsService.ts @@ -21,7 +21,7 @@ export class DrillParamsService { ): Promise { const result = await __request({ method: 'GET', - path: `/api/drillParams/${idWell}/autoParams`, + path: `/api/well/${idWell}/drillParams/autoParams`, query: { 'startDepth': startDepth, 'endDepth': endDepth, @@ -41,7 +41,7 @@ export class DrillParamsService { ): Promise> { const result = await __request({ method: 'GET', - path: `/api/drillParams/${idWell}`, + path: `/api/well/${idWell}/drillParams`, }); return result.body; } @@ -59,7 +59,7 @@ export class DrillParamsService { ): Promise { const result = await __request({ method: 'POST', - path: `/api/drillParams/${idWell}`, + path: `/api/well/${idWell}/drillParams`, body: requestBody, }); return result.body; @@ -80,7 +80,7 @@ export class DrillParamsService { ): Promise { const result = await __request({ method: 'PUT', - path: `/api/drillParams/${idWell}`, + path: `/api/well/${idWell}/drillParams`, query: { 'dtoId': dtoId, }, @@ -102,7 +102,7 @@ export class DrillParamsService { ): Promise { const result = await __request({ method: 'DELETE', - path: `/api/drillParams/${idWell}`, + path: `/api/well/${idWell}/drillParams`, query: { 'drillParamsId': drillParamsId, }, @@ -123,7 +123,7 @@ export class DrillParamsService { ): Promise { const result = await __request({ method: 'POST', - path: `/api/drillParams/${idWell}/range`, + path: `/api/well/${idWell}/drillParams/range`, body: requestBody, }); return result.body; @@ -140,7 +140,7 @@ export class DrillParamsService { ): Promise> { const result = await __request({ method: 'GET', - path: `/api/drillParams/${idWell}/composite`, + path: `/api/well/${idWell}/drillParams/composite`, }); return result.body; }