MH: ValidationMessageReport

This commit is contained in:
2023-08-21 18:34:18 +02:00
parent 35e98321d0
commit f68325c22b
12 changed files with 646 additions and 3 deletions

View File

@@ -5474,5 +5474,16 @@ namespace BeWo.Data.Access
return string.Empty;
}
public List<ValidationMessage> GetValidationMessagesForMonth(DateTime startDate, DateTime endDate)
{
var criteria = CreateCriteria<ValidationMessage>()
.Add(Restrictions.Gt(ValidationMessage.PropertyName_InsTs, startDate))
.Add(Restrictions.Lt(ValidationMessage.PropertyName_InsTs, endDate));
var list = criteria.List<ValidationMessage>();
return list.ToList();
}
}
}

View File

@@ -180,6 +180,9 @@ namespace Host
case ReportTypes.VertretungsPlanung:
report = CreateVertretungsPlanungReport();
break;
case ReportTypes.ValidationMessageReport:
report = CreateValidationMessageListReport();
break;
default:
report = CreateQueryReport();
break;
@@ -915,8 +918,14 @@ namespace Host
return reportCreator.CreateVertretungsPlanungReport(start, ansicht);
}
private XtraReport CreateValidationMessageListReport()
{
DateTime start = DateTime.Now.Date;
DateTime end = start.AddMonths(1).AddTicks(-1);
return reportCreator.CreateValidationMessageListReport(start, end);
}
private AbstractReportCreator GetReportCreator()
{

View File

@@ -102,5 +102,7 @@ namespace BeWo.Report
public abstract XtraReport CreateRatingReport(long ratingOid, long supportConceptOid);
public abstract XtraReport CreateVertretungsPlanungReport(DateTime start, int ansicht);
public abstract XtraReport CreateValidationMessageListReport(DateTime startDate, DateTime endDate);
}
}

View File

@@ -1186,5 +1186,14 @@ namespace BeWo.Report
return null;
}
}
public override XtraReport CreateValidationMessageListReport(DateTime startDate, DateTime endDate)
{
IBeWoReport<ValidationMessageListRO> report = FindReportImp<ValidationMessageListRO>();
report.SetReportDataSource(ValidationMessageListRO.Create(startDate, endDate, DAOFactory.SearchDAO.GetValidationMessagesForMonth(startDate, endDate).ToList()));
return report as XtraReport;
}
}
}

View File

