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="idWell">Идентификатор скважины</param>
|
||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet]
|
[HttpGet("wellSectionTypes")]
|
||||||
[ProducesResponseType(typeof(IEnumerable<WellSectionTypeDto>), StatusCodes.Status200OK)]
|
[ProducesResponseType(typeof(IEnumerable<WellSectionTypeDto>), StatusCodes.Status200OK)]
|
||||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||||
[ProducesResponseType(StatusCodes.Status403Forbidden)]
|
[ProducesResponseType(StatusCodes.Status403Forbidden)]
|
||||||
@ -129,6 +129,28 @@ public class WellSectionPlanController : ControllerBase
|
|||||||
return Ok(wellSectionTypes);
|
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>
|
||||||
/// Удалить секцию
|
/// Удалить секцию
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user