Фикс нейминга и сервисов

This commit is contained in:
Степанов Дмитрий 2024-09-02 13:55:17 +05:00
parent 4b52cd9f34
commit ca54ae517f
3 changed files with 40 additions and 39 deletions

View File

@ -6,22 +6,22 @@
public class DrillingBySetpointsDto
{
/// <summary>
/// Давление
/// Метры пробуренные по уставке давления
/// </summary>
public double? Pressure { get; set; }
public double? MetersByPressure { get; set; }
/// <summary>
/// Нагрузка
/// Метры пробуренные по уставке нагрузки
/// </summary>
public double? AxialLoad { get; set; }
public double? MetersByLoad { get; set; }
/// <summary>
/// Момент
/// Метры пробуренные по уставке момента
/// </summary>
public double? TopDriveTorque { get; set; }
public double? MetersByTorque { get; set; }
/// <summary>
/// Скорость
/// Метры пробуренные по уставке скорости
/// </summary>
public double? SpeedLimit { get; set; }
public double? MetersBySpeed { get; set; }
}

View File

@ -200,7 +200,8 @@ public class WellReportExportService : IWellReportExportService
foreach (var contact in contacts)
{
var position = positionsByCompanyType[contact.IdCompanyType];
if (!positionsByCompanyType.TryGetValue(contact.IdCompanyType, out var position))
continue;
sheet.Cell(row, positionColumn).SetCellValue(position);
sheet.Cell(row, fullNameColumn).SetCellValue(contact.FullName);
@ -284,10 +285,10 @@ public class WellReportExportService : IWellReportExportService
if (!SetpointsRows.TryGetValue(idSection, out var row))
return;
sheet.Cell(row, pressureColumn).SetCellValue(drillingBySetpoints.Pressure);
sheet.Cell(row, axialLoadColumn).SetCellValue(drillingBySetpoints.AxialLoad);
sheet.Cell(row, topDriveTorqueColumn).SetCellValue(drillingBySetpoints.TopDriveTorque);
sheet.Cell(row, speedLimitColumn).SetCellValue(drillingBySetpoints.SpeedLimit);
sheet.Cell(row, pressureColumn).SetCellValue(drillingBySetpoints.MetersByPressure);
sheet.Cell(row, axialLoadColumn).SetCellValue(drillingBySetpoints.MetersByLoad);
sheet.Cell(row, topDriveTorqueColumn).SetCellValue(drillingBySetpoints.MetersByTorque);
sheet.Cell(row, speedLimitColumn).SetCellValue(drillingBySetpoints.MetersBySpeed);
}
private static void FillSubsystemsStat(IXLWorksheet sheet, int idSection,

View File

@ -35,13 +35,15 @@ public class WellReportService : IWellReportService
private IEnumerable<WellOperationDto> factWellOperations;
private IEnumerable<WellOperationDto> planWellOperations;
public WellReportService(IWellService wellService, IWellOperationService wellOperationService,
IWellContactService wellContactService, IProcessMapReportDrillingService processMapReportDrillingService,
ISubsystemService subsystemService, ITrajectoryRepository<TrajectoryGeoPlanDto> trajectoryPlanRepository,
public WellReportService(IWellService wellService,
IWellOperationService wellOperationService,
IWellContactService wellContactService,
IProcessMapReportDrillingService processMapReportDrillingService,
ISubsystemService subsystemService,
ITrajectoryRepository<TrajectoryGeoPlanDto> trajectoryPlanRepository,
ITrajectoryRepository<TrajectoryGeoFactDto> trajectoryFactRepository,
IChangeLogRepository<ProcessMapPlanRotorDto, ProcessMapPlanBaseRequestWithWell> processMapPlanRotorRepository,
IScheduleRepository scheduleRepository, IEnumerable<WellOperationDto> factWellOperations,
IEnumerable<WellOperationDto> planWellOperations)
IScheduleRepository scheduleRepository)
{
this.wellService = wellService;
this.wellOperationService = wellOperationService;
@ -52,8 +54,6 @@ public class WellReportService : IWellReportService
this.trajectoryFactRepository = trajectoryFactRepository;
this.processMapPlanRotorRepository = processMapPlanRotorRepository;
this.scheduleRepository = scheduleRepository;
this.factWellOperations = factWellOperations;
this.planWellOperations = planWellOperations;
}
public async Task<WellReportDto?> GetAsync(int idWell, CancellationToken token)
@ -194,10 +194,10 @@ public class WellReportService : IWellReportService
if (processMapReportBySection.TryGetValue(group.Key, out var processMapReport))
sectionReport.DrillingBySetpoints = new DrillingBySetpointsDto
{
Pressure = processMapReport.Sum(x => x.DeltaDepth * x.PressureDiff.SetpointUsage / 100),
AxialLoad = processMapReport.Sum(x => x.DeltaDepth * x.AxialLoad.SetpointUsage / 100),
TopDriveTorque = processMapReport.Sum(x => x.DeltaDepth * x.TopDriveTorque.SetpointUsage / 100),
SpeedLimit = processMapReport.Sum(x => x.DeltaDepth * x.SpeedLimit.SetpointUsage / 100)
MetersByPressure = processMapReport.Sum(x => x.DeltaDepth * x.PressureDiff.SetpointUsage / 100),
MetersByLoad = processMapReport.Sum(x => x.DeltaDepth * x.AxialLoad.SetpointUsage / 100),
MetersByTorque = processMapReport.Sum(x => x.DeltaDepth * x.TopDriveTorque.SetpointUsage / 100),
MetersBySpeed = processMapReport.Sum(x => x.DeltaDepth * x.SpeedLimit.SetpointUsage / 100)
};
sectionReports.Add(sectionReport);