@@ -0,0 +1,333 @@
namespace BeWo.Report.DefaultReports
{
partial class ValidationMessagesReport
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Designer generated code
#endregion
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand();
this.detailBand1 = new DevExpress.XtraReports.UI.DetailBand();
this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel();
this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand();
this.Detail = new DevExpress.XtraReports.UI.DetailBand();
this.objectDataSource1 = new DevExpress.DataAccess.ObjectBinding.ObjectDataSource(this.components);
this.xrTable1 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow1 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell3 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell4 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTable2 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow2 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell9 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell10 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell11 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell12 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell13 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell15 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell16 = new DevExpress.XtraReports.UI.XRTableCell();
((System.ComponentModel.ISupportInitialize)(this.objectDataSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
//
// topMarginBand1
//
this.topMarginBand1.HeightF = 10F;
this.topMarginBand1.Name = "topMarginBand1";
//
// detailBand1
//
this.detailBand1.Expanded = false;
this.detailBand1.HeightF = 0F;
this.detailBand1.Name = "detailBand1";
//
// bottomMarginBand1
//
this.bottomMarginBand1.HeightF = 10F;
this.bottomMarginBand1.Name = "bottomMarginBand1";
//
// ReportHeader
//
this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLabel2,
this.xrLabel1,
this.xrTable1});
this.ReportHeader.HeightF = 131.0834F;
this.ReportHeader.Name = "ReportHeader";
//
// xrLabel1
//
this.xrLabel1.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ReportStartDate")});
this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(206.6667F, 38.49999F);
this.xrLabel1.Name = "xrLabel1";
this.xrLabel1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel1.SizeF = new System.Drawing.SizeF(100F, 23F);
this.xrLabel1.Text = "xrLabel1";
//
// xrLabel2
//
this.xrLabel2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ReportEndDate")});
this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(497.2917F, 38.49999F);
this.xrLabel2.Name = "xrLabel2";
this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel2.SizeF = new System.Drawing.SizeF(100F, 23F);
this.xrLabel2.Text = "xrLabel2";
//
// DetailReport
//
this.DetailReport.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
this.Detail});
this.DetailReport.DataMember = "ValidationMessagesForMonth";
this.DetailReport.DataSource = this.objectDataSource1;
this.DetailReport.Level = 0;
this.DetailReport.Name = "DetailReport";
//
// Detail
//
this.Detail.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrTable2});
this.Detail.HeightF = 100F;
this.Detail.Name = "Detail";
//
// objectDataSource1
//
this.objectDataSource1.DataSource = typeof(BeWo.Report.ReportObjects.ValidationMessageListRO);
this.objectDataSource1.Name = "objectDataSource1";
//
// xrTable1
//
this.xrTable1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 106.0834F);
this.xrTable1.Name = "xrTable1";
this.xrTable1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow1});
this.xrTable1.SizeF = new System.Drawing.SizeF(1149F, 25.00001F);
//
// xrTableRow1
//
this.xrTableRow1.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell1,
this.xrTableCell2,
this.xrTableCell3,
this.xrTableCell4,
this.xrTableCell5,
this.xrTableCell6,
this.xrTableCell7,
this.xrTableCell8});
this.xrTableRow1.Name = "xrTableRow1";
this.xrTableRow1.Weight = 1D;
//
// xrTableCell1
//
this.xrTableCell1.Name = "xrTableCell1";
this.xrTableCell1.Text = "Klient*in";
this.xrTableCell1.Weight = 1D;
//
// xrTableCell2
//
this.xrTableCell2.Name = "xrTableCell2";
this.xrTableCell2.Text = "Startzeit";
this.xrTableCell2.Weight = 1D;
//
// xrTableCell3
//
this.xrTableCell3.Name = "xrTableCell3";
this.xrTableCell3.Text = "Endzeit";
this.xrTableCell3.Weight = 1D;
//
// xrTableCell4
//
this.xrTableCell4.Name = "xrTableCell4";
this.xrTableCell4.Text = "Zeitstempel";
this.xrTableCell4.Weight = 1D;
//
// xrTableCell5
//
this.xrTableCell5.Name = "xrTableCell5";
this.xrTableCell5.Text = "Angelegt von";
this.xrTableCell5.Weight = 1D;
//
// xrTableCell6
//
this.xrTableCell6.Name = "xrTableCell6";
this.xrTableCell6.Text = "Angelegt für";
this.xrTableCell6.Weight = 1D;
//
// xrTableCell7
//
this.xrTableCell7.Name = "xrTableCell7";
this.xrTableCell7.Text = "Logkategorie";
this.xrTableCell7.Weight = 2.231176238212619D;
//
// xrTableCell8
//
this.xrTableCell8.Name = "xrTableCell8";
this.xrTableCell8.Text = "Lognachricht";
this.xrTableCell8.Weight = 4.2278599898788247D;
//
// xrTable2
//
this.xrTable2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrTable2.Name = "xrTable2";
this.xrTable2.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow2});
this.xrTable2.SizeF = new System.Drawing.SizeF(1149F, 25.00001F);
//
// xrTableRow2
//
this.xrTableRow2.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell9,
this.xrTableCell10,
this.xrTableCell11,
this.xrTableCell12,
this.xrTableCell13,
this.xrTableCell14,
this.xrTableCell15,
this.xrTableCell16});
this.xrTableRow2.Name = "xrTableRow2";
this.xrTableRow2.Weight = 1D;
//
// xrTableCell9
//
this.xrTableCell9.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ValidationMessagesForMonth.Customer")});
this.xrTableCell9.Name = "xrTableCell9";
this.xrTableCell9.Weight = 1D;
//
// xrTableCell10
//
this.xrTableCell10.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ValidationMessagesForMonth.ServiceRecordStart", "{0:dd.MM.yyyy}")});
this.xrTableCell10.Name = "xrTableCell10";
this.xrTableCell10.Weight = 1D;
//
// xrTableCell11
//
this.xrTableCell11.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ValidationMessagesForMonth.ServiceRecordEnd", "{0:dd.MM.yyyy}")});
this.xrTableCell11.Name = "xrTableCell11";
this.xrTableCell11.Weight = 1D;
//
// xrTableCell12
//
this.xrTableCell12.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ValidationMessagesForMonth.TimeStamp", "{0:dd.MM.yyyy}")});
this.xrTableCell12.Name = "xrTableCell12";
this.xrTableCell12.Weight = 1D;
//
// xrTableCell13
//
this.xrTableCell13.Name = "xrTableCell13";
this.xrTableCell13.Text = "[User.Employee.LastName], [User.Employee.FirstName]";
this.xrTableCell13.Weight = 1D;
//
// xrTableCell14
//
this.xrTableCell14.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ValidationMessagesForMonth.Employee.LastNameFirstName")});
this.xrTableCell14.Name = "xrTableCell14";
this.xrTableCell14.Weight = 1D;
//
// xrTableCell15
//
this.xrTableCell15.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ValidationMessagesForMonth.ValidationResult")});
this.xrTableCell15.Name = "xrTableCell15";
this.xrTableCell15.Weight = 2.231176238212619D;
//
// xrTableCell16
//
this.xrTableCell16.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ValidationMessagesForMonth.Message")});
this.xrTableCell16.Name = "xrTableCell16";
this.xrTableCell16.Weight = 4.2278599898788247D;
//
// ValidationMessagesReport
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
this.topMarginBand1,
this.detailBand1,
this.bottomMarginBand1,
this.ReportHeader,
this.DetailReport});
this.ComponentStorage.AddRange(new System.ComponentModel.IComponent[] {
this.objectDataSource1});
this.DataSource = this.objectDataSource1;
this.Margins = new System.Drawing.Printing.Margins(10, 10, 10, 10);
this.PageHeight = 827;
this.PageWidth = 1169;
this.PaperKind = System.Drawing.Printing.PaperKind.A4Rotated;
this.Version = "17.1";
((System.ComponentModel.ISupportInitialize)(this.objectDataSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
}
private DevExpress.XtraReports.UI.TopMarginBand topMarginBand1;
private DevExpress.XtraReports.UI.DetailBand detailBand1;
private DevExpress.XtraReports.UI.BottomMarginBand bottomMarginBand1;
private DevExpress.XtraReports.UI.ReportHeaderBand ReportHeader;
private DevExpress.DataAccess.ObjectBinding.ObjectDataSource objectDataSource1;
private DevExpress.XtraReports.UI.XRLabel xrLabel2;
private DevExpress.XtraReports.UI.XRLabel xrLabel1;
private DevExpress.XtraReports.UI.DetailReportBand DetailReport;
private DevExpress.XtraReports.UI.DetailBand Detail;
private DevExpress.XtraReports.UI.XRTable xrTable1;
private DevExpress.XtraReports.UI.XRTableRow xrTableRow1;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell1;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell2;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell3;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell4;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell5;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell6;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell7;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell8;
private DevExpress.XtraReports.UI.XRTable xrTable2;
private DevExpress.XtraReports.UI.XRTableRow xrTableRow2;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell9;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell10;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell11;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell12;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell13;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell14;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell15;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell16;
}
}

