Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void FillQuantitativeIndicators(ExcelWorksheet commonSheet, IterationReportBuilderCounter counter,
- IterationReportCommonSheetParams commonSheetParams)
- {
- var amountColumn = CalculateAmountColumn(counter.Iteration);
- commonSheet.Cells[25 + commonSheetParams.RowOffset, counter.Iteration + 2, 27 + commonSheetParams.RowOffset,
- counter.Iteration + 2].Style.Numberformat.Format = "0.0";
- var iterationReportData = commonSheetParams.ProductType == ProductType.OneCEtp ? _iterationReportOneCData : _iterationReportAstralEtData;
- var oneCAmount = iterationReportData.OneCAmount;
- var cSharpAmount = iterationReportData.CSharpAmount;
- var directSchemeData = iterationReportData.DirectSchemeData;
- var remoteProcessing = iterationReportData.RemoteProcessing;
- var planCp = iterationReportData.CpPlans;
- var certificateAmount = iterationReportData.CertificateAmount;
- var lastYearTariffsCount = iterationReportData.LastYearTariffCount;
- var lastIterationTariffsCount = iterationReportData.LastIterationTariffCount;
- commonSheet.Cells[11 + commonSheetParams.RowOffset, 1, 11 + commonSheetParams.RowOffset, counter.Iteration + 2].Merge = true;
- commonSheet.Cells[12 + commonSheetParams.RowOffset, counter.Iteration + 2].FormulaR1C1 =
- $"SUM(R{commonSheetParams.RowOffset + 13}C{counter.Iteration + 2}:R{commonSheetParams.RowOffset + 16}C{counter.Iteration + 2})";
- commonSheet.Cells[13 + commonSheetParams.RowOffset, counter.Iteration + 2].Value = remoteProcessing;
- commonSheet.Cells[14 + commonSheetParams.RowOffset, counter.Iteration + 2].Value = oneCAmount;
- commonSheet.Cells[15 + commonSheetParams.RowOffset, counter.Iteration + 2].Value = cSharpAmount;
- commonSheet.Cells[16 + commonSheetParams.RowOffset, counter.Iteration + 2].Value = directSchemeData;
- commonSheet.Cells[17 + commonSheetParams.RowOffset, counter.Iteration + 2].Value = planCp.Abonents;
- commonSheet.Cells[18 + commonSheetParams.RowOffset, counter.Iteration + 2].FormulaR1C1 =
- $"'{commonSheetParams.DataSheetName}'!R14C{amountColumn}";
- commonSheet.Cells[19 + commonSheetParams.RowOffset, counter.Iteration + 2].FormulaR1C1 =
- $"'{commonSheetParams.DataSheetName}'!R27C{amountColumn}";
- commonSheet.Cells[20 + commonSheetParams.RowOffset, counter.Iteration + 2].Value = certificateAmount;
- commonSheet.Cells[21 + commonSheetParams.RowOffset, counter.Iteration + 2].FormulaR1C1 = counter.Iteration == 1
- ? $"R{commonSheetParams.RowOffset + 20}C{counter.Iteration + 2}"
- : $"R{commonSheetParams.RowOffset + 20}C{counter.Iteration + 2} + R{commonSheetParams.RowOffset + 21}C{counter.Iteration + 1}";
- commonSheet.Cells[22 + commonSheetParams.RowOffset, counter.Iteration + 2].Value = planCp.ToProlongate;
- commonSheet.Cells[23 + commonSheetParams.RowOffset, counter.Iteration + 2].Value = planCp.LostPercent;
- commonSheet.Cells[24 + commonSheetParams.RowOffset, counter.Iteration + 2].FormulaR1C1 =
- $"(R{18 + commonSheetParams.RowOffset}C{counter.Iteration + 2} - {lastYearTariffsCount}) / {lastYearTariffsCount} * 100";
- commonSheet.Cells[25 + commonSheetParams.RowOffset, counter.Iteration + 2].FormulaR1C1 =
- $"(R{18 + commonSheetParams.RowOffset}C{counter.Iteration + 2} - {lastIterationTariffsCount}) / {lastIterationTariffsCount} * 100";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement