Сервисы обновлены

This commit is contained in:
goodmice 2021-11-29 10:55:57 +05:00
parent c2a2568f72
commit 5ad3bd5e07
7 changed files with 188 additions and 28 deletions

View File

@ -23,6 +23,8 @@ export type { FilePublishInfoDto } from './models/FilePublishInfoDto';
export type { MeasureDto } from './models/MeasureDto'; export type { MeasureDto } from './models/MeasureDto';
export type { MessageDto } from './models/MessageDto'; export type { MessageDto } from './models/MessageDto';
export type { MessageDtoPaginationContainer } from './models/MessageDtoPaginationContainer'; export type { MessageDtoPaginationContainer } from './models/MessageDtoPaginationContainer';
export type { SetpointInfoDto } from './models/SetpointInfoDto';
export type { SetpointsRequestDto } from './models/SetpointsRequestDto';
export type { StatClusterDto } from './models/StatClusterDto'; export type { StatClusterDto } from './models/StatClusterDto';
export type { StatOperationsDto } from './models/StatOperationsDto'; export type { StatOperationsDto } from './models/StatOperationsDto';
export type { StatOperationsDtoPlanFactBase } from './models/StatOperationsDtoPlanFactBase'; export type { StatOperationsDtoPlanFactBase } from './models/StatOperationsDtoPlanFactBase';
@ -63,7 +65,6 @@ export { AdminUserRoleService } from './services/AdminUserRoleService';
export { AdminUserService } from './services/AdminUserService'; export { AdminUserService } from './services/AdminUserService';
export { AdminWellService } from './services/AdminWellService'; export { AdminWellService } from './services/AdminWellService';
export { AuthService } from './services/AuthService'; export { AuthService } from './services/AuthService';
export { ClusterOperationStatService } from './services/ClusterOperationStatService';
export { ClusterService } from './services/ClusterService'; export { ClusterService } from './services/ClusterService';
export { DepositService } from './services/DepositService'; export { DepositService } from './services/DepositService';
export { DrillFlowChartService } from './services/DrillFlowChartService'; export { DrillFlowChartService } from './services/DrillFlowChartService';
@ -72,13 +73,14 @@ export { DrillParamsService } from './services/DrillParamsService';
export { FileService } from './services/FileService'; export { FileService } from './services/FileService';
export { MeasureService } from './services/MeasureService'; export { MeasureService } from './services/MeasureService';
export { MessageService } from './services/MessageService'; export { MessageService } from './services/MessageService';
export { OperationStatService } from './services/OperationStatService';
export { ReportService } from './services/ReportService'; export { ReportService } from './services/ReportService';
export { RequerstTrackerService } from './services/RequerstTrackerService'; export { RequerstTrackerService } from './services/RequerstTrackerService';
export { SetpointsService } from './services/SetpointsService';
export { TelemetryAnalyticsService } from './services/TelemetryAnalyticsService'; export { TelemetryAnalyticsService } from './services/TelemetryAnalyticsService';
export { TelemetryDataSaubService } from './services/TelemetryDataSaubService'; export { TelemetryDataSaubService } from './services/TelemetryDataSaubService';
export { TelemetryDataSpinService } from './services/TelemetryDataSpinService'; export { TelemetryDataSpinService } from './services/TelemetryDataSpinService';
export { TelemetryService } from './services/TelemetryService'; export { TelemetryService } from './services/TelemetryService';
export { WellCompositeService } from './services/WellCompositeService'; export { WellCompositeService } from './services/WellCompositeService';
export { WellOperationService } from './services/WellOperationService'; export { WellOperationService } from './services/WellOperationService';
export { WellOperationStatService } from './services/WellOperationStatService';
export { WellService } from './services/WellService'; export { WellService } from './services/WellService';

View File

@ -0,0 +1,12 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type SetpointInfoDto = {
displayName?: string | null;
name?: string | null;
units?: string | null;
comment?: string | null;
max?: number;
min?: number;
}

View File

@ -0,0 +1,19 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { UserDto } from './UserDto';
import type { WellDto } from './WellDto';
export type SetpointsRequestDto = {
id?: number;
idWell?: number;
idAuthor?: number;
idState?: number;
uploadDate?: string;
obsolescenceSec?: number;
setpoints?: Record<string, number> | null;
comment?: string | null;
well?: WellDto;
author?: UserDto;
}

View File

@ -13,6 +13,7 @@ export type WellDto = {
longitude?: number | null; longitude?: number | null;
wellType?: string | null; wellType?: string | null;
idWellType?: number; idWellType?: number;
idCluster?: number | null;
idState?: number; idState?: number;
lastTelemetryDate?: string; lastTelemetryDate?: string;
telemetry?: TelemetryDto; telemetry?: TelemetryDto;

View File

@ -1,25 +0,0 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ClusterRopStatDto } from '../models/ClusterRopStatDto';
import { request as __request } from '../core/request';
export class ClusterOperationStatService {
/**
* Формирует данные по среднему и максимальному МСП на кусту
* @param idWell id скважины с данного куста (через нее будут полуены данные)
* @returns ClusterRopStatDto Success
* @throws ApiError
*/
public static async getClusterRopStat(
idWell: number,
): Promise<ClusterRopStatDto> {
const result = await __request({
method: 'GET',
path: `/api/cluster/${idWell}/ropStat`,
});
return result.body;
}
}

