forked from ddrilling/AsbCloudServer
Приведение выгружаемого отчета РТК к актуальному состоянию (добавлен заголовок, частично изменена шапка отчета)
This commit is contained in:
parent
cfdadcb2d2
commit
d70cf25c0a
@ -13,9 +13,9 @@ namespace AsbCloudInfrastructure.Services.ProcessMap
|
||||
public class ProcessMapReportService : IProcessMapReportService
|
||||
{
|
||||
const int firstColumn = 2;
|
||||
const int lastColumn = 27;
|
||||
const int lastColumn = 30;
|
||||
|
||||
const int headerRowsCount = 3;
|
||||
const int headerRowsCount = 8;
|
||||
|
||||
private readonly IProcessMapService processMapService;
|
||||
|
||||
@ -68,7 +68,9 @@ namespace AsbCloudInfrastructure.Services.ProcessMap
|
||||
sheet.Range(row, firstColumn, row, lastColumn)
|
||||
.Merge()
|
||||
.FirstCell()
|
||||
.SetVal(sectionName);
|
||||
.SetVal(sectionName)
|
||||
.Style
|
||||
.Fill.SetBackgroundColor(XLColor.LightGray);
|
||||
|
||||
row++;
|
||||
|
||||
@ -82,14 +84,17 @@ namespace AsbCloudInfrastructure.Services.ProcessMap
|
||||
|
||||
private static int FillIntervalData(IXLWorksheet sheet, ProcessMapReportDto interval, int row)
|
||||
{
|
||||
const int columnDepth = firstColumn;
|
||||
const int columnDate = firstColumn + 1;
|
||||
const int columnRopTime = firstColumn + 2;
|
||||
const int columnMode = firstColumn + 3;
|
||||
const int columnDepth = firstColumn + 1;
|
||||
const int columnDate = firstColumn + 2;
|
||||
const int columnRopTime = firstColumn + 3;
|
||||
const int columnMode = firstColumn + 4;
|
||||
|
||||
int rowRotor = row;
|
||||
int rowSlide = row + 1;
|
||||
|
||||
sheet.Range(rowRotor, firstColumn, rowSlide, firstColumn)
|
||||
.Merge();
|
||||
|
||||
sheet.Range(rowRotor, columnDepth, rowSlide, columnDepth)
|
||||
.Merge().FirstCell()
|
||||
.SetVal(interval.DepthStart, "0.0");
|
||||
@ -115,8 +120,9 @@ namespace AsbCloudInfrastructure.Services.ProcessMap
|
||||
int columnLoad = columnPressure + 5;
|
||||
int columnTorque = columnLoad + 5;
|
||||
int columnSpeed = columnTorque + 5;
|
||||
int columnUsage = columnSpeed + 4;
|
||||
int columnRop = columnUsage + 1;
|
||||
int columnUsagePlan = columnSpeed + 5;
|
||||
int columnUsageFact = columnUsagePlan + 1;
|
||||
int columnRop = columnUsageFact + 1;
|
||||
|
||||
sheet.Cell(row, column)
|
||||
.SetVal(modeName);
|
||||
@ -129,7 +135,10 @@ namespace AsbCloudInfrastructure.Services.ProcessMap
|
||||
FillIntervalModeDataParam(sheet, modeData.TopDriveTorque, columnTorque, row);
|
||||
FillIntervalModeDataSpeed(sheet, modeData.SpeedLimit, columnSpeed, row);
|
||||
|
||||
sheet.Cell(row, columnUsage)
|
||||
sheet.Cell(row, columnUsagePlan)
|
||||
.SetVal(100);
|
||||
|
||||
sheet.Cell(row, columnUsageFact)
|
||||
.SetVal(modeData.Usage);
|
||||
|
||||
sheet.Cell(row, columnRop)
|
||||
@ -167,7 +176,8 @@ namespace AsbCloudInfrastructure.Services.ProcessMap
|
||||
const int columnOffsetSpPlan = 0;
|
||||
const int columnOffsetSpFact = 1;
|
||||
const int columnOffsetFact = 2;
|
||||
const int columnOffsetPercent = 3;
|
||||
const int columnOffsetLimit = 3;
|
||||
const int columnOffsetPercent = 4;
|
||||
|
||||
sheet.Cell(row, column + columnOffsetSpPlan)
|
||||
.SetVal(dataParam.SetpointPlan);
|
||||
@ -178,6 +188,9 @@ namespace AsbCloudInfrastructure.Services.ProcessMap
|
||||
sheet.Cell(row, column + columnOffsetFact)
|
||||
.SetVal(dataParam.Fact);
|
||||
|
||||
sheet.Cell(row, column + columnOffsetLimit)
|
||||
.SetVal(dataParam.Limit);
|
||||
|
||||
sheet.Cell(row, column + columnOffsetPercent)
|
||||
.SetVal(dataParam.PercDrillingSetpoint);
|
||||
}
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user