forked from ddrilling/AsbCloudServer
редактирование метода в контроллере
изменение интерфейса наработки подсистем
This commit is contained in:
parent
3aa01ebe47
commit
562bf5b348
@ -47,6 +47,15 @@ namespace AsbCloudApp.Services.Subsystems
|
||||
/// <param name="token"></param>
|
||||
/// <returns></returns>
|
||||
Task<DatesRangeDto?> GetDateRangeOperationTimeAsync(SubsystemOperationTimeRequest request, CancellationToken token);
|
||||
/// <summary>
|
||||
/// Получение статистики по наработке подсистем по активным скважинам
|
||||
/// </summary>
|
||||
/// <param name="idCompany"></param>
|
||||
/// <param name="gtDate"></param>
|
||||
/// <param name="ltDate"></param>
|
||||
/// <param name="token"></param>
|
||||
/// <returns></returns>
|
||||
Task<IEnumerable<SubsystemActiveWellStatDto>?> GetStatByActiveWell(int idCompany, DateTime? gtDate, DateTime? ltDate, CancellationToken token);
|
||||
}
|
||||
#nullable disable
|
||||
}
|
||||
|
@ -53,10 +53,15 @@ namespace AsbCloudWebApi.Controllers.Subsystems
|
||||
[ProducesResponseType(typeof(IEnumerable<SubsystemStatDto>), (int)System.Net.HttpStatusCode.OK)]
|
||||
public async Task<IActionResult> GetStatByWellAsync([FromQuery] DateTime? GtDate, DateTime? LtDate, CancellationToken token = default)
|
||||
{
|
||||
|
||||
var subsystemResult = await subsystemOperationTimeService.GetStatAsync(request, token);
|
||||
var idCompany = User.GetCompanyId();
|
||||
if (idCompany.HasValue)
|
||||
{
|
||||
var subsystemResult = await subsystemOperationTimeService.GetStatByActiveWell(idCompany.Value, GtDate, LtDate, token);
|
||||
return Ok(subsystemResult);
|
||||
}
|
||||
return Forbid();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// получить список подсистем общий.
|
||||
|
Loading…
Reference in New Issue
Block a user