MalteserJohanniterJohanneshaus/Import/CustomDataImporter - AviseImport nimmt nur Hilfepläne fürs BeWo (Kostenstelle 60)

This commit is contained in:
2025-07-23 10:40:28 +02:00
parent bb86343675
commit 2bf74d0668
2 changed files with 47 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.Core;
using BeWo.Service.Import.AvisImport;
using BeWo.Service.Plugins;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using Utils = BS.Shared.Core.Utils;
namespace MalteserJohanniterJohanneshaus.Import
{
public class CustomLvrAviseImporter : LvrAviseImporter
{
public override List<HilfeplanInfo> CreateHilfeplanInfos()
{
List<HilfeplanInfo> liste = new List<HilfeplanInfo>();
var scList = DAOFactory.GenericDAO.GetAllActiveAndArchived<SupportConcept>();
foreach (var supportConcept in scList)
{
foreach (var cb2sc in supportConcept.CostBearer2SupportConceptList)
{
if (cb2sc.Notice == "60")
{
HilfeplanInfo hi = new HilfeplanInfo();
hi.Start = cb2sc.StartDate;
hi.Ende = cb2sc.EndDate;
hi.Aktenzeichen = cb2sc.CustomerReferenceNumber;
hi.CostBearer2SupportConcept = cb2sc;
hi.CustomerFirstName = cb2sc.SupportConcept.Customer.Person.FirstName;
hi.CustomerLastName = cb2sc.SupportConcept.Customer.Person.LastName;
if (hi.Start.HasValue && hi.Ende.HasValue && !String.IsNullOrEmpty(hi.Aktenzeichen))
{
liste.Add(hi);
}
}
}
}
return liste;
}
}
}

View File

@@ -91,6 +91,7 @@
<Compile Include="Finanzauswertung.designer.cs">
<DependentUpon>Finanzauswertung.cs</DependentUpon>
</Compile>
<Compile Include="Import\CustomDataImporter.cs" />
<Compile Include="InvoiceCustomerReport.cs">
<SubType>Component</SubType>
</Compile>