forked from ddrilling/AsbCloudServer
CS2-107: Added lost data after merge conflict resolve (with dev)
This commit is contained in:
parent
cb52f96069
commit
e0a453a1f6
@ -139,12 +139,27 @@ namespace AsbCloudInfrastructure.Services
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<int>> GetClusterWellsIdsAsync(int idWell, CancellationToken token)
|
||||||
|
{
|
||||||
|
var well = await cacheWells.FirstOrDefaultAsync(w => w.Id == idWell)
|
||||||
|
.ConfigureAwait(false);
|
||||||
|
|
||||||
|
if (well is null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
var clusterWells = await cacheWells.WhereAsync(w => w.IdCluster == well.IdCluster)
|
||||||
|
.ConfigureAwait(false);
|
||||||
|
|
||||||
|
return clusterWells.Select(w => w.Id);
|
||||||
|
}
|
||||||
|
|
||||||
private WellDto Convert(Well well)
|
private WellDto Convert(Well well)
|
||||||
{
|
{
|
||||||
return new WellDto
|
return new WellDto
|
||||||
{
|
{
|
||||||
Id = well.Id,
|
Id = well.Id,
|
||||||
Caption = well.Caption,
|
Caption = well.Caption,
|
||||||
|
IdCluster = well.IdCluster,
|
||||||
Cluster = well.Cluster?.Caption,
|
Cluster = well.Cluster?.Caption,
|
||||||
Deposit = well.Cluster?.Deposit?.Caption,
|
Deposit = well.Cluster?.Deposit?.Caption,
|
||||||
LastTelemetryDate = GetLastTelemetryDate(well.Id),
|
LastTelemetryDate = GetLastTelemetryDate(well.Id),
|
||||||
|
Loading…
Reference in New Issue
Block a user