From 2bf74d066816108eff76237d51b2b3df2fd38cb7 Mon Sep 17 00:00:00 2001 From: Alexandra Date: Wed, 23 Jul 2025 10:40:28 +0200 Subject: [PATCH] =?UTF-8?q?MalteserJohanniterJohanneshaus/Import/CustomDat?= =?UTF-8?q?aImporter=20-=20AviseImport=20nimmt=20nur=20Hilfepl=C3=A4ne=20f?= =?UTF-8?q?=C3=BCrs=20BeWo=20(Kostenstelle=2060)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Import/CustomDataImporter.cs | 46 +++++++++++++++++++ .../MalteserJohanniterJohanneshaus.csproj | 1 + 2 files changed, 47 insertions(+) create mode 100644 ReportImp/MalteserJohanniterJohanneshaus/Import/CustomDataImporter.cs diff --git a/ReportImp/MalteserJohanniterJohanneshaus/Import/CustomDataImporter.cs b/ReportImp/MalteserJohanniterJohanneshaus/Import/CustomDataImporter.cs new file mode 100644 index 000000000..a3398f7ad --- /dev/null +++ b/ReportImp/MalteserJohanniterJohanneshaus/Import/CustomDataImporter.cs @@ -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 CreateHilfeplanInfos() + { + List liste = new List(); + var scList = DAOFactory.GenericDAO.GetAllActiveAndArchived(); + + 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; + } + } +} diff --git a/ReportImp/MalteserJohanniterJohanneshaus/MalteserJohanniterJohanneshaus.csproj b/ReportImp/MalteserJohanniterJohanneshaus/MalteserJohanniterJohanneshaus.csproj index 903d997e4..56934256d 100644 --- a/ReportImp/MalteserJohanniterJohanneshaus/MalteserJohanniterJohanneshaus.csproj +++ b/ReportImp/MalteserJohanniterJohanneshaus/MalteserJohanniterJohanneshaus.csproj @@ -91,6 +91,7 @@ Finanzauswertung.cs + Component