forked from ddrilling/AsbCloudServer
Removed Measures from db demo data
This commit is contained in:
parent
22f13cdfcc
commit
47e62f395a
@ -35,166 +35,6 @@ namespace AsbCloudDevOperations
|
||||
new Cluster { Id = 5, Caption = "к221", IdDeposit = 1, Latitude = 60.6672055555556, Longitude = 69.6603861111111 }
|
||||
);
|
||||
|
||||
demoContext.Measures.AddRange(
|
||||
new Measure { Id = 1, IdCategory = 1, IdWell = 1, Timestamp = DateTime.Now.AddHours(1),
|
||||
Data = new Dictionary<string, object> {
|
||||
{ "name", "Some name 1" },
|
||||
{ "temperature", "35" },
|
||||
{ "density", "113" },
|
||||
{ "conditionalViscosity", "354" },
|
||||
{ "r300", "234" },
|
||||
{ "r600", "4765" },
|
||||
{ "r3r6", "456" },
|
||||
{ "dnsDpa", "6789" },
|
||||
{ "plasticViscocity", "456" },
|
||||
{ "snsDpa", "8908" },
|
||||
{ "r3r649С", "567" },
|
||||
{ "dns49Cdpa", "34654" },
|
||||
{ "plasticViscocity49c", "6786" },
|
||||
{ "sns49Cdpa", "456" },
|
||||
{ "mbt", "86" },
|
||||
{ "sand", "234" },
|
||||
{ "filtering", "5675" },
|
||||
{ "crust", "23424" },
|
||||
{ "ktk", "4567" },
|
||||
{ "ph", "3455" },
|
||||
{ "hardness", "587678" },
|
||||
{ "chlorides", "3453" },
|
||||
{ "pf", "2342" },
|
||||
{ "mf", "78678" },
|
||||
{ "pm", "345345" },
|
||||
{ "fluidSolidPhase", "3453" },
|
||||
{ "grease", "67567" },
|
||||
{ "calciumCarbonate", "23424" }
|
||||
}
|
||||
},
|
||||
new Measure { Id = 2, IdCategory = 1, IdWell = 1, Timestamp = DateTime.Now.AddHours(2),
|
||||
Data = new Dictionary<string, object> {
|
||||
{ "name", "Some name 2" },
|
||||
{ "temperature", "3453" },
|
||||
{ "density", "123" },
|
||||
{ "conditionalViscosity", "4564" },
|
||||
{ "r300", "231234" },
|
||||
{ "r600", "1123" },
|
||||
{ "r3r6", "456" },
|
||||
{ "dnsDpa", "234" },
|
||||
{ "plasticViscocity", "678" },
|
||||
{ "snsDpa", "345" },
|
||||
{ "r3r649С", "678" },
|
||||
{ "dns49Cdpa", "3453" },
|
||||
{ "plasticViscocity49c", "612786" },
|
||||
{ "sns49Cdpa", "657" },
|
||||
{ "mbt", "234" },
|
||||
{ "sand", "289" },
|
||||
{ "filtering", "234" },
|
||||
{ "crust", "567" },
|
||||
{ "ktk", "234" },
|
||||
{ "ph", "567" },
|
||||
{ "hardness", "45" },
|
||||
{ "chlorides", "5687" },
|
||||
{ "pf", "4567" },
|
||||
{ "mf", "234" },
|
||||
{ "pm", "870" },
|
||||
{ "fluidSolidPhase", "780" },
|
||||
{ "grease", "456" },
|
||||
{ "calciumCarbonate", "7809" }
|
||||
}
|
||||
},
|
||||
new Measure { Id = 3, IdCategory = 2, IdWell = 1, Timestamp = DateTime.Now.AddHours(1),
|
||||
Data = new Dictionary<string, object> {
|
||||
{ "probeNumber", "345345" },
|
||||
{ "probeExtractionDepth", "345" },
|
||||
{ "sandstone", "345345" },
|
||||
{ "siltstone", "35" },
|
||||
{ "argillit", "113" },
|
||||
{ "brokenArgillit", "354" },
|
||||
{ "coal", "234" },
|
||||
{ "sand", "4765" },
|
||||
{ "clay", "456" },
|
||||
{ "camstone", "6789" },
|
||||
{ "cement", "456" },
|
||||
{ "summary", "8908" },
|
||||
{ "drillingMud", "567" },
|
||||
{ "sludge", "34654" },
|
||||
{ "maxSum", "6786" },
|
||||
{ "methane", "456" },
|
||||
{ "ethane", "86" },
|
||||
{ "propane", "234" },
|
||||
{ "butane", "5675" },
|
||||
{ "pentane", "23424" },
|
||||
{ "mechanicalSpeed", "4567" },
|
||||
{ "preliminaryConclusion", "Заключение" }
|
||||
}
|
||||
},
|
||||
new Measure { Id = 4, IdCategory = 2, IdWell = 1, Timestamp = DateTime.Now.AddHours(2),
|
||||
Data = new Dictionary<string, object> {
|
||||
{ "probeNumber", "5675" },
|
||||
{ "probeExtractionDepth", "234" },
|
||||
{ "sandstone", "789" },
|
||||
{ "siltstone", "345" },
|
||||
{ "argillit", "698" },
|
||||
{ "brokenArgillit", "345" },
|
||||
{ "coal", "567" },
|
||||
{ "sand", "234" },
|
||||
{ "clay", "7890" },
|
||||
{ "camstone", "234" },
|
||||
{ "cement", "657567" },
|
||||
{ "summary", "234234" },
|
||||
{ "drillingMud", "3453" },
|
||||
{ "sludge", "890890" },
|
||||
{ "maxSum", "234" },
|
||||
{ "methane", "5476" },
|
||||
{ "ethane", "789" },
|
||||
{ "propane", "345" },
|
||||
{ "butane", "232" },
|
||||
{ "pentane", "5678" },
|
||||
{ "mechanicalSpeed", "4568678567" },
|
||||
{ "preliminaryConclusion", "Заключение 2" }
|
||||
}
|
||||
},
|
||||
new Measure { Id = 5, IdCategory = 3, IdWell = 1, Timestamp = DateTime.Now.AddHours(1),
|
||||
Data = new Dictionary<string, object> {
|
||||
{ "depth", "345345" },
|
||||
{ "zenithAngle", "35" },
|
||||
{ "magneticAzimuth", "113" },
|
||||
{ "trueAzimuth", "354" },
|
||||
{ "directAzimuth", "234" },
|
||||
{ "verticalDepth", "4765" },
|
||||
{ "absoluteMark", "456" },
|
||||
{ "localNorthOffset", "6789" },
|
||||
{ "localEastOffset", "456" },
|
||||
{ "outFallOffset", "8908" },
|
||||
{ "offsetAzimuth", "567" },
|
||||
{ "areaIntensity", "34654" },
|
||||
{ "offsetStopAngle", "6786" },
|
||||
{ "zenithIntensity", "456" },
|
||||
{ "comment", "Some comment" },
|
||||
{ "depthPlanFactDifference", "234" },
|
||||
{ "distancePlanFactDifference", "5675" }
|
||||
}
|
||||
},
|
||||
new Measure { Id = 6, IdCategory = 3, IdWell = 1, Timestamp = DateTime.Now.AddHours(2),
|
||||
Data = new Dictionary<string, object> {
|
||||
{ "depth", "678678" },
|
||||
{ "zenithAngle", "453" },
|
||||
{ "magneticAzimuth", "568" },
|
||||
{ "trueAzimuth", "5675" },
|
||||
{ "directAzimuth", "234" },
|
||||
{ "verticalDepth", "567567" },
|
||||
{ "absoluteMark", "234234" },
|
||||
{ "localNorthOffset", "4564" },
|
||||
{ "localEastOffset", "789" },
|
||||
{ "outFallOffset", "678" },
|
||||
{ "offsetAzimuth", "456" },
|
||||
{ "areaIntensity", "90890" },
|
||||
{ "offsetStopAngle", "456456" },
|
||||
{ "zenithIntensity", "678" },
|
||||
{ "comment", "Some comment 2" },
|
||||
{ "depthPlanFactDifference", "4567" },
|
||||
{ "distancePlanFactDifference", "7809" }
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
demoContext.Telemetries.Add(
|
||||
new Telemetry
|
||||
@ -329,124 +169,6 @@ namespace AsbCloudDevOperations
|
||||
new WellOperation { Id = 76341, IdWell = 1, IdWellSectionType = 1, IdCategory = 1047, IdType = 0, WellDepth = 1250, StartDate = DateTime.Parse("2021-08-26 11:30"), DurationHours = 3.5 }
|
||||
);
|
||||
|
||||
demoContext.TelemetryAnalysis.AddRange(
|
||||
new TelemetryAnalysis
|
||||
{
|
||||
Id = 1,
|
||||
IdTelemetry = 1,
|
||||
IdOperation = 17,
|
||||
UnixDate = 1626870355,
|
||||
DurationSec = 10,
|
||||
OperationStartDepth = null,
|
||||
OperationEndDepth = 206,
|
||||
IsWellDepthIncreasing = false,
|
||||
IsWellDepthDecreasing = false,
|
||||
IsBitPositionIncreasing = false,
|
||||
IsBitPositionDecreasing = false,
|
||||
IsBitPositionLt20 = true,
|
||||
IsBlockPositionIncreasing = false,
|
||||
IsBlockPositionDecreasing = false,
|
||||
IsRotorSpeedLt5 = true,
|
||||
IsRotorSpeedGt5 = false,
|
||||
IsPressureLt20 = true,
|
||||
IsPressureGt20 = false,
|
||||
IsHookWeightNotChanges = true,
|
||||
IsHookWeightLt3 = true
|
||||
},
|
||||
new TelemetryAnalysis
|
||||
{
|
||||
Id = 2,
|
||||
IdTelemetry = 1,
|
||||
IdOperation = 8,
|
||||
UnixDate = 1626870364,
|
||||
DurationSec = 6,
|
||||
OperationStartDepth = 206,
|
||||
OperationEndDepth = 206,
|
||||
IsWellDepthIncreasing = false,
|
||||
IsWellDepthDecreasing = false,
|
||||
IsBitPositionIncreasing = true,
|
||||
IsBitPositionDecreasing = false,
|
||||
IsBitPositionLt20 = true,
|
||||
IsBlockPositionIncreasing = true,
|
||||
IsBlockPositionDecreasing = false,
|
||||
IsRotorSpeedLt5 = true,
|
||||
IsRotorSpeedGt5 = false,
|
||||
IsPressureLt20 = true,
|
||||
IsPressureGt20 = false,
|
||||
IsHookWeightNotChanges = true,
|
||||
IsHookWeightLt3 = true
|
||||
},
|
||||
new TelemetryAnalysis
|
||||
{
|
||||
Id = 3,
|
||||
IdTelemetry = 1,
|
||||
IdOperation = 10,
|
||||
UnixDate = 1626870370,
|
||||
DurationSec = 2,
|
||||
OperationStartDepth = 206,
|
||||
OperationEndDepth = 206,
|
||||
IsWellDepthIncreasing = false,
|
||||
IsWellDepthDecreasing = false,
|
||||
IsBitPositionIncreasing = false,
|
||||
IsBitPositionDecreasing = true,
|
||||
IsBitPositionLt20 = true,
|
||||
IsBlockPositionIncreasing = false,
|
||||
IsBlockPositionDecreasing = true,
|
||||
IsRotorSpeedLt5 = true,
|
||||
IsRotorSpeedGt5 = false,
|
||||
IsPressureLt20 = true,
|
||||
IsPressureGt20 = false,
|
||||
IsHookWeightNotChanges = true,
|
||||
IsHookWeightLt3 = true
|
||||
},
|
||||
new TelemetryAnalysis
|
||||
{
|
||||
Id = 4,
|
||||
IdTelemetry = 1,
|
||||
IdOperation = 17,
|
||||
UnixDate = 1626870372,
|
||||
DurationSec = 7,
|
||||
OperationStartDepth = 206,
|
||||
OperationEndDepth = 206,
|
||||
IsWellDepthIncreasing = false,
|
||||
IsWellDepthDecreasing = false,
|
||||
IsBitPositionIncreasing = false,
|
||||
IsBitPositionDecreasing = false,
|
||||
IsBitPositionLt20 = true,
|
||||
IsBlockPositionIncreasing = false,
|
||||
IsBlockPositionDecreasing = false,
|
||||
IsRotorSpeedLt5 = true,
|
||||
IsRotorSpeedGt5 = false,
|
||||
IsPressureLt20 = true,
|
||||
IsPressureGt20 = false,
|
||||
IsHookWeightNotChanges = true,
|
||||
IsHookWeightLt3 = true
|
||||
},
|
||||
new TelemetryAnalysis
|
||||
{
|
||||
Id = 5,
|
||||
IdTelemetry = 1,
|
||||
IdOperation = 8,
|
||||
UnixDate = 1626870379,
|
||||
DurationSec = 7,
|
||||
OperationStartDepth = 206,
|
||||
OperationEndDepth = 206,
|
||||
IsWellDepthIncreasing = false,
|
||||
IsWellDepthDecreasing = false,
|
||||
IsBitPositionIncreasing = true,
|
||||
IsBitPositionDecreasing = false,
|
||||
IsBitPositionLt20 = true,
|
||||
IsBlockPositionIncreasing = true,
|
||||
IsBlockPositionDecreasing = false,
|
||||
IsRotorSpeedLt5 = true,
|
||||
IsRotorSpeedGt5 = false,
|
||||
IsPressureLt20 = true,
|
||||
IsPressureGt20 = false,
|
||||
IsHookWeightNotChanges = true,
|
||||
IsHookWeightLt3 = true
|
||||
}
|
||||
);
|
||||
|
||||
int res = demoContext.SaveChanges();
|
||||
|
||||
if (res > 0)
|
||||
|
@ -89,6 +89,7 @@ namespace AsbCloudInfrastructure.Services
|
||||
.Where(m => m.IdWell == idWell && !m.IsDeleted);
|
||||
|
||||
var entities = await query
|
||||
.OrderBy(m => m.Timestamp)
|
||||
.AsNoTracking()
|
||||
.ToListAsync(token)
|
||||
.ConfigureAwait(false);
|
||||
@ -104,8 +105,6 @@ namespace AsbCloudInfrastructure.Services
|
||||
if (data.Data is null)
|
||||
throw new ArgumentException("data.data is not optional", nameof(data));
|
||||
var entity = data.Adapt<Measure>();
|
||||
entity.Id = 0;
|
||||
entity.IdWell = idWell;
|
||||
db.Measures.Add(entity);
|
||||
return db.SaveChangesAsync(token);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user