View File

@ -1,12 +1,45 @@
/* istanbul ignore file */ /* istanbul ignore file */
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
import type { ClusterRopStatDto } from '../models/ClusterRopStatDto';
import type { StatClusterDto } from '../models/StatClusterDto'; import type { StatClusterDto } from '../models/StatClusterDto';
import type { StatWellDto } from '../models/StatWellDto'; import type { StatWellDto } from '../models/StatWellDto';
import type { WellOperationDtoPlanFactPredictBase } from '../models/WellOperationDtoPlanFactPredictBase'; import type { WellOperationDtoPlanFactPredictBase } from '../models/WellOperationDtoPlanFactPredictBase';
import { request as __request } from '../core/request'; import { request as __request } from '../core/request';
export class WellOperationStatService { export class OperationStatService {
/**
* Формирует данные по среднему и максимальному МСП на кусту по id скважины
* @param idWell id скважины с данного куста (через нее будут полуены данные)
* @returns ClusterRopStatDto Success
* @throws ApiError
*/
public static async getClusterRopStatByIdWell(
idWell: number,
): Promise<ClusterRopStatDto> {
const result = await __request({
method: 'GET',
path: `/api/well/${idWell}/ropStat`,
});
return result.body;
}
/**
* Формирует данные по среднему и максимальному МСП на кусту по uid панели
* @param uid id передающей данные панели
* @returns ClusterRopStatDto Success
* @throws ApiError
*/
public static async getClusterRopStatByUid(
uid: string,
): Promise<ClusterRopStatDto> {
const result = await __request({
method: 'GET',
path: `/api/telemetry/${uid}/ropStat`,
});
return result.body;
}
/** /**
* Получает статстику по скважинам куста * Получает статстику по скважинам куста

View File

@ -0,0 +1,118 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { SetpointInfoDto } from '../models/SetpointInfoDto';
import type { SetpointsRequestDto } from '../models/SetpointsRequestDto';
import { request as __request } from '../core/request';
export class SetpointsService {
/**
* Получает список запросов на изменение уставок.
* @param idWell
* @returns SetpointInfoDto Success
* @throws ApiError
*/
public static async getSetpointsNamesByIdWell(
idWell: number,
): Promise<Array<SetpointInfoDto>> {
const result = await __request({
method: 'GET',
path: `/api/well/${idWell}/setpointsNames`,
});
return result.body;
}
/**
* Добавляет запрос на изменение заданий панели оператора.
* @param idWell
* @param requestBody
* @returns number Success
* @throws ApiError
*/
public static async insert(
idWell: number,
requestBody?: SetpointsRequestDto,
): Promise<number> {
const result = await __request({
method: 'POST',
path: `/api/well/${idWell}/setpoints`,
body: requestBody,
});
return result.body;
}
/**
* Получает список запросов на изменение уставок.
* @param idWell
* @returns SetpointsRequestDto Success
* @throws ApiError
*/
public static async getByIdWell(
idWell: number,
): Promise<Array<SetpointsRequestDto>> {
const result = await __request({
method: 'GET',
path: `/api/well/${idWell}/setpoints`,
});
return result.body;
}
/**
* Отчет о принятии, или отклонении уставок оператором.
* После уставка будет не изменяемой.
* @param uid
* @param id
* @param requestBody можно передать только новый state eg.: {state:3} - принято
* @returns SetpointsRequestDto Success
* @throws ApiError
*/
public static async updateByTelemetryUid(
uid: string,
id: number,
requestBody?: SetpointsRequestDto,
): Promise<SetpointsRequestDto> {
const result = await __request({
method: 'PUT',
path: `/api/telemetry/${uid}/setpoints/${id}`,
body: requestBody,
});
return result.body;
}
/**
* Получает запросы на изменение уставок панели.
* !!SIDE EFFECT: изменяет состояние запросов уставок на отправлено, это не позволит удалить эти уставки после отправки на панель.
* @param uid
* @returns SetpointsRequestDto Success
* @throws ApiError
*/
public static async getByTelemetryUid(
uid: string,
): Promise<Array<SetpointsRequestDto>> {
const result = await __request({
method: 'GET',
path: `/api/telemetry/${uid}/setpoints`,
});
return result.body;
}
/**
* Пробует удалить запрос на изменение уставок. Это будет выполнено, если запрос еще не был отправлен на панель.
* @param idWell
* @param id
* @returns any Success
* @throws ApiError
*/
public static async tryDeleteByIdWell(
idWell: number,
id: number,
): Promise<any> {
const result = await __request({
method: 'DELETE',
path: `/api/well/${idWell}/setpoints/${id}`,
});
return result.body;
}
}