forked from ddrilling/AsbCloudServer
Merge pull request 'Фикс алгоритма формирования записей в кеш-таблицу Data_Saub_stat' (#237) from fix/#30501319-data-saub-stat-algorithm into dev
Reviewed-on: http://test.digitaldrilling.ru:8080/DDrilling/AsbCloudServer/pulls/237
This commit is contained in:
commit
6a2396332c
@ -154,13 +154,19 @@ namespace AsbCloudInfrastructure.Background.PeriodicWorks
|
|||||||
var hasOscillation = EnabledSubsystemsFlags.AutoOscillation.HasEnabledSubsystems(operation.EnabledSubsystems);
|
var hasOscillation = EnabledSubsystemsFlags.AutoOscillation.HasEnabledSubsystems(operation.EnabledSubsystems);
|
||||||
|
|
||||||
var aggregatedValues = CalcAggregate(span);
|
var aggregatedValues = CalcAggregate(span);
|
||||||
|
var dateStart = span[0].DateTime;
|
||||||
|
var dateEnd = span[^1].DateTime;
|
||||||
|
var depthStart = span[0].WellDepth;
|
||||||
|
var depthEnd = span[^1].WellDepth;
|
||||||
|
var speed = ((depthEnd - depthStart) / (dateEnd - dateStart).TotalHours);
|
||||||
|
|
||||||
var processMapDrillingCacheItem = new DataSaubStatDto
|
var processMapDrillingCacheItem = new DataSaubStatDto
|
||||||
{
|
{
|
||||||
DateStart = operation.DateStart,
|
DateStart = dateStart,
|
||||||
DateEnd = operation.DateEnd,
|
DateEnd = dateEnd,
|
||||||
DepthStart = operation.DepthStart,
|
DepthStart = depthStart,
|
||||||
DepthEnd = operation.DepthEnd,
|
DepthEnd = depthEnd,
|
||||||
Speed = (operation.DepthEnd - operation.DepthStart) / ((operation.DateEnd - operation.DateStart).TotalHours),
|
Speed = speed,
|
||||||
BlockSpeedSp = span[0].BlockSpeedSp,
|
BlockSpeedSp = span[0].BlockSpeedSp,
|
||||||
Pressure = aggregatedValues.Pressure,
|
Pressure = aggregatedValues.Pressure,
|
||||||
PressureIdle = span[0].PressureIdle,
|
PressureIdle = span[0].PressureIdle,
|
||||||
|
Loading…
Reference in New Issue
Block a user