public ReportRow(Worksheet worksheet, int rowIndex, FomsReportRowType rowType) : base(worksheet) { RowIndex = rowIndex; RowType = rowType; var colIndex = 1; Name = new StringValue(worksheet, rowIndex, colIndex++); StacFullCount = new DoubleValue(worksheet, rowIndex, colIndex++); StacDayCount = new DoubleValue(worksheet, rowIndex, colIndex++); EmergencyCount = new DoubleValue(worksheet, rowIndex, colIndex++); TreatmentCount = new DoubleValue(worksheet, rowIndex, colIndex++); VisitCount = new DoubleValue(worksheet, rowIndex, colIndex++); AmbulanceCount = new DoubleValue(worksheet, rowIndex, colIndex++); }
public void SelectFomsReportData(Worksheet ws, AccountCorrectParams args, List<FomsReportRowData> fomsReportData, string smoCode, FomsReportRowType rowType) { var data = fomsReportData.FirstOrDefault(x => x.SmoCode == smoCode && x.RowType == rowType); if (data == null) { data = new FomsReportRowData() {SmoCode = smoCode, RowType = rowType}; fomsReportData.Add(data); } var row = (Range) ws.Rows[maxRowIndex + 1]; var colIndex = 0; if (rowType == FomsReportRowType.Plan) colIndex = 7; if (rowType == FomsReportRowType.Fact) colIndex = 11; var sumValue = row.GetCellValue<int>(1, colIndex) + row.GetCellValue<int>(1, colIndex + 1) + row.GetCellValue<int>(1, colIndex + 2) + row.GetCellValue<int>(1, colIndex + 3); switch (stacionarType) { case StacionarType.Apu: data.StacApuCount = sumValue; break; case StacionarType.Full: data.StacFullCount = sumValue; break; case StacionarType.Day: data.StacDayCount = sumValue; break; } }
protected override void selectSmoFomsReportData(Worksheet ws, AccountCorrectParams args, List<FomsReportRowData> formReportData, string smoCode, FomsReportRowType rowType) { context.ReportProgress(@"Читаем данные стационара ..."); (new Section(5, 39, dataContext, StacionarType.Full, context)) .SelectFomsReportData(ws, args, formReportData, smoCode, rowType); (new Section(45, 72, dataContext, StacionarType.Day, context)) .SelectFomsReportData(ws, args, formReportData, smoCode, rowType); (new Section(78, 106, dataContext, StacionarType.Apu, context)) .SelectFomsReportData(ws, args, formReportData, smoCode, rowType); }
protected override void selectSmoFomsReportData(Worksheet ws, AccountCorrectParams args, List<FomsReportRowData> formReportData, string smoCode, FomsReportRowType rowType) { var data = formReportData.FirstOrDefault(x => x.SmoCode == smoCode && x.RowType == rowType); if (data == null) { data = new FomsReportRowData() { SmoCode = smoCode, RowType = rowType }; formReportData.Add(data); } var row = (Range)ws.Rows[totalOmsRowIndex]; var colIndex = 0; if (rowType == FomsReportRowType.Plan) colIndex = 9; if (rowType == FomsReportRowType.Fact) colIndex = 15; data.ProfilacticCount = row.GetCellValue<int>(1, colIndex) + row.GetCellValue<int>(1, colIndex + 1); colIndex += 2; data.VisitCount = row.GetCellValue<int>(1, colIndex) + row.GetCellValue<int>(1, colIndex + 1); colIndex += 2; data.TreatmentCount = row.GetCellValue<int>(1, colIndex) + row.GetCellValue<int>(1, colIndex + 1); colIndex += 2; row = (Range)ws.Rows[emergencyRowIndex]; if (rowType == FomsReportRowType.Plan) colIndex = 11; if (rowType == FomsReportRowType.Fact) colIndex = 17; data.EmergencyCount = row.GetCellValue<int>(1, colIndex) + row.GetCellValue<int>(1, colIndex + 1); }
protected abstract void selectSmoFomsReportData(Worksheet ws, AccountCorrectParams args, List<FomsReportRowData> formReportData, string smoCode, FomsReportRowType rowType);
protected override void selectSmoFomsReportData(Worksheet ws, AccountCorrectParams args, List<FomsReportRowData> formReportData, string smoCode, FomsReportRowType rowType) { var data = formReportData.FirstOrDefault(x => x.SmoCode == smoCode && x.RowType == rowType); if (data == null) { data = new FomsReportRowData() { SmoCode = smoCode, RowType = rowType }; formReportData.Add(data); } var doctorRow = (Range)ws.Rows[doctorEventsRowIndex]; var feldRow = (Range)ws.Rows[feldEventsRowIndex]; var colIndex = 0; if (rowType == FomsReportRowType.Plan) colIndex = 4; if (rowType == FomsReportRowType.Fact) colIndex = 5; data.AmbulanceCount = doctorRow.GetCellValue<int>(1, colIndex) + feldRow.GetCellValue<int>(1, colIndex); }