From eec40bf4b75ea3931a46f300bb4ad75d46fec9f9 Mon Sep 17 00:00:00 2001 From: Frolov-Nikita Date: Tue, 8 Aug 2023 12:21:09 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=20Route=20?= =?UTF-8?q?=D0=B0=D1=82=D1=82=D1=80=D0=B8=D0=B1=D1=83=D1=82=20=D1=83=20?= =?UTF-8?q?=D0=BC=D0=B5=D1=82=D0=BE=D0=B4=D0=BE=D0=B2=20=D0=BA=D0=BE=D0=BD?= =?UTF-8?q?=D1=82=D1=80=D0=BE=D0=BB=D0=BB=D0=B5=D1=80=D0=BE=D0=B2.=20?= =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D1=8B=20=D0=BF?= =?UTF-8?q?=D0=B5=D1=80=D0=B5=D0=B8=D0=BC=D0=B5=D0=BD=D0=BE=D0=B2=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/AdminTelemetryController.cs | 3 +- .../AutoGeneratedDailyReportController.cs | 4 +-- AsbCloudWebApi/Controllers/FaqController.cs | 2 +- AsbCloudWebApi/Controllers/FileController.cs | 9 ++--- .../Controllers/HelpPageController.cs | 3 +- .../Controllers/MeasureController.cs | 12 +++---- .../Controllers/NotificationController.cs | 9 ++--- .../Controllers/OperationStatController.cs | 12 +++---- .../Controllers/OperationValueController.cs | 2 +- .../PlannedTrajectoryController.cs | 15 +++------ .../Controllers/ProcessMapController.cs | 21 ++++-------- .../Controllers/ReportController.cs | 6 ++-- .../SAUB/DetectedOperationController.cs | 3 +- .../Controllers/SAUB/MessageController.cs | 3 +- .../Controllers/SAUB/TelemetryController.cs | 12 +++---- .../SAUB/TelemetryDataBaseController.cs | 6 ++-- .../SAUB/TelemetryWirelineRunOutController.cs | 3 +- .../WellFinalDocumentsController.cs | 3 +- .../Controllers/WellOperationController.cs | 33 +++++++------------ 19 files changed, 54 insertions(+), 107 deletions(-) diff --git a/AsbCloudWebApi/Controllers/AdminTelemetryController.cs b/AsbCloudWebApi/Controllers/AdminTelemetryController.cs index c0471f8e..4fb1f9fb 100644 --- a/AsbCloudWebApi/Controllers/AdminTelemetryController.cs +++ b/AsbCloudWebApi/Controllers/AdminTelemetryController.cs @@ -28,8 +28,7 @@ namespace AsbCloudWebApi.Controllers /// Merge telemetries. No body required. /// /// - [HttpPost] - [Route("/merger/{idFrom}/{idTo}")] + [HttpPost("/merge/{idFrom}/{idTo}")] [Permission] public async Task MergeTelemetriesAsync(int idFrom, int idTo, CancellationToken token) { diff --git a/AsbCloudWebApi/Controllers/AutoGeneratedDailyReportController.cs b/AsbCloudWebApi/Controllers/AutoGeneratedDailyReportController.cs index fd2ef549..df94b605 100644 --- a/AsbCloudWebApi/Controllers/AutoGeneratedDailyReportController.cs +++ b/AsbCloudWebApi/Controllers/AutoGeneratedDailyReportController.cs @@ -42,7 +42,7 @@ public class AutoGeneratedDailyReportController : ControllerBase [HttpGet] [ProducesResponseType(typeof(PhysicalFileResult), (int)HttpStatusCode.OK, "application/octet-stream")] [ProducesResponseType(StatusCodes.Status204NoContent)] - public async Task ExportAsync([FromRoute] int idWell, + public async Task GenerateReportAsync([FromRoute] int idWell, [Required] DateOnly reportDate, CancellationToken cancellationToken) { @@ -63,7 +63,7 @@ public class AutoGeneratedDailyReportController : ControllerBase /// Параметры запроса /// /// - [HttpGet] + [HttpGet("all")] [ProducesResponseType(typeof(PaginationContainer), (int)HttpStatusCode.OK)] public async Task GetListAsync([FromRoute][Required] int idWell, [FromQuery] AutoGeneratedDailyReportRequest request, diff --git a/AsbCloudWebApi/Controllers/FaqController.cs b/AsbCloudWebApi/Controllers/FaqController.cs index d0ac20c1..763d0f6d 100644 --- a/AsbCloudWebApi/Controllers/FaqController.cs +++ b/AsbCloudWebApi/Controllers/FaqController.cs @@ -82,7 +82,7 @@ namespace AsbCloudWebApi.Controllers /// /// /// - [HttpPost("merger")] + [HttpPost("merge")] [Permission] [ProducesResponseType(typeof(int), (int)System.Net.HttpStatusCode.OK)] public async Task MergeAsync( diff --git a/AsbCloudWebApi/Controllers/FileController.cs b/AsbCloudWebApi/Controllers/FileController.cs index 2a7d6fcb..e9a7990b 100644 --- a/AsbCloudWebApi/Controllers/FileController.cs +++ b/AsbCloudWebApi/Controllers/FileController.cs @@ -73,8 +73,7 @@ namespace AsbCloudWebApi.Controllers /// /// Токен отмены задачи /// Список информации о файлах в этой категории - [HttpGet] - [Route("/api/files")] + [HttpGet("/api/files")] [Permission] [ProducesResponseType(typeof(PaginationContainer), (int)System.Net.HttpStatusCode.OK)] public async Task GetFilesInfoAsync( @@ -101,8 +100,7 @@ namespace AsbCloudWebApi.Controllers /// id запрашиваемого файла /// Токен отмены задачи /// Запрашиваемый файл - [HttpGet] - [Route("{idFile}")] + [HttpGet("{idFile}")] [Permission] [ProducesResponseType(typeof(PhysicalFileResult), (int)System.Net.HttpStatusCode.OK)] public async Task GetFileAsync( @@ -220,8 +218,7 @@ namespace AsbCloudWebApi.Controllers /// id запрашиваемого файла /// Токен отмены задачи /// Запрашиваемый файл - [HttpGet] - [Route("/api/files/{idFile}")] + [HttpGet("/api/files/{idFile}")] [Permission] [ProducesResponseType(typeof(FileInfoDto), (int)System.Net.HttpStatusCode.OK)] public async Task GetFileInfoAsync([FromRoute] int idFile, CancellationToken token) diff --git a/AsbCloudWebApi/Controllers/HelpPageController.cs b/AsbCloudWebApi/Controllers/HelpPageController.cs index db0b5faf..a90ea46a 100644 --- a/AsbCloudWebApi/Controllers/HelpPageController.cs +++ b/AsbCloudWebApi/Controllers/HelpPageController.cs @@ -102,8 +102,7 @@ public class HelpPageController : ControllerBase /// Id категории файла. Допустимое значение параметра: 20000 /// /// - [HttpGet] - [Route("isExisting")] + [HttpGet("isExisting")] [ProducesResponseType(typeof(bool), (int)HttpStatusCode.OK)] public async Task IsExistingAsync( [Required] string key, diff --git a/AsbCloudWebApi/Controllers/MeasureController.cs b/AsbCloudWebApi/Controllers/MeasureController.cs index 510a34ca..7dc1afde 100644 --- a/AsbCloudWebApi/Controllers/MeasureController.cs +++ b/AsbCloudWebApi/Controllers/MeasureController.cs @@ -24,9 +24,8 @@ namespace AsbCloudWebApi.Controllers this.wellService = wellService; } - [HttpGet] + [HttpGet("categories")] [Permission] - [Route("categories")] public async Task GetCategoriesAsync([FromRoute] int idWell, CancellationToken token) { if (!await CanUserAccessToWellAsync(idWell, token).ConfigureAwait(false)) @@ -36,9 +35,8 @@ namespace AsbCloudWebApi.Controllers return Ok(result); } - [HttpGet] + [HttpGet("last/{idCategory}")] [Permission] - [Route("last/{idCategory}")] public async Task GetLastAsync([FromRoute] int idWell, [FromRoute] int idCategory, CancellationToken token) { if (!await CanUserAccessToWellAsync(idWell, token).ConfigureAwait(false)) @@ -55,9 +53,8 @@ namespace AsbCloudWebApi.Controllers /// Категория скважины. Не обязательный параметр. /// /// - [HttpGet] + [HttpGet("history")] [Permission] - [Route("history")] public async Task GetHisoryAsync([FromRoute] int idWell, CancellationToken token, int? idCategory = null) { @@ -90,9 +87,8 @@ namespace AsbCloudWebApi.Controllers return Ok(result); } - [HttpDelete] + [HttpDelete("history/{idData}")] [Permission] - [Route("history/{idData}")] public async Task MarkAsDeleteAsync([FromRoute] int idWell, [FromRoute] int idData, CancellationToken token) { if (!await CanUserAccessToWellAsync(idWell, token).ConfigureAwait(false)) diff --git a/AsbCloudWebApi/Controllers/NotificationController.cs b/AsbCloudWebApi/Controllers/NotificationController.cs index 2e1bb976..ebb738e4 100644 --- a/AsbCloudWebApi/Controllers/NotificationController.cs +++ b/AsbCloudWebApi/Controllers/NotificationController.cs @@ -16,7 +16,7 @@ namespace AsbCloudWebApi.Controllers; /// [ApiController] [Authorize] -[Route("api/notification")] +[Route("api/[controller]")] public class NotificationController : ControllerBase { private readonly NotificationService notificationService; @@ -40,7 +40,6 @@ public class NotificationController : ControllerBase /// /// [HttpPost] - [Route("send")] public async Task SendAsync([Required] int idUser, [Required] [Range(minimum: 1, maximum: 1, ErrorMessage = "Id категории уведомления недоступно. Допустимые: 1")] @@ -70,7 +69,6 @@ public class NotificationController : ControllerBase /// /// [HttpPut] - [Route("update")] public async Task UpdateAsync([Required] int idNotification, [Required] bool isRead, CancellationToken cancellationToken) @@ -88,8 +86,7 @@ public class NotificationController : ControllerBase /// Id уведомления /// /// - [HttpGet] - [Route("get/{idNotification}")] + [HttpGet("{idNotification}")] [ProducesResponseType(typeof(NotificationDto), (int)System.Net.HttpStatusCode.OK)] public async Task GetAsync([Required] int idNotification, CancellationToken cancellationToken) @@ -112,7 +109,6 @@ public class NotificationController : ControllerBase /// /// [HttpGet] - [Route("getList")] [ProducesResponseType(typeof(PaginationContainer), (int)System.Net.HttpStatusCode.OK)] public async Task GetListAsync([FromQuery] NotificationRequest request, CancellationToken cancellationToken) @@ -136,7 +132,6 @@ public class NotificationController : ControllerBase /// /// [HttpDelete] - [Route("delete")] public async Task DeleteAsync([Required] int idNotification, CancellationToken cancellationToken) { diff --git a/AsbCloudWebApi/Controllers/OperationStatController.cs b/AsbCloudWebApi/Controllers/OperationStatController.cs index 9fa4f5bd..d4346255 100644 --- a/AsbCloudWebApi/Controllers/OperationStatController.cs +++ b/AsbCloudWebApi/Controllers/OperationStatController.cs @@ -77,8 +77,7 @@ namespace AsbCloudWebApi.Controllers /// id куста /// /// - [HttpGet] - [Route("cluster/{idCluster}/stat")] + [HttpGet("cluster/{idCluster}/stat")] [Permission] [ProducesResponseType(typeof(StatClusterDto), (int)System.Net.HttpStatusCode.OK)] public async Task GetStatClusterAsync(int idCluster, @@ -99,8 +98,7 @@ namespace AsbCloudWebApi.Controllers /// список скважин /// /// - [HttpGet] - [Route("wellsStats")] + [HttpGet("wellsStats")] [Permission] [ProducesResponseType(typeof(IEnumerable), (int)System.Net.HttpStatusCode.OK)] public async Task GetWellsStatAsync([FromQuery] IEnumerable idWells, CancellationToken token) @@ -123,8 +121,7 @@ namespace AsbCloudWebApi.Controllers /// id скважины /// /// - [HttpGet] - [Route("well/{idWell}/stat")] + [HttpGet("well/{idWell}/stat")] [Permission] [ProducesResponseType(typeof(StatWellDto), (int)System.Net.HttpStatusCode.OK)] public async Task GetStatWellAsync(int idWell, @@ -144,8 +141,7 @@ namespace AsbCloudWebApi.Controllers /// /// /// - [HttpGet] - [Route("well/{idWell}/tvd")] + [HttpGet("well/{idWell}/tvd")] [Permission] [ProducesResponseType(typeof(IEnumerable>), (int)System.Net.HttpStatusCode.OK)] public async Task GetTvdAsync(int idWell, diff --git a/AsbCloudWebApi/Controllers/OperationValueController.cs b/AsbCloudWebApi/Controllers/OperationValueController.cs index 6e9c312b..5a58953b 100644 --- a/AsbCloudWebApi/Controllers/OperationValueController.cs +++ b/AsbCloudWebApi/Controllers/OperationValueController.cs @@ -8,7 +8,7 @@ namespace AsbCloudWebApi.Controllers /// /// Целевые и нормативные значения по глубине /// - [Route("api/operationValue")] + [Route("api/[controller]")] [ApiController] [Authorize] public class OperationValueController : CrudWellRelatedController> diff --git a/AsbCloudWebApi/Controllers/PlannedTrajectoryController.cs b/AsbCloudWebApi/Controllers/PlannedTrajectoryController.cs index 6b116ae3..322dc454 100644 --- a/AsbCloudWebApi/Controllers/PlannedTrajectoryController.cs +++ b/AsbCloudWebApi/Controllers/PlannedTrajectoryController.cs @@ -41,8 +41,7 @@ namespace AsbCloudWebApi.Controllers /// Возвращает excel шаблон для заполнения строк плановой траектории /// /// Запрашиваемый файл - [HttpGet] - [Route("template/excel")] + [HttpGet("template")] [AllowAnonymous] [ProducesResponseType(typeof(PhysicalFileResult), (int)System.Net.HttpStatusCode.OK,"application/octet-stream")] [ProducesResponseType(StatusCodes.Status204NoContent)] @@ -59,8 +58,7 @@ namespace AsbCloudWebApi.Controllers /// id скважины /// Токен отмены задачи /// Запрашиваемый файл - [HttpGet] - [Route("export")] + [HttpGet("export")] [ProducesResponseType(typeof(PhysicalFileResult), (int)System.Net.HttpStatusCode.OK, "application/octet-stream")] [ProducesResponseType(StatusCodes.Status204NoContent)] public async Task ExportAsync([FromRoute] int idWell, CancellationToken token) @@ -81,8 +79,7 @@ namespace AsbCloudWebApi.Controllers /// Удалить операции перед импортом, если фал валидный /// Токен отмены задачи /// количество успешно записанных строк в БД - [HttpPost] - [Route("import/excel/{deleteBeforeImport}")] + [HttpPost("import/{deleteBeforeImport}")] [ProducesResponseType(typeof(int), (int)System.Net.HttpStatusCode.OK)] public async Task ImportAsync(int idWell, [FromForm] IFormFileCollection files, @@ -160,8 +157,7 @@ namespace AsbCloudWebApi.Controllers /// /// /// количество успешно записанных строк в БД - [HttpPost] - [Route("range")] + [HttpPost("range")] [ProducesResponseType(typeof(int), (int)System.Net.HttpStatusCode.OK)] public async Task AddRangeAsync(int idWell, [FromBody] IEnumerable rows, CancellationToken token) @@ -231,8 +227,7 @@ namespace AsbCloudWebApi.Controllers /// /// /// - [HttpGet] - [Route("trajectoryCartesianPlanFact")] + [HttpGet("trajectoryCartesianPlanFact")] [ProducesResponseType(typeof(PlanFactBase, IEnumerable>), (int)System.Net.HttpStatusCode.OK)] public async Task GetTrajectoryCartesianPlanFactAsync(int idWell, CancellationToken token) { diff --git a/AsbCloudWebApi/Controllers/ProcessMapController.cs b/AsbCloudWebApi/Controllers/ProcessMapController.cs index 97abcf11..0199cb9a 100644 --- a/AsbCloudWebApi/Controllers/ProcessMapController.cs +++ b/AsbCloudWebApi/Controllers/ProcessMapController.cs @@ -57,9 +57,8 @@ namespace AsbCloudWebApi.Controllers /// Дата, с которой следует искать новые параметры /// Токен отмены задачи /// Список параметров для коридоров бурения - [HttpGet] + [HttpGet("/api/telemetry/{uid}/drillFlowChart")] [Obsolete("use GetByUidAsync(..) instead")] - [Route("/api/telemetry/{uid}/drillFlowChart")] [AllowAnonymous] [ProducesResponseType(typeof(IEnumerable), (int)System.Net.HttpStatusCode.OK)] public IActionResult GetByTelemetry(string uid, DateTime updateFrom, CancellationToken token) @@ -77,8 +76,7 @@ namespace AsbCloudWebApi.Controllers /// Дата, с которой следует искать новые параметры /// Токен отмены задачи /// Список параметров для коридоров бурения - [HttpGet] - [Route("/api/telemetry/{uid}/processMap")] + [HttpGet("/api/telemetry/{uid}/processMap")] [AllowAnonymous] [ProducesResponseType(typeof(IEnumerable), (int)System.Net.HttpStatusCode.OK)] public async Task GetByUidAsync(string uid, DateTime updateFrom, CancellationToken token) @@ -99,8 +97,7 @@ namespace AsbCloudWebApi.Controllers /// /// /// /// - [HttpGet] - [Route("processMapReport/excel/{wellId}")] + [HttpGet("report/{wellId}")] [ProducesResponseType(typeof(PhysicalFileResult), (int)System.Net.HttpStatusCode.OK, "application/octet-stream")] [ProducesResponseType(StatusCodes.Status204NoContent)] public async Task GetReportFileAsync(int wellId, CancellationToken token) @@ -125,8 +122,7 @@ namespace AsbCloudWebApi.Controllers /// /// /// - [HttpGet] - [Route("drillProcessMap/{wellId}")] + [HttpGet("report/{wellId}/data")] [ProducesResponseType(typeof(IEnumerable), (int)System.Net.HttpStatusCode.OK)] public async Task GetDrillProcessMap(int wellId, CancellationToken token) { @@ -168,8 +164,7 @@ namespace AsbCloudWebApi.Controllers /// Возвращает шаблон файла импорта плановой РТК /// /// Запрашиваемый файл - [HttpGet] - [Route("template/excel")] + [HttpGet("template")] [ProducesResponseType(typeof(PhysicalFileResult), (int)System.Net.HttpStatusCode.OK, "application/octet-stream")] public async Task GetTemplateAsync(CancellationToken cancellationToken) { @@ -186,8 +181,7 @@ namespace AsbCloudWebApi.Controllers /// Загружаемый файл /// /// - [HttpPost] - [Route("import/excel/{idWell}/{options}")] + [HttpPost("import/{idWell}/{options}")] public async Task ImportAsync(int idWell, int options, [Required] IFormFile file, @@ -225,8 +219,7 @@ namespace AsbCloudWebApi.Controllers /// Id скважины /// /// - [HttpGet] - [Route("export/excel/{idWell}")] + [HttpGet("export/{idWell}")] [ProducesResponseType(typeof(PhysicalFileResult), (int)System.Net.HttpStatusCode.OK, "application/octet-stream")] [ProducesResponseType(StatusCodes.Status204NoContent)] public async Task ExportAsync(int idWell, CancellationToken cancellationToken) diff --git a/AsbCloudWebApi/Controllers/ReportController.cs b/AsbCloudWebApi/Controllers/ReportController.cs index c20db17b..3386d505 100644 --- a/AsbCloudWebApi/Controllers/ReportController.cs +++ b/AsbCloudWebApi/Controllers/ReportController.cs @@ -104,8 +104,7 @@ namespace AsbCloudWebApi.Controllers /// Параметры запроса /// Токен для отмены задачи /// прогнозируемое кол-во страниц отчета - [HttpGet] - [Route("reportSize")] + [HttpGet("reportSize")] [Permission] [ProducesResponseType(typeof(string), (int)System.Net.HttpStatusCode.OK)] public async Task GetReportSizeAsync([Required] int idWell, @@ -133,8 +132,7 @@ namespace AsbCloudWebApi.Controllers /// id скважины /// Токен для отмены задачи /// Даты самого старого и самого свежего отчетов в БД - [HttpGet] - [Route("datesRange")] + [HttpGet("datesRange")] [Permission] [ProducesResponseType(typeof(DatesRangeDto), (int)System.Net.HttpStatusCode.OK)] public async Task GetReportsDateRangeAsync(int idWell, CancellationToken token) diff --git a/AsbCloudWebApi/Controllers/SAUB/DetectedOperationController.cs b/AsbCloudWebApi/Controllers/SAUB/DetectedOperationController.cs index e2bf92eb..0a16bcfd 100644 --- a/AsbCloudWebApi/Controllers/SAUB/DetectedOperationController.cs +++ b/AsbCloudWebApi/Controllers/SAUB/DetectedOperationController.cs @@ -121,8 +121,7 @@ namespace AsbCloudWebApi.Controllers.SAUB /// /// Токен отмены задачи /// Запрашиваемый файл - [HttpGet] - [Route("export")] + [HttpGet("export")] [Permission] [ProducesResponseType(typeof(PhysicalFileResult), (int)System.Net.HttpStatusCode.OK, "application/octet-stream")] [ProducesResponseType(StatusCodes.Status204NoContent)] diff --git a/AsbCloudWebApi/Controllers/SAUB/MessageController.cs b/AsbCloudWebApi/Controllers/SAUB/MessageController.cs index b2bec1b8..cdac923d 100644 --- a/AsbCloudWebApi/Controllers/SAUB/MessageController.cs +++ b/AsbCloudWebApi/Controllers/SAUB/MessageController.cs @@ -64,8 +64,7 @@ namespace AsbCloudWebApi.Controllers.SAUB /// id скважины /// Токен для отмены задачи /// список сообщений по скважине - [HttpGet] - [Route("datesRange")] + [HttpGet("datesRange")] [Permission] [ProducesResponseType(typeof(DatesRangeDto), (int)System.Net.HttpStatusCode.OK)] public async Task GetMessagesDateRangeAsync(int idWell, CancellationToken token) diff --git a/AsbCloudWebApi/Controllers/SAUB/TelemetryController.cs b/AsbCloudWebApi/Controllers/SAUB/TelemetryController.cs index f7fe0b74..a70cc72f 100644 --- a/AsbCloudWebApi/Controllers/SAUB/TelemetryController.cs +++ b/AsbCloudWebApi/Controllers/SAUB/TelemetryController.cs @@ -44,8 +44,7 @@ namespace AsbCloudWebApi.Controllers.SAUB /// Информация об отправителе /// Токен отмены задачи /// - [HttpPost] - [Route("{uid}/info")] + [HttpPost("{uid}/info")] public async Task PostInfoAsync(string uid, [FromBody] TelemetryInfoDto info, CancellationToken token) { @@ -60,8 +59,7 @@ namespace AsbCloudWebApi.Controllers.SAUB /// сообщения /// Токен для отмены задачи /// - [HttpPost] - [Route("{uid}/message")] + [HttpPost("{uid}/message")] public async Task PostMessagesAsync(string uid, [FromBody] IEnumerable dtos, CancellationToken token) { @@ -82,8 +80,7 @@ namespace AsbCloudWebApi.Controllers.SAUB /// справочник событий /// Токен для отмены задачи /// - [HttpPost] - [Route("{uid}/event")] + [HttpPost("{uid}/event")] public async Task PostEventsAsync(string uid, [FromBody] List events, CancellationToken token) { @@ -99,8 +96,7 @@ namespace AsbCloudWebApi.Controllers.SAUB /// справочник пользователей телеметрии /// /// - [HttpPost] - [Route("{uid}/user")] + [HttpPost("{uid}/user")] public async Task PostUsersAsync(string uid, [FromBody] List users, CancellationToken token) { diff --git a/AsbCloudWebApi/Controllers/SAUB/TelemetryDataBaseController.cs b/AsbCloudWebApi/Controllers/SAUB/TelemetryDataBaseController.cs index 8eb26d56..05af2b9a 100644 --- a/AsbCloudWebApi/Controllers/SAUB/TelemetryDataBaseController.cs +++ b/AsbCloudWebApi/Controllers/SAUB/TelemetryDataBaseController.cs @@ -44,8 +44,7 @@ namespace AsbCloudWebApi.Controllers.SAUB /// Данные /// Токен для отмены задачи /// - [HttpPost] - [Route("{uid}")] + [HttpPost("{uid}")] [AllowAnonymous] public virtual async Task PostDataAsync(string uid, [FromBody] IEnumerable dtos, CancellationToken token) @@ -102,8 +101,7 @@ namespace AsbCloudWebApi.Controllers.SAUB /// id скважины /// Токен завершения задачи /// - [HttpGet] - [Route("{idWell}/datesRange")] + [HttpGet("{idWell}/datesRange")] [Permission] [ProducesResponseType(typeof(DatesRangeDto), (int)System.Net.HttpStatusCode.OK)] public virtual async Task> GetDataDatesRangeAsync(int idWell, diff --git a/AsbCloudWebApi/Controllers/SAUB/TelemetryWirelineRunOutController.cs b/AsbCloudWebApi/Controllers/SAUB/TelemetryWirelineRunOutController.cs index a9ee2815..b936edd5 100644 --- a/AsbCloudWebApi/Controllers/SAUB/TelemetryWirelineRunOutController.cs +++ b/AsbCloudWebApi/Controllers/SAUB/TelemetryWirelineRunOutController.cs @@ -45,8 +45,7 @@ namespace AsbCloudWebApi.Controllers.SAUB /// /// /// - [HttpPost] - [Route("{uid}")] + [HttpPost("{uid}")] [AllowAnonymous] public async Task PostDataAsync(string uid, [FromBody] TelemetryWirelineRunOutBaseDto dto, CancellationToken token) { diff --git a/AsbCloudWebApi/Controllers/WellFinalDocumentsController.cs b/AsbCloudWebApi/Controllers/WellFinalDocumentsController.cs index 19952231..3cd7156b 100644 --- a/AsbCloudWebApi/Controllers/WellFinalDocumentsController.cs +++ b/AsbCloudWebApi/Controllers/WellFinalDocumentsController.cs @@ -160,8 +160,7 @@ namespace AsbCloudWebApi.Controllers /// Получение справочника категорий файлов /// /// - [HttpGet] - [Route("wellCaseCategories")] + [HttpGet("wellCaseCategories")] [Permission] public async Task GetWellCaseCategoriesAsync(CancellationToken token) { diff --git a/AsbCloudWebApi/Controllers/WellOperationController.cs b/AsbCloudWebApi/Controllers/WellOperationController.cs index 639a5c5f..4bb40bdc 100644 --- a/AsbCloudWebApi/Controllers/WellOperationController.cs +++ b/AsbCloudWebApi/Controllers/WellOperationController.cs @@ -38,8 +38,7 @@ namespace AsbCloudWebApi.Controllers /// Возвращает словарь типов секций /// /// - [HttpGet] - [Route("sectionTypes")] + [HttpGet("sectionTypes")] [Permission] [ProducesResponseType(typeof(IEnumerable), (int)System.Net.HttpStatusCode.OK)] public IActionResult GetSectionTypes() @@ -53,8 +52,7 @@ namespace AsbCloudWebApi.Controllers /// /// флаг, нужно ли включать родителей в список /// - [HttpGet] - [Route("categories")] + [HttpGet("categories")] [Permission] [ProducesResponseType(typeof(IEnumerable), (int)System.Net.HttpStatusCode.OK)] public IActionResult GetCategories(bool includeParents = true) @@ -70,8 +68,7 @@ namespace AsbCloudWebApi.Controllers /// дата для нахождения последней сопоставленной плановой операции /// /// - [HttpGet] - [Route("operationsPlan")] + [HttpGet("operationsPlan")] [ProducesResponseType(typeof(WellOperationPlanDto), (int)System.Net.HttpStatusCode.OK)] public async Task GetOperationsPlanAsync( [FromRoute] int idWell, @@ -95,8 +92,7 @@ namespace AsbCloudWebApi.Controllers /// /// /// Список операций на скважине - [HttpGet] - [Route("fact")] + [HttpGet("fact")] [Permission] [ProducesResponseType(typeof(IEnumerable), (int)System.Net.HttpStatusCode.OK)] public async Task GetPageOperationsFactAsync( @@ -123,8 +119,7 @@ namespace AsbCloudWebApi.Controllers /// /// /// Список операций на скважине в контейнере для постраничного просмотра - [HttpGet] - [Route("plan")] + [HttpGet("plan")] [Permission] [ProducesResponseType(typeof(PaginationContainer), (int)System.Net.HttpStatusCode.OK)] public async Task GetPageOperationsPlanAsync( @@ -150,8 +145,7 @@ namespace AsbCloudWebApi.Controllers /// /// /// - [HttpGet] - [Route("groupStat")] + [HttpGet("groupStat")] [Permission] [ProducesResponseType(typeof(IEnumerable), (int)System.Net.HttpStatusCode.OK)] public async Task GetGroupOperationsAsync( @@ -177,8 +171,7 @@ namespace AsbCloudWebApi.Controllers /// id нужной операции /// Токен отмены задачи /// Нужную операцию на скважине - [HttpGet] - [Route("{idOperation}")] + [HttpGet("{idOperation}")] [Permission] [ProducesResponseType(typeof(WellOperationDto), (int)System.Net.HttpStatusCode.OK)] public async Task GetOrDefaultAsync(int idWell, int idOperation, @@ -280,9 +273,8 @@ namespace AsbCloudWebApi.Controllers /// Удалить операции перед импортом = 1, если фал валидный /// Токен отмены задачи /// - [HttpPost] + [HttpPost("import/{options}")] [Permission] - [Route("import/excel/{options}")] public async Task ImportAsync(int idWell, [FromForm] IFormFileCollection files, int options, @@ -324,8 +316,7 @@ namespace AsbCloudWebApi.Controllers /// id скважины /// Токен отмены задачи /// Запрашиваемый файл - [HttpGet] - [Route("export/excel")] + [HttpGet("export")] [Permission] [ProducesResponseType(typeof(PhysicalFileResult), (int)System.Net.HttpStatusCode.OK, "application/octet-stream")] [ProducesResponseType(StatusCodes.Status204NoContent)] @@ -352,8 +343,7 @@ namespace AsbCloudWebApi.Controllers /// /// Токен отмены задачи /// Запрашиваемый файл - [HttpGet] - [Route("scheduleReport")] + [HttpGet("scheduleReport")] [Permission] [ProducesResponseType(typeof(PhysicalFileResult), (int)System.Net.HttpStatusCode.OK)] public async Task ScheduleReportAsync([FromRoute] int idWell, [FromServices] IScheduleReportService scheduleReportService, CancellationToken token) @@ -376,8 +366,7 @@ namespace AsbCloudWebApi.Controllers /// Возвращает шаблон файла импорта /// /// Запрашиваемый файл - [HttpGet] - [Route("template/excel")] + [HttpGet("template")] [AllowAnonymous] [ProducesResponseType(typeof(PhysicalFileResult), (int)System.Net.HttpStatusCode.OK, "application/octet-stream")] public IActionResult GetTemplate()