From a22bfcbb1f951036af80e6c3694597df139e7d9a Mon Sep 17 00:00:00 2001 From: goodmice Date: Tue, 12 Oct 2021 10:39:56 +0500 Subject: [PATCH] API updated --- src/services/api/index.ts | 3 +- src/services/api/models/AuthDto.ts | 2 +- src/services/api/models/ClusterDto.ts | 2 +- src/services/api/models/CompanyDto.ts | 2 +- src/services/api/models/DatesRangeDto.ts | 2 +- src/services/api/models/DepositDto.ts | 2 +- src/services/api/models/DrillParamsDto.ts | 26 ++++ src/services/api/models/EventDto.ts | 2 +- src/services/api/models/FileInfoDto.ts | 2 +- .../models/FileInfoDtoPaginationContainer.ts | 2 +- src/services/api/models/MeasureDto.ts | 2 +- src/services/api/models/MessageDto.ts | 3 +- .../models/MessageDtoPaginationContainer.ts | 2 +- src/services/api/models/StatClusterDto.ts | 2 +- src/services/api/models/StatOperationsDto.ts | 2 +- .../models/StatOperationsDtoPlanFactBase.ts | 2 +- src/services/api/models/StatSectionDto.ts | 2 +- src/services/api/models/StatWellDto.ts | 2 +- .../api/models/TelemetryDataSaubDto.ts | 2 +- .../api/models/TelemetryDataSpinDto.ts | 2 +- src/services/api/models/TelemetryDto.ts | 2 +- src/services/api/models/TelemetryInfoDto.ts | 2 +- .../api/models/TelemetryMessageDto.ts | 2 +- .../api/models/TelemetryOperationDto.ts | 2 +- ...elemetryOperationDtoPaginationContainer.ts | 2 +- .../models/TelemetryOperationDurationDto.ts | 2 +- src/services/api/models/TelemetryUserDto.ts | 2 +- src/services/api/models/UserDto.ts | 2 +- src/services/api/models/UserRoleDto.ts | 2 +- src/services/api/models/UserTokenDto.ts | 2 +- src/services/api/models/WellDepthToDayDto.ts | 2 +- .../api/models/WellDepthToIntervalDto.ts | 2 +- src/services/api/models/WellDto.ts | 2 +- .../api/models/WellOperationCategoryDto.ts | 2 +- src/services/api/models/WellOperationDto.ts | 7 +- .../WellOperationDtoPaginationContainer.ts | 2 +- .../WellOperationDtoPlanFactPredictBase.ts | 2 +- .../api/services/AdminClusterService.ts | 24 ++-- .../api/services/AdminCompanyService.ts | 24 ++-- .../api/services/AdminDepositService.ts | 24 ++-- .../api/services/AdminTelemetryService.ts | 53 +++++++-- .../api/services/AdminUserRoleService.ts | 24 ++-- src/services/api/services/AdminUserService.ts | 24 ++-- src/services/api/services/AdminWellService.ts | 24 ++-- src/services/api/services/AuthService.ts | 22 ++-- src/services/api/services/ClusterService.ts | 6 +- src/services/api/services/DataService.ts | 54 --------- src/services/api/services/DepositService.ts | 6 +- .../api/services/DrillParamsService.ts | 56 +++++++++ .../api/services/DrillingProgramService.ts | 6 +- src/services/api/services/FileService.ts | 46 ++++---- src/services/api/services/MeasureService.ts | 64 +++++----- src/services/api/services/MessageService.ts | 20 ++-- src/services/api/services/ReportService.ts | 46 ++++---- .../api/services/TelemetryAnalyticsService.ts | 46 ++++---- .../api/services/TelemetryDataSaubService.ts | 22 ++-- .../api/services/TelemetryDataSpinService.ts | 22 ++-- src/services/api/services/TelemetryService.ts | 31 ++--- .../api/services/WellOperationService.ts | 111 +++++++++++++----- .../api/services/WellOperationStatService.ts | 18 +-- src/services/api/services/WellService.ts | 16 --- 61 files changed, 496 insertions(+), 398 deletions(-) create mode 100644 src/services/api/models/DrillParamsDto.ts delete mode 100644 src/services/api/services/DataService.ts create mode 100644 src/services/api/services/DrillParamsService.ts diff --git a/src/services/api/index.ts b/src/services/api/index.ts index 9c0ecd8..8ea0eaf 100644 --- a/src/services/api/index.ts +++ b/src/services/api/index.ts @@ -9,6 +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 { DrillParamsDto } from './models/DrillParamsDto'; export type { EventDto } from './models/EventDto'; export type { FileInfoDto } from './models/FileInfoDto'; export type { FileInfoDtoPaginationContainer } from './models/FileInfoDtoPaginationContainer'; @@ -49,9 +50,9 @@ export { AdminUserService } from './services/AdminUserService'; export { AdminWellService } from './services/AdminWellService'; export { AuthService } from './services/AuthService'; export { ClusterService } from './services/ClusterService'; -export { DataService } from './services/DataService'; export { DepositService } from './services/DepositService'; export { DrillingProgramService } from './services/DrillingProgramService'; +export { DrillParamsService } from './services/DrillParamsService'; export { FileService } from './services/FileService'; export { MeasureService } from './services/MeasureService'; export { MessageService } from './services/MessageService'; diff --git a/src/services/api/models/AuthDto.ts b/src/services/api/models/AuthDto.ts index a8317bf..bd6f347 100644 --- a/src/services/api/models/AuthDto.ts +++ b/src/services/api/models/AuthDto.ts @@ -5,4 +5,4 @@ export type AuthDto = { login?: string | null; password?: string | null; -} \ No newline at end of file +} diff --git a/src/services/api/models/ClusterDto.ts b/src/services/api/models/ClusterDto.ts index ec20834..226f3a0 100644 --- a/src/services/api/models/ClusterDto.ts +++ b/src/services/api/models/ClusterDto.ts @@ -11,4 +11,4 @@ export type ClusterDto = { latitude?: number | null; longitude?: number | null; wells?: Array | null; -} \ No newline at end of file +} diff --git a/src/services/api/models/CompanyDto.ts b/src/services/api/models/CompanyDto.ts index e532790..85fb2ad 100644 --- a/src/services/api/models/CompanyDto.ts +++ b/src/services/api/models/CompanyDto.ts @@ -6,4 +6,4 @@ export type CompanyDto = { id?: number; caption?: string | null; companyTypeCaption?: string | null; -} \ No newline at end of file +} diff --git a/src/services/api/models/DatesRangeDto.ts b/src/services/api/models/DatesRangeDto.ts index 1a9132f..acbe4e8 100644 --- a/src/services/api/models/DatesRangeDto.ts +++ b/src/services/api/models/DatesRangeDto.ts @@ -5,4 +5,4 @@ export type DatesRangeDto = { from?: string; to?: string; -} \ No newline at end of file +} diff --git a/src/services/api/models/DepositDto.ts b/src/services/api/models/DepositDto.ts index c142448..c57ae4a 100644 --- a/src/services/api/models/DepositDto.ts +++ b/src/services/api/models/DepositDto.ts @@ -11,4 +11,4 @@ export type DepositDto = { latitude?: number | null; longitude?: number | null; clusters?: Array | null; -} \ No newline at end of file +} diff --git a/src/services/api/models/DrillParamsDto.ts b/src/services/api/models/DrillParamsDto.ts new file mode 100644 index 0000000..24d5751 --- /dev/null +++ b/src/services/api/models/DrillParamsDto.ts @@ -0,0 +1,26 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type DrillParamsDto = { + id?: number; + idWell?: number; + wellSectionTypeName?: string | null; + depthStart?: number; + depthEnd?: number; + axialLoadMin?: number; + axialLoadAvg?: number; + axialLoadMax?: number; + pressureMin?: number; + pressureAvg?: number; + pressureMax?: number; + topDriveTorqueMin?: number; + topDriveTorqueAvg?: number; + topDriveTorqueMax?: number; + topDriveSpeedMin?: number; + topDriveSpeedAvg?: number; + topDriveSpeedMax?: number; + flowMin?: number; + flowAvg?: number; + flowMax?: number; +} diff --git a/src/services/api/models/EventDto.ts b/src/services/api/models/EventDto.ts index e4d90a1..e7e334b 100644 --- a/src/services/api/models/EventDto.ts +++ b/src/services/api/models/EventDto.ts @@ -9,4 +9,4 @@ export type EventDto = { tag?: string | null; eventType?: number; idSound?: number; -} \ No newline at end of file +} diff --git a/src/services/api/models/FileInfoDto.ts b/src/services/api/models/FileInfoDto.ts index c9cf4cd..d727028 100644 --- a/src/services/api/models/FileInfoDto.ts +++ b/src/services/api/models/FileInfoDto.ts @@ -13,4 +13,4 @@ export type FileInfoDto = { uploadDate?: string; size?: number; author?: UserDto; -} \ No newline at end of file +} diff --git a/src/services/api/models/FileInfoDtoPaginationContainer.ts b/src/services/api/models/FileInfoDtoPaginationContainer.ts index 6a8d883..7bf4f27 100644 --- a/src/services/api/models/FileInfoDtoPaginationContainer.ts +++ b/src/services/api/models/FileInfoDtoPaginationContainer.ts @@ -9,4 +9,4 @@ export type FileInfoDtoPaginationContainer = { take?: number; count?: number; items?: Array | null; -} \ No newline at end of file +} diff --git a/src/services/api/models/MeasureDto.ts b/src/services/api/models/MeasureDto.ts index dea91c6..5a846f9 100644 --- a/src/services/api/models/MeasureDto.ts +++ b/src/services/api/models/MeasureDto.ts @@ -9,4 +9,4 @@ export type MeasureDto = { categoryName?: string | null; timestamp?: string; data?: Record | null; -} \ No newline at end of file +} diff --git a/src/services/api/models/MessageDto.ts b/src/services/api/models/MessageDto.ts index cfc6c95..081e545 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/models/MessageDtoPaginationContainer.ts b/src/services/api/models/MessageDtoPaginationContainer.ts index 360fed6..e41bc14 100644 --- a/src/services/api/models/MessageDtoPaginationContainer.ts +++ b/src/services/api/models/MessageDtoPaginationContainer.ts @@ -9,4 +9,4 @@ export type MessageDtoPaginationContainer = { take?: number; count?: number; items?: Array | null; -} \ No newline at end of file +} diff --git a/src/services/api/models/StatClusterDto.ts b/src/services/api/models/StatClusterDto.ts index 8f18c1a..5bd051a 100644 --- a/src/services/api/models/StatClusterDto.ts +++ b/src/services/api/models/StatClusterDto.ts @@ -8,4 +8,4 @@ export type StatClusterDto = { id?: number; caption?: string | null; statsWells?: Array | null; -} \ No newline at end of file +} diff --git a/src/services/api/models/StatOperationsDto.ts b/src/services/api/models/StatOperationsDto.ts index 6941292..40c7510 100644 --- a/src/services/api/models/StatOperationsDto.ts +++ b/src/services/api/models/StatOperationsDto.ts @@ -13,4 +13,4 @@ export type StatOperationsDto = { bhaDownSpeed?: number; casingDownSpeed?: number; nonProductiveHours?: number; -} \ No newline at end of file +} diff --git a/src/services/api/models/StatOperationsDtoPlanFactBase.ts b/src/services/api/models/StatOperationsDtoPlanFactBase.ts index b15856d..cd15dfe 100644 --- a/src/services/api/models/StatOperationsDtoPlanFactBase.ts +++ b/src/services/api/models/StatOperationsDtoPlanFactBase.ts @@ -7,4 +7,4 @@ import type { StatOperationsDto } from './StatOperationsDto'; export type StatOperationsDtoPlanFactBase = { plan?: StatOperationsDto; fact?: StatOperationsDto; -} \ No newline at end of file +} diff --git a/src/services/api/models/StatSectionDto.ts b/src/services/api/models/StatSectionDto.ts index ec2edfe..934eb6d 100644 --- a/src/services/api/models/StatSectionDto.ts +++ b/src/services/api/models/StatSectionDto.ts @@ -9,4 +9,4 @@ export type StatSectionDto = { fact?: StatOperationsDto; id?: number; caption?: string | null; -} \ No newline at end of file +} diff --git a/src/services/api/models/StatWellDto.ts b/src/services/api/models/StatWellDto.ts index c197002..56eb1aa 100644 --- a/src/services/api/models/StatWellDto.ts +++ b/src/services/api/models/StatWellDto.ts @@ -13,4 +13,4 @@ export type StatWellDto = { sections?: Array | null; total?: StatOperationsDtoPlanFactBase; companies?: Array | null; -} \ No newline at end of file +} diff --git a/src/services/api/models/TelemetryDataSaubDto.ts b/src/services/api/models/TelemetryDataSaubDto.ts index c801502..91367bf 100644 --- a/src/services/api/models/TelemetryDataSaubDto.ts +++ b/src/services/api/models/TelemetryDataSaubDto.ts @@ -42,4 +42,4 @@ export type TelemetryDataSaubDto = { flowDeltaLimitMax?: number | null; idFeedRegulator?: number | null; mseState?: number | null; -} \ No newline at end of file +} diff --git a/src/services/api/models/TelemetryDataSpinDto.ts b/src/services/api/models/TelemetryDataSpinDto.ts index 8a88f08..169aa0f 100644 --- a/src/services/api/models/TelemetryDataSpinDto.ts +++ b/src/services/api/models/TelemetryDataSpinDto.ts @@ -69,4 +69,4 @@ export type TelemetryDataSpinDto = { pidMuxTorqueLeftLimit?: number | null; state?: number | null; breakAngleLeft?: number | null; -} \ No newline at end of file +} diff --git a/src/services/api/models/TelemetryDto.ts b/src/services/api/models/TelemetryDto.ts index a1eb21a..b152295 100644 --- a/src/services/api/models/TelemetryDto.ts +++ b/src/services/api/models/TelemetryDto.ts @@ -8,4 +8,4 @@ export type TelemetryDto = { id?: number; remoteUid?: string | null; info?: TelemetryInfoDto; -} \ No newline at end of file +} diff --git a/src/services/api/models/TelemetryInfoDto.ts b/src/services/api/models/TelemetryInfoDto.ts index 155e1c5..f5c5c09 100644 --- a/src/services/api/models/TelemetryInfoDto.ts +++ b/src/services/api/models/TelemetryInfoDto.ts @@ -13,4 +13,4 @@ export type TelemetryInfoDto = { hmiVersion?: string | null; plcVersion?: string | null; comment?: string | null; -} \ No newline at end of file +} diff --git a/src/services/api/models/TelemetryMessageDto.ts b/src/services/api/models/TelemetryMessageDto.ts index ea9f006..492da5c 100644 --- a/src/services/api/models/TelemetryMessageDto.ts +++ b/src/services/api/models/TelemetryMessageDto.ts @@ -12,4 +12,4 @@ export type TelemetryMessageDto = { arg1?: string | null; arg2?: string | null; arg3?: string | null; -} \ No newline at end of file +} diff --git a/src/services/api/models/TelemetryOperationDto.ts b/src/services/api/models/TelemetryOperationDto.ts index 97cb3b5..4b24faa 100644 --- a/src/services/api/models/TelemetryOperationDto.ts +++ b/src/services/api/models/TelemetryOperationDto.ts @@ -9,4 +9,4 @@ export type TelemetryOperationDto = { endDate?: string; startWellDepth?: number; endWellDepth?: number; -} \ No newline at end of file +} diff --git a/src/services/api/models/TelemetryOperationDtoPaginationContainer.ts b/src/services/api/models/TelemetryOperationDtoPaginationContainer.ts index d09351d..06d02c5 100644 --- a/src/services/api/models/TelemetryOperationDtoPaginationContainer.ts +++ b/src/services/api/models/TelemetryOperationDtoPaginationContainer.ts @@ -9,4 +9,4 @@ export type TelemetryOperationDtoPaginationContainer = { take?: number; count?: number; items?: Array | null; -} \ No newline at end of file +} diff --git a/src/services/api/models/TelemetryOperationDurationDto.ts b/src/services/api/models/TelemetryOperationDurationDto.ts index 361a705..dc090a7 100644 --- a/src/services/api/models/TelemetryOperationDurationDto.ts +++ b/src/services/api/models/TelemetryOperationDurationDto.ts @@ -5,4 +5,4 @@ export type TelemetryOperationDurationDto = { operationName?: string | null; duration?: number; -} \ No newline at end of file +} diff --git a/src/services/api/models/TelemetryUserDto.ts b/src/services/api/models/TelemetryUserDto.ts index 4bd727c..b4959fc 100644 --- a/src/services/api/models/TelemetryUserDto.ts +++ b/src/services/api/models/TelemetryUserDto.ts @@ -8,4 +8,4 @@ export type TelemetryUserDto = { surname?: string | null; patronymic?: string | null; level?: number; -} \ No newline at end of file +} diff --git a/src/services/api/models/UserDto.ts b/src/services/api/models/UserDto.ts index 8fad14a..c8761f9 100644 --- a/src/services/api/models/UserDto.ts +++ b/src/services/api/models/UserDto.ts @@ -15,4 +15,4 @@ export type UserDto = { idRole?: number | null; password?: string | null; company?: CompanyDto; -} \ No newline at end of file +} diff --git a/src/services/api/models/UserRoleDto.ts b/src/services/api/models/UserRoleDto.ts index ad7f1d2..c0810e1 100644 --- a/src/services/api/models/UserRoleDto.ts +++ b/src/services/api/models/UserRoleDto.ts @@ -8,4 +8,4 @@ export type UserRoleDto = { id?: number; caption?: string | null; users?: Array | null; -} \ No newline at end of file +} diff --git a/src/services/api/models/UserTokenDto.ts b/src/services/api/models/UserTokenDto.ts index 1439c28..6e3321d 100644 --- a/src/services/api/models/UserTokenDto.ts +++ b/src/services/api/models/UserTokenDto.ts @@ -12,4 +12,4 @@ export type UserTokenDto = { companyName?: string | null; roleName?: string | null; token?: string | null; -} \ No newline at end of file +} diff --git a/src/services/api/models/WellDepthToDayDto.ts b/src/services/api/models/WellDepthToDayDto.ts index 51cef5f..6db8d80 100644 --- a/src/services/api/models/WellDepthToDayDto.ts +++ b/src/services/api/models/WellDepthToDayDto.ts @@ -6,4 +6,4 @@ export type WellDepthToDayDto = { wellDepth?: number; bitDepth?: number; date?: string; -} \ No newline at end of file +} diff --git a/src/services/api/models/WellDepthToIntervalDto.ts b/src/services/api/models/WellDepthToIntervalDto.ts index a92c110..72d34a2 100644 --- a/src/services/api/models/WellDepthToIntervalDto.ts +++ b/src/services/api/models/WellDepthToIntervalDto.ts @@ -5,4 +5,4 @@ export type WellDepthToIntervalDto = { intervalStartDate?: string; intervalDepthProgress?: number; -} \ No newline at end of file +} diff --git a/src/services/api/models/WellDto.ts b/src/services/api/models/WellDto.ts index f14c472..0557855 100644 --- a/src/services/api/models/WellDto.ts +++ b/src/services/api/models/WellDto.ts @@ -13,4 +13,4 @@ export type WellDto = { longitude?: number | null; wellType?: string | null; telemetry?: TelemetryDto; -} \ No newline at end of file +} diff --git a/src/services/api/models/WellOperationCategoryDto.ts b/src/services/api/models/WellOperationCategoryDto.ts index 5581c68..b682abd 100644 --- a/src/services/api/models/WellOperationCategoryDto.ts +++ b/src/services/api/models/WellOperationCategoryDto.ts @@ -6,4 +6,4 @@ export type WellOperationCategoryDto = { id?: number; name?: string | null; code?: number; -} \ No newline at end of file +} diff --git a/src/services/api/models/WellOperationDto.ts b/src/services/api/models/WellOperationDto.ts index 473f2f5..7702acf 100644 --- a/src/services/api/models/WellOperationDto.ts +++ b/src/services/api/models/WellOperationDto.ts @@ -11,8 +11,9 @@ export type WellOperationDto = { categoryName?: string | null; categoryInfo?: string | null; idType?: number; - wellDepth?: number; - startDate?: string; + depthStart?: number; + depthEnd?: number; + dateStart?: string; durationHours?: number; comment?: string | null; -} \ No newline at end of file +} diff --git a/src/services/api/models/WellOperationDtoPaginationContainer.ts b/src/services/api/models/WellOperationDtoPaginationContainer.ts index 4dbd6b7..eaa7dc5 100644 --- a/src/services/api/models/WellOperationDtoPaginationContainer.ts +++ b/src/services/api/models/WellOperationDtoPaginationContainer.ts @@ -9,4 +9,4 @@ export type WellOperationDtoPaginationContainer = { take?: number; count?: number; items?: Array | null; -} \ No newline at end of file +} diff --git a/src/services/api/models/WellOperationDtoPlanFactPredictBase.ts b/src/services/api/models/WellOperationDtoPlanFactPredictBase.ts index 86b2a67..d753775 100644 --- a/src/services/api/models/WellOperationDtoPlanFactPredictBase.ts +++ b/src/services/api/models/WellOperationDtoPlanFactPredictBase.ts @@ -8,4 +8,4 @@ export type WellOperationDtoPlanFactPredictBase = { plan?: WellOperationDto; fact?: WellOperationDto; predict?: WellOperationDto; -} \ No newline at end of file +} diff --git a/src/services/api/services/AdminClusterService.ts b/src/services/api/services/AdminClusterService.ts index da74c77..f4ded6c 100644 --- a/src/services/api/services/AdminClusterService.ts +++ b/src/services/api/services/AdminClusterService.ts @@ -14,9 +14,9 @@ export class AdminClusterService { * @throws ApiError */ public static async getPage( -skip: number, -take: number = 32, -): Promise { + skip: number, + take: number = 32, + ): Promise { const result = await __request({ method: 'GET', path: `/api/admin/cluster`, @@ -35,8 +35,8 @@ take: number = 32, * @throws ApiError */ public static async insert( -requestBody?: ClusterDto, -): Promise { + requestBody?: ClusterDto, + ): Promise { const result = await __request({ method: 'POST', path: `/api/admin/cluster`, @@ -52,8 +52,8 @@ requestBody?: ClusterDto, * @throws ApiError */ public static async get( -id: number, -): Promise { + id: number, + ): Promise { const result = await __request({ method: 'GET', path: `/api/admin/cluster/${id}`, @@ -69,9 +69,9 @@ id: number, * @throws ApiError */ public static async put( -id: number, -requestBody?: ClusterDto, -): Promise { + id: number, + requestBody?: ClusterDto, + ): Promise { const result = await __request({ method: 'PUT', path: `/api/admin/cluster/${id}`, @@ -87,8 +87,8 @@ requestBody?: ClusterDto, * @throws ApiError */ public static async delete( -id: number, -): Promise { + id: number, + ): Promise { const result = await __request({ method: 'DELETE', path: `/api/admin/cluster/${id}`, diff --git a/src/services/api/services/AdminCompanyService.ts b/src/services/api/services/AdminCompanyService.ts index 0fadb8f..fb8d668 100644 --- a/src/services/api/services/AdminCompanyService.ts +++ b/src/services/api/services/AdminCompanyService.ts @@ -14,9 +14,9 @@ export class AdminCompanyService { * @throws ApiError */ public static async getPage( -skip: number, -take: number = 32, -): Promise { + skip: number, + take: number = 32, + ): Promise { const result = await __request({ method: 'GET', path: `/api/admin/company`, @@ -35,8 +35,8 @@ take: number = 32, * @throws ApiError */ public static async insert( -requestBody?: CompanyDto, -): Promise { + requestBody?: CompanyDto, + ): Promise { const result = await __request({ method: 'POST', path: `/api/admin/company`, @@ -52,8 +52,8 @@ requestBody?: CompanyDto, * @throws ApiError */ public static async get( -id: number, -): Promise { + id: number, + ): Promise { const result = await __request({ method: 'GET', path: `/api/admin/company/${id}`, @@ -69,9 +69,9 @@ id: number, * @throws ApiError */ public static async put( -id: number, -requestBody?: CompanyDto, -): Promise { + id: number, + requestBody?: CompanyDto, + ): Promise { const result = await __request({ method: 'PUT', path: `/api/admin/company/${id}`, @@ -87,8 +87,8 @@ requestBody?: CompanyDto, * @throws ApiError */ public static async delete( -id: number, -): Promise { + id: number, + ): Promise { const result = await __request({ method: 'DELETE', path: `/api/admin/company/${id}`, diff --git a/src/services/api/services/AdminDepositService.ts b/src/services/api/services/AdminDepositService.ts index b90689e..8878335 100644 --- a/src/services/api/services/AdminDepositService.ts +++ b/src/services/api/services/AdminDepositService.ts @@ -14,9 +14,9 @@ export class AdminDepositService { * @throws ApiError */ public static async getPage( -skip: number, -take: number = 32, -): Promise { + skip: number, + take: number = 32, + ): Promise { const result = await __request({ method: 'GET', path: `/api/admin/deposit`, @@ -35,8 +35,8 @@ take: number = 32, * @throws ApiError */ public static async insert( -requestBody?: DepositDto, -): Promise { + requestBody?: DepositDto, + ): Promise { const result = await __request({ method: 'POST', path: `/api/admin/deposit`, @@ -52,8 +52,8 @@ requestBody?: DepositDto, * @throws ApiError */ public static async get( -id: number, -): Promise { + id: number, + ): Promise { const result = await __request({ method: 'GET', path: `/api/admin/deposit/${id}`, @@ -69,9 +69,9 @@ id: number, * @throws ApiError */ public static async put( -id: number, -requestBody?: DepositDto, -): Promise { + id: number, + requestBody?: DepositDto, + ): Promise { const result = await __request({ method: 'PUT', path: `/api/admin/deposit/${id}`, @@ -87,8 +87,8 @@ requestBody?: DepositDto, * @throws ApiError */ public static async delete( -id: number, -): Promise { + id: number, + ): Promise { const result = await __request({ method: 'DELETE', path: `/api/admin/deposit/${id}`, diff --git a/src/services/api/services/AdminTelemetryService.ts b/src/services/api/services/AdminTelemetryService.ts index a92eff4..ce158b8 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 записей @@ -14,9 +43,9 @@ export class AdminTelemetryService { * @throws ApiError */ public static async getPage( -skip: number, -take: number = 32, -): Promise { + skip: number, + take: number = 32, + ): Promise { const result = await __request({ method: 'GET', path: `/api/admin/telemetry`, @@ -35,8 +64,8 @@ take: number = 32, * @throws ApiError */ public static async insert( -requestBody?: TelemetryDto, -): Promise { + requestBody?: TelemetryDto, + ): Promise { const result = await __request({ method: 'POST', path: `/api/admin/telemetry`, @@ -52,8 +81,8 @@ requestBody?: TelemetryDto, * @throws ApiError */ public static async get( -id: number, -): Promise { + id: number, + ): Promise { const result = await __request({ method: 'GET', path: `/api/admin/telemetry/${id}`, @@ -69,9 +98,9 @@ id: number, * @throws ApiError */ public static async put( -id: number, -requestBody?: TelemetryDto, -): Promise { + id: number, + requestBody?: TelemetryDto, + ): Promise { const result = await __request({ method: 'PUT', path: `/api/admin/telemetry/${id}`, @@ -87,8 +116,8 @@ requestBody?: TelemetryDto, * @throws ApiError */ public static async delete( -id: number, -): Promise { + id: number, + ): Promise { const result = await __request({ method: 'DELETE', path: `/api/admin/telemetry/${id}`, diff --git a/src/services/api/services/AdminUserRoleService.ts b/src/services/api/services/AdminUserRoleService.ts index a74ed7b..5a5333b 100644 --- a/src/services/api/services/AdminUserRoleService.ts +++ b/src/services/api/services/AdminUserRoleService.ts @@ -14,9 +14,9 @@ export class AdminUserRoleService { * @throws ApiError */ public static async getPage( -skip: number, -take: number = 32, -): Promise { + skip: number, + take: number = 32, + ): Promise { const result = await __request({ method: 'GET', path: `/api/admin/user/role`, @@ -35,8 +35,8 @@ take: number = 32, * @throws ApiError */ public static async insert( -requestBody?: UserRoleDto, -): Promise { + requestBody?: UserRoleDto, + ): Promise { const result = await __request({ method: 'POST', path: `/api/admin/user/role`, @@ -52,8 +52,8 @@ requestBody?: UserRoleDto, * @throws ApiError */ public static async get( -id: number, -): Promise { + id: number, + ): Promise { const result = await __request({ method: 'GET', path: `/api/admin/user/role/${id}`, @@ -69,9 +69,9 @@ id: number, * @throws ApiError */ public static async put( -id: number, -requestBody?: UserRoleDto, -): Promise { + id: number, + requestBody?: UserRoleDto, + ): Promise { const result = await __request({ method: 'PUT', path: `/api/admin/user/role/${id}`, @@ -87,8 +87,8 @@ requestBody?: UserRoleDto, * @throws ApiError */ public static async delete( -id: number, -): Promise { + id: number, + ): Promise { const result = await __request({ method: 'DELETE', path: `/api/admin/user/role/${id}`, diff --git a/src/services/api/services/AdminUserService.ts b/src/services/api/services/AdminUserService.ts index d7bd806..f4dba1d 100644 --- a/src/services/api/services/AdminUserService.ts +++ b/src/services/api/services/AdminUserService.ts @@ -14,9 +14,9 @@ export class AdminUserService { * @throws ApiError */ public static async getPage( -skip: number, -take: number = 32, -): Promise { + skip: number, + take: number = 32, + ): Promise { const result = await __request({ method: 'GET', path: `/api/admin/user`, @@ -35,8 +35,8 @@ take: number = 32, * @throws ApiError */ public static async insert( -requestBody?: UserDto, -): Promise { + requestBody?: UserDto, + ): Promise { const result = await __request({ method: 'POST', path: `/api/admin/user`, @@ -52,8 +52,8 @@ requestBody?: UserDto, * @throws ApiError */ public static async get( -id: number, -): Promise { + id: number, + ): Promise { const result = await __request({ method: 'GET', path: `/api/admin/user/${id}`, @@ -69,9 +69,9 @@ id: number, * @throws ApiError */ public static async put( -id: number, -requestBody?: UserDto, -): Promise { + id: number, + requestBody?: UserDto, + ): Promise { const result = await __request({ method: 'PUT', path: `/api/admin/user/${id}`, @@ -87,8 +87,8 @@ requestBody?: UserDto, * @throws ApiError */ public static async delete( -id: number, -): Promise { + id: number, + ): Promise { const result = await __request({ method: 'DELETE', path: `/api/admin/user/${id}`, diff --git a/src/services/api/services/AdminWellService.ts b/src/services/api/services/AdminWellService.ts index 244512c..cbabf24 100644 --- a/src/services/api/services/AdminWellService.ts +++ b/src/services/api/services/AdminWellService.ts @@ -14,9 +14,9 @@ export class AdminWellService { * @throws ApiError */ public static async getPage( -skip: number, -take: number = 32, -): Promise { + skip: number, + take: number = 32, + ): Promise { const result = await __request({ method: 'GET', path: `/api/admin/well`, @@ -35,8 +35,8 @@ take: number = 32, * @throws ApiError */ public static async insert( -requestBody?: WellDto, -): Promise { + requestBody?: WellDto, + ): Promise { const result = await __request({ method: 'POST', path: `/api/admin/well`, @@ -52,8 +52,8 @@ requestBody?: WellDto, * @throws ApiError */ public static async get( -id: number, -): Promise { + id: number, + ): Promise { const result = await __request({ method: 'GET', path: `/api/admin/well/${id}`, @@ -69,9 +69,9 @@ id: number, * @throws ApiError */ public static async put( -id: number, -requestBody?: WellDto, -): Promise { + id: number, + requestBody?: WellDto, + ): Promise { const result = await __request({ method: 'PUT', path: `/api/admin/well/${id}`, @@ -87,8 +87,8 @@ requestBody?: WellDto, * @throws ApiError */ public static async delete( -id: number, -): Promise { + id: number, + ): Promise { const result = await __request({ method: 'DELETE', path: `/api/admin/well/${id}`, diff --git a/src/services/api/services/AuthService.ts b/src/services/api/services/AuthService.ts index c35ce11..27732bd 100644 --- a/src/services/api/services/AuthService.ts +++ b/src/services/api/services/AuthService.ts @@ -10,13 +10,13 @@ export class AuthService { /** * Аутентификация пользователя - * @param requestBody + * @param requestBody * @returns UserTokenDto новый токен * @throws ApiError */ public static async login( -requestBody?: AuthDto, -): Promise { + requestBody?: AuthDto, + ): Promise { const result = await __request({ method: 'POST', path: `/auth/login`, @@ -43,13 +43,13 @@ requestBody?: AuthDto, /** * Регистрация пользователя. Доступна администратору - * @param requestBody + * @param requestBody * @returns any Success * @throws ApiError */ public static async register( -requestBody?: UserDto, -): Promise { + requestBody?: UserDto, + ): Promise { const result = await __request({ method: 'POST', path: `/auth`, @@ -60,15 +60,15 @@ requestBody?: UserDto, /** * Смена пароля пользователя. Доступна пользователю и администратору - * @param idUser - * @param requestBody + * @param idUser + * @param requestBody * @returns any Success * @throws ApiError */ public static async changePassword( -idUser: number, -requestBody?: string, -): Promise { + idUser: number, + requestBody?: string, + ): Promise { const result = await __request({ method: 'PUT', path: `/auth/${idUser}/ChangePassword`, diff --git a/src/services/api/services/ClusterService.ts b/src/services/api/services/ClusterService.ts index 5c6dada..6a2ea4b 100644 --- a/src/services/api/services/ClusterService.ts +++ b/src/services/api/services/ClusterService.ts @@ -22,13 +22,13 @@ export class ClusterService { /** * Получение доступных пользователю скважин - * @param idCluster + * @param idCluster * @returns WellDto Success * @throws ApiError */ public static async getWells( -idCluster: number, -): Promise> { + idCluster: number, + ): Promise> { const result = await __request({ method: 'GET', path: `/api/cluster/${idCluster}`, diff --git a/src/services/api/services/DataService.ts b/src/services/api/services/DataService.ts deleted file mode 100644 index 5610ba3..0000000 --- a/src/services/api/services/DataService.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { DatesRangeDto } from '../models/DatesRangeDto'; -import type { TelemetryDataSaubDto } from '../models/TelemetryDataSaubDto'; -import { request as __request } from '../core/request'; - -export class DataService { - - /** - * Возвращает данные САУБ по скважине. - * По умолчанию за последние 10 минут. - * @param idWell id скважины - * @param begin дата начала выборки. По умолчанию: текущее время - intervalSec - * @param intervalSec интервал времени даты начала выборки, секунды - * @param approxPointsCount желаемое количество точек. Если в выборке точек будет больше, то выборка будет прорежена. - * @returns TelemetryDataSaubDto Success - * @throws ApiError - */ - public static async getData( -idWell: number, -begin?: string, -intervalSec: number = 600, -approxPointsCount: number = 1024, -): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/data`, - query: { - 'begin': begin, - 'intervalSec': intervalSec, - 'approxPointsCount': approxPointsCount, - }, - }); - return result.body; - } - - /** - * Возвращает диапазон дат сохраненных данных. - * @param idWell id скважины - * @returns DatesRangeDto Success - * @throws ApiError - */ - public static async getDataDatesRange( -idWell: number, -): Promise { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/data/datesRange`, - }); - return result.body; - } - -} \ No newline at end of file diff --git a/src/services/api/services/DepositService.ts b/src/services/api/services/DepositService.ts index ca61820..ed5f426 100644 --- a/src/services/api/services/DepositService.ts +++ b/src/services/api/services/DepositService.ts @@ -22,13 +22,13 @@ export class DepositService { /** * Получает список доступных пользователю кустов месторождения - * @param depositId + * @param depositId * @returns ClusterDto Success * @throws ApiError */ public static async getClusters( -depositId: number, -): Promise> { + depositId: number, + ): Promise> { const result = await __request({ method: 'GET', path: `/api/deposit/${depositId}`, diff --git a/src/services/api/services/DrillParamsService.ts b/src/services/api/services/DrillParamsService.ts new file mode 100644 index 0000000..4c5266d --- /dev/null +++ b/src/services/api/services/DrillParamsService.ts @@ -0,0 +1,56 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { DrillParamsDto } from '../models/DrillParamsDto'; +import { request as __request } from '../core/request'; + +export class DrillParamsService { + + /** + * Возвращает автоматически расчитанные значения для режимов бурения + * @param idWell id скважины + * @param startDepth Стартовая глубина + * @param endDepth Конечная глубина + * @returns DrillParamsDto Success + * @throws ApiError + */ + public static async getDefaultDrillParams( + idWell?: number, + startDepth?: number, + endDepth?: number, + ): Promise { + const result = await __request({ + method: 'GET', + path: `/drillParams/idWell/autoParams`, + query: { + 'idWell': idWell, + 'startDepth': startDepth, + 'endDepth': endDepth, + }, + }); + return result.body; + } + + /** + * Сохраняет значения для режимов бурения + * @param idWell id скважины + * @param requestBody Параметры режимов бурений для секции + * @returns number Success + * @throws ApiError + */ + public static async saveDrillParams( + idWell?: number, + requestBody?: DrillParamsDto, + ): Promise { + const result = await __request({ + method: 'POST', + path: `/drillParams/idWell`, + query: { + 'idWell': idWell, + }, + body: requestBody, + }); + return result.body; + } + +} \ No newline at end of file diff --git a/src/services/api/services/DrillingProgramService.ts b/src/services/api/services/DrillingProgramService.ts index 5b52f12..9aaaea1 100644 --- a/src/services/api/services/DrillingProgramService.ts +++ b/src/services/api/services/DrillingProgramService.ts @@ -6,13 +6,13 @@ import { request as __request } from '../core/request'; export class DrillingProgramService { /** - * @param idWell + * @param idWell * @returns string Success * @throws ApiError */ public static async get( -idWell: number, -): Promise { + idWell: number, + ): Promise { const result = await __request({ method: 'GET', path: `/api/well/${idWell}/drillingProgram`, diff --git a/src/services/api/services/FileService.ts b/src/services/api/services/FileService.ts index 7d591b5..8424cf7 100644 --- a/src/services/api/services/FileService.ts +++ b/src/services/api/services/FileService.ts @@ -11,15 +11,15 @@ export class FileService { * Сохраняет переданные файлы и информацию о них * @param idWell id скважины * @param idCategory id категории файла - * @param requestBody + * @param requestBody * @returns number Success * @throws ApiError */ public static async saveFiles( -idWell: number, -idCategory?: number, -requestBody?: any, -): Promise { + idWell: number, + idCategory?: number, + requestBody?: any, + ): Promise { const result = await __request({ method: 'POST', path: `/api/well/${idWell}/files`, @@ -45,15 +45,15 @@ requestBody?: any, * @throws ApiError */ public static async getFilesInfo( -idWell: number, -idCategory: number, -companyName?: string, -fileName?: string, -begin?: string, -end?: string, -skip: number = 0, -take: number = 32, -): Promise { + idWell: number, + idCategory: number, + companyName?: string, + fileName?: string, + begin?: string, + end?: string, + skip: number, + take: number = 32, + ): Promise { const result = await __request({ method: 'GET', path: `/api/well/${idWell}/files`, @@ -78,9 +78,9 @@ take: number = 32, * @throws ApiError */ public static async getInfosByCategory( -idWell: number, -idCategory: number, -): Promise> { + idWell: number, + idCategory: number, + ): Promise> { const result = await __request({ method: 'GET', path: `/api/well/${idWell}/files/category/${idCategory}`, @@ -96,9 +96,9 @@ idCategory: number, * @throws ApiError */ public static async getFile( -idWell: number, -fileId: number, -): Promise { + idWell: number, + fileId: number, + ): Promise { const result = await __request({ method: 'GET', path: `/api/well/${idWell}/files/${fileId}`, @@ -114,9 +114,9 @@ fileId: number, * @throws ApiError */ public static async delete( -idWell: number, -idFile: number, -): Promise { + idWell: number, + idFile: number, + ): Promise { const result = await __request({ method: 'DELETE', path: `/api/well/${idWell}/files/${idFile}`, diff --git a/src/services/api/services/MeasureService.ts b/src/services/api/services/MeasureService.ts index 9d086fb..9a70e75 100644 --- a/src/services/api/services/MeasureService.ts +++ b/src/services/api/services/MeasureService.ts @@ -7,13 +7,13 @@ import { request as __request } from '../core/request'; export class MeasureService { /** - * @param idWell + * @param idWell * @returns any Success * @throws ApiError */ public static async getCategories( -idWell: number, -): Promise { + idWell: number, + ): Promise { const result = await __request({ method: 'GET', path: `/api/well/${idWell}/measure/categories`, @@ -22,13 +22,13 @@ idWell: number, } /** - * @param idWell + * @param idWell * @returns any Success * @throws ApiError */ public static async getAllLast( -idWell: number, -): Promise { + idWell: number, + ): Promise { const result = await __request({ method: 'GET', path: `/api/well/${idWell}/measure/lastAll`, @@ -37,15 +37,15 @@ idWell: number, } /** - * @param idWell - * @param idCategory + * @param idWell + * @param idCategory * @returns any Success * @throws ApiError */ public static async getLast( -idWell: number, -idCategory: number, -): Promise { + idWell: number, + idCategory: number, + ): Promise { const result = await __request({ method: 'GET', path: `/api/well/${idWell}/measure/last/${idCategory}`, @@ -54,32 +54,32 @@ idCategory: number, } /** - * @param idWell - * @param idCategory + * @param idWell + * @param idCategory * @returns any Success * @throws ApiError */ public static async getHisory( -idWell: number, -idCategory: number, -): Promise { + idWell: number, + 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; } /** - * @param idWell - * @param requestBody + * @param idWell + * @param requestBody * @returns any Success * @throws ApiError */ public static async insert( -idWell: number, -requestBody?: MeasureDto, -): Promise { + idWell: number, + requestBody?: MeasureDto, + ): Promise { const result = await __request({ method: 'POST', path: `/api/well/${idWell}/measure`, @@ -89,15 +89,15 @@ requestBody?: MeasureDto, } /** - * @param idWell - * @param requestBody + * @param idWell + * @param requestBody * @returns any Success * @throws ApiError */ public static async update( -idWell: number, -requestBody?: MeasureDto, -): Promise { + idWell: number, + requestBody?: MeasureDto, + ): Promise { const result = await __request({ method: 'PUT', path: `/api/well/${idWell}/measure`, @@ -107,15 +107,15 @@ requestBody?: MeasureDto, } /** - * @param idWell - * @param idData + * @param idWell + * @param idData * @returns any Success * @throws ApiError */ public static async markAsDelete( -idWell: number, -idData: number, -): Promise { + idWell: number, + idData: number, + ): Promise { const result = await __request({ method: 'DELETE', path: `/api/well/${idWell}/measure/history/${idData}`, diff --git a/src/services/api/services/MessageService.ts b/src/services/api/services/MessageService.ts index 8adaa2f..09b71d5 100644 --- a/src/services/api/services/MessageService.ts +++ b/src/services/api/services/MessageService.ts @@ -20,14 +20,14 @@ export class MessageService { * @throws ApiError */ public static async getMessages( -idWell: number, -skip: number, -take: number = 32, -categoryids?: Array, -begin?: string, -end?: string, -searchString?: string, -): Promise { + idWell: number, + skip: number, + take: number = 32, + categoryids?: Array, + begin?: string, + end?: string, + searchString?: string, + ): Promise { const result = await __request({ method: 'GET', path: `/api/well/${idWell}/message`, @@ -50,8 +50,8 @@ searchString?: string, * @throws ApiError */ public static async getMessagesDateRange( -idWell: number, -): Promise { + idWell: number, + ): Promise { const result = await __request({ method: 'GET', path: `/api/well/${idWell}/message/datesRange`, diff --git a/src/services/api/services/ReportService.ts b/src/services/api/services/ReportService.ts index e540c4c..cc99805 100644 --- a/src/services/api/services/ReportService.ts +++ b/src/services/api/services/ReportService.ts @@ -17,12 +17,12 @@ export class ReportService { * @throws ApiError */ public static async createReport( -idWell: number, -stepSeconds?: number, -format?: number, -begin?: string, -end?: string, -): Promise { + idWell: number, + stepSeconds?: number, + format?: number, + begin?: string, + end?: string, + ): Promise { const result = await __request({ method: 'POST', path: `/api/well/${idWell}/report`, @@ -43,8 +43,8 @@ end?: string, * @throws ApiError */ public static async getAllReportsNamesByWell( -idWell: number, -): Promise> { + idWell: number, + ): Promise> { const result = await __request({ method: 'GET', path: `/api/well/${idWell}/report`, @@ -55,7 +55,7 @@ idWell: number, /** * @deprecated * Возвращает имена отчетов, хранящихся на диске, - * которые подходят под указанные параметры + * которые подходят под указанные параметры * @param idWell id скважины * @param stepSeconds шаг интервала * @param format формат отчета (0-PDF, 1-LAS) @@ -65,12 +65,12 @@ idWell: number, * @throws ApiError */ public static async getSuitableReportsNames( -idWell: number, -stepSeconds?: number, -format?: number, -begin?: string, -end?: string, -): Promise> { + idWell: number, + stepSeconds?: number, + format?: number, + begin?: string, + end?: string, + ): Promise> { const result = await __request({ method: 'GET', path: `/api/well/${idWell}/report/suitableReports`, @@ -95,12 +95,12 @@ end?: string, * @throws ApiError */ public static async getReportSize( -idWell: number, -stepSeconds?: number, -format?: number, -begin?: string, -end?: string, -): Promise { + idWell: number, + stepSeconds?: number, + format?: number, + begin?: string, + end?: string, + ): Promise { const result = await __request({ method: 'GET', path: `/api/well/${idWell}/report/reportSize`, @@ -121,8 +121,8 @@ end?: string, * @throws ApiError */ public static async getReportsDateRange( -idWell: number, -): Promise { + idWell: number, + ): Promise { const result = await __request({ method: 'GET', path: `/api/well/${idWell}/report/datesRange`, diff --git a/src/services/api/services/TelemetryAnalyticsService.ts b/src/services/api/services/TelemetryAnalyticsService.ts index b4f828c..d1d2d9f 100644 --- a/src/services/api/services/TelemetryAnalyticsService.ts +++ b/src/services/api/services/TelemetryAnalyticsService.ts @@ -22,13 +22,13 @@ export class TelemetryAnalyticsService { * @throws ApiError */ public static async getOperationsByWell( -idWell: number, -skip: number, -take: number = 32, -categoryIds?: Array, -begin?: string, -end?: string, -): Promise { + idWell: number, + skip: number, + take: number = 32, + categoryIds?: Array, + begin?: string, + end?: string, + ): Promise { const result = await __request({ method: 'GET', path: `/api/well/${idWell}/telemetryAnalytics/operationsByWell`, @@ -50,8 +50,8 @@ end?: string, * @throws ApiError */ public static async getWellDepthToDay( -idWell: number, -): Promise> { + idWell: number, + ): Promise> { const result = await __request({ method: 'GET', path: `/api/well/${idWell}/telemetryAnalytics/wellDepthToDay`, @@ -68,10 +68,10 @@ idWell: number, * @throws ApiError */ public static async getWellDepthToInterval( -idWell: number, -intervalSeconds?: number, -workBeginSeconds?: number, -): Promise> { + idWell: number, + intervalSeconds?: number, + workBeginSeconds?: number, + ): Promise> { const result = await __request({ method: 'GET', path: `/api/well/${idWell}/telemetryAnalytics/wellDepthToInterval`, @@ -92,10 +92,10 @@ workBeginSeconds?: number, * @throws ApiError */ public static async getOperationsSummary( -idWell: number, -begin?: string, -end?: string, -): Promise> { + idWell: number, + begin?: string, + end?: string, + ): Promise> { const result = await __request({ method: 'GET', path: `/api/well/${idWell}/telemetryAnalytics/operationsSummary`, @@ -116,10 +116,10 @@ end?: string, * @throws ApiError */ public static async getOperationsToInterval( -idWell: number, -intervalSeconds?: number, -workBeginSeconds?: number, -): Promise> { + idWell: number, + intervalSeconds?: number, + workBeginSeconds?: number, + ): Promise> { const result = await __request({ method: 'GET', path: `/api/well/${idWell}/telemetryAnalytics/operationsToInterval`, @@ -138,8 +138,8 @@ workBeginSeconds?: number, * @throws ApiError */ public static async getOperationsDateRange( -idWell: number, -): Promise { + idWell: number, + ): Promise { const result = await __request({ method: 'GET', path: `/api/well/${idWell}/telemetryAnalytics/datesRange`, diff --git a/src/services/api/services/TelemetryDataSaubService.ts b/src/services/api/services/TelemetryDataSaubService.ts index 7354dbc..8854704 100644 --- a/src/services/api/services/TelemetryDataSaubService.ts +++ b/src/services/api/services/TelemetryDataSaubService.ts @@ -15,9 +15,9 @@ export class TelemetryDataSaubService { * @throws ApiError */ public static async postData( -uid: string, -requestBody?: Array, -): Promise { + uid: string, + requestBody?: Array, + ): Promise { const result = await __request({ method: 'POST', path: `/api/TelemetryDataSaub/${uid}`, @@ -28,7 +28,7 @@ requestBody?: Array, /** * Возвращает данные САУБ по скважине. - * По умолчанию за последние 10 минут. + * По умолчанию за последние 10 минут. * @param idWell id скважины * @param begin дата начала выборки. По умолчанию: текущее время - intervalSec * @param intervalSec интервал времени даты начала выборки, секунды @@ -37,11 +37,11 @@ requestBody?: Array, * @throws ApiError */ public static async getData( -idWell: number, -begin?: string, -intervalSec: number = 600, -approxPointsCount: number = 1024, -): Promise { + idWell: number, + begin?: string, + intervalSec: number = 600, + approxPointsCount: number = 1024, + ): Promise { const result = await __request({ method: 'GET', path: `/api/TelemetryDataSaub/${idWell}`, @@ -61,8 +61,8 @@ approxPointsCount: number = 1024, * @throws ApiError */ public static async getDataDatesRange( -idWell: number, -): Promise { + idWell: number, + ): Promise { const result = await __request({ method: 'GET', path: `/api/TelemetryDataSaub/${idWell}/datesRange`, diff --git a/src/services/api/services/TelemetryDataSpinService.ts b/src/services/api/services/TelemetryDataSpinService.ts index 02673ee..71add2c 100644 --- a/src/services/api/services/TelemetryDataSpinService.ts +++ b/src/services/api/services/TelemetryDataSpinService.ts @@ -15,9 +15,9 @@ export class TelemetryDataSpinService { * @throws ApiError */ public static async postData( -uid: string, -requestBody?: Array, -): Promise { + uid: string, + requestBody?: Array, + ): Promise { const result = await __request({ method: 'POST', path: `/api/TelemetryDataSpin/${uid}`, @@ -28,7 +28,7 @@ requestBody?: Array, /** * Возвращает данные САУБ по скважине. - * По умолчанию за последние 10 минут. + * По умолчанию за последние 10 минут. * @param idWell id скважины * @param begin дата начала выборки. По умолчанию: текущее время - intervalSec * @param intervalSec интервал времени даты начала выборки, секунды @@ -37,11 +37,11 @@ requestBody?: Array, * @throws ApiError */ public static async getData( -idWell: number, -begin?: string, -intervalSec: number = 600, -approxPointsCount: number = 1024, -): Promise { + idWell: number, + begin?: string, + intervalSec: number = 600, + approxPointsCount: number = 1024, + ): Promise { const result = await __request({ method: 'GET', path: `/api/TelemetryDataSpin/${idWell}`, @@ -61,8 +61,8 @@ approxPointsCount: number = 1024, * @throws ApiError */ public static async getDataDatesRange( -idWell: number, -): Promise { + idWell: number, + ): Promise { const result = await __request({ method: 'GET', path: `/api/TelemetryDataSpin/${idWell}/datesRange`, diff --git a/src/services/api/services/TelemetryService.ts b/src/services/api/services/TelemetryService.ts index 5e0ca30..9ff2d4b 100644 --- a/src/services/api/services/TelemetryService.ts +++ b/src/services/api/services/TelemetryService.ts @@ -18,9 +18,9 @@ export class TelemetryService { * @throws ApiError */ public static async postInfo( -uid: string, -requestBody?: TelemetryInfoDto, -): Promise { + uid: string, + requestBody?: TelemetryInfoDto, + ): Promise { const result = await __request({ method: 'POST', path: `/api/telemetry/${uid}/info`, @@ -30,6 +30,7 @@ requestBody?: TelemetryInfoDto, } /** + * @deprecated * Принимает данные от разных систем по скважине * @param uid Уникальный идентификатор отправителя * @param requestBody Данные @@ -37,9 +38,9 @@ requestBody?: TelemetryInfoDto, * @throws ApiError */ public static async postData( -uid: string, -requestBody?: Array, -): Promise { + uid: string, + requestBody?: Array, + ): Promise { const result = await __request({ method: 'POST', path: `/api/telemetry/${uid}/data`, @@ -56,9 +57,9 @@ requestBody?: Array, * @throws ApiError */ public static async postMessages( -uid: string, -requestBody?: Array, -): Promise { + uid: string, + requestBody?: Array, + ): Promise { const result = await __request({ method: 'POST', path: `/api/telemetry/${uid}/message`, @@ -75,9 +76,9 @@ requestBody?: Array, * @throws ApiError */ public static async postEvents( -uid: string, -requestBody?: Array, -): Promise { + uid: string, + requestBody?: Array, + ): Promise { const result = await __request({ method: 'POST', path: `/api/telemetry/${uid}/event`, @@ -94,9 +95,9 @@ requestBody?: Array, * @throws ApiError */ public static async postUsers( -uid: string, -requestBody?: Array, -): Promise { + uid: string, + requestBody?: Array, + ): Promise { const result = await __request({ method: 'POST', path: `/api/telemetry/${uid}/user`, diff --git a/src/services/api/services/WellOperationService.ts b/src/services/api/services/WellOperationService.ts index 3215e56..ca2cfa2 100644 --- a/src/services/api/services/WellOperationService.ts +++ b/src/services/api/services/WellOperationService.ts @@ -10,13 +10,13 @@ export class WellOperationService { /** * Возвращает список имен типов операций на скважине - * @param idWell + * @param idWell * @returns WellOperationCategoryDto Success * @throws ApiError */ public static async getCategories( -idWell: string, -): Promise> { + idWell: string, + ): Promise> { const result = await __request({ method: 'GET', path: `/api/well/${idWell}/wellOperations/categories`, @@ -34,23 +34,23 @@ idWell: string, * @param end фильтр по окончанию операции * @param minDepth фильтр по минимальной глубине скважины * @param maxDepth фильтр по максимальной глубине скважины - * @param skip - * @param take + * @param skip + * @param take * @returns WellOperationDtoPaginationContainer Success * @throws ApiError */ public static async getOperations( -idWell: number, -opertaionType?: number, -sectionTypeIds?: Array, -operationCategoryIds?: Array, -begin?: string, -end?: string, -minDepth: number = -1.7976931348623157e+308, -maxDepth: number = 1.7976931348623157e+308, -skip: number = 0, -take: number = 32, -): Promise { + idWell: number, + opertaionType?: number, + sectionTypeIds?: Array, + operationCategoryIds?: Array, + begin?: string, + end?: string, + minDepth: number = -1.7976931348623157e+308, + maxDepth: number = 1.7976931348623157e+308, + skip: number, + take: number = 32, + ): Promise { const result = await __request({ method: 'GET', path: `/api/well/${idWell}/wellOperations`, @@ -77,9 +77,9 @@ take: number = 32, * @throws ApiError */ public static async insertRange( -idWell: number, -requestBody?: Array, -): Promise> { + idWell: number, + requestBody?: Array, + ): Promise> { const result = await __request({ method: 'POST', path: `/api/well/${idWell}/wellOperations`, @@ -96,9 +96,9 @@ requestBody?: Array, * @throws ApiError */ public static async get( -idWell: number, -idOperation: number, -): Promise { + idWell: number, + idOperation: number, + ): Promise { const result = await __request({ method: 'GET', path: `/api/well/${idWell}/wellOperations/${idOperation}`, @@ -115,10 +115,10 @@ idOperation: number, * @throws ApiError */ public static async update( -idWell: number, -idOperation: number, -requestBody?: WellOperationDto, -): Promise { + idWell: number, + idOperation: number, + requestBody?: WellOperationDto, + ): Promise { const result = await __request({ method: 'PUT', path: `/api/well/${idWell}/wellOperations/${idOperation}`, @@ -135,9 +135,9 @@ requestBody?: WellOperationDto, * @throws ApiError */ public static async delete( -idWell: number, -idOperation: number, -): Promise { + idWell: number, + idOperation: number, + ): Promise { const result = await __request({ method: 'DELETE', path: `/api/well/${idWell}/wellOperations/${idOperation}`, @@ -145,4 +145,57 @@ idOperation: number, return result.body; } + /** + * Импортирует операции из excel (xlsx) файла + * @param idWell id скважины + * @param options Удалить операции перед импортом = 1, если фал валидный + * @param requestBody + * @returns any Success + * @throws ApiError + */ + public static async import( + idWell: number, + options: number, + requestBody?: any, + ): Promise { + const result = await __request({ + method: 'POST', + path: `/api/well/${idWell}/wellOperations/import/${options}`, + 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 diff --git a/src/services/api/services/WellOperationStatService.ts b/src/services/api/services/WellOperationStatService.ts index 0bde586..e7e0275 100644 --- a/src/services/api/services/WellOperationStatService.ts +++ b/src/services/api/services/WellOperationStatService.ts @@ -9,13 +9,13 @@ import { request as __request } from '../core/request'; export class WellOperationStatService { /** - * @param idCluster + * @param idCluster * @returns StatClusterDto Success * @throws ApiError */ public static async getStatCluster( -idCluster: number, -): Promise { + idCluster: number, + ): Promise { const result = await __request({ method: 'GET', path: `/api/cluster/${idCluster}/stat`, @@ -24,13 +24,13 @@ idCluster: number, } /** - * @param idWell + * @param idWell * @returns StatWellDto Success * @throws ApiError */ public static async getStatWell( -idWell: number, -): Promise { + idWell: number, + ): Promise { const result = await __request({ method: 'GET', path: `/api/well/${idWell}/stat`, @@ -39,13 +39,13 @@ idWell: number, } /** - * @param idWell + * @param idWell * @returns WellOperationDtoPlanFactPredictBase Success * @throws ApiError */ public static async getTvd( -idWell: number, -): Promise> { + idWell: number, + ): Promise> { const result = await __request({ method: 'GET', path: `/api/well/${idWell}/tvd`, diff --git a/src/services/api/services/WellService.ts b/src/services/api/services/WellService.ts index c3c6290..42f08a6 100644 --- a/src/services/api/services/WellService.ts +++ b/src/services/api/services/WellService.ts @@ -2,7 +2,6 @@ /* tslint:disable */ /* eslint-disable */ import type { WellDto } from '../models/WellDto'; -import type { WellOperationDto } from '../models/WellOperationDto'; import { request as __request } from '../core/request'; export class WellService { @@ -19,21 +18,6 @@ export class WellService { return result.body; } - /** - * @param idWell - * @returns WellOperationDto Success - * @throws ApiError - */ - public static async getOperations( -idWell: number, -): Promise> { - const result = await __request({ - method: 'GET', - path: `/api/well/${idWell}/operations`, - }); - return result.body; - } - /** * @returns WellDto Success * @throws ApiError