From 0557b8e8ccd79f826f1dae4e284f8dc25766436c Mon Sep 17 00:00:00 2001 From: Christian Date: Fri, 20 Mar 2026 16:36:21 +0100 Subject: [PATCH] =?UTF-8?q?Neue=20Statistik=20f=C3=BCr=20die=20Straff?= =?UTF-8?q?=C3=A4lligenhilfe=20Vermittlung=20gemeinn=C3=BCtziger=20Arbeit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BeWo/BeWoApp.xaml.cs | 4 +- .../VgaStatistikReport.Designer.cs | 718 ++++++++++++++++++ Report/DefaultReports/VgaStatistikReport.cs | 334 ++++++++ Report/DefaultReports/VgaStatistikReport.resx | 120 +++ Report/Report.csproj | 9 + .../Straffaelligenhilfe/StatisticBase.cs | 120 +++ .../Straffaelligenhilfe/VgaStatistic.cs | 93 +++ 7 files changed, 1396 insertions(+), 2 deletions(-) create mode 100644 Report/DefaultReports/VgaStatistikReport.Designer.cs create mode 100644 Report/DefaultReports/VgaStatistikReport.cs create mode 100644 Report/DefaultReports/VgaStatistikReport.resx create mode 100644 Service/Reporting/Straffaelligenhilfe/StatisticBase.cs create mode 100644 Service/Reporting/Straffaelligenhilfe/VgaStatistic.cs diff --git a/BeWo/BeWoApp.xaml.cs b/BeWo/BeWoApp.xaml.cs index 53536b5d9..0c553c773 100644 --- a/BeWo/BeWoApp.xaml.cs +++ b/BeWo/BeWoApp.xaml.cs @@ -655,8 +655,8 @@ namespace BeWo AppSettings.AllowStorno = true; AppSettings.AllowXRechnung = true; - AppSettings.ShowAI = true; - AppSettings.ShowAIVoice = true; + AppSettings.ShowAI = false; + AppSettings.ShowAIVoice = false; AppSettings.ShowWorktime = true; AppSettings.ShowPersehImport = true; diff --git a/Report/DefaultReports/VgaStatistikReport.Designer.cs b/Report/DefaultReports/VgaStatistikReport.Designer.cs new file mode 100644 index 000000000..b81bdaa4a --- /dev/null +++ b/Report/DefaultReports/VgaStatistikReport.Designer.cs @@ -0,0 +1,718 @@ +namespace BeWo.Report.DefaultReports +{ + partial class VgaStatistikReport + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); + this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand(); + this.lblVersion = new DevExpress.XtraReports.UI.XRLabel(); + this.lblTitel = new DevExpress.XtraReports.UI.XRLabel(); + this.lblVermLabel = new DevExpress.XtraReports.UI.XRLabel(); + this.lblVermWert = new DevExpress.XtraReports.UI.XRLabel(); + this.lblStaLabel = new DevExpress.XtraReports.UI.XRLabel(); + this.lblStaWert = new DevExpress.XtraReports.UI.XRLabel(); + this.lblBerLabel = new DevExpress.XtraReports.UI.XRLabel(); + this.lblBerWert = new DevExpress.XtraReports.UI.XRLabel(); + this.PageHeader = new DevExpress.XtraReports.UI.PageHeaderBand(); + this.tblHeader = new DevExpress.XtraReports.UI.XRTable(); + this.tblHeaderRow1 = new DevExpress.XtraReports.UI.XRTableRow(); + this.cellHPos = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellHBeschr = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellHInsgesamt = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellHEFS = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellH1Auflage153a = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellH1Auflage153aSteuerstraf = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellH1BewOhne = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellH1BewMit = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellHGnadenverfahren = new DevExpress.XtraReports.UI.XRTableCell(); + this.tblHeaderRow2 = new DevExpress.XtraReports.UI.XRTableRow(); + this.cellH2Pos = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellH2Beschr = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellH2Insgesamt = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellH2EFS = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellH2Auflage153a = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellH2Auflage153aSteuerstraf = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellH2BewOhne = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellH2BewMit = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellH2Gnadenverfahren = new DevExpress.XtraReports.UI.XRTableCell(); + this.Detail = new DevExpress.XtraReports.UI.DetailBand(); + this.tblDetail = new DevExpress.XtraReports.UI.XRTable(); + this.tblDetailRow = new DevExpress.XtraReports.UI.XRTableRow(); + this.cellPos = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellBeschr = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellInsgesamt = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellEFS = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellAuflage153a = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellAuflage153aSteuerstraf = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellBewOhne = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellBewMit = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellGnadenverfahren = new DevExpress.XtraReports.UI.XRTableCell(); + this.ruleHighlighted = new DevExpress.XtraReports.UI.FormattingRule(); + this.ruleSectionHeader = new DevExpress.XtraReports.UI.FormattingRule(); + this.PageFooter = new DevExpress.XtraReports.UI.PageFooterBand(); + this.xrPageInfo1 = new DevExpress.XtraReports.UI.XRPageInfo(); + this.TopMargin = new DevExpress.XtraReports.UI.TopMarginBand(); + this.BottomMargin = new DevExpress.XtraReports.UI.BottomMarginBand(); + this.paramVermittlungsstelle = new DevExpress.XtraReports.Parameters.Parameter(); + this.paramStaatsanwaltschaft = new DevExpress.XtraReports.Parameters.Parameter(); + this.paramBerichtszeitraum = new DevExpress.XtraReports.Parameters.Parameter(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tblHeader)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tblDetail)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); + // + // bindingSource1 + // + this.bindingSource1.DataSource = typeof(BeWo.Report.DefaultReports.VgaStatistikReportRow); + // + // ReportHeader + // + this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.lblVersion, + this.lblTitel, + this.lblVermLabel, + this.lblVermWert, + this.lblStaLabel, + this.lblStaWert, + this.lblBerLabel, + this.lblBerWert}); + this.ReportHeader.HeightF = 84F; + this.ReportHeader.Name = "ReportHeader"; + // + // lblVersion + // + this.lblVersion.Font = new DevExpress.Drawing.DXFont("Arial", 8F); + this.lblVersion.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); + this.lblVersion.Name = "lblVersion"; + this.lblVersion.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.lblVersion.SizeF = new System.Drawing.SizeF(80F, 18F); + this.lblVersion.Text = "V 2014.1"; + // + // lblTitel + // + this.lblTitel.Font = new DevExpress.Drawing.DXFont("Arial", 8F, DevExpress.Drawing.DXFontStyle.Bold); + this.lblTitel.LocationFloat = new DevExpress.Utils.PointFloat(80F, 0F); + this.lblTitel.Name = "lblTitel"; + this.lblTitel.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.lblTitel.SizeF = new System.Drawing.SizeF(989F, 18F); + this.lblTitel.StylePriority.UseFont = false; + this.lblTitel.StylePriority.UseTextAlignment = false; + this.lblTitel.Text = "Statistik der Ableistung gemeinnütziger Arbeit"; + this.lblTitel.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + // + // lblVermLabel + // + this.lblVermLabel.Font = new DevExpress.Drawing.DXFont("Arial", 8F); + this.lblVermLabel.LocationFloat = new DevExpress.Utils.PointFloat(50F, 20F); + this.lblVermLabel.Name = "lblVermLabel"; + this.lblVermLabel.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.lblVermLabel.SizeF = new System.Drawing.SizeF(319F, 18F); + this.lblVermLabel.Text = "Vermittlungsstelle (Ort):"; + // + // lblVermWert + // + this.lblVermWert.ExpressionBindings.AddRange(new DevExpress.XtraReports.UI.ExpressionBinding[] { + new DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Parameters.Vermittlungsstelle]")}); + this.lblVermWert.Font = new DevExpress.Drawing.DXFont("Arial", 8F); + this.lblVermWert.LocationFloat = new DevExpress.Utils.PointFloat(369F, 20F); + this.lblVermWert.Name = "lblVermWert"; + this.lblVermWert.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.lblVermWert.SizeF = new System.Drawing.SizeF(300F, 18F); + // + // lblStaLabel + // + this.lblStaLabel.Font = new DevExpress.Drawing.DXFont("Arial", 8F); + this.lblStaLabel.LocationFloat = new DevExpress.Utils.PointFloat(50F, 40F); + this.lblStaLabel.Name = "lblStaLabel"; + this.lblStaLabel.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.lblStaLabel.SizeF = new System.Drawing.SizeF(319F, 18F); + this.lblStaLabel.Text = "Staatsanwaltschaft / Landgerichtsbezirk:"; + // + // lblStaWert + // + this.lblStaWert.ExpressionBindings.AddRange(new DevExpress.XtraReports.UI.ExpressionBinding[] { + new DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Parameters.Staatsanwaltschaft]")}); + this.lblStaWert.Font = new DevExpress.Drawing.DXFont("Arial", 8F); + this.lblStaWert.LocationFloat = new DevExpress.Utils.PointFloat(369F, 40F); + this.lblStaWert.Name = "lblStaWert"; + this.lblStaWert.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.lblStaWert.SizeF = new System.Drawing.SizeF(300F, 18F); + // + // lblBerLabel + // + this.lblBerLabel.Font = new DevExpress.Drawing.DXFont("Arial", 8F); + this.lblBerLabel.LocationFloat = new DevExpress.Utils.PointFloat(50F, 60F); + this.lblBerLabel.Name = "lblBerLabel"; + this.lblBerLabel.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.lblBerLabel.SizeF = new System.Drawing.SizeF(319F, 18F); + this.lblBerLabel.Text = "Berichtszeitraum:"; + // + // lblBerWert + // + this.lblBerWert.ExpressionBindings.AddRange(new DevExpress.XtraReports.UI.ExpressionBinding[] { + new DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "FormatString(\'{0:dd.MM.yyyy}\', [Parameters.Berichtszeitraum])")}); + this.lblBerWert.Font = new DevExpress.Drawing.DXFont("Arial", 8F); + this.lblBerWert.LocationFloat = new DevExpress.Utils.PointFloat(369F, 60F); + this.lblBerWert.Name = "lblBerWert"; + this.lblBerWert.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.lblBerWert.SizeF = new System.Drawing.SizeF(200F, 18F); + // + // PageHeader + // + this.PageHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.tblHeader}); + this.PageHeader.HeightF = 56F; + this.PageHeader.Name = "PageHeader"; + // + // tblHeader + // + this.tblHeader.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(166)))), ((int)(((byte)(166)))), ((int)(((byte)(166))))); + this.tblHeader.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) + | DevExpress.XtraPrinting.BorderSide.Right) + | DevExpress.XtraPrinting.BorderSide.Bottom))); + this.tblHeader.BorderWidth = 0.5F; + this.tblHeader.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); + this.tblHeader.Name = "tblHeader"; + this.tblHeader.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { + this.tblHeaderRow1, + this.tblHeaderRow2}); + this.tblHeader.SizeF = new System.Drawing.SizeF(1069F, 56F); + // + // tblHeaderRow1 + // + this.tblHeaderRow1.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { + this.cellHPos, + this.cellHBeschr, + this.cellHInsgesamt, + this.cellHEFS, + this.cellH1Auflage153a, + this.cellH1Auflage153aSteuerstraf, + this.cellH1BewOhne, + this.cellH1BewMit, + this.cellHGnadenverfahren}); + this.tblHeaderRow1.Name = "tblHeaderRow1"; + this.tblHeaderRow1.Weight = 0.92D; + // + // cellHPos + // + this.cellHPos.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(217)))), ((int)(((byte)(217)))), ((int)(((byte)(217))))); + this.cellHPos.Font = new DevExpress.Drawing.DXFont("Arial", 7F, DevExpress.Drawing.DXFontStyle.Bold); + this.cellHPos.Name = "cellHPos"; + this.cellHPos.Padding = new DevExpress.XtraPrinting.PaddingInfo(1, 1, 1, 1, 100F); + this.cellHPos.RowSpan = 2; + this.cellHPos.StylePriority.UseFont = false; + this.cellHPos.StylePriority.UseTextAlignment = false; + this.cellHPos.Text = "Pos."; + this.cellHPos.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + this.cellHPos.Weight = 0.16666666666666666D; + // + // cellHBeschr + // + this.cellHBeschr.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(217)))), ((int)(((byte)(217)))), ((int)(((byte)(217))))); + this.cellHBeschr.Font = new DevExpress.Drawing.DXFont("Arial", 7F, DevExpress.Drawing.DXFontStyle.Bold); + this.cellHBeschr.Name = "cellHBeschr"; + this.cellHBeschr.Padding = new DevExpress.XtraPrinting.PaddingInfo(1, 1, 1, 1, 100F); + this.cellHBeschr.RowSpan = 2; + this.cellHBeschr.StylePriority.UseFont = false; + this.cellHBeschr.StylePriority.UseTextAlignment = false; + this.cellHBeschr.Text = "1 Auftrag = 1 Person !!!"; + this.cellHBeschr.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + this.cellHBeschr.Weight = 1.0633333333333332D; + // + // cellHInsgesamt + // + this.cellHInsgesamt.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(217)))), ((int)(((byte)(217)))), ((int)(((byte)(217))))); + this.cellHInsgesamt.Font = new DevExpress.Drawing.DXFont("Arial", 7F, DevExpress.Drawing.DXFontStyle.Bold); + this.cellHInsgesamt.Name = "cellHInsgesamt"; + this.cellHInsgesamt.Padding = new DevExpress.XtraPrinting.PaddingInfo(1, 1, 1, 1, 100F); + this.cellHInsgesamt.RowSpan = 2; + this.cellHInsgesamt.StylePriority.UseFont = false; + this.cellHInsgesamt.StylePriority.UseTextAlignment = false; + this.cellHInsgesamt.Text = "insgesamt"; + this.cellHInsgesamt.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + this.cellHInsgesamt.Weight = 0.33333333333333331D; + // + // cellHEFS + // + this.cellHEFS.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(217)))), ((int)(((byte)(217)))), ((int)(((byte)(217))))); + this.cellHEFS.Font = new DevExpress.Drawing.DXFont("Arial", 7F); + this.cellHEFS.Name = "cellHEFS"; + this.cellHEFS.Padding = new DevExpress.XtraPrinting.PaddingInfo(1, 1, 1, 1, 100F); + this.cellHEFS.RowSpan = 2; + this.cellHEFS.StylePriority.UseFont = false; + this.cellHEFS.StylePriority.UseTextAlignment = false; + this.cellHEFS.Text = "zur Abwendung einer\nErsatzfreiheitsstrafe"; + this.cellHEFS.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + this.cellHEFS.Weight = 0.33333333333333331D; + // + // cellH1Auflage153a + // + this.cellH1Auflage153a.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(217)))), ((int)(((byte)(217)))), ((int)(((byte)(217))))); + this.cellH1Auflage153a.Font = new DevExpress.Drawing.DXFont("Arial", 7F); + this.cellH1Auflage153a.Name = "cellH1Auflage153a"; + this.cellH1Auflage153a.Padding = new DevExpress.XtraPrinting.PaddingInfo(1, 1, 1, 1, 100F); + this.cellH1Auflage153a.StylePriority.UseFont = false; + this.cellH1Auflage153a.StylePriority.UseTextAlignment = false; + this.cellH1Auflage153a.Text = "als Auflage gem."; + this.cellH1Auflage153a.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + this.cellH1Auflage153a.Weight = 0.33333333333333331D; + // + // cellH1Auflage153aSteuerstraf + // + this.cellH1Auflage153aSteuerstraf.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(217)))), ((int)(((byte)(217)))), ((int)(((byte)(217))))); + this.cellH1Auflage153aSteuerstraf.Font = new DevExpress.Drawing.DXFont("Arial", 7F); + this.cellH1Auflage153aSteuerstraf.Name = "cellH1Auflage153aSteuerstraf"; + this.cellH1Auflage153aSteuerstraf.Padding = new DevExpress.XtraPrinting.PaddingInfo(1, 1, 1, 1, 100F); + this.cellH1Auflage153aSteuerstraf.StylePriority.UseFont = false; + this.cellH1Auflage153aSteuerstraf.StylePriority.UseTextAlignment = false; + this.cellH1Auflage153aSteuerstraf.Text = "als Auflage gem."; + this.cellH1Auflage153aSteuerstraf.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + this.cellH1Auflage153aSteuerstraf.Weight = 0.33333333333333331D; + // + // cellH1BewOhne + // + this.cellH1BewOhne.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(217)))), ((int)(((byte)(217)))), ((int)(((byte)(217))))); + this.cellH1BewOhne.Font = new DevExpress.Drawing.DXFont("Arial", 7F); + this.cellH1BewOhne.Name = "cellH1BewOhne"; + this.cellH1BewOhne.Padding = new DevExpress.XtraPrinting.PaddingInfo(1, 1, 1, 1, 100F); + this.cellH1BewOhne.StylePriority.UseFont = false; + this.cellH1BewOhne.StylePriority.UseTextAlignment = false; + this.cellH1BewOhne.Text = "als Bewährungs-\nauflage"; + this.cellH1BewOhne.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + this.cellH1BewOhne.Weight = 0.33333333333333331D; + // + // cellH1BewMit + // + this.cellH1BewMit.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(217)))), ((int)(((byte)(217)))), ((int)(((byte)(217))))); + this.cellH1BewMit.Font = new DevExpress.Drawing.DXFont("Arial", 7F); + this.cellH1BewMit.Name = "cellH1BewMit"; + this.cellH1BewMit.Padding = new DevExpress.XtraPrinting.PaddingInfo(1, 1, 1, 1, 100F); + this.cellH1BewMit.StylePriority.UseFont = false; + this.cellH1BewMit.StylePriority.UseTextAlignment = false; + this.cellH1BewMit.Text = "als Bewährungs-\nauflage"; + this.cellH1BewMit.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + this.cellH1BewMit.Weight = 0.33333333333333331D; + // + // cellHGnadenverfahren + // + this.cellHGnadenverfahren.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(217)))), ((int)(((byte)(217)))), ((int)(((byte)(217))))); + this.cellHGnadenverfahren.Font = new DevExpress.Drawing.DXFont("Arial", 7F); + this.cellHGnadenverfahren.Name = "cellHGnadenverfahren"; + this.cellHGnadenverfahren.Padding = new DevExpress.XtraPrinting.PaddingInfo(1, 1, 1, 1, 100F); + this.cellHGnadenverfahren.RowSpan = 2; + this.cellHGnadenverfahren.StylePriority.UseFont = false; + this.cellHGnadenverfahren.StylePriority.UseTextAlignment = false; + this.cellHGnadenverfahren.Text = "als Auflage im\nGnadenverfahren"; + this.cellHGnadenverfahren.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + this.cellHGnadenverfahren.Weight = 0.33333333333333331D; + // + // tblHeaderRow2 + // + this.tblHeaderRow2.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { + this.cellH2Pos, + this.cellH2Beschr, + this.cellH2Insgesamt, + this.cellH2EFS, + this.cellH2Auflage153a, + this.cellH2Auflage153aSteuerstraf, + this.cellH2BewOhne, + this.cellH2BewMit, + this.cellH2Gnadenverfahren}); + this.tblHeaderRow2.Name = "tblHeaderRow2"; + this.tblHeaderRow2.Weight = 0.92D; + // + // cellH2Pos + // + this.cellH2Pos.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(217)))), ((int)(((byte)(217)))), ((int)(((byte)(217))))); + this.cellH2Pos.Name = "cellH2Pos"; + this.cellH2Pos.Weight = 0.16666666666666666D; + // + // cellH2Beschr + // + this.cellH2Beschr.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(217)))), ((int)(((byte)(217)))), ((int)(((byte)(217))))); + this.cellH2Beschr.Name = "cellH2Beschr"; + this.cellH2Beschr.Weight = 1.0633333333333332D; + // + // cellH2Insgesamt + // + this.cellH2Insgesamt.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(217)))), ((int)(((byte)(217)))), ((int)(((byte)(217))))); + this.cellH2Insgesamt.Name = "cellH2Insgesamt"; + this.cellH2Insgesamt.Weight = 0.33333333333333331D; + // + // cellH2EFS + // + this.cellH2EFS.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(217)))), ((int)(((byte)(217)))), ((int)(((byte)(217))))); + this.cellH2EFS.Name = "cellH2EFS"; + this.cellH2EFS.Weight = 0.33333333333333331D; + // + // cellH2Auflage153a + // + this.cellH2Auflage153a.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(217)))), ((int)(((byte)(217)))), ((int)(((byte)(217))))); + this.cellH2Auflage153a.Font = new DevExpress.Drawing.DXFont("Arial", 7F); + this.cellH2Auflage153a.Name = "cellH2Auflage153a"; + this.cellH2Auflage153a.Padding = new DevExpress.XtraPrinting.PaddingInfo(1, 1, 1, 1, 100F); + this.cellH2Auflage153a.StylePriority.UseFont = false; + this.cellH2Auflage153a.StylePriority.UseTextAlignment = false; + this.cellH2Auflage153a.Text = "§ 153a StPO"; + this.cellH2Auflage153a.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + this.cellH2Auflage153a.Weight = 0.33333333333333331D; + // + // cellH2Auflage153aSteuerstraf + // + this.cellH2Auflage153aSteuerstraf.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(217)))), ((int)(((byte)(217)))), ((int)(((byte)(217))))); + this.cellH2Auflage153aSteuerstraf.Font = new DevExpress.Drawing.DXFont("Arial", 7F); + this.cellH2Auflage153aSteuerstraf.Name = "cellH2Auflage153aSteuerstraf"; + this.cellH2Auflage153aSteuerstraf.Padding = new DevExpress.XtraPrinting.PaddingInfo(1, 1, 1, 1, 100F); + this.cellH2Auflage153aSteuerstraf.StylePriority.UseFont = false; + this.cellH2Auflage153aSteuerstraf.StylePriority.UseTextAlignment = false; + this.cellH2Auflage153aSteuerstraf.Text = "§ 153a StPO im\nSteuerstrafverfahren"; + this.cellH2Auflage153aSteuerstraf.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + this.cellH2Auflage153aSteuerstraf.Weight = 0.33333333333333331D; + // + // cellH2BewOhne + // + this.cellH2BewOhne.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(217)))), ((int)(((byte)(217)))), ((int)(((byte)(217))))); + this.cellH2BewOhne.Font = new DevExpress.Drawing.DXFont("Arial", 7F); + this.cellH2BewOhne.Name = "cellH2BewOhne"; + this.cellH2BewOhne.Padding = new DevExpress.XtraPrinting.PaddingInfo(1, 1, 1, 1, 100F); + this.cellH2BewOhne.StylePriority.UseFont = false; + this.cellH2BewOhne.StylePriority.UseTextAlignment = false; + this.cellH2BewOhne.Text = "ohne Bewährungs-\nhelfer"; + this.cellH2BewOhne.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + this.cellH2BewOhne.Weight = 0.33333333333333331D; + // + // cellH2BewMit + // + this.cellH2BewMit.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(217)))), ((int)(((byte)(217)))), ((int)(((byte)(217))))); + this.cellH2BewMit.Font = new DevExpress.Drawing.DXFont("Arial", 7F); + this.cellH2BewMit.Name = "cellH2BewMit"; + this.cellH2BewMit.Padding = new DevExpress.XtraPrinting.PaddingInfo(1, 1, 1, 1, 100F); + this.cellH2BewMit.StylePriority.UseFont = false; + this.cellH2BewMit.StylePriority.UseTextAlignment = false; + this.cellH2BewMit.Text = "mit Bewährungs-\nhelfer"; + this.cellH2BewMit.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + this.cellH2BewMit.Weight = 0.33333333333333331D; + // + // cellH2Gnadenverfahren + // + this.cellH2Gnadenverfahren.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(217)))), ((int)(((byte)(217)))), ((int)(((byte)(217))))); + this.cellH2Gnadenverfahren.Name = "cellH2Gnadenverfahren"; + this.cellH2Gnadenverfahren.Weight = 0.33333333333333331D; + // + // Detail + // + this.Detail.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.tblDetail}); + this.Detail.HeightF = 16F; + this.Detail.Name = "Detail"; + // + // tblDetail + // + this.tblDetail.AnchorVertical = ((DevExpress.XtraReports.UI.VerticalAnchorStyles)((DevExpress.XtraReports.UI.VerticalAnchorStyles.Top | DevExpress.XtraReports.UI.VerticalAnchorStyles.Bottom))); + this.tblDetail.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(166)))), ((int)(((byte)(166)))), ((int)(((byte)(166))))); + this.tblDetail.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) + | DevExpress.XtraPrinting.BorderSide.Right) + | DevExpress.XtraPrinting.BorderSide.Bottom))); + this.tblDetail.BorderWidth = 0.5F; + this.tblDetail.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); + this.tblDetail.Name = "tblDetail"; + this.tblDetail.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { + this.tblDetailRow}); + this.tblDetail.SizeF = new System.Drawing.SizeF(1069F, 16F); + // + // tblDetailRow + // + this.tblDetailRow.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { + this.cellPos, + this.cellBeschr, + this.cellInsgesamt, + this.cellEFS, + this.cellAuflage153a, + this.cellAuflage153aSteuerstraf, + this.cellBewOhne, + this.cellBewMit, + this.cellGnadenverfahren}); + this.tblDetailRow.Name = "tblDetailRow"; + this.tblDetailRow.Weight = 11.5D; + // + // cellPos + // + this.cellPos.CanGrow = false; + this.cellPos.ExpressionBindings.AddRange(new DevExpress.XtraReports.UI.ExpressionBinding[] { + new DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Position]")}); + this.cellPos.Name = "cellPos"; + this.cellPos.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.cellPos.StylePriority.UseTextAlignment = false; + this.cellPos.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + this.cellPos.Weight = 0.16666666666666666D; + // + // cellBeschr + // + this.cellBeschr.CanGrow = false; + this.cellBeschr.ExpressionBindings.AddRange(new DevExpress.XtraReports.UI.ExpressionBinding[] { + new DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Beschreibung]")}); + this.cellBeschr.Name = "cellBeschr"; + this.cellBeschr.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.cellBeschr.StylePriority.UseTextAlignment = false; + this.cellBeschr.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + this.cellBeschr.Weight = 1.0633333333333332D; + // + // cellInsgesamt + // + this.cellInsgesamt.CanGrow = false; + this.cellInsgesamt.ExpressionBindings.AddRange(new DevExpress.XtraReports.UI.ExpressionBinding[] { + new DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[ColInsgesamt]")}); + this.cellInsgesamt.Name = "cellInsgesamt"; + this.cellInsgesamt.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.cellInsgesamt.StylePriority.UseTextAlignment = false; + this.cellInsgesamt.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; + this.cellInsgesamt.Weight = 0.33333333333333331D; + // + // cellEFS + // + this.cellEFS.CanGrow = false; + this.cellEFS.ExpressionBindings.AddRange(new DevExpress.XtraReports.UI.ExpressionBinding[] { + new DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[ColEFS]")}); + this.cellEFS.Name = "cellEFS"; + this.cellEFS.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.cellEFS.StylePriority.UseTextAlignment = false; + this.cellEFS.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; + this.cellEFS.Weight = 0.33333333333333331D; + // + // cellAuflage153a + // + this.cellAuflage153a.CanGrow = false; + this.cellAuflage153a.ExpressionBindings.AddRange(new DevExpress.XtraReports.UI.ExpressionBinding[] { + new DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[ColAuflage153a]")}); + this.cellAuflage153a.Name = "cellAuflage153a"; + this.cellAuflage153a.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.cellAuflage153a.StylePriority.UseTextAlignment = false; + this.cellAuflage153a.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; + this.cellAuflage153a.Weight = 0.33333333333333331D; + // + // cellAuflage153aSteuerstraf + // + this.cellAuflage153aSteuerstraf.CanGrow = false; + this.cellAuflage153aSteuerstraf.ExpressionBindings.AddRange(new DevExpress.XtraReports.UI.ExpressionBinding[] { + new DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[ColAuflage153aSteuerstraf]")}); + this.cellAuflage153aSteuerstraf.Name = "cellAuflage153aSteuerstraf"; + this.cellAuflage153aSteuerstraf.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.cellAuflage153aSteuerstraf.StylePriority.UseTextAlignment = false; + this.cellAuflage153aSteuerstraf.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; + this.cellAuflage153aSteuerstraf.Weight = 0.33333333333333331D; + // + // cellBewOhne + // + this.cellBewOhne.CanGrow = false; + this.cellBewOhne.ExpressionBindings.AddRange(new DevExpress.XtraReports.UI.ExpressionBinding[] { + new DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[ColBewOhne]")}); + this.cellBewOhne.Name = "cellBewOhne"; + this.cellBewOhne.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.cellBewOhne.StylePriority.UseTextAlignment = false; + this.cellBewOhne.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; + this.cellBewOhne.Weight = 0.33333333333333331D; + // + // cellBewMit + // + this.cellBewMit.CanGrow = false; + this.cellBewMit.ExpressionBindings.AddRange(new DevExpress.XtraReports.UI.ExpressionBinding[] { + new DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[ColBewMit]")}); + this.cellBewMit.Name = "cellBewMit"; + this.cellBewMit.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.cellBewMit.StylePriority.UseTextAlignment = false; + this.cellBewMit.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; + this.cellBewMit.Weight = 0.33333333333333331D; + // + // cellGnadenverfahren + // + this.cellGnadenverfahren.CanGrow = false; + this.cellGnadenverfahren.ExpressionBindings.AddRange(new DevExpress.XtraReports.UI.ExpressionBinding[] { + new DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[ColGnadenverfahren]")}); + this.cellGnadenverfahren.Name = "cellGnadenverfahren"; + this.cellGnadenverfahren.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.cellGnadenverfahren.StylePriority.UseTextAlignment = false; + this.cellGnadenverfahren.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; + this.cellGnadenverfahren.Weight = 0.33333333333333331D; + // + // ruleHighlighted + // + this.ruleHighlighted.Condition = "[RowType] == 1"; + this.ruleHighlighted.Formatting.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(230)))), ((int)(((byte)(153))))); + this.ruleHighlighted.Name = "ruleHighlighted"; + // + // ruleSectionHeader + // + this.ruleSectionHeader.Condition = "[RowType] == 2"; + this.ruleSectionHeader.Formatting.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(189)))), ((int)(((byte)(215)))), ((int)(((byte)(238))))); + this.ruleSectionHeader.Formatting.Font = new DevExpress.Drawing.DXFont("Arial", 8F, DevExpress.Drawing.DXFontStyle.Bold); + this.ruleSectionHeader.Name = "ruleSectionHeader"; + // + // PageFooter + // + this.PageFooter.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrPageInfo1}); + this.PageFooter.HeightF = 26F; + this.PageFooter.Name = "PageFooter"; + // + // xrPageInfo1 + // + this.xrPageInfo1.LocationFloat = new DevExpress.Utils.PointFloat(868.9998F, 10F); + this.xrPageInfo1.Name = "xrPageInfo1"; + this.xrPageInfo1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrPageInfo1.SizeF = new System.Drawing.SizeF(200F, 16F); + this.xrPageInfo1.StylePriority.UseTextAlignment = false; + this.xrPageInfo1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; + // + // TopMargin + // + this.TopMargin.HeightF = 50F; + this.TopMargin.Name = "TopMargin"; + // + // BottomMargin + // + this.BottomMargin.HeightF = 50F; + this.BottomMargin.Name = "BottomMargin"; + // + // paramVermittlungsstelle + // + this.paramVermittlungsstelle.Description = "Vermittlungsstelle (Ort)"; + this.paramVermittlungsstelle.Name = "paramVermittlungsstelle"; + // + // paramStaatsanwaltschaft + // + this.paramStaatsanwaltschaft.Description = "Staatsanwaltschaft / LG-Bezirk"; + this.paramStaatsanwaltschaft.Name = "paramStaatsanwaltschaft"; + this.paramStaatsanwaltschaft.ValueInfo = "GESAMT"; + // + // paramBerichtszeitraum + // + this.paramBerichtszeitraum.Description = "Berichtszeitraum (Stichtag)"; + this.paramBerichtszeitraum.Name = "paramBerichtszeitraum"; + this.paramBerichtszeitraum.Type = typeof(System.DateTime); + this.paramBerichtszeitraum.ValueInfo = "2026-03-20"; + // + // VgaStatistikReport + // + this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { + this.TopMargin, + this.ReportHeader, + this.PageHeader, + this.Detail, + this.PageFooter, + this.BottomMargin}); + this.DataSource = this.bindingSource1; + this.Font = new DevExpress.Drawing.DXFont("Arial", 8F); + this.Landscape = true; + this.Margins = new DevExpress.Drawing.DXMargins(50F, 50F, 50F, 50F); + this.PageHeight = 827; + this.PageWidth = 1169; + this.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4; + this.Parameters.AddRange(new DevExpress.XtraReports.Parameters.Parameter[] { + this.paramVermittlungsstelle, + this.paramStaatsanwaltschaft, + this.paramBerichtszeitraum}); + this.Version = "23.2"; + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tblHeader)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tblDetail)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); + + } + + #endregion + + // ── Private Felder (alle Report-Controls) ────────────────────────────── + private System.Windows.Forms.BindingSource bindingSource1; + + private DevExpress.XtraReports.UI.TopMarginBand TopMargin; + private DevExpress.XtraReports.UI.BottomMarginBand BottomMargin; + private DevExpress.XtraReports.UI.ReportHeaderBand ReportHeader; + private DevExpress.XtraReports.UI.PageHeaderBand PageHeader; + private DevExpress.XtraReports.UI.DetailBand Detail; + private DevExpress.XtraReports.UI.PageFooterBand PageFooter; + + // Report-Header Labels + private DevExpress.XtraReports.UI.XRLabel lblVersion; + private DevExpress.XtraReports.UI.XRLabel lblTitel; + private DevExpress.XtraReports.UI.XRLabel lblVermLabel; + private DevExpress.XtraReports.UI.XRLabel lblVermWert; + private DevExpress.XtraReports.UI.XRLabel lblStaLabel; + private DevExpress.XtraReports.UI.XRLabel lblStaWert; + private DevExpress.XtraReports.UI.XRLabel lblBerLabel; + private DevExpress.XtraReports.UI.XRLabel lblBerWert; + + // Page-Header Tabelle + private DevExpress.XtraReports.UI.XRTable tblHeader; + private DevExpress.XtraReports.UI.XRTableRow tblHeaderRow1; + private DevExpress.XtraReports.UI.XRTableCell cellHPos; + private DevExpress.XtraReports.UI.XRTableCell cellHBeschr; + private DevExpress.XtraReports.UI.XRTableCell cellHInsgesamt; + private DevExpress.XtraReports.UI.XRTableCell cellHEFS; + private DevExpress.XtraReports.UI.XRTableCell cellH1Auflage153a; + private DevExpress.XtraReports.UI.XRTableCell cellH1Auflage153aSteuerstraf; + private DevExpress.XtraReports.UI.XRTableCell cellH1BewOhne; + private DevExpress.XtraReports.UI.XRTableCell cellH1BewMit; + private DevExpress.XtraReports.UI.XRTableCell cellHGnadenverfahren; + private DevExpress.XtraReports.UI.XRTableRow tblHeaderRow2; + private DevExpress.XtraReports.UI.XRTableCell cellH2Pos; + private DevExpress.XtraReports.UI.XRTableCell cellH2Beschr; + private DevExpress.XtraReports.UI.XRTableCell cellH2Insgesamt; + private DevExpress.XtraReports.UI.XRTableCell cellH2EFS; + private DevExpress.XtraReports.UI.XRTableCell cellH2Auflage153a; + private DevExpress.XtraReports.UI.XRTableCell cellH2Auflage153aSteuerstraf; + private DevExpress.XtraReports.UI.XRTableCell cellH2BewOhne; + private DevExpress.XtraReports.UI.XRTableCell cellH2BewMit; + private DevExpress.XtraReports.UI.XRTableCell cellH2Gnadenverfahren; + + // Detail-Tabelle + private DevExpress.XtraReports.UI.XRTable tblDetail; + private DevExpress.XtraReports.UI.XRTableRow tblDetailRow; + private DevExpress.XtraReports.UI.XRTableCell cellPos; + private DevExpress.XtraReports.UI.XRTableCell cellBeschr; + private DevExpress.XtraReports.UI.XRTableCell cellInsgesamt; + private DevExpress.XtraReports.UI.XRTableCell cellEFS; + private DevExpress.XtraReports.UI.XRTableCell cellAuflage153a; + private DevExpress.XtraReports.UI.XRTableCell cellAuflage153aSteuerstraf; + private DevExpress.XtraReports.UI.XRTableCell cellBewOhne; + private DevExpress.XtraReports.UI.XRTableCell cellBewMit; + private DevExpress.XtraReports.UI.XRTableCell cellGnadenverfahren; + + // Seitenzahl + private DevExpress.XtraReports.UI.XRPageInfo xrPageInfo1; + + // Bedingte Formatierung + private DevExpress.XtraReports.UI.FormattingRule ruleHighlighted; + private DevExpress.XtraReports.UI.FormattingRule ruleSectionHeader; + + // Parameter + private DevExpress.XtraReports.Parameters.Parameter paramVermittlungsstelle; + private DevExpress.XtraReports.Parameters.Parameter paramStaatsanwaltschaft; + private DevExpress.XtraReports.Parameters.Parameter paramBerichtszeitraum; + } +} diff --git a/Report/DefaultReports/VgaStatistikReport.cs b/Report/DefaultReports/VgaStatistikReport.cs new file mode 100644 index 000000000..78268f20e --- /dev/null +++ b/Report/DefaultReports/VgaStatistikReport.cs @@ -0,0 +1,334 @@ +using System; +using System.Collections.Generic; +using BeWo.Service.Reporting.Straffaelligenhilfe; +using DevExpress.XtraReports.UI; + +namespace BeWo.Report.DefaultReports +{ + /// + /// XtraReport für die "Statistik der Ableistung gemeinnütziger Arbeit" (V 2014.1). + /// + /// Verwendung: + /// var rows = VgaStatistikReport.CreateRows(efs, a153, a153s, bewO, bewM, gnad); + /// var report = new VgaStatistikReport(); + /// report.Parameters["Vermittlungsstelle"].Value = "Musterstadt"; + /// report.Parameters["Staatsanwaltschaft"].Value = "GESAMT"; + /// report.Parameters["Berichtszeitraum"].Value = new DateTime(2025, 6, 30); + /// report.SetReportDataSource(rows); + /// report.ShowPreview(); + /// + public partial class VgaStatistikReport : XtraReport + { + public VgaStatistikReport() + { + InitializeComponent(); + } + + /// + /// Setzt die Datenquelle des Reports. + /// + public void SetReportDataSource(List rows) + { + this.bindingSource1.DataSource = rows; + } + + // ── Factory ───────────────────────────────────────────────────────────── + + /// + /// Konvertiert 6 ausgefüllte VgaStatistic-Objekte (je eine Kategorie) in die + /// Zeilenliste für den Report. Spalte C (insgesamt) wird als Summe berechnet. + /// + /// Parameterreihenfolge entspricht den Excel-Spalten D–I: + /// efs → Spalte D: Abwendung Ersatzfreiheitsstrafe + /// auflage153a → Spalte E: Auflage gem. § 153a StPO + /// auflage153aSteuerstraf → Spalte F: Auflage § 153a StPO Steuerstrafverfahren + /// bewOhne → Spalte G: Bewährungsauflage ohne Bewährungshelfer + /// bewMit → Spalte H: Bewährungsauflage mit Bewährungshelfer + /// gnadenverfahren → Spalte I: Auflage im Gnadenverfahren + /// + public static List CreateRows( + VgaStatistic efs, + VgaStatistic auflage153a, + VgaStatistic auflage153aSteuerstraf, + VgaStatistic bewOhne, + VgaStatistic bewMit, + VgaStatistic gnadenverfahren) + { + // Kurzform: Zähle eine Eigenschaft über alle 6 Kategorien + int Sum(Func f) => + f(efs) + f(auflage153a) + f(auflage153aSteuerstraf) + + f(bewOhne) + f(bewMit) + f(gnadenverfahren); + + // Normale Datenzeile + VgaStatistikReportRow Row(string pos, string beschr, + Func f, + VgaReportRowType type = VgaReportRowType.Normal) => + VgaStatistikReportRow.FromValues(pos, beschr, + f(efs), f(auflage153a), f(auflage153aSteuerstraf), + f(bewOhne), f(bewMit), f(gnadenverfahren), type); + + return new List + { + // ── Auftragsbestand ──────────────────────────────────────────── + Row("0.1", + "Anzahl der aus dem vorhergehenden Berichtszeitraum übernommenen offenen Aufträge", + s => s.Anzahl01), + + Row("0.2", + "Anzahl der im aktuellen Berichtszeitraum erteilten Aufträge", + s => s.Anzahl02, VgaReportRowType.Highlighted), + + Row("1.", + "Anzahl der insges. erteilten Aufträge (Summe Zeilen 0.1 + 0.2)", + s => s.Anzahl1, VgaReportRowType.Highlighted), + + Row("1.1.", + "darunter mehrfach erteilte Aufträge zur selben Person und zum selben Aktenzeichen (Fallzahl v. Zeile 1)", + s => s.Anzahl1_1, VgaReportRowType.Highlighted), + + Row("1.2.", + "darunter Amtshilfe für andere Bezirke in BW (Fallzahl v. Zeile 1)", + s => s.Anzahl1_2), + + Row("1.3.", + "darunter Amtshilfe für andere Bundesländer / Ausland (Fallzahl v. Zeile 1)", + s => s.Anzahl1_3), + + Row("1.4.", + "Aufträge für männliche Klienten (Fallzahl v. Zeile 1)", + s => s.Anzahl1_4), + + Row("1.5.", + "Aufträge für weibliche Klienten (Fallzahl v. Zeile 1)", + s => s.Anzahl1_5), + + // ── Arbeitsstunden ───────────────────────────────────────────── + Row("2.", + "Anzahl der (beauftragten) Arbeitsstunden (bezogen auf Zeile 1) in vollen Std.", + s => s.Anzahl2), + + // ── Erledigte Aufträge ───────────────────────────────────────── + Row("3.", + "Anzahl aller erledigten Aufträge (incl. Abbrüche, teilweise erledigter Aufträge, gescheiterte Fälle)", + s => s.Anzahl3), + + Row("3.1.", + "davon Anzahl der teilweise erledigten Aufträge (Fallzahl v. Zeile 3)", + s => s.Anzahl3_1), + + VgaStatistikReportRow.FromEfsOnly( + "3.1.1.", + "Anzahl der Aufträge = Personen, bei denen die Auflagen teilweise nur durch Arbeitsleistungen erledigt wurden (Fallzahl v. Spalte D; Zeile 3.1.)", + efs.Anzahl3_1_1.ToString("N0")), + + Row("3.2.", + "davon Anzahl der gescheiterten Fälle (negativer Fallstatus u. Abbrüche (Fallzahl v. Zeile 3))", + s => s.Anzahl3_2), + + Row("3.3.", + "davon Anzahl der vollständig erledigten Aufträge (Fallzahl v. Zeile 3)", + s => s.Anzahl3_3), + + VgaStatistikReportRow.FromEfsOnly( + "3.3.1.", + "Anzahl der Aufträge = Personen, bei denen die Auflagen nur durch Arbeitsleistungen erfüllt wurden (Fallzahl v. Spalte D; Zeile 3.3.)", + efs.Anzahl3_3_1.ToString("N0")), + + // ── Verlauf (Abschnittsüberschrift) ──────────────────────────── + VgaStatistikReportRow.SectionHeader( + "4.", + "Verlauf (der erledigten Aufträge gem. Zeile 3)", + "Mehrfachnennungen möglich !!"), + + Row("4.1.", + "darunter Vermittlungen in externe Einsatzstellen (Fallzahl von Zeile 3)", + s => s.Anzahl4_1), + + Row("4.2.", + "darunter Vermittlungen in verschiedene Einsatzstellen (Fallzahl von Zeile 3)", + s => s.Anzahl4_2), + + Row("4.3.", + "darunter Vermittlungen in eigene Arbeitsgruppen (Fallzahl von Zeile 3)", + s => s.Anzahl4_3), + + Row("4.4.", + "darunter durch Ratenzahlungsvereinbarung (Fallzahlen v. Zeile 3)", + s => s.Anzahl4_4), + + Row("4.5.", + "darunter sonstige Erledigung (Umzug, Änderung des Beschlusses) (Fallzahl v. Zeile 3)", + s => s.Anzahl4_5), + + Row("4.6.", + "darunter Mischformen (Fallzahlen von Zeile 3)", + s => s.Anzahl4_6), + + Row("4.7.", + "Übergang in Aufsuchende Sozialarbeit", + s => s.Anzahl4_7), + + Row("4.8.", + "Übergang in Treuhänderische Geldverwaltung", + s => s.Anzahl4_8), + + // ── Geleistete Stunden ───────────────────────────────────────── + Row("5.", + "Anzahl der geleisteten Arbeitsstunden bezogen auf Zeile 3 (volle Std.)", + s => s.Anzahl5), + + // ── Zahlungen / Hafttage / Fälle (nur Insgesamt = EFS) ───────── + VgaStatistikReportRow.FromEfsOnly( + "6.", + "Summe der nachgewiesenen Zahlungen in €", + (efs.Betrag6 + auflage153a.Betrag6 + auflage153aSteuerstraf.Betrag6 + + bewOhne.Betrag6 + bewMit.Betrag6 + gnadenverfahren.Betrag6).ToString("N2")), + + VgaStatistikReportRow.FromEfsOnly( + "7.", + "Anzahl der vermiedenen Hafttage (durch Arbeitsstd. und / oder Zahlungen)", + Sum(s => s.Anzahl7).ToString("N0")), + + VgaStatistikReportRow.FromEfsOnly( + "7.1.", + "Anzahl der vermiedenen Hafttage (nur durch Arbeitsstd.)", + Sum(s => s.Anzahl7_1).ToString("N0")), + + VgaStatistikReportRow.FromEfsOnly( + "8.", + "Anzahl der Aufträge = Personen, bei denen die Vollstreckung der Freiheitsstrafe vollständig oder teilweise durch gemeinnützige Arbeit abgewendet wurde", + Sum(s => s.Anzahl8).ToString("N0")), + + // ── Gründe für Abbrüche (Abschnittsüberschrift) ──────────────── + VgaStatistikReportRow.SectionHeader( + "9.", + "Gründe für Abbrüche / Scheitern", + "(Fallzahlen bezogen auf Zeile 3.2 - Mehrfachnennung möglich)"), + + Row("9.1.", "kein Kontakt", s => s.Anzahl9_1), + Row("9.2.", "nicht angetreten", s => s.Anzahl9_2), + Row("9.3.", "Abbruch der Tätigkeit", s => s.Anzahl9_3), + Row("9.4.", "längerfristig arbeitsunfähig", s => s.Anzahl9_4), + Row("9.5.", "Suchtproblematik", s => s.Anzahl9_5), + Row("9.6.", "psychische Probleme", s => s.Anzahl9_6), + Row("9.7.", "keine Motivation", s => s.Anzahl9_7), + Row("9.8.", "in Haft", s => s.Anzahl9_8), + Row("9.9.", "unbekannt", s => s.Anzahl9_9), + + // ── Offene Aufträge ──────────────────────────────────────────── + Row("10.", + "Anzahl der offenen Aufträge (= Zeile 1 minus Zeile 3)", + s => s.Anzahl10), + + // ── Dauer der Beratung (Abschnittsüberschrift) ───────────────── + VgaStatistikReportRow.SectionHeader( + "11.", + "Dauer der Beratung / Betreuung (der erl. Aufträge)", + "(Fallzahlen-Summen müssen identisch sein mit Zeile 3)"), + + Row("11.1.", "bis 3 Monate", s => s.Anzahl11_1), + Row("11.2.", "3 bis 6 Monate", s => s.Anzahl11_2), + Row("11.3.", "6 bis 12 Monate", s => s.Anzahl11_3), + Row("11.4.", "über 12 Monate", s => s.Anzahl11_4), + + // ── Vermittlung aus Haft ─────────────────────────────────────── + Row("12.", "Vermittlung aus Haft", s => s.Anzahl12), + }; + } + } + /// + /// Zeilentyp für die bedingte Formatierung im VGA-Statistik Report. + /// + public enum VgaReportRowType + { + Normal = 0, + Highlighted = 1, // Orangefarbener Hintergrund (z. B. Zeilen 0.2, 1., 1.1.) + SectionHeader = 2 // Blauer Hintergrund (Abschnittsüberschriften 4., 9., 11.) + } + + /// + /// Datenmodell für eine Zeile im VGA-Statistik Report. + /// Alle Werte werden als formatierte Strings übergeben, damit auch "x"-Einträge + /// für nicht anwendbare Felder dargestellt werden können. + /// + public class VgaStatistikReportRow + { + public string Position { get; set; } = ""; + public string Beschreibung { get; set; } = ""; + public string ColInsgesamt { get; set; } = ""; + public string ColEFS { get; set; } = ""; + public string ColAuflage153a { get; set; } = ""; + public string ColAuflage153aSteuerstraf { get; set; } = ""; + public string ColBewOhne { get; set; } = ""; + public string ColBewMit { get; set; } = ""; + public string ColGnadenverfahren { get; set; } = ""; + public VgaReportRowType RowType { get; set; } = VgaReportRowType.Normal; + + /// + /// Erstellt eine normale Datenzeile aus den Einzelwerten der 6 Kategorien. + /// Insgesamt wird als Summe berechnet. + /// + internal static VgaStatistikReportRow FromValues( + string position, string beschreibung, + int valEFS, int valA153, int valA153s, int valBewO, int valBewM, int valGnad, + VgaReportRowType rowType = VgaReportRowType.Normal) + { + int total = valEFS + valA153 + valA153s + valBewO + valBewM + valGnad; + return new VgaStatistikReportRow + { + Position = position, + Beschreibung = beschreibung, + ColInsgesamt = total.ToString("N0"), + ColEFS = valEFS.ToString("N0"), + ColAuflage153a = valA153.ToString("N0"), + ColAuflage153aSteuerstraf = valA153s.ToString("N0"), + ColBewOhne = valBewO.ToString("N0"), + ColBewMit = valBewM.ToString("N0"), + ColGnadenverfahren = valGnad.ToString("N0"), + RowType = rowType + }; + } + + /// + /// Erstellt eine Zeile, bei der nur Insgesamt (= EFS-Wert) relevant ist – + /// Spalten E–I werden als "x" (nicht anwendbar) dargestellt. + /// Verwendet für Positionen 3.1.1., 3.3.1., 6., 7., 7.1., 8. + /// + internal static VgaStatistikReportRow FromEfsOnly( + string position, string beschreibung, + string valTotal, + VgaReportRowType rowType = VgaReportRowType.Normal) + { + return new VgaStatistikReportRow + { + Position = position, + Beschreibung = beschreibung, + ColInsgesamt = valTotal, + ColEFS = valTotal, + ColAuflage153a = "x", + ColAuflage153aSteuerstraf = "x", + ColBewOhne = "x", + ColBewMit = "x", + ColGnadenverfahren = "x", + RowType = rowType + }; + } + + /// + /// Erstellt eine Abschnittsüberschrift (blauer Hintergrund). + /// ColInsgesamt nimmt den Hinweistext auf. + /// + internal static VgaStatistikReportRow SectionHeader( + string position, string beschreibung, string hinweis = "") + { + return new VgaStatistikReportRow + { + Position = position, + Beschreibung = beschreibung, + ColInsgesamt = hinweis, + RowType = VgaReportRowType.SectionHeader + }; + } + } +} + diff --git a/Report/DefaultReports/VgaStatistikReport.resx b/Report/DefaultReports/VgaStatistikReport.resx new file mode 100644 index 000000000..1af7de150 --- /dev/null +++ b/Report/DefaultReports/VgaStatistikReport.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Report/Report.csproj b/Report/Report.csproj index 94a0aeb44..cdd5d977a 100644 --- a/Report/Report.csproj +++ b/Report/Report.csproj @@ -289,6 +289,12 @@ ValidationMessagesReport.cs + + Component + + + VgaStatistikReport.cs + Component @@ -702,6 +708,9 @@ ValidationMessagesReport.cs Designer + + VgaStatistikReport.cs + VorlageReport.cs Designer diff --git a/Service/Reporting/Straffaelligenhilfe/StatisticBase.cs b/Service/Reporting/Straffaelligenhilfe/StatisticBase.cs new file mode 100644 index 000000000..7fae41699 --- /dev/null +++ b/Service/Reporting/Straffaelligenhilfe/StatisticBase.cs @@ -0,0 +1,120 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using BS.Shared; +using BS.Shared.Core; +using BS.Shared.DataContracts; +using BS.Shared.Services; +using BeWo.Data.Access; +using BeWo.Data.Entities; +using BeWo.Service.DCEntityMapper; +using BeWo.Service.Plugins; +using Castle.Components.DictionaryAdapter; +using NHibernate.Linq; + +namespace BeWo.Service.Reporting.Straffaelligenhilfe +{ + public class StatisticBase + { + protected DateTime StartDate { get; set; } + protected DateTime EndDate { get; set; } + protected Dictionary CustomerByOid { get; set; } + + public virtual List CreateStatistic(DateTime startDate, DateTime endDate) + { + StartDate = startDate; + EndDate = endDate; + CustomerByOid = new Dictionary(); + + var reports = new List(); + + LoadData(); + + Dictionary customerOid2Days = new Dictionary(); + StringBuilder sb = new StringBuilder(); + foreach (var customerOid in CustomerByOid.Keys) + { + Customer customer = CustomerByOid[customerOid]; + ProcessCustomer(customer); + + } + + + + + + return reports; + } + + public virtual void LoadData() + { + foreach (var customer in DAOFactory.GenericDAO.GetAllActiveAndArchived()) + { + if (ShouldProcessCustomer(customer)) + { + if (!CustomerByOid.ContainsKey(customer.Oid.Value)) + { + CustomerByOid.Add(customer.Oid.Value, customer); + } + } + + } + + } + + public virtual void ProcessCustomer(Customer customer) + { + + } + + public virtual IList GetVgaList(Customer customer, VgaTypeEnum vgaType) + { + var list = customer.CustomerVermittlungArbeiten.Where(v => v.Auftragseingang.HasValue && v.Auftragseingang >= StartDate && v.Auftragseingang.Value.Date <= EndDate); + return list.Where(v => v.VgaType == vgaType).ToList(); + } + + public virtual bool ShouldProcessCustomer(Customer customer) + { + if (customer .IsActive != ActivationTypeId.Deleted) + { + //if (CustomerBelongsToTeam(customer, TeamOid) && + // IsCustomerOfCustomerCareType(customer, CustomerCareTypeValueListEntryOid)) + //{ + return true; + //} + } + return false; + } + + public virtual bool IsCustomerOfCustomerCareType(Customer customer, long? customerCareTypeValueListEntryOid) + { + bool val = true; + if (customerCareTypeValueListEntryOid.HasValue) + { + val = false; + foreach (var v in customer.ValueList) + { + if (v.Entry.Type == ValueListEntryType.CustomerCareType && v.Entry.Oid == customerCareTypeValueListEntryOid) + return true; + } + } + return val; + } + + public virtual bool CustomerBelongsToTeam(Customer customer, long? teamOid) + { + bool val = true; + if (teamOid.HasValue) + { + val = false; + foreach (var t2c in customer.Team2CustomerList) + { + if (t2c.TeamOid == teamOid) + return true; + } + } + return val; + } + } +} \ No newline at end of file diff --git a/Service/Reporting/Straffaelligenhilfe/VgaStatistic.cs b/Service/Reporting/Straffaelligenhilfe/VgaStatistic.cs new file mode 100644 index 000000000..7cbb1c1dd --- /dev/null +++ b/Service/Reporting/Straffaelligenhilfe/VgaStatistic.cs @@ -0,0 +1,93 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using BS.Shared; +using BS.Shared.Core; +using BS.Shared.DataContracts; +using BS.Shared.Services; +using BeWo.Data.Access; +using BeWo.Data.Entities; +using BeWo.Service.DCEntityMapper; +using BeWo.Service.Plugins; +using Castle.Components.DictionaryAdapter; +using NHibernate.Linq; + +namespace BeWo.Service.Reporting.Straffaelligenhilfe +{ + + public class VgaStatistic : StatisticBase + { + public int Anzahl01 { get; set; } // Anzahl der aus dem vorhergehenden Berichtszeitraum übernommenen offenen Aufträge + public int Anzahl02 { get; set; } // Anzahl der im aktuellen Berichtszeitraum erteilten Aufträge + public int Anzahl1 { get; set; } // Anzahl der insges. erteilten Aufträge (Summe Zeilen 0.1+ 0.2) + public int Anzahl1_1 { get; set; } // darunter mehrfach erteilte Aufträge zur selben Person und zum selben Aktenzeichen (Fallzahl v. Zeile 1) + public int Anzahl1_2 { get; set; } // darunter Amtshilfe für andere Bezirke in BW (Fallzahl v.Zeile 1) + public int Anzahl1_3 { get; set; } // darunter Amtshilfe für andere Bundesländer/ Ausland (Fallzahl v.Zeile 1) + public int Anzahl1_4 { get; set; } // Aufträge für männliche Klienten (Fallzahl v. Zeile 1) + public int Anzahl1_5 { get; set; } // Aufträge für weibliche Klienten (Fallzahl v. Zeile 1) + + public int Anzahl2 { get; set; } // Anzahl der (beauftragten) Arbeitsstunden (bezogen auf Zeile 1) in vollen Std. + + public int Anzahl3 { get; set; } // Anzahl aller erledigten Aufträge (incl. Abbrüche, teilweise erledigter Aufträge, gescheiterte Fälle) + public int Anzahl3_1 { get; set; } // davon Anzahl der teilweise erledigten Aufträge (Fallzahl v. Zeile 3) + public int Anzahl3_1_1 { get; set; } // Anzahl der Aufträge = Personen, bei denen die Auflagen teilweise nur durch Arbeitsleistungen erledigt wurden (Fallzahl v. Spalte D; Zeile 3.1.) + public int Anzahl3_2 { get; set; } // davon Anzahl der gescheiterten Fälle (negativer Fallstatus u. Abbrüche) (Fallzahl v. Zeile 3) + public int Anzahl3_3 { get; set; } // davon Anzahl der vollständig erledigten Aufträge (Fallzahl v. Zeile 3) + public int Anzahl3_3_1 { get; set; } // Anzahl der Aufträge = Personen, bei denen die Auflagen nur durch Arbeitsleistungen erfüllt wurden (Fallzahl v. Spalte D; Zeile 3.3.) + + public int Anzahl4 { get; set; } // Verlauf (der erledigten Aufträge gem. Zeile 3) + public int Anzahl4_1 { get; set; } // darunter Vermittlungen in externe Einsatzstellen (Fallzahl von Zeile 3) + public int Anzahl4_2 { get; set; } // darunter Vermittlungen in verschiedene Einsatzstellen (Fallzahl von Zeile 3) + public int Anzahl4_3 { get; set; } // darunter Vermittlungen in eigene Arbeitsgruppen (Fallzahl von Zeile 3) + public int Anzahl4_4 { get; set; } // darunter durch Ratenzahlungsvereinbarung (Fallzahlen v. Zeile 3) + public int Anzahl4_5 { get; set; } // darunter sonstige Erledigung (Umzug, Änderung des Beschlusses) (Fallzahl v. Zeile 3) + public int Anzahl4_6 { get; set; } // darunter Mischformen (Fallzahlen von Zeile 3) + public int Anzahl4_7 { get; set; } // Übergang in Aufsuchende Sozialarbeit + public int Anzahl4_8 { get; set; } // Übergang in Treuhänderische Geldverwaltung + + public int Anzahl5 { get; set; } // Anzahl der geleisteten Arbeitsstunden bezogen auf Zeile 3 (volle Std.) + + public decimal Betrag6 { get; set; } // Summe der nachgewiesenen Zahlungen in € (kein Anzahl, daher decimal) + + public int Anzahl7 { get; set; } // Anzahl der vermiedenen Hafttage (durch Arbeitsstd. und / oder Zahlungen) + public int Anzahl7_1 { get; set; } // Anzahl der vermiedenen Hafttage (nur durch Arbeitsstd.) + + public int Anzahl8 { get; set; } // Anzahl der Aufträge = Personen, bei denen die Vollstreckung der Freiheitsstrafe vollständig oder teilweise durch gemeinnützige Arbeit abgewendet wurde + + public int Anzahl9 { get; set; } // Gründe für Abbrüche / Scheitern + public int Anzahl9_1 { get; set; } // kein Kontakt + public int Anzahl9_2 { get; set; } // nicht angetreten + public int Anzahl9_3 { get; set; } // Abbruch der Tätigkeit + public int Anzahl9_4 { get; set; } // längerfristig arbeitsunfähig + public int Anzahl9_5 { get; set; } // Suchtproblematik + public int Anzahl9_6 { get; set; } // psychische Probleme + public int Anzahl9_7 { get; set; } // keine Motivation + public int Anzahl9_8 { get; set; } // in Haft + public int Anzahl9_9 { get; set; } // unbekannt + + public int Anzahl10 { get; set; } // Anzahl der offenen Aufträge (= Zeile 1 minus Zeile 3) + + public int Anzahl11 { get; set; } // Dauer der Beratung/ Betreuung (der erl. Aufträge) + public int Anzahl11_1 { get; set; } // bis 3 Monate + public int Anzahl11_2 { get; set; } // 3 bis 6 Monate + public int Anzahl11_3 { get; set; } // 6 bis 12 Monate + public int Anzahl11_4 { get; set; } // über 12 Monate + + public int Anzahl12 { get; set; } // Vermittlung aus Haft + + public override void ProcessCustomer(Customer customer) + { + var vgaList = GetVgaList(customer, VgaTypeEnum.Vga); + + + foreach (var item in vgaList) + { + //Zählen + } + } + + + } + +} \ No newline at end of file