LH Bad Kreuznach: FLS Soll/Ist Report zur Verfügung gestellt
This commit is contained in:
18
Report/DefaultReports/FLSSollIstReport.Designer.cs
generated
18
Report/DefaultReports/FLSSollIstReport.Designer.cs
generated
@@ -59,6 +59,7 @@ namespace BeWo.Report.DefaultReports
|
||||
this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell10 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell11 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.formattingRuleDiffNegativ = new DevExpress.XtraReports.UI.FormattingRule();
|
||||
this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
|
||||
this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
@@ -80,7 +81,6 @@ namespace BeWo.Report.DefaultReports
|
||||
this.fieldDifferenzWoche3 = new DevExpress.XtraReports.UI.CalculatedField();
|
||||
this.fieldDifferenzWoche4 = new DevExpress.XtraReports.UI.CalculatedField();
|
||||
this.fieldDifferenzGesamt = new DevExpress.XtraReports.UI.CalculatedField();
|
||||
this.formattingRuleDiffNegativ = new DevExpress.XtraReports.UI.FormattingRule();
|
||||
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable4)).BeginInit();
|
||||
@@ -120,7 +120,7 @@ namespace BeWo.Report.DefaultReports
|
||||
//
|
||||
this.xrTable1.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right)
|
||||
| DevExpress.XtraPrinting.BorderSide.Bottom)));
|
||||
this.xrTable1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 25F);
|
||||
this.xrTable1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 30F);
|
||||
this.xrTable1.Name = "xrTable1";
|
||||
this.xrTable1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
|
||||
this.xrTableRow1});
|
||||
@@ -389,6 +389,13 @@ namespace BeWo.Report.DefaultReports
|
||||
this.xrTableCell11.TextFormatString = "{0:0.00}";
|
||||
this.xrTableCell11.Weight = 0.6802721088435375D;
|
||||
//
|
||||
// formattingRuleDiffNegativ
|
||||
//
|
||||
this.formattingRuleDiffNegativ.Condition = "[DifferenzSollIstGesamt] < 0";
|
||||
this.formattingRuleDiffNegativ.DataMember = "RootObjectList";
|
||||
this.formattingRuleDiffNegativ.Formatting.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
|
||||
this.formattingRuleDiffNegativ.Name = "formattingRuleDiffNegativ";
|
||||
//
|
||||
// ReportHeader
|
||||
//
|
||||
this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
|
||||
@@ -577,13 +584,6 @@ namespace BeWo.Report.DefaultReports
|
||||
this.fieldDifferenzGesamt.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal;
|
||||
this.fieldDifferenzGesamt.Name = "fieldDifferenzGesamt";
|
||||
//
|
||||
// formattingRuleDiffNegativ
|
||||
//
|
||||
this.formattingRuleDiffNegativ.Condition = "[DifferenzSollIstGesamt] < 0";
|
||||
this.formattingRuleDiffNegativ.DataMember = "RootObjectList";
|
||||
this.formattingRuleDiffNegativ.Formatting.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
|
||||
this.formattingRuleDiffNegativ.Name = "formattingRuleDiffNegativ";
|
||||
//
|
||||
// bindingSource1
|
||||
//
|
||||
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.FLSSollIstReportRO);
|
||||
|
||||
@@ -63,7 +63,6 @@ namespace BeWo.Report.DefaultReports
|
||||
this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell15 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.GroupHeader1 = new DevExpress.XtraReports.UI.GroupHeaderBand();
|
||||
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
|
||||
this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
@@ -84,6 +83,7 @@ namespace BeWo.Report.DefaultReports
|
||||
this.fieldDifferenzWoche2 = new DevExpress.XtraReports.UI.CalculatedField();
|
||||
this.fieldDifferenzWoche3 = new DevExpress.XtraReports.UI.CalculatedField();
|
||||
this.fieldDifferenzWoche4 = new DevExpress.XtraReports.UI.CalculatedField();
|
||||
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTableData)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTableHeader)).BeginInit();
|
||||
@@ -122,7 +122,7 @@ namespace BeWo.Report.DefaultReports
|
||||
//
|
||||
this.xrTable1.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right)
|
||||
| DevExpress.XtraPrinting.BorderSide.Bottom)));
|
||||
this.xrTable1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 25F);
|
||||
this.xrTable1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 35F);
|
||||
this.xrTable1.Name = "xrTable1";
|
||||
this.xrTable1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
|
||||
this.xrTableRow1});
|
||||
@@ -137,6 +137,7 @@ namespace BeWo.Report.DefaultReports
|
||||
this.Detail1.Font = new DevExpress.Drawing.DXFont("Arial", 9.75F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
|
||||
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
|
||||
this.Detail1.HeightF = 69.66665F;
|
||||
this.Detail1.KeepTogetherWithDetailReports = true;
|
||||
this.Detail1.Name = "Detail1";
|
||||
this.Detail1.StylePriority.UseFont = false;
|
||||
//
|
||||
@@ -451,10 +452,6 @@ namespace BeWo.Report.DefaultReports
|
||||
this.GroupHeader1.Level = 1;
|
||||
this.GroupHeader1.Name = "GroupHeader1";
|
||||
//
|
||||
// bindingSource1
|
||||
//
|
||||
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.FLSSollIstReportRO);
|
||||
//
|
||||
// ReportHeader
|
||||
//
|
||||
this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
|
||||
@@ -636,6 +633,10 @@ namespace BeWo.Report.DefaultReports
|
||||
this.fieldDifferenzWoche4.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal;
|
||||
this.fieldDifferenzWoche4.Name = "fieldDifferenzWoche4";
|
||||
//
|
||||
// bindingSource1
|
||||
//
|
||||
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.FLSSollIstReportRO);
|
||||
//
|
||||
// FLSSollIstWeeklyReport
|
||||
//
|
||||
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
|
||||
|
||||
@@ -26,6 +26,8 @@ namespace BeWo.Report.ReportObjects
|
||||
|
||||
public long ObjectOid { get; set; }
|
||||
|
||||
public TableID ObjectTid { get; set; }
|
||||
|
||||
public List<FLSSollIstReportGroupRO> Groups { get; set; } = new List<FLSSollIstReportGroupRO>();
|
||||
public decimal SollGesamt { get; set; }
|
||||
public decimal IstGesamt { get; set; }
|
||||
@@ -40,6 +42,7 @@ namespace BeWo.Report.ReportObjects
|
||||
public String CustomValue4 { get; set; }
|
||||
|
||||
public String CustomValue5 { get; set; }
|
||||
public List<ServiceRecordFLSOverviewDC> ServiceRecords { get; internal set; } = new List<ServiceRecordFLSOverviewDC>();
|
||||
}
|
||||
|
||||
public class FLSSollIstReportGroupRO
|
||||
@@ -48,6 +51,10 @@ namespace BeWo.Report.ReportObjects
|
||||
|
||||
public long ObjectOid { get; set; }
|
||||
|
||||
public TableID ObjectTid { get; set; }
|
||||
|
||||
public List<SupportConceptCostBearerRelDC> CostBearer2SupportConceptList { get; set; } = new List<SupportConceptCostBearerRelDC>();
|
||||
|
||||
public List<FLSSollIstWochenSummen> WochenSummen { get; set; } = new List<FLSSollIstWochenSummen>();
|
||||
|
||||
public decimal SollGesamt { get; set; }
|
||||
@@ -63,6 +70,7 @@ namespace BeWo.Report.ReportObjects
|
||||
public String CustomValue4 { get; set; }
|
||||
|
||||
public String CustomValue5 { get; set; }
|
||||
public List<ServiceRecordFLSOverviewDC> ServiceRecords { get; internal set; } = new List<ServiceRecordFLSOverviewDC>();
|
||||
}
|
||||
|
||||
public class FLSSollIstWochenSummen
|
||||
@@ -104,6 +112,7 @@ namespace BeWo.Report.ReportObjects
|
||||
}
|
||||
}
|
||||
|
||||
public List<ServiceRecordFLSOverviewDC> ServiceRecords { get; internal set; } = new List<ServiceRecordFLSOverviewDC>();
|
||||
}
|
||||
|
||||
public static FLSSollIstReportRO Create(List<FLSAnalysisRootDC> dcList, FLSAnalysisConfigDC config)
|
||||
@@ -118,21 +127,45 @@ namespace BeWo.Report.ReportObjects
|
||||
var rootRo = new FLSSollIstRootRO();
|
||||
rootRo.Name = root.DisplayName;
|
||||
rootRo.SollGesamt = 0; //root.SollFLSTotal ?;
|
||||
|
||||
if (root.Employee != null)
|
||||
{
|
||||
rootRo.ObjectOid = root.Employee.EmployeeOid;
|
||||
rootRo.ObjectTid = TableID.Employee;
|
||||
}
|
||||
else if (root.Customer != null)
|
||||
{
|
||||
rootRo.ObjectOid = root.Customer.CustomerOid;
|
||||
rootRo.ObjectTid = TableID.Customer;
|
||||
}
|
||||
foreach (var item in root.Groups.OrderBy(a => a.DisplayName))
|
||||
{
|
||||
var grpRo = new FLSSollIstReportGroupRO();
|
||||
grpRo.Name = item.DisplayName;
|
||||
grpRo.WochenSummen = ErstelleWochensummen(config.StartDate, config.EndDate, null);
|
||||
|
||||
if (item.Employee != null)
|
||||
{
|
||||
grpRo.ObjectOid = item.Employee.EmployeeOid;
|
||||
grpRo.ObjectTid = TableID.Employee;
|
||||
}
|
||||
else if (item.Customer != null)
|
||||
{
|
||||
grpRo.ObjectOid = item.Customer.CustomerOid;
|
||||
grpRo.ObjectTid = TableID.Customer;
|
||||
}
|
||||
foreach (var sc in item.SupportConcepts)
|
||||
{
|
||||
grpRo.CostBearer2SupportConceptList.Add(sc.SupportConcept2CostBearer);
|
||||
|
||||
foreach (var sr in sc.ServiceRecords)
|
||||
{
|
||||
rootRo.ServiceRecords.Add(sr);
|
||||
grpRo.ServiceRecords.Add(sr);
|
||||
|
||||
var ws = grpRo.WochenSummen.FirstOrDefault(w => w.WocheStart <= sr.Start && sr.Start < w.WocheEnde.AddDays(1));
|
||||
|
||||
if (ws != null)
|
||||
{
|
||||
ws.ServiceRecords.Add(sr);
|
||||
if (!ws.IstStunden.HasValue)
|
||||
{
|
||||
ws.IstStunden = 0;
|
||||
|
||||
@@ -8,14 +8,112 @@ using BeWo.Data.Entities;
|
||||
using BeWo.Report;
|
||||
using BeWo.Report.DefaultReports;
|
||||
using BeWo.Report.ReportObjects;
|
||||
using BeWo.Service.Plugins;
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using DevExpress.XtraReports.UI;
|
||||
|
||||
namespace LebenshilfeBadKreuznach
|
||||
{
|
||||
public class CustomReportCreator : DefaultReportCreator
|
||||
{
|
||||
public override XtraReport CreateQueryReport(long queryOid, string queryReportId)
|
||||
{
|
||||
if (queryOid == 1000)
|
||||
{
|
||||
return CreateStundenkontrolleAbwNachWochen(CreateQueryRO(queryOid, queryReportId));
|
||||
}
|
||||
if (queryOid == 1100)
|
||||
{
|
||||
return CreateStundenkontrolleAbwGesamt(CreateQueryRO(queryOid, queryReportId));
|
||||
}
|
||||
|
||||
return base.CreateQueryReport(queryOid, queryReportId);
|
||||
}
|
||||
|
||||
private XtraReport CreateStundenkontrolleAbwNachWochen(QueryRO qro)
|
||||
{
|
||||
var ro = CreateFLSSollIstReportRO(qro);
|
||||
|
||||
if (ro != null)
|
||||
{
|
||||
var druck = new FLSSollIstWeeklyReport();
|
||||
druck.SetReportDataSource(ro);
|
||||
|
||||
return druck;
|
||||
}
|
||||
return new XtraReport();
|
||||
}
|
||||
|
||||
private XtraReport CreateStundenkontrolleAbwGesamt(QueryRO qro)
|
||||
{
|
||||
var ro = CreateFLSSollIstReportRO(qro);
|
||||
|
||||
if (ro != null)
|
||||
{
|
||||
var druck = new LebenshilfeBadKreuznach.FLSSollIstReport();
|
||||
druck.SetReportDataSource(ro);
|
||||
|
||||
return druck;
|
||||
}
|
||||
return new XtraReport();
|
||||
}
|
||||
|
||||
private FLSSollIstReportRO CreateFLSSollIstReportRO(QueryRO qro)
|
||||
{
|
||||
|
||||
if (qro.Rows.Count > 0)
|
||||
{
|
||||
DateTime start = DateTime.Now;
|
||||
start = new DateTime(start.Year, start.Month, 1);
|
||||
|
||||
DateTime dt = DateTime.Now;
|
||||
if (DateTime.TryParse(qro.Rows[0].Field1.ToString(), out dt) && dt > DateTime.MinValue)
|
||||
{
|
||||
start = dt;
|
||||
|
||||
}
|
||||
|
||||
DateTime ende = start.AddMonths(1).AddTicks(-1);
|
||||
|
||||
if (DateTime.TryParse(qro.Rows[0].Field2.ToString(), out dt) && dt < DateTime.MaxValue.Date)
|
||||
{
|
||||
ende = dt.AddTicks(-1);
|
||||
|
||||
}
|
||||
|
||||
var config = new FLSAnalysisConfigDC();
|
||||
config.StartDate = start;
|
||||
config.EndDate = ende;
|
||||
config.FetchApprovedFLS = true;
|
||||
config.ReportType = FLSReportType.Customer;
|
||||
|
||||
if (qro.Rows[0].Field3 != null && Int64.TryParse(qro.Rows[0].Field3.ToString(), out var catOid))
|
||||
{
|
||||
if (catOid > 0)
|
||||
{
|
||||
config.ServiceDescriptionOids = DAOFactory.SearchDAO.FindServiceDescriptionForCategory(catOid).Select(d => d.Oid.Value).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
if (qro.Rows[0].Field4 != null && Int64.TryParse(qro.Rows[0].Field4.ToString(), out var teamOid))
|
||||
{
|
||||
if (teamOid > 0)
|
||||
{
|
||||
config.TeamOids = new List<long> { teamOid };
|
||||
}
|
||||
}
|
||||
|
||||
var plugin = PluginLoader.FindClass<StundenuebersichtAuswertung>();
|
||||
|
||||
var reportDcList = plugin.GetCustomerFLSAnalysis(config);
|
||||
|
||||
return FLSSollIstReportRO.Create(reportDcList, config);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public override XtraReport CreateServiceOverviewAllCustomersReport(int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay)
|
||||
{
|
||||
//List<ServicesOverviewRO> lROs = ServicesOverviewRO.Create(month, year, orgaOid, empOid, startDay, endDay);
|
||||
|
||||
@@ -60,6 +60,12 @@
|
||||
<Compile Include="CustomReportCreator.cs" />
|
||||
<Compile Include="Export\CustomDataExporter.cs" />
|
||||
<Compile Include="Export\SageExporter.cs" />
|
||||
<Compile Include="FLSSollIstReport.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FLSSollIstReport.Designer.cs">
|
||||
<DependentUpon>FLSSollIstReport.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Invoicing\CustomCalculations.cs" />
|
||||
<Compile Include="Invoicing\CustomInvoiceCreation.cs" />
|
||||
<Compile Include="Invoicing\CustomInvoiceFactory.cs" />
|
||||
@@ -104,6 +110,10 @@
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="FLSSollIstReport.resx">
|
||||
<DependentUpon>FLSSollIstReport.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\licenses.licx" />
|
||||
<EmbeddedResource Include="Quittierungsbeleg_old.resx">
|
||||
<DependentUpon>Quittierungsbeleg_old.cs</DependentUpon>
|
||||
|
||||
Reference in New Issue
Block a user