View File

@@ -0,0 +1,18 @@
using System.Linq;
using BeWo.Report.ReportObjects;
namespace BeWo.Report.DefaultReports
{
public partial class ValidationMessagesReport : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<ValidationMessageListRO>
{
public ValidationMessagesReport()
{
InitializeComponent();
}
public void SetReportDataSource(ValidationMessageListRO pRO)
{
objectDataSource1.DataSource = pRO;
}
}
}

View File

@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="objectDataSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@@ -154,6 +154,12 @@
<Compile Include="DefaultReports\RosterIstReport.designer.cs">
<DependentUpon>RosterIstReport.cs</DependentUpon>
</Compile>
<Compile Include="DefaultReports\ValidationMessagesReport.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="DefaultReports\ValidationMessagesReport.Designer.cs">
<DependentUpon>ValidationMessagesReport.cs</DependentUpon>
</Compile>
<Compile Include="DefaultReports\VorlageReport.cs">
<SubType>Component</SubType>
</Compile>
@@ -468,6 +474,7 @@
<Compile Include="ReportObjects\ServicesOverviewRO.cs" />
<Compile Include="ReportObjects\SettlementRO.cs" />
<Compile Include="ReportObjects\BewertungsstatistikRO.cs" />
<Compile Include="ReportObjects\ValidationMessageListRO.cs" />
<Compile Include="ReportObjects\VorlageRO.cs" />
</ItemGroup>
<ItemGroup>
@@ -493,6 +500,10 @@
<EmbeddedResource Include="DefaultReports\RosterIstReport.resx">
<DependentUpon>RosterIstReport.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DefaultReports\ValidationMessagesReport.resx">
<DependentUpon>ValidationMessagesReport.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="DefaultReports\VorlageReport.resx">
<DependentUpon>VorlageReport.cs</DependentUpon>
<SubType>Designer</SubType>

View File

