diff --git a/AsbCloudApp/Services/IWellOperationsStatService.cs b/AsbCloudApp/Services/IOperationsStatService.cs similarity index 72% rename from AsbCloudApp/Services/IWellOperationsStatService.cs rename to AsbCloudApp/Services/IOperationsStatService.cs index dc71fb33..d0689b9e 100644 --- a/AsbCloudApp/Services/IWellOperationsStatService.cs +++ b/AsbCloudApp/Services/IOperationsStatService.cs @@ -5,8 +5,10 @@ using System.Threading.Tasks; namespace AsbCloudApp.Services { - public interface IWellOperationsStatService + public interface IOperationsStatService { + Task GetRopStatByIdWellAsync(int idWell, CancellationToken token); + Task GetRopStatByUidAsync(string uid, CancellationToken token); Task GetStatClusterAsync(int idCluster, int idCompany, CancellationToken token = default); Task GetStatWellAsync(int idWell, CancellationToken token = default); Task>> GetTvdAsync(int idWell, CancellationToken token); diff --git a/AsbCloudInfrastructure/Services/WellOperationService/OperationsStatService.cs b/AsbCloudInfrastructure/Services/WellOperationService/OperationsStatService.cs index 45cc8212..5f20c8ac 100644 --- a/AsbCloudInfrastructure/Services/WellOperationService/OperationsStatService.cs +++ b/AsbCloudInfrastructure/Services/WellOperationService/OperationsStatService.cs @@ -129,6 +129,9 @@ namespace AsbCloudInfrastructure.Services.WellOperationService .LastOrDefaultAsync(token) .ConfigureAwait(false); + if (idLastSectionType == default) + return null; + var operations = await (from o in db.WellOperations where clusterWellsIds.Contains(o.IdWell) && o.IdType == 1 &&