forked from ddrilling/AsbCloudServer
Форматирование TelemetryDataSaubService
This commit is contained in:
parent
7dd92be567
commit
bb107c8f5b
@ -1,24 +1,20 @@
|
||||
using AsbCloudApp.Data;
|
||||
using AsbCloudApp.Data.SAUB;
|
||||
using AsbCloudApp.Data.SAUB;
|
||||
using AsbCloudApp.Exceptions;
|
||||
using AsbCloudApp.Repositories;
|
||||
using AsbCloudApp.Services;
|
||||
using AsbCloudDb.Model;
|
||||
using Mapster;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Org.BouncyCastle.Asn1.Pkcs;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Csv;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services.SAUB
|
||||
{
|
||||
namespace AsbCloudInfrastructure.Services.SAUB;
|
||||
|
||||
public class TelemetryDataSaubService : TelemetryDataBaseService<TelemetryDataSaubDto, TelemetryDataSaub>, ITelemetryDataSaubService
|
||||
{
|
||||
@ -71,11 +67,13 @@ namespace AsbCloudInfrastructure.Services.SAUB
|
||||
.Where(t => t.WellDepth > 0.0001)
|
||||
.Where(t => modes.Contains(t.Mode))
|
||||
.Where(t => t.WellDepth - t.BitDepth < 0.01)
|
||||
.GroupBy(t => new {
|
||||
.GroupBy(t => new
|
||||
{
|
||||
t.DateTime.Hour,
|
||||
WellDepthX10 = Math.Truncate(t.WellDepth * 10),
|
||||
t.Mode,
|
||||
t.IdFeedRegulator})
|
||||
t.IdFeedRegulator
|
||||
})
|
||||
.Select(g => new TelemetryDataSaubStatDto
|
||||
{
|
||||
Count = g.Count(),
|
||||
@ -172,5 +170,3 @@ namespace AsbCloudInfrastructure.Services.SAUB
|
||||
return outStream;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user