diff --git a/AsbCloudInfrastructure/Services/WellInfoService.cs b/AsbCloudInfrastructure/Services/WellInfoService.cs index f301fd02..70c6afdd 100644 --- a/AsbCloudInfrastructure/Services/WellInfoService.cs +++ b/AsbCloudInfrastructure/Services/WellInfoService.cs @@ -34,7 +34,7 @@ public class WellInfoService { var wellService = services.GetRequiredService(); var operationsStatService = services.GetRequiredService(); - var wellDrillingProcessMapRepository = services.GetRequiredService(); + var processMapPlanWellDrillingRepository = services.GetRequiredService>(); var subsystemOperationTimeService = services.GetRequiredService(); var telemetryDataSaubCache = services.GetRequiredService>(); var messageHub = services.GetRequiredService>(); @@ -44,10 +44,10 @@ public class WellInfoService var wellsIds = activeWells.Select(w => w.Id); - var wellDrillingProcessMapRequests = wellsIds.Select(id => new WellDrillingProcessMapRequest { IdWell = id }); - var wellDrillingProcessMaps = await wellDrillingProcessMapRepository.GetAsync(wellDrillingProcessMapRequests, token); + var processMapPlanWellDrillingRequests = wellsIds.Select(id => new ProcessMapPlanRequest { IdWell = id }); + var processMapPlanWellDrillings = await processMapPlanWellDrillingRepository.GetAsync(processMapPlanWellDrillingRequests, token); - var wellDepthByProcessMap = wellDrillingProcessMaps + var wellDepthByProcessMap = processMapPlanWellDrillings .GroupBy(p => p.IdWell) .Select(g => new { @@ -85,20 +85,20 @@ public class WellInfoService var wellLastFactSection = wellOperationsStat?.Sections.LastOrDefault(s => s.Fact is not null); currentDepth ??= wellLastFactSection?.Fact?.WellDepthEnd; - var wellProcessMaps = wellDrillingProcessMaps + var wellProcessMaps = processMapPlanWellDrillings .Where(p => p.IdWell == well.Id) .OrderBy(p => p.DepthEnd); int? idSection = wellLastFactSection?.Id; - WellDrillingProcessMapDto? wellDrillingProcessMap = null; + ProcessMapPlanWellDrillingDto? processMapPlanWellDrilling = null; if (idSection.HasValue) { - wellDrillingProcessMap = wellProcessMaps.FirstOrDefault(p => p.IdWellSectionType == idSection); + processMapPlanWellDrilling = wellProcessMaps.FirstOrDefault(p => p.IdWellSectionType == idSection); } else if (currentDepth.HasValue) { - wellDrillingProcessMap = wellProcessMaps.FirstOrDefault(p => p.DepthStart <= currentDepth.Value && p.DepthEnd >= currentDepth.Value); + processMapPlanWellDrilling = wellProcessMaps.FirstOrDefault(p => p.DepthStart <= currentDepth.Value && p.DepthEnd >= currentDepth.Value); } double? planTotalDepth = null; @@ -114,25 +114,25 @@ public class WellInfoService wellMapInfo.AxialLoad = new() { - Plan = wellDrillingProcessMap?.AxialLoad.Plan, + Plan = processMapPlanWellDrilling?.AxialLoad.Plan, Fact = lastSaubTelemetry?.AxialLoad }; wellMapInfo.TopDriveSpeed = new() { - Plan = wellDrillingProcessMap?.TopDriveSpeed.Plan, + Plan = processMapPlanWellDrilling?.TopDriveSpeed.Plan, Fact = lastSaubTelemetry?.RotorSpeed }; wellMapInfo.TopDriveTorque = new() { - Plan = wellDrillingProcessMap?.TopDriveTorque.Plan, + Plan = processMapPlanWellDrilling?.TopDriveTorque.Plan, Fact = lastSaubTelemetry?.RotorTorque }; wellMapInfo.Pressure = new() { - Plan = wellDrillingProcessMap?.Pressure.Plan, + Plan = processMapPlanWellDrilling?.Pressure.Plan, Fact = lastSaubTelemetry?.Pressure }; @@ -146,7 +146,7 @@ public class WellInfoService wellMapInfo.ROP = new() { - Plan = wellDrillingProcessMap?.RopPlan, + Plan = processMapPlanWellDrilling?.RopPlan, Fact = wellOperationsStat?.Total.Fact?.Rop, }; diff --git a/AsbCloudWebApi/Controllers/WellCompositeController.cs b/AsbCloudWebApi/Controllers/WellCompositeController.cs index f9488ac6..63ccd990 100644 --- a/AsbCloudWebApi/Controllers/WellCompositeController.cs +++ b/AsbCloudWebApi/Controllers/WellCompositeController.cs @@ -73,7 +73,7 @@ namespace AsbCloudWebApi.Controllers /// [HttpGet("compositeProcessMap")] [Permission] - [ProducesResponseType(typeof(IEnumerable), (int)System.Net.HttpStatusCode.OK)] + [ProducesResponseType(typeof(IEnumerable), (int)System.Net.HttpStatusCode.OK)] public async Task GetCompositeProcessMap(int idWell, CancellationToken token) { if (!await CanUserAccessToWellAsync(idWell, token).ConfigureAwait(false))