diff --git a/AsbCloudApp/Data/ProcessMap/ProcessMapReportDto.cs b/AsbCloudApp/Data/ProcessMap/ProcessMapReportDto.cs
index 6af7c3ec..7d9b9c03 100644
--- a/AsbCloudApp/Data/ProcessMap/ProcessMapReportDto.cs
+++ b/AsbCloudApp/Data/ProcessMap/ProcessMapReportDto.cs
@@ -33,16 +33,6 @@ namespace AsbCloudApp.Data.ProcessMap
///
public double MechDrillingHours { get; set; }
- ///
- /// Слайд
- ///
- public ProcessMapReportRowDto Slide { get; set; } = null!;
-
- ///
- /// Ротор
- ///
- public ProcessMapReportRowDto Rotor { get; set; } = null!;
-
///
/// название секции скважины
///
@@ -52,5 +42,40 @@ namespace AsbCloudApp.Data.ProcessMap
/// название секции скважины
///
public string WellSectionTypeName { get; set; } = null!;
+
+ ///
+ /// Проходка, м
+ ///
+ public double? DeltaDepth { get; set; }
+
+ ///
+ /// Перепад давления, атм
+ ///
+ public ProcessMapReportParamsDto PressureDiff { get; set; } = new();
+
+ ///
+ /// Нагрузка, т
+ ///
+ public ProcessMapReportParamsDto AxialLoad { get; set; } = new();
+
+ ///
+ /// Момент на ВСП, кНхМ
+ ///
+ public ProcessMapReportParamsDto TopDriveTorque { get; set; } = new();
+
+ ///
+ /// Ограничение скорости, м/ч
+ ///
+ public ProcessMapReportParamsDto SpeedLimit { get; set; } = new();
+
+ ///
+ /// Процент использования системы АПД, %
+ ///
+ public double Usage { get; set; }
+
+ ///
+ /// Фактическая механическая скорость, м/ч
+ ///
+ public double Rop { get; set; }
}
}
diff --git a/AsbCloudApp/Data/ProcessMap/ProcessMapReportRowDto.cs b/AsbCloudApp/Data/ProcessMap/ProcessMapReportRowDto.cs
deleted file mode 100644
index 331df5da..00000000
--- a/AsbCloudApp/Data/ProcessMap/ProcessMapReportRowDto.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-namespace AsbCloudApp.Data.ProcessMap
-{
- ///
- /// Строки РТК
- ///
- public class ProcessMapReportRowDto
- {
- ///
- /// Проходка, м
- ///
- public double? DeltaDepth { get; set; }
-
- ///
- /// Перепад давления, атм
- ///
- public ProcessMapReportParamsDto PressureDiff { get; set; } = new();
-
- ///
- /// Нагрузка, т
- ///
- public ProcessMapReportParamsDto AxialLoad { get; set; } = new();
-
- ///
- /// Момент на ВСП, кНхМ
- ///
- public ProcessMapReportParamsDto TopDriveTorque { get; set; } = new();
-
- ///
- /// Ограничение скорости, м/ч
- ///
- public ProcessMapReportParamsDto SpeedLimit { get; set; } = new();
-
- ///
- /// Процент использования системы АПД, %
- ///
- public double Usage { get; set; }
-
- ///
- /// Фактическая механическая скорость, м/ч
- ///
- public double Rop { get; set; }
- }
-}
diff --git a/AsbCloudInfrastructure/Services/ProcessMap/ProcessMapReportService.cs b/AsbCloudInfrastructure/Services/ProcessMap/ProcessMapReportService.cs
index 923a6bf5..cacb341d 100644
--- a/AsbCloudInfrastructure/Services/ProcessMap/ProcessMapReportService.cs
+++ b/AsbCloudInfrastructure/Services/ProcessMap/ProcessMapReportService.cs
@@ -107,45 +107,45 @@ namespace AsbCloudInfrastructure.Services.ProcessMap
.Merge().FirstCell()
.SetVal(interval.MechDrillingHours);
- row = FillIntervalModeData(sheet, "Ротор", interval.Rotor, columnMode, row);
- row = FillIntervalModeData(sheet, "Слайд", interval.Slide, columnMode, row);
+ //row = FillIntervalModeData(sheet, "Ротор", interval.Rotor, columnMode, row);
+ //row = FillIntervalModeData(sheet, "Слайд", interval.Slide, columnMode, row);
return row;
}
- private static int FillIntervalModeData(IXLWorksheet sheet, string modeName, ProcessMapReportRowDto modeData, int column, int row)
- {
- int columnDeltaDepth = column + 1;
- int columnPressure = columnDeltaDepth + 1;
- int columnLoad = columnPressure + 5;
- int columnTorque = columnLoad + 5;
- int columnSpeed = columnTorque + 5;
- int columnUsagePlan = columnSpeed + 5;
- int columnUsageFact = columnUsagePlan + 1;
- int columnRop = columnUsageFact + 12;
+ //private static int FillIntervalModeData(IXLWorksheet sheet, string modeName, ProcessMapReportRowDto modeData, int column, int row)
+ //{
+ // int columnDeltaDepth = column + 1;
+ // int columnPressure = columnDeltaDepth + 1;
+ // int columnLoad = columnPressure + 5;
+ // int columnTorque = columnLoad + 5;
+ // int columnSpeed = columnTorque + 5;
+ // int columnUsagePlan = columnSpeed + 5;
+ // int columnUsageFact = columnUsagePlan + 1;
+ // int columnRop = columnUsageFact + 12;
- sheet.Cell(row, column)
- .SetVal(modeName);
+ // sheet.Cell(row, column)
+ // .SetVal(modeName);
- sheet.Cell(row, columnDeltaDepth)
- .SetVal(modeData.DeltaDepth);
+ // sheet.Cell(row, columnDeltaDepth)
+ // .SetVal(modeData.DeltaDepth);
- FillIntervalModeDataParam(sheet, modeData.PressureDiff, columnPressure, row);
- FillIntervalModeDataParam(sheet, modeData.AxialLoad, columnLoad, row);
- FillIntervalModeDataParam(sheet, modeData.TopDriveTorque, columnTorque, row);
- FillIntervalModeDataSpeed(sheet, modeData.SpeedLimit, columnSpeed, row);
+ // FillIntervalModeDataParam(sheet, modeData.PressureDiff, columnPressure, row);
+ // FillIntervalModeDataParam(sheet, modeData.AxialLoad, columnLoad, row);
+ // FillIntervalModeDataParam(sheet, modeData.TopDriveTorque, columnTorque, row);
+ // FillIntervalModeDataSpeed(sheet, modeData.SpeedLimit, columnSpeed, row);
- sheet.Cell(row, columnUsagePlan)
- .SetVal(100);
+ // sheet.Cell(row, columnUsagePlan)
+ // .SetVal(100);
- sheet.Cell(row, columnUsageFact)
- .SetVal(modeData.Usage);
+ // sheet.Cell(row, columnUsageFact)
+ // .SetVal(modeData.Usage);
- sheet.Cell(row, columnRop)
- .SetVal(modeData.Rop);
+ // sheet.Cell(row, columnRop)
+ // .SetVal(modeData.Rop);
- return row + 1;
- }
+ // return row + 1;
+ //}
private static void FillIntervalModeDataParam(IXLWorksheet sheet, ProcessMapReportParamsDto dataParam, int column, int row)
{
diff --git a/AsbCloudInfrastructure/Services/ProcessMap/ProcessMapService.cs b/AsbCloudInfrastructure/Services/ProcessMap/ProcessMapService.cs
index 0c1769c7..a8228d7e 100644
--- a/AsbCloudInfrastructure/Services/ProcessMap/ProcessMapService.cs
+++ b/AsbCloudInfrastructure/Services/ProcessMap/ProcessMapService.cs
@@ -146,8 +146,8 @@ namespace AsbCloudInfrastructure.Services.ProcessMap
var slideOperations = intervalOperations.Where(o => o.IdCategory == WellOperationCategory.IdSlide);
var rotorOperations = intervalOperations.Where(o => o.IdCategory == WellOperationCategory.IdRotor);
- dto.Slide = CalcDrillModeStat(depthInterval, slideOperations, intervalProcessMap, intervalTelemetryDataStat, intervalLimitingParametrs, intervalSubsystemsOperationTime);
- dto.Rotor = CalcDrillModeStat(depthInterval, rotorOperations, intervalProcessMap, intervalTelemetryDataStat, intervalLimitingParametrs, intervalSubsystemsOperationTime);
+ //dto.Slide = CalcDrillModeStat(depthInterval, slideOperations, intervalProcessMap, intervalTelemetryDataStat, intervalLimitingParametrs, intervalSubsystemsOperationTime);
+ //dto.Rotor = CalcDrillModeStat(depthInterval, rotorOperations, intervalProcessMap, intervalTelemetryDataStat, intervalLimitingParametrs, intervalSubsystemsOperationTime);
return dto;
}
@@ -201,91 +201,91 @@ namespace AsbCloudInfrastructure.Services.ProcessMap
return result;
}
- private static ProcessMapReportRowDto CalcDrillModeStat(
- (double min, double max) depthInterval,
- IEnumerable intervalModeOperations,
- IEnumerable intervalProcessMap,
- TelemetryDataSaubStatDto? telemetryDataStat,
- IEnumerable intervalLimitingParametrs,
- IEnumerable intervalSubsystemsOperationTime)
- {
- var dto = new ProcessMapReportRowDto();
- if (intervalModeOperations.Any())
- {
- var deltaDepth = CalcDeltaDepth(depthInterval, intervalModeOperations);
- dto.DeltaDepth = deltaDepth;
- dto.Rop = deltaDepth / CalcHours(depthInterval, intervalModeOperations);
- };
+ //private static ProcessMapReportRowDto CalcDrillModeStat(
+ // (double min, double max) depthInterval,
+ // IEnumerable intervalModeOperations,
+ // IEnumerable intervalProcessMap,
+ // TelemetryDataSaubStatDto? telemetryDataStat,
+ // IEnumerable intervalLimitingParametrs,
+ // IEnumerable intervalSubsystemsOperationTime)
+ //{
+ // var dto = new ProcessMapReportRowDto();
+ // if (intervalModeOperations.Any())
+ // {
+ // var deltaDepth = CalcDeltaDepth(depthInterval, intervalModeOperations);
+ // dto.DeltaDepth = deltaDepth;
+ // dto.Rop = deltaDepth / CalcHours(depthInterval, intervalModeOperations);
+ // };
- if (intervalProcessMap.Any())
- {
- var processMapFirst = intervalProcessMap.First();
- dto.PressureDiff.SetpointPlan = processMapFirst.Pressure.Plan;
- dto.AxialLoad.SetpointPlan = processMapFirst.AxialLoad.Plan;
- dto.TopDriveTorque.SetpointPlan = processMapFirst.TopDriveTorque.Plan;
- //dto.SpeedLimit.SetpointPlan = null;
- }
+ // if (intervalProcessMap.Any())
+ // {
+ // var processMapFirst = intervalProcessMap.First();
+ // dto.PressureDiff.SetpointPlan = processMapFirst.Pressure.Plan;
+ // dto.AxialLoad.SetpointPlan = processMapFirst.AxialLoad.Plan;
+ // dto.TopDriveTorque.SetpointPlan = processMapFirst.TopDriveTorque.Plan;
+ // //dto.SpeedLimit.SetpointPlan = null;
+ // }
- if (telemetryDataStat is not null)
- {
- dto.PressureDiff.SetpointFact = telemetryDataStat.PressureSp;
- dto.PressureDiff.Fact = telemetryDataStat.PressureDelta;
- dto.PressureDiff.Limit = telemetryDataStat.PressureDeltaLimitMax;
+ // if (telemetryDataStat is not null)
+ // {
+ // dto.PressureDiff.SetpointFact = telemetryDataStat.PressureSp;
+ // dto.PressureDiff.Fact = telemetryDataStat.PressureDelta;
+ // dto.PressureDiff.Limit = telemetryDataStat.PressureDeltaLimitMax;
- dto.AxialLoad.SetpointFact = telemetryDataStat.AxialLoadSp;
- dto.AxialLoad.Fact = telemetryDataStat.AxialLoad;
- dto.AxialLoad.Limit = telemetryDataStat.AxialLoadLimitMax;
+ // dto.AxialLoad.SetpointFact = telemetryDataStat.AxialLoadSp;
+ // dto.AxialLoad.Fact = telemetryDataStat.AxialLoad;
+ // dto.AxialLoad.Limit = telemetryDataStat.AxialLoadLimitMax;
- dto.TopDriveTorque.SetpointFact = telemetryDataStat.RotorTorqueSp;
- dto.TopDriveTorque.Fact = telemetryDataStat.RotorTorque;
- dto.TopDriveTorque.Limit = telemetryDataStat.RotorTorqueLimitMax;
+ // dto.TopDriveTorque.SetpointFact = telemetryDataStat.RotorTorqueSp;
+ // dto.TopDriveTorque.Fact = telemetryDataStat.RotorTorque;
+ // dto.TopDriveTorque.Limit = telemetryDataStat.RotorTorqueLimitMax;
- dto.SpeedLimit.SetpointFact = telemetryDataStat.BlockSpeedSp;
- dto.SpeedLimit.Fact = telemetryDataStat.BlockSpeed;
- //dto.SpeedLimit.Limit = mull;
- }
+ // dto.SpeedLimit.SetpointFact = telemetryDataStat.BlockSpeedSp;
+ // dto.SpeedLimit.Fact = telemetryDataStat.BlockSpeed;
+ // //dto.SpeedLimit.Limit = mull;
+ // }
- if(intervalLimitingParametrs.Any())
- {
- const int idLimParamRop = 1;
- const int idLimParamPressure = 2;
- const int idLimParamAxialLoad = 3;
- const int idLimParamTorque = 4;
+ // if(intervalLimitingParametrs.Any())
+ // {
+ // const int idLimParamRop = 1;
+ // const int idLimParamPressure = 2;
+ // const int idLimParamAxialLoad = 3;
+ // const int idLimParamTorque = 4;
- var intervalLimitingParametrsStat = intervalLimitingParametrs
- .GroupBy(p => p.IdFeedRegulator)
- .Select(g => new
- {
- IdLimParam = g.Key,
- SumDepth = g.Sum(p => p.DepthEnd - p.DepthStart),
- });
+ // var intervalLimitingParametrsStat = intervalLimitingParametrs
+ // .GroupBy(p => p.IdFeedRegulator)
+ // .Select(g => new
+ // {
+ // IdLimParam = g.Key,
+ // SumDepth = g.Sum(p => p.DepthEnd - p.DepthStart),
+ // });
- var totalDepth = intervalLimitingParametrsStat
- .Sum(s => s.SumDepth);
+ // var totalDepth = intervalLimitingParametrsStat
+ // .Sum(s => s.SumDepth);
- if (totalDepth > 0)
- {
- dto.AxialLoad.PercDrillingSetpoint = intervalLimitingParametrsStat
- .FirstOrDefault(s => s.IdLimParam == idLimParamAxialLoad)?.SumDepth / totalDepth;
+ // if (totalDepth > 0)
+ // {
+ // dto.AxialLoad.PercDrillingSetpoint = intervalLimitingParametrsStat
+ // .FirstOrDefault(s => s.IdLimParam == idLimParamAxialLoad)?.SumDepth / totalDepth;
- dto.PressureDiff.PercDrillingSetpoint = intervalLimitingParametrsStat
- .FirstOrDefault(s => s.IdLimParam == idLimParamPressure)?.SumDepth / totalDepth;
+ // dto.PressureDiff.PercDrillingSetpoint = intervalLimitingParametrsStat
+ // .FirstOrDefault(s => s.IdLimParam == idLimParamPressure)?.SumDepth / totalDepth;
- dto.TopDriveTorque.PercDrillingSetpoint = intervalLimitingParametrsStat
- .FirstOrDefault(s => s.IdLimParam == idLimParamTorque)?.SumDepth / totalDepth;
+ // dto.TopDriveTorque.PercDrillingSetpoint = intervalLimitingParametrsStat
+ // .FirstOrDefault(s => s.IdLimParam == idLimParamTorque)?.SumDepth / totalDepth;
- dto.SpeedLimit.PercDrillingSetpoint = intervalLimitingParametrsStat
- .FirstOrDefault(s => s.IdLimParam == idLimParamRop)?.SumDepth / totalDepth;
- }
- }
+ // dto.SpeedLimit.PercDrillingSetpoint = intervalLimitingParametrsStat
+ // .FirstOrDefault(s => s.IdLimParam == idLimParamRop)?.SumDepth / totalDepth;
+ // }
+ // }
- if (intervalSubsystemsOperationTime.Any() && dto.DeltaDepth > 0)
- {
- dto.Usage = intervalSubsystemsOperationTime.Sum(t => t.DepthEnd - t.DepthStart) / dto.DeltaDepth.Value;
- }
+ // if (intervalSubsystemsOperationTime.Any() && dto.DeltaDepth > 0)
+ // {
+ // dto.Usage = intervalSubsystemsOperationTime.Sum(t => t.DepthEnd - t.DepthStart) / dto.DeltaDepth.Value;
+ // }
- return dto;
- }
+ // return dto;
+ //}
private static double CalcDeltaDepth((double min, double max) depthInterval, IEnumerable intervalOperations)
{