API updated

This commit is contained in:
goodmice 2021-10-12 10:39:56 +05:00
parent 5e43b59d8c
commit a22bfcbb1f
61 changed files with 496 additions and 398 deletions

View File

@ -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';

View File

@ -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;
}

View File

@ -6,6 +6,7 @@ export type MessageDto = {
id?: number;
date?: string;
categoryId?: number;
wellDepth?: number;
user?: string | null;
message?: string | null;
}

View File

@ -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;
}

View File

@ -6,6 +6,35 @@ import { request as __request } from '../core/request';
export class AdminTelemetryService {
/**
* @returns any Success
* @throws ApiError
*/
public static async getRedundentRemoteUids(): Promise<any> {
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<number>,
): Promise<any> {
const result = await __request({
method: 'POST',
path: `/merge`,
body: requestBody,
});
return result.body;
}
/**
* Получить страницу с записями в PaginationContainer
* @param skip пропустить skip записей

View File

@ -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<Array<TelemetryDataSaubDto>> {
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<DatesRangeDto> {
const result = await __request({
method: 'GET',
path: `/api/well/${idWell}/data/datesRange`,
});
return result.body;
}
}

View File

@ -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<DrillParamsDto> {
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<number> {
const result = await __request({
method: 'POST',
path: `/drillParams/idWell`,
query: {
'idWell': idWell,
},
body: requestBody,
});
return result.body;
}
}

View File

@ -51,7 +51,7 @@ companyName?: string,
fileName?: string,
begin?: string,
end?: string,
skip: number = 0,
skip: number,
take: number = 32,
): Promise<FileInfoDtoPaginationContainer> {
const result = await __request({

View File

@ -65,7 +65,7 @@ idCategory: number,
): Promise<any> {
const result = await __request({
method: 'GET',
path: `/api/well/${idWell}/measure/history/${idCategory}`,
path: `/api/well/${idWell}/measure/history`,
});
return result.body;
}

View File

@ -30,6 +30,7 @@ requestBody?: TelemetryInfoDto,
}
/**
* @deprecated
* Принимает данные от разных систем по скважине
* @param uid Уникальный идентификатор отправителя
* @param requestBody Данные

View File

@ -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<WellOperationDtoPaginationContainer> {
const result = await __request({
@ -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<any> {
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<string> {
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<string> {
const result = await __request({
method: 'GET',
path: `/api/well/${idWell}/wellOperations/tamplate`,
});
return result.body;
}
}

View File

@ -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<Array<WellOperationDto>> {
const result = await __request({
method: 'GET',
path: `/api/well/${idWell}/operations`,
});
return result.body;
}
/**
* @returns WellDto Success
* @throws ApiError