WellInfoService add another source for planned well depth.

This commit is contained in:
ngfrolov 2023-05-22 10:52:27 +05:00
parent 9347e9610b
commit 2415647dce
Signed by untrusted user who does not match committer: ng.frolov
GPG Key ID: E99907A0357B29A7

View File

@ -79,6 +79,7 @@ namespace AsbCloudInfrastructure.Services
var wellLastFactSection = wellOperationsStat?.Sections.LastOrDefault(s => s.Fact is not null);
double? currentDepth = null;
double? planTotalDepth = null;
DateTime lastTelemetryDate = default;
if (well.IdTelemetry.HasValue)
@ -110,9 +111,12 @@ namespace AsbCloudInfrastructure.Services
idSection ??= welllProcessMap?.IdWellSectionType;
}
planTotalDepth = wellDepthByProcessMap.FirstOrDefault(p => p.Id == well.Id)?.DepthEnd;
planTotalDepth ??= wellOperationsStat?.Total.Plan?.WellDepthEnd;
wellMapInfo.WellDepth = new()
{
Plan = wellDepthByProcessMap.FirstOrDefault(p => p.Id == well.Id)?.DepthEnd,
Plan = planTotalDepth,
Fact = currentDepth,
};