Files
BeWoPlaner/ReportImp/PerspektivenEV/Service/CustomServiceRecordStatisticFactory.cs

25 lines
1.1 KiB
C#

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 PerspektivenEV.Service
{
public class CustomServiceRecordStatisticFactory : ServiceRecordStatisticFactory
{
public override SupportConceptStatisticsDC CreateSupportConceptStatisticsImpl(long costBearer2SupportConceptOid, DateTime statisticsDate, long? ignoreServiceRecordOid)
{
// Ausblenden der Fahrtzeit und Gesondert vorgehaltenen Flächen
var stat = base.CreateSupportConceptStatisticsImpl(costBearer2SupportConceptOid, statisticsDate, ignoreServiceRecordOid);
stat.PeriodStatistics = stat.PeriodStatistics.Where(p => p.SupportConceptApprovalPeriod.ServiceCategory == null ||
(p.SupportConceptApprovalPeriod.ServiceCategory != null && !p.SupportConceptApprovalPeriod.ServiceCategory.Abbreviation.Contains("GVF")
&& !p.SupportConceptApprovalPeriod.ServiceCategory.Abbreviation.Contains("AFZ"))).ToList();
return stat;
}
}
}