MalteserJohanniterJohanneshaus/Import/CustomDataImporter - AviseImport nimmt nur Hilfepläne fürs BeWo (Kostenstelle 60)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user