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 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
|
||||
{
|
||||
DateStart = operation.DateStart,
|
||||
DateEnd = operation.DateEnd,
|
||||
DepthStart = operation.DepthStart,
|
||||
DepthEnd = operation.DepthEnd,
|
||||
Speed = (operation.DepthEnd - operation.DepthStart) / ((operation.DateEnd - operation.DateStart).TotalHours),
|
||||
DateStart = dateStart,
|
||||
DateEnd = dateEnd,
|
||||
DepthStart = depthStart,
|
||||
DepthEnd = depthEnd,
|
||||
Speed = speed,
|
||||
BlockSpeedSp = span[0].BlockSpeedSp,
|
||||
Pressure = aggregatedValues.Pressure,
|
||||
PressureIdle = span[0].PressureIdle,
|
||||
|
Loading…
Reference in New Issue
Block a user