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>
|
/// <param name="token"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<DatesRangeDto?> GetDateRangeOperationTimeAsync(SubsystemOperationTimeRequest request, CancellationToken token);
|
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
|
#nullable disable
|
||||||
}
|
}
|
||||||
|
@ -53,10 +53,15 @@ namespace AsbCloudWebApi.Controllers.Subsystems
|
|||||||
[ProducesResponseType(typeof(IEnumerable<SubsystemStatDto>), (int)System.Net.HttpStatusCode.OK)]
|
[ProducesResponseType(typeof(IEnumerable<SubsystemStatDto>), (int)System.Net.HttpStatusCode.OK)]
|
||||||
public async Task<IActionResult> GetStatByWellAsync([FromQuery] DateTime? GtDate, DateTime? LtDate, CancellationToken token = default)
|
public async Task<IActionResult> GetStatByWellAsync([FromQuery] DateTime? GtDate, DateTime? LtDate, CancellationToken token = default)
|
||||||
{
|
{
|
||||||
|
var idCompany = User.GetCompanyId();
|
||||||
var subsystemResult = await subsystemOperationTimeService.GetStatAsync(request, token);
|
if (idCompany.HasValue)
|
||||||
|
{
|
||||||
|
var subsystemResult = await subsystemOperationTimeService.GetStatByActiveWell(idCompany.Value, GtDate, LtDate, token);
|
||||||
return Ok(subsystemResult);
|
return Ok(subsystemResult);
|
||||||
}
|
}
|
||||||
|
return Forbid();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// получить список подсистем общий.
|
/// получить список подсистем общий.
|
||||||
|
Loading…
Reference in New Issue
Block a user