From 1cda800f18f4edd6428d9668aab4dafba27c7595 Mon Sep 17 00:00:00 2001 From: KharchenkoVV Date: Tue, 5 Oct 2021 15:20:42 +0500 Subject: [PATCH] Api refresh --- src/services/api/models/MessageDto.ts | 1 + .../api/services/AdminTelemetryService.ts | 29 +++++++++++++++++++ src/services/api/services/FileService.ts | 2 +- src/services/api/services/MeasureService.ts | 2 +- src/services/api/services/TelemetryService.ts | 1 + .../api/services/WellOperationService.ts | 2 +- 6 files changed, 34 insertions(+), 3 deletions(-) diff --git a/src/services/api/models/MessageDto.ts b/src/services/api/models/MessageDto.ts index cfc6c95..1c5001b 100644 --- a/src/services/api/models/MessageDto.ts +++ b/src/services/api/models/MessageDto.ts @@ -6,6 +6,7 @@ export type MessageDto = { id?: number; date?: string; categoryId?: number; + wellDepth?: number; user?: string | null; message?: string | null; } \ No newline at end of file diff --git a/src/services/api/services/AdminTelemetryService.ts b/src/services/api/services/AdminTelemetryService.ts index a92eff4..18b0dd9 100644 --- a/src/services/api/services/AdminTelemetryService.ts +++ b/src/services/api/services/AdminTelemetryService.ts @@ -6,6 +6,35 @@ import { request as __request } from '../core/request'; export class AdminTelemetryService { + /** + * @returns any Success + * @throws ApiError + */ + public static async getRedundentRemoteUids(): Promise { + const result = await __request({ + method: 'GET', + path: `/reduntentUids`, + }); + return result.body; + } + + /** + * merge telemetries + * @param requestBody array of ids + * @returns any Success + * @throws ApiError + */ + public static async mergeTelemetries( +requestBody?: Array, +): Promise { + const result = await __request({ + method: 'POST', + path: `/merge`, + body: requestBody, + }); + return result.body; + } + /** * Получить страницу с записями в PaginationContainer * @param skip пропустить skip записей diff --git a/src/services/api/services/FileService.ts b/src/services/api/services/FileService.ts index 7d591b5..cd51ab2 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 = 0, +skip?: number, take: number = 32, ): Promise { const result = await __request({ diff --git a/src/services/api/services/MeasureService.ts b/src/services/api/services/MeasureService.ts index 9d086fb..b0d4c26 100644 --- a/src/services/api/services/MeasureService.ts +++ b/src/services/api/services/MeasureService.ts @@ -65,7 +65,7 @@ idCategory: number, ): Promise { const result = await __request({ method: 'GET', - path: `/api/well/${idWell}/measure/history/${idCategory}`, + path: `/api/well/${idWell}/measure/history`, }); return result.body; } diff --git a/src/services/api/services/TelemetryService.ts b/src/services/api/services/TelemetryService.ts index 5e0ca30..98b3bbc 100644 --- a/src/services/api/services/TelemetryService.ts +++ b/src/services/api/services/TelemetryService.ts @@ -30,6 +30,7 @@ requestBody?: TelemetryInfoDto, } /** + * @deprecated * Принимает данные от разных систем по скважине * @param uid Уникальный идентификатор отправителя * @param requestBody Данные diff --git a/src/services/api/services/WellOperationService.ts b/src/services/api/services/WellOperationService.ts index 3215e56..0fdbd49 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 = 0, +skip?: number, take: number = 32, ): Promise { const result = await __request({