Merge pull request '#13058364 Изменения расчёта отклонения по ТВД' (#92) from feature/tvd_calculation into dev

Reviewed-on: http://test.digitaldrilling.ru:8080/DDrilling/AsbCloudServer/pulls/92
Reviewed-by: Никита Фролов <ng.frolov@digitaldrilling.ru>
This commit is contained in:
Никита Фролов 2023-08-04 15:48:54 +05:00
commit bd4bb09509
4 changed files with 571 additions and 536 deletions

View File

@ -53,8 +53,8 @@ namespace AsbCloudApp.Data
public IEnumerable<CompanyDto> Companies { get; set; } = Enumerable.Empty<CompanyDto>();
/// <summary>
/// Отставание от ГГД, дней
/// Отставание от ГГД, проценты
/// </summary>
public double TvdLagDays { get; set; } = 0;
public double? TvdLagPercent { get; set; }
}
}

View File

@ -95,9 +95,8 @@ namespace AsbCloudApp.Data
public PlanFactDto<double?> WellDepth { get; set; } = null!;
/// <summary>
/// Отставание от ГГД, дни
/// Отставание от ГГД, проценты
/// </summary>
public double TvdLagDays { get; set; }
public double TvdLagPercent { get; set; }
}
}

View File

@ -138,8 +138,7 @@ namespace AsbCloudInfrastructure.Services
wellMapInfo.FirstFactOperationDateStart = wellOperationsStat?.Total.Fact?.Start
?? wellOperationsStat?.Total.Plan?.Start;
wellMapInfo.LastPredictOperationDateEnd = wellOperationsStat?.Total.Plan?.End?
.AddDays(wellOperationsStat?.TvdLagDays ?? 0d);
wellMapInfo.LastPredictOperationDateEnd = wellOperationsStat?.Total.Plan?.End;
wellMapInfo.WellDepth = new()
{
@ -163,7 +162,7 @@ namespace AsbCloudInfrastructure.Services
wellMapInfo.SaubUsage = wellSubsystemStat?.SubsystemAKB?.KUsage ?? 0d;
wellMapInfo.SpinUsage = wellSubsystemStat?.SubsystemSpinMaster?.KUsage ?? 0d;
wellMapInfo.TorqueKUsage = wellSubsystemStat?.SubsystemTorqueMaster?.KUsage ?? 0d;
wellMapInfo.TvdLagDays = wellOperationsStat?.TvdLagDays ?? 0d;
wellMapInfo.TvdLagPercent = wellOperationsStat?.TvdLagPercent ?? 0d;
wellMapInfo.IdsCompanies = well.Companies.Select(c => c.Id);
return wellMapInfo;