From 93a8a7bd7ffa823d988ebd0e54d91fad4407f465 Mon Sep 17 00:00:00 2001 From: Olga Nemt Date: Thu, 6 Apr 2023 15:18:29 +0500 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20=D0=BF?= =?UTF-8?q?=D0=BE=20=D0=BE=D1=82=D1=87=D0=B5=D1=82=D1=83=20-=20=D1=80?= =?UTF-8?q?=D1=82=D0=BA=201.=20=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D0=B0=20=D1=88=D0=B0=D0=BF=D0=BA=D0=B0=20=D0=BE=D1=82=D1=87?= =?UTF-8?q?=D0=B5=D1=82=D0=B0=202.=20=D0=94=D0=B0=D0=BD=D0=BD=D1=8B=D0=B5?= =?UTF-8?q?=20=D0=BE=D1=82=D1=87=D0=B5=D1=82=D0=B0=20-=20=D1=8D=D1=82?= =?UTF-8?q?=D0=BE=20=D0=BF=D0=BB=D0=BE=D1=81=D0=BA=D0=B8=D0=B9=20=D1=81?= =?UTF-8?q?=D0=BF=D0=B8=D1=81=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProcessMapReportMakerService.cs | 77 ++++++++---------- .../ProcessMap/ProcessMapReportTemplate.xlsx | Bin 9177 -> 7628 bytes .../Services/ProcessMap/XLExtentions.cs | 31 ++----- 3 files changed, 44 insertions(+), 64 deletions(-) diff --git a/AsbCloudInfrastructure/Services/ProcessMap/ProcessMapReportMakerService.cs b/AsbCloudInfrastructure/Services/ProcessMap/ProcessMapReportMakerService.cs index 71faec0e..01f215ee 100644 --- a/AsbCloudInfrastructure/Services/ProcessMap/ProcessMapReportMakerService.cs +++ b/AsbCloudInfrastructure/Services/ProcessMap/ProcessMapReportMakerService.cs @@ -13,9 +13,9 @@ namespace AsbCloudInfrastructure.Services.ProcessMap public class ProcessMapReportMakerService : IProcessMapReportMakerService { const int firstColumn = 2; - const int lastColumn = 61; + const int lastColumn = 49; - const int headerRowsCount = 8; + const int headerRowsCount = 6; private readonly IProcessMapReportService processMapService; @@ -89,63 +89,56 @@ namespace AsbCloudInfrastructure.Services.ProcessMap const int columnRopTime = firstColumn + 3; const int columnMode = firstColumn + 4; - int rowRotor = row; - int rowSlide = row + 1; + sheet.Cell(row, firstColumn) + .SetVal(interval.DepthStart, "0.0"); - sheet.Range(rowRotor, firstColumn, rowSlide, firstColumn) - .Merge(); + sheet.Cell(row, columnDepth) + .SetVal(interval.DepthEnd, "0.0"); - sheet.Range(rowRotor, columnDepth, rowSlide, columnDepth) - .Merge().FirstCell() - .SetVal(interval.DepthStart, "0.0"); - - sheet.Range(rowRotor, columnDate, rowSlide, columnDate) - .Merge().FirstCell() + sheet.Cell(row, columnDate) .SetVal(interval.DateStart); - sheet.Range(rowRotor, columnRopTime, rowSlide, columnRopTime) - .Merge().FirstCell() + sheet.Cell(row, columnRopTime) .SetVal(interval.MechDrillingHours); - //row = FillIntervalModeData(sheet, "Ротор", interval.Rotor, columnMode, row); - //row = FillIntervalModeData(sheet, "Слайд", interval.Slide, columnMode, row); + row = FillIntervalModeData(sheet, interval, 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, ProcessMapReportDto 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(modeData.DrillingMode); - // 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/ProcessMapReportTemplate.xlsx b/AsbCloudInfrastructure/Services/ProcessMap/ProcessMapReportTemplate.xlsx index 65b418cc90308c683f9812d869fd5e0f7ddc45ae..352ecbfabb3e3833dab496122e9b53602b5b3c91 100644 GIT binary patch delta 5947 zcmZ9Q1yEc|vw#;{oM3^)-Q5EOcMZB&2=1;yv$*@>?yv!ZJAn{fgS!Ox0KqN1ufcORTXZ>LDCSIMM7d9a{5DdQXau6RJ+aR$etglS2JFzFRVr?-}gsVwYoy7X@J$%u-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1J=#gG&BSPLnm|xHGJ(rg4tYhtgHZUc z=z?h8MF~-3nKOU=oclB`B-AU(l2T>RXude+`39pMcmVIY1r4^IZU{hN%TgSXOnE_6 zfhu-P!6-#S(Ryi9>V5Li=1~J?j(=8z;H9<7Dz44a7uCt8Cm^|;l3O;r#O0rAF>iId zZAOt;)f{+_x9YRDr*9f+hkr#J6!5otr!IZ)b%_;7BGPjM=i=zNm=js;m>bO0r5bZ- zaSdv5Ds5{yM|$)n443nr3iuxQDcTW`zco2*P`pwcgjiq!>gGLH|#0H2w21Lirao4I9CLMUCL2#bx|wjz9O^{nq=VK*$j0w9NmimLaq>sJYaL zN>Wyph2J(8W70A!(QLp!_!B=-oxARfBMcp9Yy#T+>h=LIMmbgKWOg1 zX|8<%y-d4@9p6`yzu-Oe2wOU)e<@BZGj}-MFT~7!dii@$CIcdmjtxVZ=^yC-0hb)% A>;M1& diff --git a/AsbCloudInfrastructure/Services/ProcessMap/XLExtentions.cs b/AsbCloudInfrastructure/Services/ProcessMap/XLExtentions.cs index 7117e1cf..b5443037 100644 --- a/AsbCloudInfrastructure/Services/ProcessMap/XLExtentions.cs +++ b/AsbCloudInfrastructure/Services/ProcessMap/XLExtentions.cs @@ -5,27 +5,6 @@ namespace AsbCloudInfrastructure.Services.ProcessMap; internal static class XLExtentions { - public static IXLCell SetVal(this IXLCell cell, object value) - { - switch (value) - { - case DateTime dateTime: - cell.SetVal(dateTime); - break; - case IFormattable formattable: - cell.SetVal(formattable); - break; - case string valueString: - cell.SetVal(valueString); - break; - default: - cell.Value = value; - break; - } - - return cell; - } - public static IXLCell SetVal(this IXLCell cell, string value, bool adaptRowHeight = false) { cell.Value = value; @@ -53,11 +32,19 @@ internal static class XLExtentions return cell; } - public static IXLCell SetVal(this IXLCell cell, IFormattable value, string format = "0.00") + public static IXLCell SetVal(this IXLCell cell, int? value, string format = "0.00") { cell.Value = value; cell.DataType = XLDataType.Number; cell.Style.NumberFormat.Format = format; return cell; } + + public static IXLCell SetVal(this IXLCell cell, double? value, string format = "0.00") + { + cell.Value = (value is not null && double.IsFinite(value.Value)) ? value : null; + cell.DataType = XLDataType.Number; + cell.Style.NumberFormat.Format = format; + return cell; + } }