forked from ddrilling/AsbCloudServer
#7887519 Добавление параметров
This commit is contained in:
parent
ddcade44a3
commit
65e8c7d8c1
@ -27,6 +27,16 @@ namespace AsbCloudApp.Data
|
||||
/// Идентификатор критерия бурения
|
||||
/// </summary>
|
||||
public short IdFeedRegulator { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Наименование критерия бурения
|
||||
/// </summary>
|
||||
public string NameFeedRegulator { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Количество включений
|
||||
/// </summary>
|
||||
public int NumberInclusions { get; set; }
|
||||
}
|
||||
#nullable disable
|
||||
}
|
||||
|
@ -15,6 +15,14 @@ namespace AsbCloudInfrastructure.Services
|
||||
{
|
||||
private readonly ILimitingParameterRepository limitingParameterRepository;
|
||||
private readonly IWellService wellService;
|
||||
private readonly Dictionary<int, string> feedRegulatorData = new Dictionary<int, string>()
|
||||
{
|
||||
{ 0, "Нет ограничения" },
|
||||
{ 1, "МСП" },
|
||||
{ 2, "Давление" },
|
||||
{ 3, "Осевая нагрузка" },
|
||||
{ 4, "Момент" }
|
||||
};
|
||||
|
||||
public LimitingParameterService(ILimitingParameterRepository limitingParameterRepository,
|
||||
IWellService wellService)
|
||||
@ -46,7 +54,9 @@ namespace AsbCloudInfrastructure.Services
|
||||
IdWell = well.Id,
|
||||
IdFeedRegulator = item.Key,
|
||||
Depth = allItemDepths,
|
||||
TotalMinutes = (float)allItemDates
|
||||
TotalMinutes = (float)allItemDates,
|
||||
NumberInclusions = item.Count(),
|
||||
NameFeedRegulator = feedRegulatorData.FirstOrDefault(x => x.Key == item.Key).Value
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user