forked from ddrilling/AsbCloudServer
Фикс нейминга и сервисов
This commit is contained in:
parent
4b52cd9f34
commit
ca54ae517f
@ -5,23 +5,23 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class DrillingBySetpointsDto
|
public class DrillingBySetpointsDto
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Давление
|
/// Метры пробуренные по уставке давления
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public double? Pressure { get; set; }
|
public double? MetersByPressure { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Нагрузка
|
/// Метры пробуренные по уставке нагрузки
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public double? AxialLoad { get; set; }
|
public double? MetersByLoad { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Момент
|
/// Метры пробуренные по уставке момента
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public double? TopDriveTorque { get; set; }
|
public double? MetersByTorque { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Скорость
|
/// Метры пробуренные по уставке скорости
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public double? SpeedLimit { get; set; }
|
public double? MetersBySpeed { get; set; }
|
||||||
}
|
}
|
@ -199,16 +199,17 @@ public class WellReportExportService : IWellReportExportService
|
|||||||
var row = 6;
|
var row = 6;
|
||||||
|
|
||||||
foreach (var contact in contacts)
|
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, positionColumn).SetCellValue(position);
|
||||||
sheet.Cell(row, fullNameColumn).SetCellValue(contact.FullName);
|
sheet.Cell(row, fullNameColumn).SetCellValue(contact.FullName);
|
||||||
sheet.Cell(row, companyColumn).SetCellValue(contact.Company);
|
sheet.Cell(row, companyColumn).SetCellValue(contact.Company);
|
||||||
sheet.Cell(row, phoneColumn).SetCellValue(contact.Phone);
|
sheet.Cell(row, phoneColumn).SetCellValue(contact.Phone);
|
||||||
|
|
||||||
row++;
|
row++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void FillDrillerReports(IXLWorksheet sheet, IEnumerable<DrillerReportDto> drillerReports)
|
private static void FillDrillerReports(IXLWorksheet sheet, IEnumerable<DrillerReportDto> drillerReports)
|
||||||
@ -284,10 +285,10 @@ public class WellReportExportService : IWellReportExportService
|
|||||||
if (!SetpointsRows.TryGetValue(idSection, out var row))
|
if (!SetpointsRows.TryGetValue(idSection, out var row))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
sheet.Cell(row, pressureColumn).SetCellValue(drillingBySetpoints.Pressure);
|
sheet.Cell(row, pressureColumn).SetCellValue(drillingBySetpoints.MetersByPressure);
|
||||||
sheet.Cell(row, axialLoadColumn).SetCellValue(drillingBySetpoints.AxialLoad);
|
sheet.Cell(row, axialLoadColumn).SetCellValue(drillingBySetpoints.MetersByLoad);
|
||||||
sheet.Cell(row, topDriveTorqueColumn).SetCellValue(drillingBySetpoints.TopDriveTorque);
|
sheet.Cell(row, topDriveTorqueColumn).SetCellValue(drillingBySetpoints.MetersByTorque);
|
||||||
sheet.Cell(row, speedLimitColumn).SetCellValue(drillingBySetpoints.SpeedLimit);
|
sheet.Cell(row, speedLimitColumn).SetCellValue(drillingBySetpoints.MetersBySpeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void FillSubsystemsStat(IXLWorksheet sheet, int idSection,
|
private static void FillSubsystemsStat(IXLWorksheet sheet, int idSection,
|
||||||
|
@ -35,13 +35,15 @@ public class WellReportService : IWellReportService
|
|||||||
private IEnumerable<WellOperationDto> factWellOperations;
|
private IEnumerable<WellOperationDto> factWellOperations;
|
||||||
private IEnumerable<WellOperationDto> planWellOperations;
|
private IEnumerable<WellOperationDto> planWellOperations;
|
||||||
|
|
||||||
public WellReportService(IWellService wellService, IWellOperationService wellOperationService,
|
public WellReportService(IWellService wellService,
|
||||||
IWellContactService wellContactService, IProcessMapReportDrillingService processMapReportDrillingService,
|
IWellOperationService wellOperationService,
|
||||||
ISubsystemService subsystemService, ITrajectoryRepository<TrajectoryGeoPlanDto> trajectoryPlanRepository,
|
IWellContactService wellContactService,
|
||||||
|
IProcessMapReportDrillingService processMapReportDrillingService,
|
||||||
|
ISubsystemService subsystemService,
|
||||||
|
ITrajectoryRepository<TrajectoryGeoPlanDto> trajectoryPlanRepository,
|
||||||
ITrajectoryRepository<TrajectoryGeoFactDto> trajectoryFactRepository,
|
ITrajectoryRepository<TrajectoryGeoFactDto> trajectoryFactRepository,
|
||||||
IChangeLogRepository<ProcessMapPlanRotorDto, ProcessMapPlanBaseRequestWithWell> processMapPlanRotorRepository,
|
IChangeLogRepository<ProcessMapPlanRotorDto, ProcessMapPlanBaseRequestWithWell> processMapPlanRotorRepository,
|
||||||
IScheduleRepository scheduleRepository, IEnumerable<WellOperationDto> factWellOperations,
|
IScheduleRepository scheduleRepository)
|
||||||
IEnumerable<WellOperationDto> planWellOperations)
|
|
||||||
{
|
{
|
||||||
this.wellService = wellService;
|
this.wellService = wellService;
|
||||||
this.wellOperationService = wellOperationService;
|
this.wellOperationService = wellOperationService;
|
||||||
@ -52,8 +54,6 @@ public class WellReportService : IWellReportService
|
|||||||
this.trajectoryFactRepository = trajectoryFactRepository;
|
this.trajectoryFactRepository = trajectoryFactRepository;
|
||||||
this.processMapPlanRotorRepository = processMapPlanRotorRepository;
|
this.processMapPlanRotorRepository = processMapPlanRotorRepository;
|
||||||
this.scheduleRepository = scheduleRepository;
|
this.scheduleRepository = scheduleRepository;
|
||||||
this.factWellOperations = factWellOperations;
|
|
||||||
this.planWellOperations = planWellOperations;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<WellReportDto?> GetAsync(int idWell, CancellationToken token)
|
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))
|
if (processMapReportBySection.TryGetValue(group.Key, out var processMapReport))
|
||||||
sectionReport.DrillingBySetpoints = new DrillingBySetpointsDto
|
sectionReport.DrillingBySetpoints = new DrillingBySetpointsDto
|
||||||
{
|
{
|
||||||
Pressure = processMapReport.Sum(x => x.DeltaDepth * x.PressureDiff.SetpointUsage / 100),
|
MetersByPressure = processMapReport.Sum(x => x.DeltaDepth * x.PressureDiff.SetpointUsage / 100),
|
||||||
AxialLoad = processMapReport.Sum(x => x.DeltaDepth * x.AxialLoad.SetpointUsage / 100),
|
MetersByLoad = processMapReport.Sum(x => x.DeltaDepth * x.AxialLoad.SetpointUsage / 100),
|
||||||
TopDriveTorque = processMapReport.Sum(x => x.DeltaDepth * x.TopDriveTorque.SetpointUsage / 100),
|
MetersByTorque = processMapReport.Sum(x => x.DeltaDepth * x.TopDriveTorque.SetpointUsage / 100),
|
||||||
SpeedLimit = processMapReport.Sum(x => x.DeltaDepth * x.SpeedLimit.SetpointUsage / 100)
|
MetersBySpeed = processMapReport.Sum(x => x.DeltaDepth * x.SpeedLimit.SetpointUsage / 100)
|
||||||
};
|
};
|
||||||
|
|
||||||
sectionReports.Add(sectionReport);
|
sectionReports.Add(sectionReport);
|
||||||
|
Loading…
Reference in New Issue
Block a user