@@ -0,0 +1,85 @@
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.DCEntityMapper;
using BS.Shared.DataContracts;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeWo.Report.ReportObjects
{
public class ValidationMessageListRO : AbstractBeWoReportObject<ValidationMessageListRO>
{
public List<ValidationMessageRO> ValidationMessagesForMonth { get; set; }
public DateTime ReportStartDate { get; set; }
public DateTime ReportEndDate { get; set; }
public static ValidationMessageListRO Create(DateTime reportStart, DateTime reportEnd, List<ValidationMessage> validationMessagesForMonth)
{
var ro = new ValidationMessageListRO();
ro.ValidationMessagesForMonth = new List<ValidationMessageRO>();
ro.ReportStartDate = reportStart;
ro.ReportEndDate = reportEnd;
foreach (var msg in validationMessagesForMonth)
ro.ValidationMessagesForMonth.Add(CreateMessageRO(msg));
return ro;
}
public static ValidationMessageRO CreateMessageRO(ValidationMessage message)
{
var ro = new ValidationMessageRO();
ro.TimeStamp = message.InsTs;
ro.Message = message.Message;
ro.Customer = message.CustomerName;
ro.ServiceRecordStart = message.ServiceRecordStart;
ro.ServiceRecordEnd = message.ServiceRecordEnd;
if (message.UserOid.HasValue)
ro.User = MapperFactory.UserDC_User.MapToNewDC(DAOFactory.GenericDAO.GetByID<ApplicationUser>(message.UserOid.Value));
if (message.EmployeeOid.HasValue)
ro.Employee = MapperFactory.EmployeeDC_Employee.MapToNewDC(DAOFactory.GenericDAO.GetByID<Employee>(message.EmployeeOid.Value));
if (message.SupportConceptOid.HasValue)
ro.SupportConcept = MapperFactory.SupportConceptDC_SupportConcept.MapToNewDC(DAOFactory.GenericDAO.GetByID<SupportConcept>(message.SupportConceptOid.Value));
switch (message.ServiceRecordValidationResult)
{
case 0: ro.ValidationResult = "Überschneidung zweier Leistungsempfangenden"; break;
case 1: ro.ValidationResult = "Terminüberschneidung zweier Mitarbeitenden"; break;
case 2: ro.ValidationResult = "Termin außerhalb des Hilfeplanzeitraums"; break;
case 3: ro.ValidationResult = "Überschreitung von bewilligten Stunden"; break;
case 4: ro.ValidationResult = "Überschreitung des zugelassenen Bearbeitungszeitraums"; break;
case 5: ro.ValidationResult = "Fehler beim Speichern"; break;
case 6: ro.ValidationResult = "Dokumentieren nach Erstellung der Spitzabrechnung"; break;
case 7: ro.ValidationResult = "Dokumentieren nach ablauf der Frist"; break;
case 8: ro.ValidationResult = ""; break;
case 9: ro.ValidationResult = "Unterschrift existiert bereits"; break;
}
return ro;
}
public class ValidationMessageRO
{
public DateTime? TimeStamp { get; set; }
public string Message { get; set; }
public UserDC User { get; set; }
public EmployeeDC Employee { get; set; }
public string Customer { get; set; }
public SupportConceptDC SupportConcept { get; set; }
public DateTime? ServiceRecordStart { get; set; }
public DateTime? ServiceRecordEnd { get; set; }
public string ValidationResult { get; set; }
}
}
}

View File

@@ -32,8 +32,10 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="DevExpress.Data.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.DataAccess.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.Printing.v17.1.Core, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Utils.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Xpo.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.XtraPrinting.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraReports.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="System" />

View File

@@ -1,11 +1,16 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Report;
using BeWo.Report.DefaultReports;
using BeWo.Report.ReportObjects;
using BeWo.Service.DCEntityMapper;
using BeWo.Service.ServiceImplementations;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using DevExpress.XtraReports.UI;
@@ -160,6 +165,41 @@ namespace AWOMuensterlandRecklinghausen
return allReports as XtraReport;
}
public override XtraReport CreateQueryReport(long queryOid, string queryReportId)
{
if (queryOid == 1001)
return CreateValidationMessageReport(queryOid, queryReportId);
return base.CreateQueryReport(queryOid, queryReportId);
}
private XtraReport CreateValidationMessageReport(long queryOid, string queryReportId)
{
var query = DAOFactory.GenericDAO.LoadByID<Query>(queryOid);
if (query == null)
return new XtraReport();
var path = Path.Combine(TempPath, queryReportId + ".xml");
var table = Utils.XMLDeserialize<DataTable>(path);
var qro = QueryRO.Create(query, table);
if (qro.Rows.Count > 0)
{
DateTime start = DateTime.Parse(qro.Rows[0].Field1.ToString());
DateTime end = DateTime.Parse(qro.Rows[0].Field2.ToString()); ;
var ro = ValidationMessageListRO.Create(start, end, DAOFactory.SearchDAO.GetValidationMessagesForMonth(start, end).ToList());
var druck = new ValidationMessagesReport();
druck.SetReportDataSource(ro);
return druck;
}
return new XtraReport();
}
//public override XtraReport CreateServiceOverviewReportForCustomers(IList<long> customerOids, int month, int year, long? orgaOid, long? empOid, long? serviceCategoryOid, int startDay, int endDay, bool nurFehlende)
//{
// var roList = new List<ServicesOverviewRO>();

View File

@@ -38,7 +38,7 @@
HilfeplanStatistik,
RatingReport,
KilometerAuswertung,
VertretungsPlanung
VertretungsPlanung,
ValidationMessageReport
}
}