forked from ddrilling/AsbCloudServer
Merge pull request 'Правка фильтрации processMapPlanDrilling' (#278) from fix/info-rop-on-start-screen into dev
Reviewed-on: http://test.digitaldrilling.ru:8080/DDrilling/AsbCloudServer/pulls/278
This commit is contained in:
commit
7079d7e539
@ -43,7 +43,10 @@ public class WellInfoService
|
||||
|
||||
var wellsIds = activeWells.Select(w => w.Id);
|
||||
|
||||
var processMapPlanWellDrillingRequests = wellsIds.Select(id => new ProcessMapPlanBaseRequestWithWell(id));
|
||||
var processMapPlanWellDrillingRequests = wellsIds.Select(id => new ProcessMapPlanBaseRequestWithWell(id)
|
||||
{
|
||||
Moment = DateTimeOffset.UtcNow.AddDays(1)
|
||||
});
|
||||
var processMapPlanWellDrillings = new List<ProcessMapPlanDrillingDto>();
|
||||
foreach (var processMapPlanWellDrillingRequest in processMapPlanWellDrillingRequests)
|
||||
{
|
||||
@ -97,14 +100,21 @@ public class WellInfoService
|
||||
int? idSection = wellLastFactSection?.Id;
|
||||
ProcessMapPlanDrillingDto? processMapPlanWellDrilling = null;
|
||||
|
||||
if (idSection.HasValue)
|
||||
if(idSection.HasValue && currentDepth.HasValue)
|
||||
{
|
||||
processMapPlanWellDrilling = wellProcessMaps.FirstOrDefault(p => p.IdWellSectionType == idSection);
|
||||
}
|
||||
else if (currentDepth.HasValue)
|
||||
processMapPlanWellDrilling = wellProcessMaps
|
||||
.Where(p => p.IdWellSectionType == idSection)
|
||||
.Where(p => p.DepthStart <= currentDepth.Value && p.DepthEnd >= currentDepth.Value)
|
||||
.FirstOrDefault();
|
||||
}
|
||||
else if(currentDepth.HasValue)
|
||||
{
|
||||
processMapPlanWellDrilling = wellProcessMaps.FirstOrDefault(p => p.DepthStart <= currentDepth.Value && p.DepthEnd >= currentDepth.Value);
|
||||
}
|
||||
else if (idSection.HasValue)
|
||||
{
|
||||
processMapPlanWellDrilling = wellProcessMaps.FirstOrDefault(p => p.IdWellSectionType == idSection);
|
||||
}
|
||||
|
||||
double? planTotalDepth = null;
|
||||
planTotalDepth = wellDepthByProcessMap.FirstOrDefault(p => p.Id == well.Id)?.DepthEnd;
|
||||
|
Loading…
Reference in New Issue
Block a user