forked from ddrilling/asb_cloud_front
api client update
This commit is contained in:
parent
73e0dded99
commit
28ad2f63f1
@ -1,7 +1,7 @@
|
|||||||
import { ChartDepthToDay } from './charts/ChartDepthToDay'
|
import { ChartDepthToDay } from './charts/ChartDepthToDay'
|
||||||
import notify from "../components/notify"
|
import notify from "../components/notify"
|
||||||
import { useState, useEffect } from 'react'
|
import { useState, useEffect } from 'react'
|
||||||
import { AnalyticsService } from "../services/api"
|
import { TelemetryAnalyticsService } from "../services/api"
|
||||||
import LoaderPortal from '../components/LoaderPortal'
|
import LoaderPortal from '../components/LoaderPortal'
|
||||||
|
|
||||||
const lines = [
|
const lines = [
|
||||||
@ -19,7 +19,7 @@ export function AnalysisDepthToDay({idWell}) {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setLoader(true)
|
setLoader(true)
|
||||||
AnalyticsService.getWellDepthToDay(idWell)
|
TelemetryAnalyticsService.getWellDepthToDay(idWell)
|
||||||
.then(handleReceiveDepthToDayData)
|
.then(handleReceiveDepthToDayData)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
notify(`Не удалось получить данные для Анализа Глубина-День по скважине "${idWell}"`,
|
notify(`Не удалось получить данные для Анализа Глубина-День по скважине "${idWell}"`,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { useParams } from "react-router-dom"
|
import { useParams } from "react-router-dom"
|
||||||
import notify from "../components/notify"
|
import notify from "../components/notify"
|
||||||
import { useState, useEffect } from 'react'
|
import { useState, useEffect } from 'react'
|
||||||
import { AnalyticsService } from '../services/api'
|
import { TelemetryAnalyticsService } from '../services/api'
|
||||||
import { ChartDepthToInterval } from './charts/ChartDepthToInterval'
|
import { ChartDepthToInterval } from './charts/ChartDepthToInterval'
|
||||||
import { Select } from 'antd'
|
import { Select } from 'antd'
|
||||||
import LoaderPortal from '../components/LoaderPortal'
|
import LoaderPortal from '../components/LoaderPortal'
|
||||||
@ -35,7 +35,7 @@ export function AnalysisDepthToInterval() {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setLoader(true)
|
setLoader(true)
|
||||||
AnalyticsService.getWellDepthToInterval(id, chartInterval)
|
TelemetryAnalyticsService.getWellDepthToInterval(id, chartInterval)
|
||||||
.then(handleReceiveDepthToIntervalData)
|
.then(handleReceiveDepthToIntervalData)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
notify(`Не удалось получить данные для Анализа скорость проходки-интервал "${id}"`,
|
notify(`Не удалось получить данные для Анализа скорость проходки-интервал "${id}"`,
|
||||||
|
@ -2,7 +2,7 @@ import { useParams } from "react-router-dom"
|
|||||||
import { DatePicker, ConfigProvider } from 'antd';
|
import { DatePicker, ConfigProvider } from 'antd';
|
||||||
import notify from "../components/notify"
|
import notify from "../components/notify"
|
||||||
import { useState, useEffect } from 'react'
|
import { useState, useEffect } from 'react'
|
||||||
import { AnalyticsService } from '../services/api'
|
import { TelemetryAnalyticsService } from '../services/api'
|
||||||
import { ChartOperationTime } from './charts/ChartOperationTime'
|
import { ChartOperationTime } from './charts/ChartOperationTime'
|
||||||
import locale from "antd/lib/locale/ru_RU";
|
import locale from "antd/lib/locale/ru_RU";
|
||||||
import LoaderPortal from '../components/LoaderPortal'
|
import LoaderPortal from '../components/LoaderPortal'
|
||||||
@ -34,7 +34,7 @@ export function AnalysisOperationTime() {
|
|||||||
begin = range[0].toISOString()
|
begin = range[0].toISOString()
|
||||||
end = range[1].toISOString()
|
end = range[1].toISOString()
|
||||||
}
|
}
|
||||||
AnalyticsService.getOperationsSummary(id, begin, end)
|
TelemetryAnalyticsService.getOperationsSummary(id, begin, end)
|
||||||
.then(handleReceiveOperationTimeData)
|
.then(handleReceiveOperationTimeData)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
notify(`Не удалось получить данные для Анализа Операция-Время по скважине "${id}" за период с ${begin} по ${end}`,
|
notify(`Не удалось получить данные для Анализа Операция-Время по скважине "${id}" за период с ${begin} по ${end}`,
|
||||||
|
@ -1,159 +1,166 @@
|
|||||||
import {Table, Select, DatePicker, ConfigProvider} from 'antd';
|
import { Table, Select, DatePicker, ConfigProvider } from "antd";
|
||||||
import {AnalyticsService} from '../services/api'
|
import { TelemetryAnalyticsService } from "../services/api";
|
||||||
import {useState, useEffect} from 'react'
|
import { useState, useEffect } from "react";
|
||||||
import {useParams} from 'react-router-dom'
|
import { useParams } from "react-router-dom";
|
||||||
import notify from '../components/notify'
|
import notify from "../components/notify";
|
||||||
import LoaderPortal from '../components/LoaderPortal'
|
import LoaderPortal from "../components/LoaderPortal";
|
||||||
import locale from "antd/lib/locale/ru_RU";
|
import locale from "antd/lib/locale/ru_RU";
|
||||||
import moment from 'moment'
|
import moment from "moment";
|
||||||
import '../styles/message.css'
|
import "../styles/message.css";
|
||||||
|
|
||||||
const {Option} = Select
|
const { Option } = Select;
|
||||||
const pageSize = 26
|
const pageSize = 26;
|
||||||
const {RangePicker} = DatePicker;
|
const { RangePicker } = DatePicker;
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: 'Название операции',
|
title: "Название операции",
|
||||||
key: 'name',
|
key: "name",
|
||||||
dataIndex: 'name',
|
dataIndex: "name",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Дата начала операции',
|
title: "Дата начала операции",
|
||||||
key: 'beginDate',
|
key: "beginDate",
|
||||||
dataIndex: 'beginDate',
|
dataIndex: "beginDate",
|
||||||
render: (item) => moment.utc(item).local().format('DD MMM YYYY, HH:mm:ss')
|
render: (item) => moment.utc(item).local().format("DD MMM YYYY, HH:mm:ss"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Дата окончания операции',
|
title: "Дата окончания операции",
|
||||||
key: 'endDate',
|
key: "endDate",
|
||||||
dataIndex: 'endDate',
|
dataIndex: "endDate",
|
||||||
render: (item) => moment.utc(item).local().format('DD MMM YYYY, HH:mm:ss')
|
render: (item) => moment.utc(item).local().format("DD MMM YYYY, HH:mm:ss"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Глубина скважины в начале операции',
|
title: "Глубина скважины в начале операции",
|
||||||
key: 'beginWellDepth',
|
key: "beginWellDepth",
|
||||||
dataIndex: 'startWellDepth',
|
dataIndex: "startWellDepth",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Глубина скважины в конце операции',
|
title: "Глубина скважины в конце операции",
|
||||||
key: 'endWellDepth',
|
key: "endWellDepth",
|
||||||
dataIndex: 'endWellDepth',
|
dataIndex: "endWellDepth",
|
||||||
}
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const filterOptions = [
|
const filterOptions = [
|
||||||
{label: 'Невозможно определить операцию', value: 1},
|
{ label: "Невозможно определить операцию", value: 1 },
|
||||||
{label: 'Роторное бурение', value: 2},
|
{ label: "Роторное бурение", value: 2 },
|
||||||
{label: 'Слайдирование', value: 3},
|
{ label: "Слайдирование", value: 3 },
|
||||||
{label: 'Подъем с проработкой', value: 4},
|
{ label: "Подъем с проработкой", value: 4 },
|
||||||
{label: 'Спуск с проработкой', value: 5},
|
{ label: "Спуск с проработкой", value: 5 },
|
||||||
{label: 'Подъем с промывкой', value: 6},
|
{ label: "Подъем с промывкой", value: 6 },
|
||||||
{label: 'Спуск с промывкой', value: 7},
|
{ label: "Спуск с промывкой", value: 7 },
|
||||||
{label: 'Спуск в скважину', value: 8},
|
{ label: "Спуск в скважину", value: 8 },
|
||||||
{label: 'Спуск с вращением', value: 9},
|
{ label: "Спуск с вращением", value: 9 },
|
||||||
{label: 'Подъем из скважины', value: 10},
|
{ label: "Подъем из скважины", value: 10 },
|
||||||
{label: 'Подъем с вращением', value: 11},
|
{ label: "Подъем с вращением", value: 11 },
|
||||||
{label: 'Промывка в покое', value: 12},
|
{ label: "Промывка в покое", value: 12 },
|
||||||
{label: 'Промывка с вращением', value: 13},
|
{ label: "Промывка с вращением", value: 13 },
|
||||||
{label: 'Удержание в клиньях', value: 14},
|
{ label: "Удержание в клиньях", value: 14 },
|
||||||
{label: 'Неподвижное состояние', value: 15},
|
{ label: "Неподвижное состояние", value: 15 },
|
||||||
{label: 'Вращение без циркуляции', value: 16},
|
{ label: "Вращение без циркуляции", value: 16 },
|
||||||
{label: 'На поверхности', value: 17}
|
{ label: "На поверхности", value: 17 },
|
||||||
]
|
];
|
||||||
|
|
||||||
export default function WellAnalysis() {
|
export default function WellAnalysis() {
|
||||||
let {id} = useParams()
|
let { id } = useParams();
|
||||||
|
|
||||||
const [page, setPage] = useState(1)
|
const [page, setPage] = useState(1);
|
||||||
const [range, setRange] = useState([])
|
const [range, setRange] = useState([]);
|
||||||
const [categories, setCategories] = useState([])
|
const [categories, setCategories] = useState([]);
|
||||||
const [pagination, setPagination] = useState(null)
|
const [pagination, setPagination] = useState(null);
|
||||||
const [operations, setOperations] = useState([])
|
const [operations, setOperations] = useState([]);
|
||||||
|
|
||||||
const [loader, setLoader] = useState(false)
|
const [loader, setLoader] = useState(false);
|
||||||
|
|
||||||
const children = filterOptions.map((line) => <Option key={line.value}>{line.label}</Option>)
|
const children = filterOptions.map((line) => (
|
||||||
|
<Option key={line.value}>{line.label}</Option>
|
||||||
|
));
|
||||||
|
|
||||||
const onChangeRange = (range) => {
|
const onChangeRange = (range) => {
|
||||||
setRange(range)
|
setRange(range);
|
||||||
}
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const GetOperations = async () => {
|
const GetOperations = async () => {
|
||||||
setLoader(true)
|
setLoader(true);
|
||||||
try {
|
try {
|
||||||
let begin = null
|
let begin = null;
|
||||||
let end = null
|
let end = null;
|
||||||
if (range?.length > 1) {
|
if (range?.length > 1) {
|
||||||
begin = range[0].toISOString()
|
begin = range[0].toISOString();
|
||||||
end = range[1].toISOString()
|
end = range[1].toISOString();
|
||||||
}
|
|
||||||
|
|
||||||
await AnalyticsService.getOperationsByWell(
|
|
||||||
`${id}`,
|
|
||||||
(page-1) * pageSize,
|
|
||||||
pageSize,
|
|
||||||
categories,
|
|
||||||
begin,
|
|
||||||
end).then((paginatedOperations) => {
|
|
||||||
setOperations(paginatedOperations?.items.map(o => {
|
|
||||||
return {
|
|
||||||
key: o.id,
|
|
||||||
begin: o.date,
|
|
||||||
...o
|
|
||||||
}
|
|
||||||
}))
|
|
||||||
|
|
||||||
setPagination({
|
|
||||||
total: paginatedOperations?.count,
|
|
||||||
current: Math.floor(paginatedOperations?.skip / pageSize),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
)
|
|
||||||
} catch (ex) {
|
|
||||||
notify(`Не удалось загрузить операции по скважине "${id}"`, 'error')
|
|
||||||
console.log(ex)
|
|
||||||
}
|
|
||||||
setLoader(false)
|
|
||||||
}
|
}
|
||||||
GetOperations()
|
|
||||||
}, [id, categories, range, page])
|
|
||||||
|
|
||||||
return(<>
|
await TelemetryAnalyticsService.getOperationsByWell(
|
||||||
<div className='filter-group'>
|
`${id}`,
|
||||||
<h3 className='filter-group-heading'>Фильтр операций</h3>
|
(page - 1) * pageSize,
|
||||||
<Select
|
pageSize,
|
||||||
mode="multiple"
|
categories,
|
||||||
allowClear
|
begin,
|
||||||
placeholder="Фильтр операций"
|
end
|
||||||
className="filter-selector"
|
).then((paginatedOperations) => {
|
||||||
value={categories}
|
setOperations(
|
||||||
onChange={setCategories}>
|
paginatedOperations?.items.map((o) => {
|
||||||
{children}
|
return {
|
||||||
</Select>
|
key: o.id,
|
||||||
<ConfigProvider locale={locale}>
|
begin: o.date,
|
||||||
<RangePicker
|
...o,
|
||||||
showTime
|
};
|
||||||
placeholder={["Дата начала операции", "Дата окончания операции"]}
|
})
|
||||||
onChange={onChangeRange}
|
);
|
||||||
/>
|
|
||||||
</ConfigProvider>
|
setPagination({
|
||||||
</div>
|
total: paginatedOperations?.count,
|
||||||
<LoaderPortal show={loader}>
|
current: Math.floor(paginatedOperations?.skip / pageSize),
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} catch (ex) {
|
||||||
|
notify(`Не удалось загрузить операции по скважине "${id}"`, "error");
|
||||||
|
console.log(ex);
|
||||||
|
}
|
||||||
|
setLoader(false);
|
||||||
|
};
|
||||||
|
GetOperations();
|
||||||
|
}, [id, categories, range, page]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div className="filter-group">
|
||||||
|
<h3 className="filter-group-heading">Фильтр операций</h3>
|
||||||
|
<Select
|
||||||
|
mode="multiple"
|
||||||
|
allowClear
|
||||||
|
placeholder="Фильтр операций"
|
||||||
|
className="filter-selector"
|
||||||
|
value={categories}
|
||||||
|
onChange={setCategories}
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</Select>
|
||||||
|
<ConfigProvider locale={locale}>
|
||||||
|
<RangePicker
|
||||||
|
showTime
|
||||||
|
placeholder={["Дата начала операции", "Дата окончания операции"]}
|
||||||
|
onChange={onChangeRange}
|
||||||
|
/>
|
||||||
|
</ConfigProvider>
|
||||||
|
</div>
|
||||||
|
<LoaderPortal show={loader}>
|
||||||
<Table
|
<Table
|
||||||
columns={columns}
|
columns={columns}
|
||||||
dataSource={operations}
|
dataSource={operations}
|
||||||
size={'small'}
|
size={"small"}
|
||||||
pagination={{
|
pagination={{
|
||||||
pageSize: pageSize,
|
pageSize: pageSize,
|
||||||
showSizeChanger: false,
|
showSizeChanger: false,
|
||||||
total: pagination?.total,
|
total: pagination?.total,
|
||||||
current: page,
|
current: page,
|
||||||
onChange: (page) => setPage(page)
|
onChange: (page) => setPage(page),
|
||||||
}}
|
}}
|
||||||
rowKey={(record) => record.id}
|
rowKey={(record) => record.id}
|
||||||
/>
|
/>
|
||||||
</LoaderPortal>
|
</LoaderPortal>
|
||||||
</>)
|
</>
|
||||||
}
|
);
|
||||||
|
}
|
||||||
|
@ -12,8 +12,8 @@ export type { DataSaubBaseDto } from './models/DataSaubBaseDto';
|
|||||||
export type { DatesRangeDto } from './models/DatesRangeDto';
|
export type { DatesRangeDto } from './models/DatesRangeDto';
|
||||||
export type { DepositDto } from './models/DepositDto';
|
export type { DepositDto } from './models/DepositDto';
|
||||||
export type { EventDto } from './models/EventDto';
|
export type { EventDto } from './models/EventDto';
|
||||||
export type { FilePropertiesDto } from './models/FilePropertiesDto';
|
export type { FileInfoDto } from './models/FileInfoDto';
|
||||||
export type { FilePropertiesDtoPaginationContainer } from './models/FilePropertiesDtoPaginationContainer';
|
export type { FileInfoDtoPaginationContainer } from './models/FileInfoDtoPaginationContainer';
|
||||||
export type { FluidDataDto } from './models/FluidDataDto';
|
export type { FluidDataDto } from './models/FluidDataDto';
|
||||||
export type { MessageDto } from './models/MessageDto';
|
export type { MessageDto } from './models/MessageDto';
|
||||||
export type { MessageDtoPaginationContainer } from './models/MessageDtoPaginationContainer';
|
export type { MessageDtoPaginationContainer } from './models/MessageDtoPaginationContainer';
|
||||||
@ -30,10 +30,11 @@ export type { WellDepthToDayDto } from './models/WellDepthToDayDto';
|
|||||||
export type { WellDepthToIntervalDto } from './models/WellDepthToIntervalDto';
|
export type { WellDepthToIntervalDto } from './models/WellDepthToIntervalDto';
|
||||||
export type { WellDto } from './models/WellDto';
|
export type { WellDto } from './models/WellDto';
|
||||||
export type { WellOperationDto } from './models/WellOperationDto';
|
export type { WellOperationDto } from './models/WellOperationDto';
|
||||||
|
export type { WellOperationDtoPaginationContainer } from './models/WellOperationDtoPaginationContainer';
|
||||||
export type { WellSectionDto } from './models/WellSectionDto';
|
export type { WellSectionDto } from './models/WellSectionDto';
|
||||||
|
export type { WellSectionDtoPaginationContainer } from './models/WellSectionDtoPaginationContainer';
|
||||||
export type { WellStatDto } from './models/WellStatDto';
|
export type { WellStatDto } from './models/WellStatDto';
|
||||||
|
|
||||||
export { AnalyticsService } from './services/AnalyticsService';
|
|
||||||
export { AuthService } from './services/AuthService';
|
export { AuthService } from './services/AuthService';
|
||||||
export { ClusterService } from './services/ClusterService';
|
export { ClusterService } from './services/ClusterService';
|
||||||
export { DataService } from './services/DataService';
|
export { DataService } from './services/DataService';
|
||||||
@ -44,6 +45,8 @@ export { MessageService } from './services/MessageService';
|
|||||||
export { MudDiagramService } from './services/MudDiagramService';
|
export { MudDiagramService } from './services/MudDiagramService';
|
||||||
export { NnbDataService } from './services/NnbDataService';
|
export { NnbDataService } from './services/NnbDataService';
|
||||||
export { ReportService } from './services/ReportService';
|
export { ReportService } from './services/ReportService';
|
||||||
|
export { TelemetryAnalyticsService } from './services/TelemetryAnalyticsService';
|
||||||
export { TelemetryService } from './services/TelemetryService';
|
export { TelemetryService } from './services/TelemetryService';
|
||||||
|
export { WellOperationService } from './services/WellOperationService';
|
||||||
export { WellSectionService } from './services/WellSectionService';
|
export { WellSectionService } from './services/WellSectionService';
|
||||||
export { WellService } from './services/WellService';
|
export { WellService } from './services/WellService';
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
|
|
||||||
export type FilePropertiesDto = {
|
export type FileInfoDto = {
|
||||||
id?: number;
|
id?: number;
|
||||||
name?: string | null;
|
name?: string | null;
|
||||||
idCategory?: number;
|
idCategory?: number;
|
||||||
uploadDate?: string;
|
uploadDate?: string;
|
||||||
userName?: string | null;
|
authorName?: string | null;
|
||||||
}
|
}
|
12
src/services/api/models/FileInfoDtoPaginationContainer.ts
Normal file
12
src/services/api/models/FileInfoDtoPaginationContainer.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
|
import type { FileInfoDto } from './FileInfoDto';
|
||||||
|
|
||||||
|
export type FileInfoDtoPaginationContainer = {
|
||||||
|
skip?: number;
|
||||||
|
take?: number;
|
||||||
|
count?: number;
|
||||||
|
items?: Array<FileInfoDto> | null;
|
||||||
|
}
|
@ -1,12 +0,0 @@
|
|||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
|
|
||||||
import type { FilePropertiesDto } from './FilePropertiesDto';
|
|
||||||
|
|
||||||
export type FilePropertiesDtoPaginationContainer = {
|
|
||||||
skip?: number;
|
|
||||||
take?: number;
|
|
||||||
count?: number;
|
|
||||||
items?: Array<FilePropertiesDto> | null;
|
|
||||||
}
|
|
@ -5,8 +5,14 @@
|
|||||||
export type WellOperationDto = {
|
export type WellOperationDto = {
|
||||||
id?: number;
|
id?: number;
|
||||||
idWell?: number;
|
idWell?: number;
|
||||||
caption?: string | null;
|
idWellSectionType?: number;
|
||||||
description?: string | null;
|
wellSectionTypeName?: string | null;
|
||||||
casingSection?: number;
|
idOperationCategory?: number;
|
||||||
|
categoryName?: string | null;
|
||||||
|
type?: number;
|
||||||
wellDepth?: number;
|
wellDepth?: number;
|
||||||
|
startDate?: string;
|
||||||
|
durationHours?: number;
|
||||||
|
info?: string | null;
|
||||||
|
comment?: string | null;
|
||||||
}
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
|
import type { WellOperationDto } from './WellOperationDto';
|
||||||
|
|
||||||
|
export type WellOperationDtoPaginationContainer = {
|
||||||
|
skip?: number;
|
||||||
|
take?: number;
|
||||||
|
count?: number;
|
||||||
|
items?: Array<WellOperationDto> | null;
|
||||||
|
}
|
12
src/services/api/models/WellSectionDtoPaginationContainer.ts
Normal file
12
src/services/api/models/WellSectionDtoPaginationContainer.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
|
import type { WellSectionDto } from './WellSectionDto';
|
||||||
|
|
||||||
|
export type WellSectionDtoPaginationContainer = {
|
||||||
|
skip?: number;
|
||||||
|
take?: number;
|
||||||
|
count?: number;
|
||||||
|
items?: Array<WellSectionDto> | null;
|
||||||
|
}
|
@ -46,7 +46,7 @@ idWell: number,
|
|||||||
): Promise<DatesRangeDto> {
|
): Promise<DatesRangeDto> {
|
||||||
const result = await __request({
|
const result = await __request({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
path: `/api/well/${idWell}/dataDatesRange`,
|
path: `/api/well/${idWell}/data/datesRange`,
|
||||||
});
|
});
|
||||||
return result.body;
|
return result.body;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* istanbul ignore file */
|
/* istanbul ignore file */
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import type { FilePropertiesDtoPaginationContainer } from '../models/FilePropertiesDtoPaginationContainer';
|
import type { FileInfoDtoPaginationContainer } from '../models/FileInfoDtoPaginationContainer';
|
||||||
import { request as __request } from '../core/request';
|
import { request as __request } from '../core/request';
|
||||||
|
|
||||||
export class FileService {
|
export class FileService {
|
||||||
@ -23,7 +23,7 @@ requestBody?: any,
|
|||||||
): Promise<number> {
|
): Promise<number> {
|
||||||
const result = await __request({
|
const result = await __request({
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
path: `/api/files/${idWell}/files`,
|
path: `/api/well/${idWell}/files`,
|
||||||
query: {
|
query: {
|
||||||
'idCategory': idCategory,
|
'idCategory': idCategory,
|
||||||
'idUser': idUser,
|
'idUser': idUser,
|
||||||
@ -41,7 +41,7 @@ requestBody?: any,
|
|||||||
* @param idCategory id категории файла
|
* @param idCategory id категории файла
|
||||||
* @param begin дата начала
|
* @param begin дата начала
|
||||||
* @param end дата окончания
|
* @param end дата окончания
|
||||||
* @returns FilePropertiesDtoPaginationContainer Success
|
* @returns FileInfoDtoPaginationContainer Success
|
||||||
* @throws ApiError
|
* @throws ApiError
|
||||||
*/
|
*/
|
||||||
public static async getFilesInfo(
|
public static async getFilesInfo(
|
||||||
@ -51,10 +51,10 @@ take: number = 32,
|
|||||||
idCategory: number,
|
idCategory: number,
|
||||||
begin?: string,
|
begin?: string,
|
||||||
end?: string,
|
end?: string,
|
||||||
): Promise<FilePropertiesDtoPaginationContainer> {
|
): Promise<FileInfoDtoPaginationContainer> {
|
||||||
const result = await __request({
|
const result = await __request({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
path: `/api/files/${idWell}`,
|
path: `/api/well/${idWell}/files`,
|
||||||
query: {
|
query: {
|
||||||
'skip': skip,
|
'skip': skip,
|
||||||
'take': take,
|
'take': take,
|
||||||
@ -79,7 +79,7 @@ fileId: number,
|
|||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
const result = await __request({
|
const result = await __request({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
path: `/api/files/${idWell}/${fileId}`,
|
path: `/api/well/${idWell}/files/${fileId}`,
|
||||||
});
|
});
|
||||||
return result.body;
|
return result.body;
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ idCategory?: number,
|
|||||||
): Promise<any> {
|
): Promise<any> {
|
||||||
const result = await __request({
|
const result = await __request({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
path: `/api/fluidLastData/${idWell}`,
|
path: `/api/well/${idWell}/fluidLastData`,
|
||||||
query: {
|
query: {
|
||||||
'idCategory': idCategory,
|
'idCategory': idCategory,
|
||||||
},
|
},
|
||||||
@ -40,7 +40,7 @@ requestBody?: FluidDataDto,
|
|||||||
): Promise<any> {
|
): Promise<any> {
|
||||||
const result = await __request({
|
const result = await __request({
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
path: `/api/fluidLastData/${idWell}`,
|
path: `/api/well/${idWell}/fluidLastData`,
|
||||||
query: {
|
query: {
|
||||||
'idCategory': idCategory,
|
'idCategory': idCategory,
|
||||||
},
|
},
|
||||||
|
@ -54,7 +54,7 @@ idWell: number,
|
|||||||
): Promise<DatesRangeDto> {
|
): Promise<DatesRangeDto> {
|
||||||
const result = await __request({
|
const result = await __request({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
path: `/api/well/${idWell}/messagesDatesRange`,
|
path: `/api/well/${idWell}/message/datesRange`,
|
||||||
});
|
});
|
||||||
return result.body;
|
return result.body;
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ idCategory?: number,
|
|||||||
): Promise<any> {
|
): Promise<any> {
|
||||||
const result = await __request({
|
const result = await __request({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
path: `/api/mudLastData/${idWell}`,
|
path: `/api/well/${idWell}/mudLastData`,
|
||||||
query: {
|
query: {
|
||||||
'idCategory': idCategory,
|
'idCategory': idCategory,
|
||||||
},
|
},
|
||||||
@ -40,7 +40,7 @@ requestBody?: MudDiagramDataDto,
|
|||||||
): Promise<any> {
|
): Promise<any> {
|
||||||
const result = await __request({
|
const result = await __request({
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
path: `/api/mudLastData/${idWell}`,
|
path: `/api/well/${idWell}/mudLastData`,
|
||||||
query: {
|
query: {
|
||||||
'idCategory': idCategory,
|
'idCategory': idCategory,
|
||||||
},
|
},
|
||||||
|
@ -18,7 +18,7 @@ idCategory?: number,
|
|||||||
): Promise<any> {
|
): Promise<any> {
|
||||||
const result = await __request({
|
const result = await __request({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
path: `/api/nnbLastData/${idWell}`,
|
path: `/api/well/${idWell}/nnbLastData`,
|
||||||
query: {
|
query: {
|
||||||
'idCategory': idCategory,
|
'idCategory': idCategory,
|
||||||
},
|
},
|
||||||
@ -40,7 +40,7 @@ requestBody?: NnbDataDto,
|
|||||||
): Promise<any> {
|
): Promise<any> {
|
||||||
const result = await __request({
|
const result = await __request({
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
path: `/api/nnbLastData/${idWell}`,
|
path: `/api/well/${idWell}/nnbLastData`,
|
||||||
query: {
|
query: {
|
||||||
'idCategory': idCategory,
|
'idCategory': idCategory,
|
||||||
},
|
},
|
||||||
|
@ -27,7 +27,7 @@ end?: string,
|
|||||||
): Promise<number> {
|
): Promise<number> {
|
||||||
const result = await __request({
|
const result = await __request({
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
path: `/api/report/${idWell}/report`,
|
path: `/api/well/${idWell}/report`,
|
||||||
query: {
|
query: {
|
||||||
'idUser': idUser,
|
'idUser': idUser,
|
||||||
'stepSeconds': stepSeconds,
|
'stepSeconds': stepSeconds,
|
||||||
@ -52,7 +52,7 @@ reportName: string,
|
|||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
const result = await __request({
|
const result = await __request({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
path: `/api/report/${idWell}/${reportName}`,
|
path: `/api/well/${idWell}/report/${reportName}`,
|
||||||
});
|
});
|
||||||
return result.body;
|
return result.body;
|
||||||
}
|
}
|
||||||
@ -77,7 +77,7 @@ end?: string,
|
|||||||
): Promise<Array<string>> {
|
): Promise<Array<string>> {
|
||||||
const result = await __request({
|
const result = await __request({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
path: `/api/report/${idWell}/suitableReports`,
|
path: `/api/well/${idWell}/report/suitableReports`,
|
||||||
query: {
|
query: {
|
||||||
'stepSeconds': stepSeconds,
|
'stepSeconds': stepSeconds,
|
||||||
'format': format,
|
'format': format,
|
||||||
@ -107,7 +107,7 @@ end?: string,
|
|||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
const result = await __request({
|
const result = await __request({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
path: `/api/report/${idWell}/reportSize`,
|
path: `/api/well/${idWell}/report/reportSize`,
|
||||||
query: {
|
query: {
|
||||||
'stepSeconds': stepSeconds,
|
'stepSeconds': stepSeconds,
|
||||||
'format': format,
|
'format': format,
|
||||||
@ -129,7 +129,7 @@ idWell: number,
|
|||||||
): Promise<DatesRangeDto> {
|
): Promise<DatesRangeDto> {
|
||||||
const result = await __request({
|
const result = await __request({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
path: `/api/report/${idWell}/reportsDatesRange`,
|
path: `/api/well/${idWell}/report/datesRange`,
|
||||||
});
|
});
|
||||||
return result.body;
|
return result.body;
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ import type { WellDepthToDayDto } from '../models/WellDepthToDayDto';
|
|||||||
import type { WellDepthToIntervalDto } from '../models/WellDepthToIntervalDto';
|
import type { WellDepthToIntervalDto } from '../models/WellDepthToIntervalDto';
|
||||||
import { request as __request } from '../core/request';
|
import { request as __request } from '../core/request';
|
||||||
|
|
||||||
export class AnalyticsService {
|
export class TelemetryAnalyticsService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Возвращает список операций на скважине за все время
|
* Возвращает список операций на скважине за все время
|
||||||
@ -30,7 +30,7 @@ end?: string,
|
|||||||
): Promise<TelemetryOperationDtoPaginationContainer> {
|
): Promise<TelemetryOperationDtoPaginationContainer> {
|
||||||
const result = await __request({
|
const result = await __request({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
path: `/api/analytics/${idWell}/operationsByWell`,
|
path: `/api/well/${idWell}/telemetryAnalytics/operationsByWell`,
|
||||||
query: {
|
query: {
|
||||||
'skip': skip,
|
'skip': skip,
|
||||||
'take': take,
|
'take': take,
|
||||||
@ -53,7 +53,7 @@ idWell: number,
|
|||||||
): Promise<Array<WellDepthToDayDto>> {
|
): Promise<Array<WellDepthToDayDto>> {
|
||||||
const result = await __request({
|
const result = await __request({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
path: `/api/analytics/${idWell}/wellDepthToDay`,
|
path: `/api/well/${idWell}/telemetryAnalytics/wellDepthToDay`,
|
||||||
});
|
});
|
||||||
return result.body;
|
return result.body;
|
||||||
}
|
}
|
||||||
@ -73,7 +73,7 @@ workBeginSeconds?: number,
|
|||||||
): Promise<Array<WellDepthToIntervalDto>> {
|
): Promise<Array<WellDepthToIntervalDto>> {
|
||||||
const result = await __request({
|
const result = await __request({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
path: `/api/analytics/${idWell}/wellDepthToInterval`,
|
path: `/api/well/${idWell}/telemetryAnalytics/wellDepthToInterval`,
|
||||||
query: {
|
query: {
|
||||||
'intervalSeconds': intervalSeconds,
|
'intervalSeconds': intervalSeconds,
|
||||||
'workBeginSeconds': workBeginSeconds,
|
'workBeginSeconds': workBeginSeconds,
|
||||||
@ -97,7 +97,7 @@ end?: string,
|
|||||||
): Promise<Array<TelemetryOperationDurationDto>> {
|
): Promise<Array<TelemetryOperationDurationDto>> {
|
||||||
const result = await __request({
|
const result = await __request({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
path: `/api/analytics/${idWell}/operationsSummary`,
|
path: `/api/well/${idWell}/telemetryAnalytics/operationsSummary`,
|
||||||
query: {
|
query: {
|
||||||
'begin': begin,
|
'begin': begin,
|
||||||
'end': end,
|
'end': end,
|
||||||
@ -121,7 +121,7 @@ workBeginSeconds?: number,
|
|||||||
): Promise<Array<TelemetryOperationDurationDto>> {
|
): Promise<Array<TelemetryOperationDurationDto>> {
|
||||||
const result = await __request({
|
const result = await __request({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
path: `/api/analytics/${idWell}/operationsToInterval`,
|
path: `/api/well/${idWell}/telemetryAnalytics/operationsToInterval`,
|
||||||
query: {
|
query: {
|
||||||
'intervalSeconds': intervalSeconds,
|
'intervalSeconds': intervalSeconds,
|
||||||
'workBeginSeconds': workBeginSeconds,
|
'workBeginSeconds': workBeginSeconds,
|
126
src/services/api/services/WellOperationService.ts
Normal file
126
src/services/api/services/WellOperationService.ts
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
import type { WellOperationDto } from '../models/WellOperationDto';
|
||||||
|
import type { WellOperationDtoPaginationContainer } from '../models/WellOperationDtoPaginationContainer';
|
||||||
|
import { request as __request } from '../core/request';
|
||||||
|
|
||||||
|
export class WellOperationService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Возвращает список имен типов операций на скважине
|
||||||
|
* @param idWell
|
||||||
|
* @returns string Success
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public static async getCategories(
|
||||||
|
idWell: string,
|
||||||
|
): Promise<Array<string>> {
|
||||||
|
const result = await __request({
|
||||||
|
method: 'GET',
|
||||||
|
path: `/api/well/${idWell}/wellOperations/categories`,
|
||||||
|
});
|
||||||
|
return result.body;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Возвращает весь список операций на скважине
|
||||||
|
* @param idWell id скважины
|
||||||
|
* @param skip Для пагинации кол-во записей пропустить
|
||||||
|
* @param take Для пагинации кол-во записей
|
||||||
|
* @returns WellOperationDtoPaginationContainer Success
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public static async getAll(
|
||||||
|
idWell: number,
|
||||||
|
skip: number,
|
||||||
|
take: number = 32,
|
||||||
|
): Promise<WellOperationDtoPaginationContainer> {
|
||||||
|
const result = await __request({
|
||||||
|
method: 'GET',
|
||||||
|
path: `/api/well/${idWell}/wellOperations`,
|
||||||
|
query: {
|
||||||
|
'skip': skip,
|
||||||
|
'take': take,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return result.body;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Добавляет новые операции на скважине
|
||||||
|
* @param idWell id скважины
|
||||||
|
* @param requestBody Данные о добавляемых операциях
|
||||||
|
* @returns WellOperationDto Success
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public static async insertRange(
|
||||||
|
idWell: number,
|
||||||
|
requestBody?: Array<WellOperationDto>,
|
||||||
|
): Promise<Array<WellOperationDto>> {
|
||||||
|
const result = await __request({
|
||||||
|
method: 'POST',
|
||||||
|
path: `/api/well/${idWell}/wellOperations`,
|
||||||
|
body: requestBody,
|
||||||
|
});
|
||||||
|
return result.body;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Возвращает нужную операцию на скважине
|
||||||
|
* @param idWell id скважины
|
||||||
|
* @param idOperation id нужной операции
|
||||||
|
* @returns WellOperationDto Success
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public static async get(
|
||||||
|
idWell: number,
|
||||||
|
idOperation: number,
|
||||||
|
): Promise<WellOperationDto> {
|
||||||
|
const result = await __request({
|
||||||
|
method: 'GET',
|
||||||
|
path: `/api/well/${idWell}/wellOperations/${idOperation}`,
|
||||||
|
});
|
||||||
|
return result.body;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Обновляет выбранную операцию на скважине
|
||||||
|
* @param idWell id скважины
|
||||||
|
* @param idOperation id выбраной операции
|
||||||
|
* @param requestBody Новые данные для выбраной операции
|
||||||
|
* @returns WellOperationDto Success
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public static async update(
|
||||||
|
idWell: number,
|
||||||
|
idOperation: number,
|
||||||
|
requestBody?: WellOperationDto,
|
||||||
|
): Promise<WellOperationDto> {
|
||||||
|
const result = await __request({
|
||||||
|
method: 'PUT',
|
||||||
|
path: `/api/well/${idWell}/wellOperations/${idOperation}`,
|
||||||
|
body: requestBody,
|
||||||
|
});
|
||||||
|
return result.body;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Удаляет выбраную операцию на скважине
|
||||||
|
* @param idWell id скважины
|
||||||
|
* @param idOperation id выбраной операции
|
||||||
|
* @returns number Success
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public static async delete(
|
||||||
|
idWell: number,
|
||||||
|
idOperation: number,
|
||||||
|
): Promise<number> {
|
||||||
|
const result = await __request({
|
||||||
|
method: 'DELETE',
|
||||||
|
path: `/api/well/${idWell}/wellOperations/${idOperation}`,
|
||||||
|
});
|
||||||
|
return result.body;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -2,6 +2,7 @@
|
|||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import type { WellSectionDto } from '../models/WellSectionDto';
|
import type { WellSectionDto } from '../models/WellSectionDto';
|
||||||
|
import type { WellSectionDtoPaginationContainer } from '../models/WellSectionDtoPaginationContainer';
|
||||||
import { request as __request } from '../core/request';
|
import { request as __request } from '../core/request';
|
||||||
|
|
||||||
export class WellSectionService {
|
export class WellSectionService {
|
||||||
@ -25,14 +26,14 @@ idWell: string,
|
|||||||
* @param idWell
|
* @param idWell
|
||||||
* @param skip
|
* @param skip
|
||||||
* @param take
|
* @param take
|
||||||
* @returns WellSectionDto Success
|
* @returns WellSectionDtoPaginationContainer Success
|
||||||
* @throws ApiError
|
* @throws ApiError
|
||||||
*/
|
*/
|
||||||
public static async getAll(
|
public static async getAll(
|
||||||
idWell: number,
|
idWell: number,
|
||||||
skip: number,
|
skip: number,
|
||||||
take: number = 32,
|
take: number = 32,
|
||||||
): Promise<Array<WellSectionDto>> {
|
): Promise<WellSectionDtoPaginationContainer> {
|
||||||
const result = await __request({
|
const result = await __request({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
path: `/api/well/${idWell}/sections`,
|
path: `/api/well/${idWell}/sections`,
|
||||||
@ -102,16 +103,21 @@ requestBody?: WellSectionDto,
|
|||||||
/**
|
/**
|
||||||
* @param idWell
|
* @param idWell
|
||||||
* @param idSection
|
* @param idSection
|
||||||
|
* @param idItem
|
||||||
* @returns number Success
|
* @returns number Success
|
||||||
* @throws ApiError
|
* @throws ApiError
|
||||||
*/
|
*/
|
||||||
public static async delete(
|
public static async delete(
|
||||||
idWell: number,
|
idWell: number,
|
||||||
idSection: number,
|
idSection: string,
|
||||||
|
idItem?: number,
|
||||||
): Promise<number> {
|
): Promise<number> {
|
||||||
const result = await __request({
|
const result = await __request({
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
path: `/api/well/${idWell}/sections/${idSection}`,
|
path: `/api/well/${idWell}/sections/${idSection}`,
|
||||||
|
query: {
|
||||||
|
'idItem': idItem,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
return result.body;
|
return result.body;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user