BAWAachen Diagnosen in jahresbericht
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using BeWo.Service.Reporting;
|
||||
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;
|
||||
|
||||
namespace BetreuungsserviceFuerAlltagUndWohnen.Reporting
|
||||
{
|
||||
public class CustomAnnualReportFactory : AnnualReportFactory
|
||||
{
|
||||
private List<JahresBerichtBase> jahresberichtElemente = new List<JahresBerichtBase>();
|
||||
|
||||
public override List<AnnualReportDC> CreateAnnualReport(CostBearer cb, long? teamOid, long? customerCareTypeValueListEntryOid, DateTime reportStartDate,
|
||||
DateTime reportEndDate)
|
||||
{
|
||||
jahresberichtElemente.Add(new JahresBerichtNachDiagnose("Auswertung nach Diagnosen", reportEndDate.AddDays(-1)));
|
||||
|
||||
|
||||
var list = base.CreateAnnualReport(cb, teamOid, customerCareTypeValueListEntryOid, reportStartDate, reportEndDate);
|
||||
|
||||
foreach (var annualReportDc in list)
|
||||
{
|
||||
if (annualReportDc.Name == "Anzahl der Betreuungen")
|
||||
{
|
||||
var datalist = annualReportDc.Data;
|
||||
|
||||
annualReportDc.Data = new List<AnnualReportDataDC>();
|
||||
|
||||
foreach (var annualReportDataDc in datalist)
|
||||
{
|
||||
if (annualReportDataDc.Name == String.Format("{0:yyyy}", reportStartDate))
|
||||
{
|
||||
annualReportDc.Data.Add(annualReportDataDc);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (annualReportDc.Name == "Anzahl der Zugänge")
|
||||
{
|
||||
var datalist = annualReportDc.Data;
|
||||
|
||||
annualReportDc.Data = new List<AnnualReportDataDC>();
|
||||
|
||||
foreach (var annualReportDataDc in datalist)
|
||||
{
|
||||
if (annualReportDataDc.Name == String.Format("{0:yyyy}", reportStartDate))
|
||||
{
|
||||
annualReportDc.Data.Add(annualReportDataDc);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (var jb in jahresberichtElemente)
|
||||
{
|
||||
list.Add(jb.CreateAuswertung());
|
||||
}
|
||||
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public override void ProcessCustomer(Customer customer, List<CostBearer2SupportConcept> allCostBearer2SupportConcepts)
|
||||
{
|
||||
if (LiegtImStichtagByCustomerOid.ContainsKey(customer.Oid.Value))
|
||||
{
|
||||
foreach (var jb in jahresberichtElemente)
|
||||
{
|
||||
jb.ProcessCustomer(customer);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user