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
|
public class ProcessMapReportService : IProcessMapReportService
|
||||||
{
|
{
|
||||||
const int firstColumn = 2;
|
const int firstColumn = 2;
|
||||||
const int lastColumn = 27;
|
const int lastColumn = 30;
|
||||||
|
|
||||||
const int headerRowsCount = 3;
|
const int headerRowsCount = 8;
|
||||||
|
|
||||||
private readonly IProcessMapService processMapService;
|
private readonly IProcessMapService processMapService;
|
||||||
|
|
||||||
@ -68,7 +68,9 @@ namespace AsbCloudInfrastructure.Services.ProcessMap
|
|||||||
sheet.Range(row, firstColumn, row, lastColumn)
|
sheet.Range(row, firstColumn, row, lastColumn)
|
||||||
.Merge()
|
.Merge()
|
||||||
.FirstCell()
|
.FirstCell()
|
||||||
.SetVal(sectionName);
|
.SetVal(sectionName)
|
||||||
|
.Style
|
||||||
|
.Fill.SetBackgroundColor(XLColor.LightGray);
|
||||||
|
|
||||||
row++;
|
row++;
|
||||||
|
|
||||||
@ -82,14 +84,17 @@ namespace AsbCloudInfrastructure.Services.ProcessMap
|
|||||||
|
|
||||||
private static int FillIntervalData(IXLWorksheet sheet, ProcessMapReportDto interval, int row)
|
private static int FillIntervalData(IXLWorksheet sheet, ProcessMapReportDto interval, int row)
|
||||||
{
|
{
|
||||||
const int columnDepth = firstColumn;
|
const int columnDepth = firstColumn + 1;
|
||||||
const int columnDate = firstColumn + 1;
|
const int columnDate = firstColumn + 2;
|
||||||
const int columnRopTime = firstColumn + 2;
|
const int columnRopTime = firstColumn + 3;
|
||||||
const int columnMode = firstColumn + 3;
|
const int columnMode = firstColumn + 4;
|
||||||
|
|
||||||
int rowRotor = row;
|
int rowRotor = row;
|
||||||
int rowSlide = row + 1;
|
int rowSlide = row + 1;
|
||||||
|
|
||||||
|
sheet.Range(rowRotor, firstColumn, rowSlide, firstColumn)
|
||||||
|
.Merge();
|
||||||
|
|
||||||
sheet.Range(rowRotor, columnDepth, rowSlide, columnDepth)
|
sheet.Range(rowRotor, columnDepth, rowSlide, columnDepth)
|
||||||
.Merge().FirstCell()
|
.Merge().FirstCell()
|
||||||
.SetVal(interval.DepthStart, "0.0");
|
.SetVal(interval.DepthStart, "0.0");
|
||||||
@ -115,8 +120,9 @@ namespace AsbCloudInfrastructure.Services.ProcessMap
|
|||||||
int columnLoad = columnPressure + 5;
|
int columnLoad = columnPressure + 5;
|
||||||
int columnTorque = columnLoad + 5;
|
int columnTorque = columnLoad + 5;
|
||||||
int columnSpeed = columnTorque + 5;
|
int columnSpeed = columnTorque + 5;
|
||||||
int columnUsage = columnSpeed + 4;
|
int columnUsagePlan = columnSpeed + 5;
|
||||||
int columnRop = columnUsage + 1;
|
int columnUsageFact = columnUsagePlan + 1;
|
||||||
|
int columnRop = columnUsageFact + 1;
|
||||||
|
|
||||||
sheet.Cell(row, column)
|
sheet.Cell(row, column)
|
||||||
.SetVal(modeName);
|
.SetVal(modeName);
|
||||||
@ -129,7 +135,10 @@ namespace AsbCloudInfrastructure.Services.ProcessMap
|
|||||||
FillIntervalModeDataParam(sheet, modeData.TopDriveTorque, columnTorque, row);
|
FillIntervalModeDataParam(sheet, modeData.TopDriveTorque, columnTorque, row);
|
||||||
FillIntervalModeDataSpeed(sheet, modeData.SpeedLimit, columnSpeed, row);
|
FillIntervalModeDataSpeed(sheet, modeData.SpeedLimit, columnSpeed, row);
|
||||||
|
|
||||||
sheet.Cell(row, columnUsage)
|
sheet.Cell(row, columnUsagePlan)
|
||||||
|
.SetVal(100);
|
||||||
|
|
||||||
|
sheet.Cell(row, columnUsageFact)
|
||||||
.SetVal(modeData.Usage);
|
.SetVal(modeData.Usage);
|
||||||
|
|
||||||
sheet.Cell(row, columnRop)
|
sheet.Cell(row, columnRop)
|
||||||
@ -167,7 +176,8 @@ namespace AsbCloudInfrastructure.Services.ProcessMap
|
|||||||
const int columnOffsetSpPlan = 0;
|
const int columnOffsetSpPlan = 0;
|
||||||
const int columnOffsetSpFact = 1;
|
const int columnOffsetSpFact = 1;
|
||||||
const int columnOffsetFact = 2;
|
const int columnOffsetFact = 2;
|
||||||
const int columnOffsetPercent = 3;
|
const int columnOffsetLimit = 3;
|
||||||
|
const int columnOffsetPercent = 4;
|
||||||
|
|
||||||
sheet.Cell(row, column + columnOffsetSpPlan)
|
sheet.Cell(row, column + columnOffsetSpPlan)
|
||||||
.SetVal(dataParam.SetpointPlan);
|
.SetVal(dataParam.SetpointPlan);
|
||||||
@ -178,6 +188,9 @@ namespace AsbCloudInfrastructure.Services.ProcessMap
|
|||||||
sheet.Cell(row, column + columnOffsetFact)
|
sheet.Cell(row, column + columnOffsetFact)
|
||||||
.SetVal(dataParam.Fact);
|
.SetVal(dataParam.Fact);
|
||||||
|
|
||||||
|
sheet.Cell(row, column + columnOffsetLimit)
|
||||||
|
.SetVal(dataParam.Limit);
|
||||||
|
|
||||||
sheet.Cell(row, column + columnOffsetPercent)
|
sheet.Cell(row, column + columnOffsetPercent)
|
||||||
.SetVal(dataParam.PercDrillingSetpoint);
|
.SetVal(dataParam.PercDrillingSetpoint);
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user