diff --git a/AsbCloudApp/Data/StatWellDto.cs b/AsbCloudApp/Data/StatWellDto.cs index f72a29a6..81d20ff3 100644 --- a/AsbCloudApp/Data/StatWellDto.cs +++ b/AsbCloudApp/Data/StatWellDto.cs @@ -8,6 +8,7 @@ namespace AsbCloudApp.Data public int Id { get; set; } public string Caption { get; set; } public string WellType { get; set; } + public int IdState { get; set; } public string State { get; set; } public DateTime LastTelemetryDate { get; set; } public IEnumerable Sections { get; set; } diff --git a/AsbCloudInfrastructure/Services/WellOperationService/WellOperationsStatService.cs b/AsbCloudInfrastructure/Services/WellOperationService/WellOperationsStatService.cs index 7f765575..8a16358d 100644 --- a/AsbCloudInfrastructure/Services/WellOperationService/WellOperationsStatService.cs +++ b/AsbCloudInfrastructure/Services/WellOperationService/WellOperationsStatService.cs @@ -102,6 +102,7 @@ namespace AsbCloudInfrastructure.Services.WellOperationService Id = well.Id, Caption = well.Caption, WellType = wellType.Caption, + IdState = well.IdState, State = wellService.GetStateText(well.IdState), LastTelemetryDate = wellService.GetLastTelemetryDate(well.Id), }; @@ -119,7 +120,7 @@ namespace AsbCloudInfrastructure.Services.WellOperationService return statWellDto; statWellDto.Sections = CalcSectionsStats(wellOperations); - statWellDto.Total = GetStat(wellOperations); + statWellDto.Total = GetStatTotal(wellOperations); return statWellDto; } @@ -152,7 +153,7 @@ namespace AsbCloudInfrastructure.Services.WellOperationService return sections; } - private static PlanFactBase GetStat(IEnumerable operations) + private static PlanFactBase GetStatTotal(IEnumerable operations) { var operationsPlan = operations.Where(o => o.IdType == idOperationTypePlan); var operationsFact = operations.Where(o => o.IdType == idOperationTypeFact);