WellService.GetWellTreeAsync add companies

This commit is contained in:
ngfrolov 2023-12-26 14:04:02 +05:00
parent 4c3f638bfb
commit d950e487fa
Signed by: ng.frolov
GPG Key ID: E99907A0357B29A7
2 changed files with 8 additions and 0 deletions

View File

@ -1,5 +1,7 @@
using AsbCloudApp.Data.SAUB;
using System;
using System.Collections.Generic;
using System.Linq;
namespace AsbCloudApp.Data
{
@ -37,6 +39,11 @@ namespace AsbCloudApp.Data
/// Дата полседнего получения данных от станции контроля параметров цементирования (СКЦ)
/// </summary>
public DateTime? LastDataCpmsDate { get; set; }
/// <summary>
/// Компании
/// </summary>
public IEnumerable<CompanyDto> Companies { get; set; } = Enumerable.Empty<CompanyDto>();
}
/// <summary>

View File

@ -97,6 +97,7 @@ namespace AsbCloudInfrastructure.Services
dto ??= well.Adapt<WellMapInfoWithTelemetryStat>();
dto.Latitude ??= gCluster.Key.Latitude ?? gDeposit.Key.Latitude;
dto.Longitude ??= gCluster.Key.Longitude ?? gDeposit.Key.Longitude;
dto.Companies = well.RelationCompaniesWells.Select(r => Convert(r.Company));
return dto;
}),
}),