- Bugfix Perseh Import
- TRIAS Anpassung Rechnung für Haushaltshilfe - Bugfix Löschen von ServiceRecords ohne Unterschrift
This commit is contained in:
@@ -215,12 +215,11 @@ namespace BeWo.View.Detail.Zeiterfassung
|
||||
if(!pSCViewModel.EditAllowed)
|
||||
{
|
||||
GridOben.IsEnabled = false;
|
||||
|
||||
TextboxNotice.IsEnabled = false;
|
||||
TextboxNotice2.IsEnabled = false;
|
||||
TextboxNotice3.IsEnabled = false;
|
||||
TextboxNotice4.IsEnabled = false;
|
||||
TextboxNotice5.IsEnabled = false;
|
||||
TextboxNotice.IsReadOnly = true;
|
||||
TextboxNotice2.IsReadOnly = true;
|
||||
TextboxNotice3.IsReadOnly = true;
|
||||
TextboxNotice4.IsReadOnly = true;
|
||||
TextboxNotice5.IsReadOnly = true;
|
||||
|
||||
btnSave.Visibility = Visibility.Hidden;
|
||||
}
|
||||
|
||||
@@ -217,11 +217,11 @@ namespace BeWo.View.Detail.Zeiterfassung
|
||||
btnSave.Visibility = Visibility.Hidden;
|
||||
|
||||
|
||||
TextboxNotice.IsEnabled = false;
|
||||
TextboxNotice2.IsEnabled = false;
|
||||
TextboxNotice3.IsEnabled = false;
|
||||
TextboxNotice4.IsEnabled = false;
|
||||
TextboxNotice5.IsEnabled = false;
|
||||
TextboxNotice.IsReadOnly = true;
|
||||
TextboxNotice2.IsReadOnly = true;
|
||||
TextboxNotice3.IsReadOnly = true;
|
||||
TextboxNotice4.IsReadOnly = true;
|
||||
TextboxNotice5.IsReadOnly = true;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3870,7 +3870,24 @@ namespace BeWo.View.Detail.Zeiterfassung
|
||||
}
|
||||
else
|
||||
{
|
||||
text = Translator.Translate("Sind Sie sicher, dass Sie {0} Einträge umbuchen möchten?", records.Count);
|
||||
int realCount = 0;
|
||||
|
||||
//Prüfen, ob es Gruppen gibt, die von mehreren MAs betreut werden. Denn diese werden mehrfach gezählt, was zu Verwirrung geführt hat.
|
||||
Dictionary<long, bool> groupDict = new Dictionary<long, bool>();
|
||||
foreach (var item in records)
|
||||
{
|
||||
if (!item.GroupOid.HasValue || !groupDict.ContainsKey(item.GroupOid.Value))
|
||||
{
|
||||
realCount++;
|
||||
|
||||
if (item.GroupOid.HasValue && !groupDict.ContainsKey(item.GroupOid.Value))
|
||||
{
|
||||
groupDict.Add(item.GroupOid.Value, true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
text = Translator.Translate("Sind Sie sicher, dass Sie {0} Einträge umbuchen möchten?", realCount);
|
||||
}
|
||||
if (MessageBox.Show(text, Translator.Translate("Umbuchen"), MessageBoxButton.OKCancel, MessageBoxImage.Question) == MessageBoxResult.OK)
|
||||
{
|
||||
|
||||
@@ -147,6 +147,10 @@ namespace BeWo.Data
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!TenantExists())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
Thread.CurrentThread.CurrentCulture = new CultureInfo("de-DE");
|
||||
//System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
|
||||
|
||||
|
||||
@@ -22,8 +22,34 @@ namespace TRIASAmbulanteSozialarbeit.Invoicing
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var list in supportConcepts2ServiceRecords.Values)
|
||||
{
|
||||
|
||||
foreach (var sr in list)
|
||||
{
|
||||
var sd = sr.ServiceDescription.Category;
|
||||
var ic = GetInvoiceCreatorForCategory(sd);
|
||||
if (ic != null)
|
||||
return ic;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return base.CreateInvoiceCreator(specificId, tenant, supportConcepts2ServiceRecords);
|
||||
}
|
||||
}
|
||||
|
||||
private InvoiceCreation GetInvoiceCreatorForCategory(ServiceCategoryDC sd)
|
||||
{
|
||||
if (sd != null && !String.IsNullOrEmpty(sd.Name))
|
||||
{
|
||||
String cat = sd.Name.ToLower().Trim();
|
||||
if (cat.IndexOf("haushaltshilfe") >= 0)
|
||||
{
|
||||
return new HaushaltshilfeInvoiceCreation();
|
||||
}
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,18 @@ namespace TRIASAmbulanteSozialarbeit.Invoicing
|
||||
|
||||
public override void SetRecipientInformation(ServiceInvoice serviceInvoice, CostBearer costBearer)
|
||||
{
|
||||
if (!"Haushaltshilfe".Equals(costBearer.Organisation.Name))
|
||||
{
|
||||
base.SetRecipientInformation(serviceInvoice, costBearer);
|
||||
if (serviceInvoice.InvoiceBase.CostBearer2SupportConcept != null &&
|
||||
serviceInvoice.InvoiceBase.CostBearer2SupportConcept.CostBearerContactPerson != null)
|
||||
{
|
||||
serviceInvoice.InvoiceBase.RecipientPersonFirstName = serviceInvoice.InvoiceBase.CostBearer2SupportConcept.CostBearerContactPerson.FirstName;
|
||||
serviceInvoice.InvoiceBase.RecipientPersonLastName = serviceInvoice.InvoiceBase.CostBearer2SupportConcept.CostBearerContactPerson.LastName;
|
||||
serviceInvoice.InvoiceBase.RecipientPersonOid = serviceInvoice.InvoiceBase.CostBearer2SupportConcept.CostBearerContactPerson.Oid;
|
||||
}
|
||||
return;
|
||||
}
|
||||
serviceInvoice.InvoiceBase.RecipientDivision = costBearer.Organisation.Name2;
|
||||
serviceInvoice.InvoiceBase.RecipientOrganisationOid = costBearer.Organisation.Oid;
|
||||
serviceInvoice.InvoiceBase.RecipientOrganisation = costBearer.Organisation.Name;
|
||||
|
||||
@@ -246,58 +246,248 @@ namespace BeWo.Service.Import.Perseh
|
||||
|
||||
if (!String.IsNullOrEmpty(bereich.Lebensbereich) && !String.IsNullOrEmpty(bereich.Ziele))
|
||||
{
|
||||
var zeilen = bereich.Ziele.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
var zeilen = bereich.Ziele.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries).Where(z => z != "Handlungsziele" && z != "Maßnahmeplanung" && !IgnoriereZeile(z)).ToList();
|
||||
|
||||
|
||||
HilfeplanImportZielDC ziel = null;
|
||||
|
||||
int index = 0;
|
||||
foreach (var zeile in zeilen)
|
||||
{
|
||||
if (zeile != "Handlungsziele" && zeile != "Maßnahmeplanung" && !IgnoriereZeile(zeile))
|
||||
//Suche den Punkt, mit dem jedes Ziel anfängt. Unglücklicherweise steht das eigentliche Ziel manchmal in der Zeile vor und nach dem Punkt, so dass hier unterschieden wird, so wie in diesem Beispiel:
|
||||
//
|
||||
/*
|
||||
-Ich möchte meine psychiatrischen Gesprächstermine bei Frau Dr. Kramer regelmäßig
|
||||
•
|
||||
-Ich möchte meine psychiatrischen Gesprächstermine bei Frau Dr. Kramer regelmäßig
|
||||
wahrnehmen.
|
||||
wahrnehmen.
|
||||
• -Ich möchte verlässlicher meine fachärztlichen Kontrollen wahrnehmen.
|
||||
•
|
||||
• - Meinen hauswirtschaftlichen Tätigkeiten möchte ich weiterhin nachkommen.
|
||||
- im Rahmen meiner ambulanten psychiatrischen Gesprächstermine werde ich meine
|
||||
•
|
||||
- im Rahmen meiner ambulanten psychiatrischen Gesprächstermine werde ich meine
|
||||
Bedenken zur Schulmedizin und der daraus resultierenden Verhaltensweise der oft sich
|
||||
Bedenken zur Schulmedizin und der daraus resultierenden Verhaltensweise der oft sich
|
||||
gegen von Ärzten empfohlene medikamentöse Therapien, thematisieren.
|
||||
|
||||
*/
|
||||
if (zeile.StartsWith("•"))
|
||||
{
|
||||
if (zeile.StartsWith("• "))
|
||||
String trim = zeile.Replace("•", "").Trim();
|
||||
|
||||
String zielString = "";
|
||||
if (trim.Length > 0 || index == 0)
|
||||
{
|
||||
//Neues Ziel in einer Zeile
|
||||
zielString = trim;
|
||||
ziel = new HilfeplanImportZielDC();
|
||||
ziel.DoImport = true;
|
||||
ziel.Bereich = bereich.Lebensbereich.Trim();
|
||||
|
||||
}
|
||||
else if (index < zeilen.Count -1 && zeilen[index - 1].Trim().Equals(zeilen[index + 1].Trim()))
|
||||
{
|
||||
//Neues Ziel
|
||||
zielString = zeilen[index + 1];
|
||||
}
|
||||
|
||||
if (!String.IsNullOrEmpty(zielString))
|
||||
{
|
||||
ziel = new HilfeplanImportZielDC();
|
||||
ziel.DoImport = true;
|
||||
ziel.Bereich = bereich.Lebensbereich.Trim();
|
||||
ziel.ZielName = zeile.Replace("Ziele • ", "").Replace("• ", "").Trim();
|
||||
|
||||
LeseMassnahmenAusBereich(bereich, ziel);
|
||||
ziel.ZielName = zielString;
|
||||
|
||||
ziele.Add(ziel);
|
||||
}
|
||||
else if (ziel != null)
|
||||
{
|
||||
ziel.ZielName += " " + zeile.Trim();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
bool neuesZielbeginnt = false;
|
||||
if (index > 0 && index < zeilen.Count - 2 && zeilen[index].Trim().Equals(zeilen[index + 2].Trim()) && zeilen[index + 1].StartsWith("•") && zeilen[index + 1].Replace("•", "").Trim().Length == 0)
|
||||
{
|
||||
neuesZielbeginnt = true;
|
||||
}
|
||||
if (ziel != null && !neuesZielbeginnt)
|
||||
{
|
||||
if (!ziel.ZielName.EndsWith(zeile.Trim()))
|
||||
{
|
||||
ziel.ZielName += " " + zeile.Trim();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
index++;
|
||||
}
|
||||
|
||||
|
||||
index = 1;
|
||||
foreach (var z in ziele)
|
||||
{
|
||||
LeseMassnahmenAusBereich(bereich, z, index++, ziele.Count);
|
||||
}
|
||||
}
|
||||
|
||||
return ziele;
|
||||
}
|
||||
|
||||
private void LeseMassnahmenAusBereich(BereichMitZielenUndMassnahmen bereich, HilfeplanImportZielDC ziel)
|
||||
private void LeseMassnahmenAusBereich(BereichMitZielenUndMassnahmen bereich, HilfeplanImportZielDC ziel, int zielIndex, int maxZiele)
|
||||
{
|
||||
if (!String.IsNullOrEmpty(bereich.Massnahmenplanung))
|
||||
{
|
||||
ziel.Massnahmen = new List<HilfeplanImportZielDC>();
|
||||
|
||||
var zeilen = bereich.Massnahmenplanung.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
var zeilenArray = bereich.Massnahmenplanung.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
var zeilen = zeilenArray.Where(z => z != "Maßnahmeplanung" && z != "Maßnahme" && z != "Leistungsplanung" && !IgnoriereZeile(z)).ToList();
|
||||
|
||||
//Schwer die Massnahmen zu trennen, daher für alles eine Maßnahme erstellen
|
||||
var massnahme = new HilfeplanImportZielDC();
|
||||
ziel.Massnahmen.Add(massnahme);
|
||||
massnahme.ZielName = "";
|
||||
foreach (var zeile in zeilen)
|
||||
var massnahmen = new List<string>();
|
||||
|
||||
//Aus dem Text in den Zeilen geht nicht hervor, wieviele Massnahmen insgesamt enthalten sind. Trenne daher nach Satzzeichen. (Führendes "-") und Punkt
|
||||
String massnahme = "";
|
||||
|
||||
foreach (var item in zeilen)
|
||||
{
|
||||
if (zeile != "Maßnahmeplanung" && zeile != "Maßnahme" && zeile != "Leistungsplanung" && !IgnoriereZeile(zeile))
|
||||
String zeile = item.Trim();
|
||||
if (zeile.StartsWith("-"))
|
||||
{
|
||||
if (massnahme.ZielName.Length > 0)
|
||||
if (!String.IsNullOrEmpty(massnahme))
|
||||
{
|
||||
massnahme.ZielName += " ";
|
||||
massnahmen.Add(massnahme);
|
||||
}
|
||||
massnahme = zeile;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (massnahme.Length > 0)
|
||||
{
|
||||
massnahme += " ";
|
||||
}
|
||||
massnahme += zeile;
|
||||
if (zeile.EndsWith("."))
|
||||
{
|
||||
massnahmen.Add(massnahme);
|
||||
massnahme = "";
|
||||
}
|
||||
massnahme.ZielName += zeile.Trim();
|
||||
}
|
||||
}
|
||||
if (massnahmen.Count == 0 && !String.IsNullOrEmpty(massnahme))
|
||||
{
|
||||
//Kein Bindestrich oder Punkt im Satz enthalten
|
||||
massnahmen.Add(massnahme);
|
||||
}
|
||||
//Jetzt versuche anhand der Anzahl der Massnahmen die Zuordnung zu den Zielen zu erraten.
|
||||
//Die Ziele werden in dieser PDF Version oben aufgelistet und die Massnahmen in deiner Tabelle darunter
|
||||
|
||||
int anzahlMinusTrennzeichen = massnahmen.Count(m => m.StartsWith("-"));
|
||||
int anzahlPunkte = massnahmen.Count(m => m.EndsWith("."));
|
||||
|
||||
HilfeplanImportZielDC letztesDc = null;
|
||||
int index = 1;
|
||||
if (anzahlMinusTrennzeichen > 0)
|
||||
{
|
||||
foreach (var mZeile in massnahmen)
|
||||
{
|
||||
if (mZeile.StartsWith("-"))
|
||||
{
|
||||
letztesDc = new HilfeplanImportZielDC();
|
||||
letztesDc.DoImport = true;
|
||||
if (index++ == zielIndex)
|
||||
{
|
||||
ziel.Massnahmen.Add(letztesDc);
|
||||
}
|
||||
letztesDc.ZielName = mZeile;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (letztesDc != null)
|
||||
{
|
||||
if (letztesDc.ZielName.Length > 0)
|
||||
{
|
||||
letztesDc.ZielName += " ";
|
||||
}
|
||||
|
||||
letztesDc.ZielName += mZeile;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (anzahlPunkte > 0)
|
||||
{
|
||||
foreach (var mZeile in massnahmen)
|
||||
{
|
||||
if (letztesDc == null)
|
||||
{
|
||||
letztesDc = new HilfeplanImportZielDC();
|
||||
letztesDc.DoImport = true;
|
||||
letztesDc.ZielName = "";
|
||||
if (index++ == zielIndex)
|
||||
{
|
||||
ziel.Massnahmen.Add(letztesDc);
|
||||
}
|
||||
}
|
||||
if (mZeile.EndsWith("."))
|
||||
{
|
||||
if (letztesDc.ZielName.Length > 0)
|
||||
{
|
||||
letztesDc.ZielName += " ";
|
||||
}
|
||||
|
||||
letztesDc.ZielName += mZeile;
|
||||
|
||||
letztesDc = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (letztesDc.ZielName.Length > 0)
|
||||
{
|
||||
letztesDc.ZielName += " ";
|
||||
}
|
||||
|
||||
letztesDc.ZielName += mZeile;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var mZeile in massnahmen)
|
||||
{
|
||||
if (letztesDc == null)
|
||||
{
|
||||
letztesDc = new HilfeplanImportZielDC();
|
||||
letztesDc.DoImport = true;
|
||||
letztesDc.ZielName = "";
|
||||
if (index++ == zielIndex)
|
||||
{
|
||||
ziel.Massnahmen.Add(letztesDc);
|
||||
}
|
||||
}
|
||||
|
||||
if (letztesDc.ZielName.Length > 0)
|
||||
{
|
||||
letztesDc.ZielName += " ";
|
||||
}
|
||||
|
||||
letztesDc.ZielName += mZeile;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//foreach (var zeile in zeilen)
|
||||
//{
|
||||
// if (zeile != "Maßnahmeplanung" && zeile != "Maßnahme" && zeile != "Leistungsplanung" && !IgnoriereZeile(zeile))
|
||||
// {
|
||||
// if (massnahme.ZielName.Length > 0)
|
||||
// {
|
||||
// massnahme.ZielName += " ";
|
||||
// }
|
||||
// massnahme.ZielName += zeile.Trim();
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -532,7 +722,7 @@ namespace BeWo.Service.Import.Perseh
|
||||
|
||||
private String LeseTextAufSeite(PdfDocumentProcessor processor, PdfPage page, double top, double bottom, double left, double right)
|
||||
{
|
||||
int h = 10; //Lese Seite Zeilenweise mit Zeilenhöhe = 10 ein
|
||||
int h = 9; //Lese Seite Zeilenweise mit Zeilenhöhe = x ein
|
||||
|
||||
var abschnittTop = top;
|
||||
var abschnittBottom = top - h;
|
||||
@@ -540,6 +730,19 @@ namespace BeWo.Service.Import.Perseh
|
||||
String gesamtText = "";
|
||||
|
||||
String letzteZeile = "";
|
||||
String letzterGesamtText = "";
|
||||
|
||||
var idx = page.GetPageIndex();
|
||||
|
||||
var pageText = processor.GetPageText(idx + 1, DefaultExtractOptions);
|
||||
int anzahlPunkte = 0;
|
||||
int pos = 0;
|
||||
while (pageText.IndexOf("•", pos) > 0)
|
||||
{
|
||||
anzahlPunkte++;
|
||||
pos = pageText.IndexOf("•", pos) + 1;
|
||||
}
|
||||
|
||||
while (abschnittTop > bottom)
|
||||
{
|
||||
double r = right;
|
||||
@@ -547,24 +750,54 @@ namespace BeWo.Service.Import.Perseh
|
||||
{
|
||||
right = page.CropBox.Right;
|
||||
}
|
||||
var idx = page.GetPageIndex();
|
||||
|
||||
var area = new PdfDocumentArea(idx + 1, new PdfRectangle(left, abschnittBottom, r, abschnittTop));
|
||||
String neuerText = processor.GetText(area, DefaultExtractOptions);
|
||||
|
||||
neuerText = ReplaceZielAufzaehlungszeichen(neuerText);
|
||||
|
||||
var zeilen = neuerText.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
foreach (var zeile in zeilen)
|
||||
|
||||
if (idx == 22)
|
||||
{
|
||||
if (letzteZeile != zeile)
|
||||
{
|
||||
gesamtText += zeile + "\r\n";
|
||||
}
|
||||
int test = 0;
|
||||
}
|
||||
if (zeilen.Length > 0)
|
||||
//neuerText = ReplaceZielAufzaehlungszeichen(neuerText);
|
||||
if (neuerText != letzterGesamtText)
|
||||
{
|
||||
letzteZeile = zeilen[zeilen.Length - 1];
|
||||
var zeilen = neuerText.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
int index = 0;
|
||||
foreach (var zeile in zeilen)
|
||||
{
|
||||
//if (!gesamtText.EndsWith(zeile + "\r\n"))
|
||||
//{
|
||||
// gesamtText += zeile + "\r\n";
|
||||
//}
|
||||
//if (letzteZeile != zeile || (letzteZeile == "•" && zeile == "•" && zeilen.Length > 2 && index == 2))
|
||||
if (letzteZeile != zeile)
|
||||
{
|
||||
gesamtText += zeile + "\r\n";
|
||||
if (zeile.Contains("•"))
|
||||
{
|
||||
anzahlPunkte--;
|
||||
}
|
||||
// letzteZeile = "";
|
||||
}
|
||||
else if (letzteZeile == "•" && zeile == "•" && zeilen.Length > 2 && index == 2 && anzahlPunkte > 0)
|
||||
{
|
||||
//gesamtText += zeile + "\r\n";
|
||||
anzahlPunkte--;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
if (zeilen.Length > 0)
|
||||
{
|
||||
letzteZeile = zeilen[zeilen.Length - 1];
|
||||
}
|
||||
|
||||
letzterGesamtText = neuerText;
|
||||
}
|
||||
else
|
||||
{
|
||||
int test = 0;
|
||||
}
|
||||
|
||||
abschnittTop -= (h + 1);
|
||||
|
||||
@@ -443,6 +443,7 @@ namespace BeWo.Service.Invoicing
|
||||
serviceInvoice.InvoiceBase.RecipientPersonFirstName = cust.Person.FirstName;
|
||||
serviceInvoice.InvoiceBase.RecipientPersonLastName = cust.Person.LastName;
|
||||
}
|
||||
serviceInvoice.InvoiceBase.RecipientPersonOid = cust.Person.Oid;
|
||||
return;
|
||||
}
|
||||
if (costBearer.Organisation.InvoiceAddress != null)
|
||||
@@ -478,6 +479,7 @@ namespace BeWo.Service.Invoicing
|
||||
{
|
||||
serviceInvoice.InvoiceBase.RecipientPersonFirstName = serviceInvoice.InvoiceBase.CostBearer2SupportConcept.CostBearerContactPerson.FirstName;
|
||||
serviceInvoice.InvoiceBase.RecipientPersonLastName = serviceInvoice.InvoiceBase.CostBearer2SupportConcept.CostBearerContactPerson.LastName;
|
||||
serviceInvoice.InvoiceBase.RecipientPersonOid = serviceInvoice.InvoiceBase.CostBearer2SupportConcept.CostBearerContactPerson.Oid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using BeWo.Data;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
@@ -1496,9 +1497,7 @@ namespace BeWo.Service.Plugins
|
||||
if (!String.IsNullOrEmpty(bereich))
|
||||
{
|
||||
ValueListEntry newEntry = new ValueListEntry();
|
||||
newEntry.Value = bereich;
|
||||
newEntry.Value.StartsWith("Lebensbereich ");
|
||||
newEntry.Value = newEntry.Value.Substring(13).Trim();
|
||||
newEntry.Value = GetBereichsname(bereich);
|
||||
newEntry.Type = ValueListEntryType.SupportConceptGoalCategoryType;
|
||||
DAOFactory.GenericDAO.Insert(newEntry);
|
||||
|
||||
@@ -1508,6 +1507,29 @@ namespace BeWo.Service.Plugins
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual string GetBereichsname(string bereich)
|
||||
{
|
||||
//Schneidet Lebensbereich und Kapitelnummerierung ab
|
||||
string name = bereich;
|
||||
if (bereich.StartsWith("Lebensbereich "))
|
||||
{
|
||||
name = bereich.Substring(13).Trim();
|
||||
}
|
||||
if (bereich.StartsWith("Kapitel "))
|
||||
{
|
||||
// Regulärer Ausdruck, um "Kapitel " gefolgt von Ziffern am Anfang des Satzes zu finden
|
||||
string pattern = @"^Kapitel \d+";
|
||||
|
||||
// Ersetzen des Musters mit einem leeren String, um es abzuschneiden
|
||||
name = Regex.Replace(bereich, pattern, "").Trim();
|
||||
if (name.StartsWith(": "))
|
||||
{
|
||||
name = name.Substring(1).Trim();
|
||||
}
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
private List<ValueListEntryDC> SortiereZieleNachHierarchie(List<ValueListEntryDC> alleZiele)
|
||||
{
|
||||
var sortierteListe = new List<ValueListEntryDC>();
|
||||
@@ -1591,11 +1613,8 @@ namespace BeWo.Service.Plugins
|
||||
|
||||
if (ziel == null)
|
||||
{
|
||||
if (bereich.StartsWith("Lebensbereich "))
|
||||
{
|
||||
bereich = bereich.Substring(13).Trim();
|
||||
}
|
||||
|
||||
bereich = GetBereichsname(bereich);
|
||||
|
||||
ziel = alleZiele.Where(z => z.DisplayName != null && z.DisplayName.Contains(bereich)).FirstOrDefault();
|
||||
|
||||
if (ziel == null)
|
||||
|
||||
@@ -110,7 +110,7 @@ namespace BeWo.Service.Plugins
|
||||
//t = "8677523325"; // BeWo Richartz
|
||||
//t = "1765854593"; // Mein Betreutes Wohnen
|
||||
//t = "6802909544"; // Lebenshilfe Coburg
|
||||
//t = "9417634361"; // Synprax
|
||||
t = "9417634361"; // Synprax
|
||||
//t = "5761861730"; // Lebenshilfe Warendorf
|
||||
//t = "6712648331"; // BeWo Färber
|
||||
//t = "4982295287"; // ASB Hamm
|
||||
@@ -148,7 +148,7 @@ namespace BeWo.Service.Plugins
|
||||
//t = "9975231461"; // Selwo
|
||||
//t = "8181286349"; // BeWo am Rhein
|
||||
//t = "4595275645"; // Eigenständig
|
||||
t = "7912635399"; // Prof. Dr. Eggers Stiftung
|
||||
//t = "7912635399"; // Prof. Dr. Eggers Stiftung
|
||||
//t = "3549726254"; // Socia
|
||||
//t = "1992495802"; // Monvita
|
||||
//t = "7381352241"; // Ressource e.V.
|
||||
@@ -319,7 +319,7 @@ namespace BeWo.Service.Plugins
|
||||
//t = "9734214365"; // Wegfinder Rhein-Ruhr
|
||||
//t = "1011478760"; // Autismus Köln/Bonn e.V.
|
||||
//t = "8184278271"; // Ambulant Betreutes Wohnen Stephan Schillings
|
||||
t = "2576513996"; // TRIAS Ambulante Sozialarbeit Schön + Schön-Uhlmann GbR
|
||||
//t = "2576513996"; // TRIAS Ambulante Sozialarbeit Schön + Schön-Uhlmann GbR
|
||||
//t = "9518001524"; // Sozialpädagogische Praxis Astrid Schnödewind
|
||||
//t = "1048483934"; // Frauenhaus e.V. EWFRA - Wohnprojekt für Frauen
|
||||
//t = "4293131072"; // ASB Rhein-Erft/Düren e.V. Schulbegleitung
|
||||
|
||||
@@ -134,12 +134,18 @@ namespace BS.Shared.Extensions
|
||||
|
||||
public static void AddIfNotNull<T>(this IList<T> list, T item)
|
||||
{
|
||||
list.Add(item);
|
||||
if (item != null)
|
||||
{
|
||||
list.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
public static void AddIfNotNullAndNotIn<T>(this IList<T> list, T item)
|
||||
{
|
||||
list.AddIfNotIn(item);
|
||||
if (item != null)
|
||||
{
|
||||
list.AddIfNotIn(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user