forked from ddrilling/asb_cloud_front
Сервисы обновлены
This commit is contained in:
parent
c327240ea2
commit
a4b62c76a8
@ -9,6 +9,7 @@ export type { ClusterDto } from './models/ClusterDto';
|
||||
export type { ClusterRopStatDto } from './models/ClusterRopStatDto';
|
||||
export type { CompanyDto } from './models/CompanyDto';
|
||||
export type { DatesRangeDto } from './models/DatesRangeDto';
|
||||
export type { DepositBaseDto } from './models/DepositBaseDto';
|
||||
export type { DepositDto } from './models/DepositDto';
|
||||
export type { DrillFlowChartDto } from './models/DrillFlowChartDto';
|
||||
export type { DrillParamsDto } from './models/DrillParamsDto';
|
||||
@ -20,9 +21,8 @@ export type { FilePublishInfoDto } from './models/FilePublishInfoDto';
|
||||
export type { MeasureDto } from './models/MeasureDto';
|
||||
export type { MessageDto } from './models/MessageDto';
|
||||
export type { MessageDtoPaginationContainer } from './models/MessageDtoPaginationContainer';
|
||||
export type { PermissionBaseDto } from './models/PermissionBaseDto';
|
||||
export type { PermissionDto } from './models/PermissionDto';
|
||||
export type { PermissionInfoDto } from './models/PermissionInfoDto';
|
||||
export type { RequestLogUserDto } from './models/RequestLogUserDto';
|
||||
export type { SetpointInfoDto } from './models/SetpointInfoDto';
|
||||
export type { SetpointsRequestDto } from './models/SetpointsRequestDto';
|
||||
export type { StatClusterDto } from './models/StatClusterDto';
|
||||
@ -30,6 +30,7 @@ export type { StatOperationsDto } from './models/StatOperationsDto';
|
||||
export type { StatOperationsDtoPlanFactBase } from './models/StatOperationsDtoPlanFactBase';
|
||||
export type { StatSectionDto } from './models/StatSectionDto';
|
||||
export type { StatWellDto } from './models/StatWellDto';
|
||||
export type { TelemetryBaseDto } from './models/TelemetryBaseDto';
|
||||
export type { TelemetryDataSaubDto } from './models/TelemetryDataSaubDto';
|
||||
export type { TelemetryDataSpinDto } from './models/TelemetryDataSpinDto';
|
||||
export type { TelemetryDto } from './models/TelemetryDto';
|
||||
@ -49,16 +50,15 @@ export type { WellCompositeDto } from './models/WellCompositeDto';
|
||||
export type { WellDepthToDayDto } from './models/WellDepthToDayDto';
|
||||
export type { WellDepthToIntervalDto } from './models/WellDepthToIntervalDto';
|
||||
export type { WellDto } from './models/WellDto';
|
||||
export type { WellInfoDto } from './models/WellInfoDto';
|
||||
export type { WellOperationCategoryDto } from './models/WellOperationCategoryDto';
|
||||
export type { WellOperationDto } from './models/WellOperationDto';
|
||||
export type { WellOperationDtoPaginationContainer } from './models/WellOperationDtoPaginationContainer';
|
||||
export type { WellOperationDtoPlanFactPredictBase } from './models/WellOperationDtoPlanFactPredictBase';
|
||||
export type { WellParamsDto } from './models/WellParamsDto';
|
||||
|
||||
export { AdminClusterService } from './services/AdminClusterService';
|
||||
export { AdminCompanyService } from './services/AdminCompanyService';
|
||||
export { AdminDepositService } from './services/AdminDepositService';
|
||||
export { AdminPermissionInfoService } from './services/AdminPermissionInfoService';
|
||||
export { AdminPermissionService } from './services/AdminPermissionService';
|
||||
export { AdminTelemetryService } from './services/AdminTelemetryService';
|
||||
export { AdminUserRoleService } from './services/AdminUserRoleService';
|
||||
|
@ -2,6 +2,7 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { DepositBaseDto } from './DepositBaseDto';
|
||||
import type { WellDto } from './WellDto';
|
||||
|
||||
export type ClusterDto = {
|
||||
@ -9,5 +10,7 @@ export type ClusterDto = {
|
||||
caption?: string | null;
|
||||
latitude?: number | null;
|
||||
longitude?: number | null;
|
||||
idDeposit?: number | null;
|
||||
deposit?: DepositBaseDto;
|
||||
wells?: Array<WellDto> | null;
|
||||
}
|
||||
|
@ -2,10 +2,9 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
export type WellParamsDto = {
|
||||
export type DepositBaseDto = {
|
||||
id?: number;
|
||||
caption?: string | null;
|
||||
latitude?: number | null;
|
||||
longitude?: number | null;
|
||||
idWellType?: number;
|
||||
idState?: number;
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
export type PermissionBaseDto = {
|
||||
idPermissionInfo?: number;
|
||||
permissionName?: string | null;
|
||||
value?: number;
|
||||
}
|
@ -3,8 +3,7 @@
|
||||
/* eslint-disable */
|
||||
|
||||
export type PermissionDto = {
|
||||
idPermissionInfo?: number;
|
||||
permissionName?: string | null;
|
||||
value?: number;
|
||||
idUserRole?: number;
|
||||
id?: number;
|
||||
name?: string | null;
|
||||
description?: string | null;
|
||||
}
|
||||
|
@ -1,10 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
export type PermissionInfoDto = {
|
||||
id?: number;
|
||||
name?: string | null;
|
||||
description?: string | null;
|
||||
bitDescription?: Record<string, string> | null;
|
||||
}
|
16
src/services/api/models/RequestLogUserDto.ts
Normal file
16
src/services/api/models/RequestLogUserDto.ts
Normal file
@ -0,0 +1,16 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { UserDto } from './UserDto';
|
||||
|
||||
export type RequestLogUserDto = {
|
||||
userId?: number;
|
||||
login?: string | null;
|
||||
ip?: string | null;
|
||||
elapsedMs?: number;
|
||||
lastDate?: string;
|
||||
requests?: number;
|
||||
errors?: number;
|
||||
user?: UserDto;
|
||||
}
|
@ -3,8 +3,8 @@
|
||||
/* eslint-disable */
|
||||
|
||||
export type StatOperationsDto = {
|
||||
start?: string;
|
||||
end?: string;
|
||||
start?: string | null;
|
||||
end?: string | null;
|
||||
wellDepthStart?: number;
|
||||
wellDepthEnd?: number;
|
||||
routeSpeed?: number;
|
||||
|
11
src/services/api/models/TelemetryBaseDto.ts
Normal file
11
src/services/api/models/TelemetryBaseDto.ts
Normal file
@ -0,0 +1,11 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { TelemetryInfoDto } from './TelemetryInfoDto';
|
||||
|
||||
export type TelemetryBaseDto = {
|
||||
id?: number;
|
||||
remoteUid?: string | null;
|
||||
info?: TelemetryInfoDto;
|
||||
}
|
@ -3,9 +3,12 @@
|
||||
/* eslint-disable */
|
||||
|
||||
import type { TelemetryInfoDto } from './TelemetryInfoDto';
|
||||
import type { WellInfoDto } from './WellInfoDto';
|
||||
|
||||
export type TelemetryDto = {
|
||||
id?: number;
|
||||
remoteUid?: string | null;
|
||||
info?: TelemetryInfoDto;
|
||||
idWell?: number | null;
|
||||
well?: WellInfoDto;
|
||||
}
|
||||
|
@ -14,5 +14,6 @@ export type UserDto = {
|
||||
phone?: string | null;
|
||||
position?: string | null;
|
||||
idCompany?: number | null;
|
||||
idState?: number | null;
|
||||
company?: CompanyDto;
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ export type UserExtendedDto = {
|
||||
phone?: string | null;
|
||||
position?: string | null;
|
||||
idCompany?: number | null;
|
||||
idState?: number | null;
|
||||
company?: CompanyDto;
|
||||
roleNames?: Array<string> | null;
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ export type UserRegistrationDto = {
|
||||
phone?: string | null;
|
||||
position?: string | null;
|
||||
idCompany?: number | null;
|
||||
idState?: number | null;
|
||||
company?: CompanyDto;
|
||||
password?: string | null;
|
||||
}
|
||||
|
@ -2,12 +2,12 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { PermissionBaseDto } from './PermissionBaseDto';
|
||||
import type { PermissionDto } from './PermissionDto';
|
||||
|
||||
export type UserRoleDto = {
|
||||
id?: number;
|
||||
caption?: string | null;
|
||||
idParent?: number | null;
|
||||
idType?: number;
|
||||
permissions?: Array<PermissionBaseDto> | null;
|
||||
permissions?: Array<PermissionDto> | null;
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
/* eslint-disable */
|
||||
|
||||
import type { CompanyDto } from './CompanyDto';
|
||||
import type { PermissionBaseDto } from './PermissionBaseDto';
|
||||
import type { PermissionDto } from './PermissionDto';
|
||||
|
||||
export type UserTokenDto = {
|
||||
id?: number;
|
||||
@ -15,8 +15,9 @@ export type UserTokenDto = {
|
||||
phone?: string | null;
|
||||
position?: string | null;
|
||||
idCompany?: number | null;
|
||||
idState?: number | null;
|
||||
company?: CompanyDto;
|
||||
roleNames?: Array<string> | null;
|
||||
permissions?: Array<PermissionBaseDto> | null;
|
||||
permissions?: Array<PermissionDto> | null;
|
||||
token?: string | null;
|
||||
}
|
||||
|
@ -2,7 +2,8 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { TelemetryDto } from './TelemetryDto';
|
||||
import type { CompanyDto } from './CompanyDto';
|
||||
import type { TelemetryBaseDto } from './TelemetryBaseDto';
|
||||
|
||||
export type WellDto = {
|
||||
caption?: string | null;
|
||||
@ -16,5 +17,7 @@ export type WellDto = {
|
||||
idCluster?: number | null;
|
||||
idState?: number;
|
||||
lastTelemetryDate?: string;
|
||||
telemetry?: TelemetryDto;
|
||||
idTelemetry?: number | null;
|
||||
telemetry?: TelemetryBaseDto;
|
||||
companies?: Array<CompanyDto> | null;
|
||||
}
|
||||
|
9
src/services/api/models/WellInfoDto.ts
Normal file
9
src/services/api/models/WellInfoDto.ts
Normal file
@ -0,0 +1,9 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
export type WellInfoDto = {
|
||||
caption?: string | null;
|
||||
cluster?: string | null;
|
||||
deposit?: string | null;
|
||||
}
|
@ -1,90 +0,0 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { PermissionInfoDto } from '../models/PermissionInfoDto';
|
||||
import { request as __request } from '../core/request';
|
||||
|
||||
export class AdminPermissionInfoService {
|
||||
|
||||
/**
|
||||
* Получить все записи
|
||||
* @returns PermissionInfoDto Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static async getAll(): Promise<Array<PermissionInfoDto>> {
|
||||
const result = await __request({
|
||||
method: 'GET',
|
||||
path: `/api/admin/permissionInfo/all`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
/**
|
||||
* Получить одну запись по Id
|
||||
* @param id id записи
|
||||
* @returns PermissionInfoDto Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static async get(
|
||||
id: number,
|
||||
): Promise<PermissionInfoDto> {
|
||||
const result = await __request({
|
||||
method: 'GET',
|
||||
path: `/api/admin/permissionInfo/${id}`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
/**
|
||||
* Редактировать запись по id
|
||||
* @param id id записи
|
||||
* @param requestBody запись
|
||||
* @returns number Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static async put(
|
||||
id: number,
|
||||
requestBody?: PermissionInfoDto,
|
||||
): Promise<number> {
|
||||
const result = await __request({
|
||||
method: 'PUT',
|
||||
path: `/api/admin/permissionInfo/${id}`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
/**
|
||||
* Удалить запись по id
|
||||
* @param id id записи
|
||||
* @returns number Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static async delete(
|
||||
id: number,
|
||||
): Promise<number> {
|
||||
const result = await __request({
|
||||
method: 'DELETE',
|
||||
path: `/api/admin/permissionInfo/${id}`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
/**
|
||||
* Добавить запись
|
||||
* @param requestBody запись
|
||||
* @returns number Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static async insert(
|
||||
requestBody?: PermissionInfoDto,
|
||||
): Promise<number> {
|
||||
const result = await __request({
|
||||
method: 'POST',
|
||||
path: `/api/admin/permissionInfo`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
@ -7,32 +7,77 @@ import { request as __request } from '../core/request';
|
||||
export class AdminPermissionService {
|
||||
|
||||
/**
|
||||
* Получает список всех разрешений для роли
|
||||
* @param idRole id роли
|
||||
* Получить все записи
|
||||
* @returns PermissionDto Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static async getByIdRole(
|
||||
idRole?: number,
|
||||
): Promise<Array<PermissionDto>> {
|
||||
public static async getAll(): Promise<Array<PermissionDto>> {
|
||||
const result = await __request({
|
||||
method: 'GET',
|
||||
path: `/api/admin/permission`,
|
||||
query: {
|
||||
'idRole': idRole,
|
||||
},
|
||||
path: `/api/admin/permission/all`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
/**
|
||||
* Добавляет разрешения для роли
|
||||
* @param requestBody Объекты новых разрешений для справочника
|
||||
* Получить одну запись по Id
|
||||
* @param id id записи
|
||||
* @returns PermissionDto Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static async get(
|
||||
id: number,
|
||||
): Promise<PermissionDto> {
|
||||
const result = await __request({
|
||||
method: 'GET',
|
||||
path: `/api/admin/permission/${id}`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
/**
|
||||
* Редактировать запись по id
|
||||
* @param id id записи
|
||||
* @param requestBody запись
|
||||
* @returns number Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static async insertRange(
|
||||
requestBody?: Array<PermissionDto>,
|
||||
public static async put(
|
||||
id: number,
|
||||
requestBody?: PermissionDto,
|
||||
): Promise<number> {
|
||||
const result = await __request({
|
||||
method: 'PUT',
|
||||
path: `/api/admin/permission/${id}`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
/**
|
||||
* Удалить запись по id
|
||||
* @param id id записи
|
||||
* @returns number Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static async delete(
|
||||
id: number,
|
||||
): Promise<number> {
|
||||
const result = await __request({
|
||||
method: 'DELETE',
|
||||
path: `/api/admin/permission/${id}`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
/**
|
||||
* Добавить запись
|
||||
* @param requestBody запись
|
||||
* @returns number Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static async insert(
|
||||
requestBody?: PermissionDto,
|
||||
): Promise<number> {
|
||||
const result = await __request({
|
||||
method: 'POST',
|
||||
@ -42,39 +87,4 @@ export class AdminPermissionService {
|
||||
return result.body;
|
||||
}
|
||||
|
||||
/**
|
||||
* Обновляет разрешение для роли
|
||||
* @param requestBody Объект разрешения для справочника
|
||||
* @returns number Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static async update(
|
||||
requestBody?: PermissionDto,
|
||||
): Promise<number> {
|
||||
const result = await __request({
|
||||
method: 'PUT',
|
||||
path: `/api/admin/permission`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
/**
|
||||
* Удаляет разрешение для роли
|
||||
* @param idUserRole id роли для удаления разрешения
|
||||
* @param idPermission id разрешения
|
||||
* @returns number Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static async delete(
|
||||
idUserRole: number,
|
||||
idPermission: number,
|
||||
): Promise<number> {
|
||||
const result = await __request({
|
||||
method: 'DELETE',
|
||||
path: `/api/admin/permission/${idPermission}/${idUserRole}`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
@ -7,30 +7,19 @@ 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
|
||||
* Merge telemetries. No body required.
|
||||
* @param idFrom
|
||||
* @param idTo
|
||||
* @returns any Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static async mergeTelemetries(
|
||||
requestBody?: Array<number>,
|
||||
idFrom: number,
|
||||
idTo: number,
|
||||
): Promise<any> {
|
||||
const result = await __request({
|
||||
method: 'POST',
|
||||
path: `/merge`,
|
||||
body: requestBody,
|
||||
path: `/merge/${idFrom}/${idTo}`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
@ -39,18 +39,22 @@ export class MeasureService {
|
||||
}
|
||||
|
||||
/**
|
||||
* История замеров по скважине
|
||||
* @param idWell
|
||||
* @param idCategory
|
||||
* @param idCategory Категория скважины. Не обязательный параметр.
|
||||
* @returns any Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static async getHisory(
|
||||
idWell: number,
|
||||
idCategory: number,
|
||||
idCategory?: number,
|
||||
): Promise<any> {
|
||||
const result = await __request({
|
||||
method: 'GET',
|
||||
path: `/api/well/${idWell}/measure/history`,
|
||||
query: {
|
||||
'idCategory': idCategory,
|
||||
},
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { RequestLogUserDto } from '../models/RequestLogUserDto';
|
||||
import { request as __request } from '../core/request';
|
||||
|
||||
export class RequerstTrackerService {
|
||||
@ -84,12 +85,12 @@ export class RequerstTrackerService {
|
||||
/**
|
||||
* Получить последних пользователей обращавшихся к серверу. Уникальность пользователя проверяется по логину и Ip.
|
||||
* @param take от 1 до 1000
|
||||
* @returns any Success
|
||||
* @returns RequestLogUserDto Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static async getUsersStat(
|
||||
take: number = 512,
|
||||
): Promise<any> {
|
||||
): Promise<Array<RequestLogUserDto>> {
|
||||
const result = await __request({
|
||||
method: 'GET',
|
||||
path: `/api/RequerstTracker/users`,
|
||||
|
@ -8,6 +8,22 @@ import { request as __request } from '../core/request';
|
||||
|
||||
export class WellOperationService {
|
||||
|
||||
/**
|
||||
* Возвращает словарь типов секций
|
||||
* @param idWell
|
||||
* @returns string Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static async getSectionTypes(
|
||||
idWell: string,
|
||||
): Promise<Record<string, string>> {
|
||||
const result = await __request({
|
||||
method: 'GET',
|
||||
path: `/api/well/${idWell}/wellOperations/sectionTypes`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
/**
|
||||
* Возвращает список имен типов операций на скважине
|
||||
* @param idWell
|
||||
|
@ -2,7 +2,6 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { WellDto } from '../models/WellDto';
|
||||
import type { WellParamsDto } from '../models/WellParamsDto';
|
||||
import { request as __request } from '../core/request';
|
||||
|
||||
export class WellService {
|
||||
@ -31,7 +30,7 @@ export class WellService {
|
||||
*/
|
||||
public static async updateWell(
|
||||
idWell?: number,
|
||||
requestBody?: WellParamsDto,
|
||||
requestBody?: WellDto,
|
||||
): Promise<number> {
|
||||
const result = await __request({
|
||||
method: 'PUT',
|
||||
@ -63,17 +62,4 @@ export class WellService {
|
||||
return result.body;
|
||||
}
|
||||
|
||||
/**
|
||||
* Возвращает список скважин, передающих телеметрию в данный момент
|
||||
* @returns WellDto Success
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static async getTransmittingWells(): Promise<Array<WellDto>> {
|
||||
const result = await __request({
|
||||
method: 'GET',
|
||||
path: `/api/well/transmittingWells`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
export type { RawDate } from './datetime'
|
||||
export type { RawDate, timeInS } from './datetime'
|
||||
export { isRawDate, formatDate, defaultFormat, periodToString } from './datetime'
|
||||
|
||||
export const headerHeight = 64
|
||||
|
Loading…
Reference in New Issue
Block a user