From c4fc90976fe31d95db8003e2004eecdd159546dc Mon Sep 17 00:00:00 2001 From: Marcel Hirschle Date: Tue, 7 Nov 2023 12:53:34 +0100 Subject: [PATCH] MH: LH Coburg Ministatistik umsortieren --- .../LebenshilfeCoburg.csproj | 1 + .../CustomServiceRecordStatisticFactory.cs | 21 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 ReportImp/LebenshilfeCoburg/Service/CustomServiceRecordStatisticFactory.cs diff --git a/ReportImp/LebenshilfeCoburg/LebenshilfeCoburg.csproj b/ReportImp/LebenshilfeCoburg/LebenshilfeCoburg.csproj index 8ca759570..243fe8ab9 100644 --- a/ReportImp/LebenshilfeCoburg/LebenshilfeCoburg.csproj +++ b/ReportImp/LebenshilfeCoburg/LebenshilfeCoburg.csproj @@ -132,6 +132,7 @@ RosterReport.cs + Component diff --git a/ReportImp/LebenshilfeCoburg/Service/CustomServiceRecordStatisticFactory.cs b/ReportImp/LebenshilfeCoburg/Service/CustomServiceRecordStatisticFactory.cs new file mode 100644 index 000000000..9a4ec5105 --- /dev/null +++ b/ReportImp/LebenshilfeCoburg/Service/CustomServiceRecordStatisticFactory.cs @@ -0,0 +1,21 @@ +using BeWo.Service.Plugins; +using BS.Shared.DataContracts; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace LebenshilfeCoburg.Service +{ + public class CustomServiceRecordStatisticFactory : ServiceRecordStatisticFactory + { + public override SupportConceptStatisticsDC CreateSupportConceptStatisticsImpl(long costBearer2SupportConceptOid, DateTime statisticsDate, long? ignoreServiceRecordOid) + { + var stat = base.CreateSupportConceptStatisticsImpl(costBearer2SupportConceptOid, statisticsDate, ignoreServiceRecordOid); + stat.PeriodStatistics = stat.PeriodStatistics.OrderByDescending(p => p.SupportConceptApprovalPeriod.StartDate).ToList(); + + return stat; + } + } +}