forked from ddrilling/AsbCloudServer
Добавлен метод API получения секций конструкции скважины
This commit is contained in:
parent
3d36779529
commit
018c5c026b
@ -113,7 +113,7 @@ public class WellSectionPlanController : ControllerBase
|
||||
/// <param name="idWell">Идентификатор скважины</param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[HttpGet("wellSectionTypes")]
|
||||
[ProducesResponseType(typeof(IEnumerable<WellSectionTypeDto>), StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||
[ProducesResponseType(StatusCodes.Status403Forbidden)]
|
||||
@ -128,7 +128,29 @@ public class WellSectionPlanController : ControllerBase
|
||||
|
||||
return Ok(wellSectionTypes);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Получить список секций
|
||||
/// </summary>
|
||||
/// <param name="idWell">Идентификатор скважины</param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[ProducesResponseType(typeof(IEnumerable<WellSectionPlanDto>), StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||
[ProducesResponseType(StatusCodes.Status403Forbidden)]
|
||||
public async Task<IActionResult> GetPlanWellSectionsAsync(int idWell, CancellationToken cancellationToken)
|
||||
{
|
||||
await AssertUserAccessToWell(idWell, cancellationToken);
|
||||
|
||||
var planWellSections = await wellSectionPlanRepository.GetByIdWellAsync(idWell, cancellationToken);
|
||||
|
||||
if (!planWellSections.Any())
|
||||
return NoContent();
|
||||
|
||||
return Ok(planWellSections);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Удалить секцию
|
||||
/// </summary>
|
||||
|
Loading…
Reference in New Issue
Block a user