forked from ddrilling/AsbCloudServer
nit fixes
This commit is contained in:
parent
41663eabcb
commit
8eaad67496
@ -4,10 +4,8 @@ using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace AsbCloudApp.Repositories
|
||||
{
|
||||
#nullable enable
|
||||
/// <summary>
|
||||
/// данные ГТИ
|
||||
/// </summary>
|
||||
@ -44,5 +42,4 @@ namespace AsbCloudApp.Repositories
|
||||
/// <returns></returns>
|
||||
Task<IEnumerable<WitsItemRecordDto>> GetLastDataByRecordIdAsync(int idWell, int idRecord, CancellationToken token = default);
|
||||
}
|
||||
#nullable disable
|
||||
}
|
||||
|
@ -12,7 +12,6 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace AsbCloudInfrastructure.Repository
|
||||
{
|
||||
|
||||
public class GtrWitsRepository : IGtrRepository
|
||||
{
|
||||
private readonly IAsbCloudDbContext db;
|
||||
@ -64,7 +63,7 @@ namespace AsbCloudInfrastructure.Repository
|
||||
Items = g.Select(r => new
|
||||
{
|
||||
Key = r.IdItem,
|
||||
Value = r.Value
|
||||
r.Value
|
||||
}).ToDictionary(x => x.Key, x => x.Value)
|
||||
});
|
||||
return dtos;
|
||||
@ -89,7 +88,7 @@ namespace AsbCloudInfrastructure.Repository
|
||||
var recordAllFloat = await GetGroupedItemsOrDefaultAsync<WitsItemFloat, float>(witsRequest, token);
|
||||
var recordAllString = await GetGroupedItemsOrDefaultAsync<WitsItemString, string>(witsRequest, token);
|
||||
|
||||
var dtos = (recordAllFloat.Union(recordAllInt)).Union(recordAllString).ToArray();
|
||||
var dtos = recordAllFloat.Union(recordAllInt).Union(recordAllString);
|
||||
return dtos;
|
||||
}
|
||||
|
||||
@ -116,7 +115,7 @@ namespace AsbCloudInfrastructure.Repository
|
||||
.ToArrayAsync(token)
|
||||
.ConfigureAwait(false);
|
||||
|
||||
var entities = groupedEntities
|
||||
var dtos = groupedEntities
|
||||
.Select(e => new WitsItemRecordDto()
|
||||
{
|
||||
IdRecord = e.IdRecord,
|
||||
@ -125,7 +124,7 @@ namespace AsbCloudInfrastructure.Repository
|
||||
Value = new JsonValue(e.Data!.Value)
|
||||
});
|
||||
|
||||
return entities;
|
||||
return dtos;
|
||||
}
|
||||
|
||||
private async Task<IEnumerable<WitsItemRecordDto>> GetItemsOrDefaultAsync<TEntity, TValue>(
|
||||
|
Loading…
Reference in New Issue
Block a user