diff --git a/src/services/api/models/WellOperationDto.ts b/src/services/api/models/WellOperationDto.ts index 4c38efc..473f2f5 100644 --- a/src/services/api/models/WellOperationDto.ts +++ b/src/services/api/models/WellOperationDto.ts @@ -7,12 +7,12 @@ export type WellOperationDto = { idWell?: number; idWellSectionType?: number; wellSectionTypeName?: string | null; - idOperationCategory?: number; + idCategory?: number; categoryName?: string | null; - type?: number; + categoryInfo?: string | null; + idType?: number; wellDepth?: number; startDate?: string; durationHours?: number; - info?: string | null; comment?: string | null; } \ No newline at end of file diff --git a/src/services/api/models/WellSectionDto.ts b/src/services/api/models/WellSectionDto.ts index 0112361..f53fced 100644 --- a/src/services/api/models/WellSectionDto.ts +++ b/src/services/api/models/WellSectionDto.ts @@ -7,10 +7,10 @@ export type WellSectionDto = { sectionType?: string | null; wellDepthPlan?: number; wellDepthFact?: number; - buildDaysPlan?: number; - buildDaysFact?: number; - rateOfPenetrationPlan?: number; - rateOfPenetrationFact?: number; + durationPlan?: number; + durationFact?: number; + mechSpeedPlan?: number; + mechSpeedFact?: number; routeSpeedPlan?: number; routeSpeedFact?: number; bhaUpSpeedPlan?: number; diff --git a/src/services/api/services/FileService.ts b/src/services/api/services/FileService.ts index 2594a02..f532889 100644 --- a/src/services/api/services/FileService.ts +++ b/src/services/api/services/FileService.ts @@ -10,7 +10,6 @@ export class FileService { * Сохраняет переданные файлы и информацию о них * @param idWell id скважины * @param idCategory id категории файла - * @param idUser id отправившего файл пользователя * @param requestBody * @returns number Success * @throws ApiError @@ -18,7 +17,6 @@ export class FileService { public static async saveFiles( idWell: number, idCategory?: number, -idUser?: number, requestBody?: any, ): Promise { const result = await __request({ @@ -26,7 +24,6 @@ requestBody?: any, path: `/api/well/${idWell}/files`, query: { 'idCategory': idCategory, - 'idUser': idUser, }, body: requestBody, }); diff --git a/src/services/api/services/WellOperationService.ts b/src/services/api/services/WellOperationService.ts index 1d97db6..17f32ce 100644 --- a/src/services/api/services/WellOperationService.ts +++ b/src/services/api/services/WellOperationService.ts @@ -24,22 +24,37 @@ idWell: string, } /** - * Возвращает весь список операций на скважине + * Отфильтрованный список операций на скважине. Если не применять фильтр, то вернется весь список. Сортированный по глубине затем по дате * @param idWell id скважины - * @param skip Для пагинации кол-во записей пропустить - * @param take Для пагинации кол-во записей + * @param opertaionType фильтр по план = 0, факт = 1 + * @param sectionTypeIds фильтр по списку id конструкций секции + * @param operationCategoryIds фильтр по списку id категорий операции + * @param begin фильтр по началу операции + * @param end фильтр по окончанию операции + * @param skip + * @param take * @returns WellOperationDtoPaginationContainer Success * @throws ApiError */ - public static async getAll( + public static async getOperations( idWell: number, -skip: number, +opertaionType?: number, +sectionTypeIds?: Array, +operationCategoryIds?: Array, +begin?: string, +end?: string, +skip: number = 0, take: number = 32, ): Promise { const result = await __request({ method: 'GET', path: `/api/well/${idWell}/wellOperations`, query: { + 'opertaionType': opertaionType, + 'sectionTypeIds': sectionTypeIds, + 'operationCategoryIds': operationCategoryIds, + 'begin': begin, + 'end': end, 'skip': skip, 'take': take, }, diff --git a/src/services/api/services/WellSectionService.ts b/src/services/api/services/WellSectionService.ts index 007cf4f..5630e06 100644 --- a/src/services/api/services/WellSectionService.ts +++ b/src/services/api/services/WellSectionService.ts @@ -45,24 +45,6 @@ take: number = 32, return result.body; } - /** - * @param idWell - * @param requestBody - * @returns WellSectionDto Success - * @throws ApiError - */ - public static async insert( -idWell: number, -requestBody?: Array, -): Promise> { - const result = await __request({ - method: 'POST', - path: `/api/well/${idWell}/sections`, - body: requestBody, - }); - return result.body; - } - /** * @param idWell * @param idSection @@ -80,46 +62,4 @@ idSection: number, return result.body; } - /** - * @param idWell - * @param idSection - * @param requestBody - * @returns WellSectionDto Success - * @throws ApiError - */ - public static async update( -idWell: number, -idSection: number, -requestBody?: WellSectionDto, -): Promise { - const result = await __request({ - method: 'PUT', - path: `/api/well/${idWell}/sections/${idSection}`, - body: requestBody, - }); - return result.body; - } - - /** - * @param idWell - * @param idSection - * @param idItem - * @returns number Success - * @throws ApiError - */ - public static async delete( -idWell: number, -idSection: string, -idItem?: number, -): Promise { - const result = await __request({ - method: 'DELETE', - path: `/api/well/${idWell}/sections/${idSection}`, - query: { - 'idItem': idItem, - }, - }); - return result.body; - } - } \ No newline at end of file