forked from ddrilling/AsbCloudServer
add IdState to StatWell
This commit is contained in:
parent
eab95cb7a1
commit
4968ca4382
@ -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<StatSectionDto> Sections { get; set; }
|
||||
|
@ -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<StatOperationsDto> GetStat(IEnumerable<WellOperation> operations)
|
||||
private static PlanFactBase<StatOperationsDto> GetStatTotal(IEnumerable<WellOperation> operations)
|
||||
{
|
||||
var operationsPlan = operations.Where(o => o.IdType == idOperationTypePlan);
|
||||
var operationsFact = operations.Where(o => o.IdType == idOperationTypeFact);
|
||||
|
Loading…
Reference in New Issue
Block a user