Merge branch 'master' of ssh://float.beyondsoft.de/git/beyondSoft/BeWo
This commit is contained in:
@@ -336,7 +336,7 @@ namespace BeWo.View.Detail
|
||||
var ve = _TreeViewItemsList.FirstOrDefault(f => f.GoalEntryVM != null && f.GoalEntryVM.Equals(ziel));
|
||||
if (ve != null)
|
||||
{
|
||||
GoalService.RecursiveSynchronousValueListEntrySave(ve);
|
||||
GoalService.RecursiveSynchronousValueListEntrySave(ve); // Hier passiert bei Komponente E ein Fehler
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -312,7 +312,21 @@ namespace BeWo.View.Detail.Report
|
||||
|
||||
SchedulerHelper.OverrideAppointmentWithAbsenceTime(appointment, absence); //Auskommentieren entfernt Einträge aus Planer
|
||||
appointment.Start = absence.Start.Value;
|
||||
appointment.End = absence.End.Value.Date == absence.Start.Value.Date ? absence.End.Value : absence.End.Value.AddDays(1);
|
||||
if (absence.End.HasValue)
|
||||
appointment.End = absence.End.Value.Date == absence.Start.Value.Date ? absence.End.Value : absence.End.Value.AddDays(1);
|
||||
else
|
||||
{
|
||||
if (appointment.Start.Date.Year >= SelectedYear && appointment.Start.Date.Month <= SelectedMonth)
|
||||
{
|
||||
if (SelectedMonth < 12)
|
||||
appointment.End = new DateTime(SelectedYear, SelectedMonth + 1, 1);
|
||||
else
|
||||
appointment.End = new DateTime(SelectedYear + 1, 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (appointment.End == null)
|
||||
Console.WriteLine("test");
|
||||
|
||||
_AppointmentStorage.Add(appointment);
|
||||
}
|
||||
|
||||
@@ -75,6 +75,7 @@ namespace BeWo.View.Detail.Report
|
||||
{
|
||||
// Hier muss eine zusätzliche Verschachtelungsstufe erstellt werden, also ICF -> Kategorie -> Einschränkungsarten/Ziele
|
||||
|
||||
|
||||
// Erzeugt das Objekt
|
||||
var goalItem = new SupportConceptGoalDC
|
||||
{
|
||||
@@ -158,27 +159,101 @@ namespace BeWo.View.Detail.Report
|
||||
|
||||
List<ValueListEntryDC> listEntries = new List<ValueListEntryDC>();
|
||||
|
||||
var counter = 0;
|
||||
foreach (var list in icfs)
|
||||
{
|
||||
if (listEntries.Count == 0)
|
||||
{
|
||||
listEntries.Add(list[0]);
|
||||
else
|
||||
listEntries = AddKlassifikationen(listEntries);
|
||||
}
|
||||
if (listEntries.Count > 0)
|
||||
{
|
||||
foreach (var item in list)
|
||||
{
|
||||
if (item != null)
|
||||
{
|
||||
int? parentOid = null;
|
||||
switch (counter)
|
||||
{
|
||||
case 0:
|
||||
parentOid = -2;
|
||||
break;
|
||||
case 1:
|
||||
parentOid = -3;
|
||||
break;
|
||||
case 2:
|
||||
parentOid = -4;
|
||||
break;
|
||||
case 3:
|
||||
parentOid = -5;
|
||||
break;
|
||||
}
|
||||
|
||||
if (item.DisplayName != "ICF")
|
||||
{
|
||||
if (item.ParentOid == null)
|
||||
item.ParentOid = (int)parentOid;
|
||||
listEntries.Add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
|
||||
//foreach (var list in icfs)
|
||||
//{
|
||||
// if (listEntries.Count == 0)
|
||||
// {
|
||||
// listEntries.Add(list[0]);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// foreach (var item in list)
|
||||
// {
|
||||
// if (item != null)
|
||||
// {
|
||||
// if (item.DisplayName != "ICF")
|
||||
// listEntries.Add(item);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
// Hier müssen die Children alle Oberkategorien sein und erst nach diesen die Unterkategorien
|
||||
// In jedem ersten Slot der Listen befindet sich das Objekt ICF
|
||||
TreeViewGoalItem = GetSupportConceptGoal(null, listEntries.Find(x => x.ParentOid == -1), listEntries);
|
||||
}
|
||||
public List<ValueListEntryDC> AddKlassifikationen(List<ValueListEntryDC> listEntries)
|
||||
{
|
||||
listEntries.Add(new ValueListEntryDC()
|
||||
{
|
||||
TypeDescription = "Klassifikation der Körperfunktionen (Komponente b)",
|
||||
ParentOid = null,
|
||||
ValueListEntryOid = -2
|
||||
});
|
||||
listEntries.Add(new ValueListEntryDC()
|
||||
{
|
||||
TypeDescription = "Klassifikation der Körperstrukturen (Komponente s)",
|
||||
ParentOid = null,
|
||||
ValueListEntryOid = -3
|
||||
});
|
||||
listEntries.Add(new ValueListEntryDC()
|
||||
{
|
||||
TypeDescription = "Klassifikation der Aktivitäten und Partizipationen (Komponente d)",
|
||||
ParentOid = null,
|
||||
ValueListEntryOid = -4
|
||||
});
|
||||
listEntries.Add(new ValueListEntryDC()
|
||||
{
|
||||
TypeDescription = "Klassifikation der Umweltfaktoren (Komponente e)",
|
||||
ParentOid = null,
|
||||
ValueListEntryOid = -5
|
||||
});
|
||||
|
||||
return listEntries;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,8 +28,8 @@ namespace BeWo.Data.ICF
|
||||
{
|
||||
file = "icf.xml";
|
||||
}
|
||||
//file = BS.Shared.Core.Utils.CreateSavePath(AppDomain.CurrentDomain.BaseDirectory, @"bin\ICF\" + file);
|
||||
file = @"D:\Projects\beyondSoft\BeWoPlaner\BeWo\Data\ICF\icf.xml";
|
||||
file = BS.Shared.Core.Utils.CreateSavePath(AppDomain.CurrentDomain.BaseDirectory, @"bin\ICF\" + file);
|
||||
//file = @"D:\Projects\beyondSoft\BeWoPlaner\BeWo\Data\ICF\icf.xml";
|
||||
_File = XDocument.Load(file);
|
||||
|
||||
Debug.WriteLine("Dokument geladen");
|
||||
|
||||
@@ -567,12 +567,15 @@ namespace Host
|
||||
string goalOids = Request.Params["goals"].ToString();
|
||||
var oids = goalOids.Split(',');
|
||||
var alleValueListEntries = DAOFactory.GenericDAO.GetAllActive<ValueListEntry>();
|
||||
foreach (var oid in oids)
|
||||
if (goalOids != null && goalOids != "")
|
||||
{
|
||||
foreach (var item in alleValueListEntries)
|
||||
foreach (var oid in oids)
|
||||
{
|
||||
if (long.Parse(oid) == item.Oid)
|
||||
ziele.Add(MapperFactory.ValueListEntryDC_ValueListEntry.MapToNewDC(item));
|
||||
foreach (var item in alleValueListEntries)
|
||||
{
|
||||
if (long.Parse(oid) == item.Oid)
|
||||
ziele.Add(MapperFactory.ValueListEntryDC_ValueListEntry.MapToNewDC(item));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
2
Model/Changes_2021_11_15_ValueListEntry.txt
Normal file
2
Model/Changes_2021_11_15_ValueListEntry.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE `bewodemo`.`valuelistentry`
|
||||
CHANGE COLUMN `Notice` `Notice` VARCHAR(2048) NULL DEFAULT NULL ;
|
||||
@@ -171,22 +171,37 @@ namespace BeWo.Report.ReportObjects
|
||||
{
|
||||
foreach (var block in alleEintraegeSortiert)
|
||||
{
|
||||
int lastRowIndex = 0;
|
||||
foreach (var item in block)
|
||||
{
|
||||
if (item.Zeile > lastRowIndex)
|
||||
lastRowIndex = item.Zeile;
|
||||
}
|
||||
|
||||
RosterReportRow row = null;
|
||||
double[] sum = new double[6];
|
||||
List<DienstEintragDC>[] eintraegeNachZeilen = new List<DienstEintragDC>[3];
|
||||
eintraegeNachZeilen[0] = new List<DienstEintragDC>();
|
||||
eintraegeNachZeilen[1] = new List<DienstEintragDC>();
|
||||
eintraegeNachZeilen[2] = new List<DienstEintragDC>();
|
||||
List<DienstEintragDC>[] eintraegeNachZeilen = new List<DienstEintragDC>[lastRowIndex + 1];
|
||||
for (int i = 0; i <= lastRowIndex; i++)
|
||||
eintraegeNachZeilen[i] = new List<DienstEintragDC>();
|
||||
|
||||
foreach (var b in block)
|
||||
eintraegeNachZeilen[b.Zeile].Add(b);
|
||||
|
||||
EmployeeDC currentEmployee = new EmployeeDC();
|
||||
|
||||
foreach (var zeile in eintraegeNachZeilen)
|
||||
{
|
||||
if (zeile.Count > 0)
|
||||
currentEmployee = employee.First(e => e.EmployeeOid == zeile[0].EmployeeOid);
|
||||
}
|
||||
|
||||
|
||||
double monthlyHours = 0;
|
||||
for (int i = 0; i < eintraegeNachZeilen.Length; i++)
|
||||
{
|
||||
var aktuellerBlock = eintraegeNachZeilen[i];
|
||||
|
||||
|
||||
row = new RosterReportRow()
|
||||
{
|
||||
Pos = i,
|
||||
@@ -194,27 +209,30 @@ namespace BeWo.Report.ReportObjects
|
||||
AlleDienste = infoDict
|
||||
};
|
||||
|
||||
EmployeeDC emp = new EmployeeDC();
|
||||
foreach (var e in employee)
|
||||
if (currentEmployee.EmployeeOid == null)
|
||||
{
|
||||
foreach (var b in aktuellerBlock)
|
||||
EmployeeDC emp = new EmployeeDC();
|
||||
foreach (var e in employee)
|
||||
{
|
||||
if (b.EmployeeOid == e.EmployeeOid)
|
||||
foreach (var b in aktuellerBlock)
|
||||
{
|
||||
emp = e;
|
||||
currentEmployee = e;
|
||||
break;
|
||||
if (b.EmployeeOid == e.EmployeeOid)
|
||||
{
|
||||
emp = e;
|
||||
currentEmployee = e;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (emp.EmployeeOid != null)
|
||||
break;
|
||||
}
|
||||
if (emp.EmployeeOid != null)
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (i % 2 == 0 && i != 0)
|
||||
{
|
||||
res.RosterReportRows[res.RosterReportRows.Count - 1 - 1].Title = currentEmployee.LastNameFirstName;
|
||||
currentEmployee = new EmployeeDC();
|
||||
}
|
||||
row.Employee = currentEmployee;
|
||||
|
||||
if (i == 0)
|
||||
row.Title = currentEmployee.LastNameFirstName;
|
||||
|
||||
DienstInfoDC dienst = null;
|
||||
foreach (var b in aktuellerBlock)
|
||||
@@ -248,17 +266,29 @@ namespace BeWo.Report.ReportObjects
|
||||
{
|
||||
foreach (var block in alleVertretungenSortiert)
|
||||
{
|
||||
int lastRowIndex = 0;
|
||||
foreach (var item in block)
|
||||
{
|
||||
if (item.Zeile > lastRowIndex)
|
||||
lastRowIndex = item.Zeile;
|
||||
}
|
||||
|
||||
RosterReportRow row = null;
|
||||
double[] sum = new double[6];
|
||||
List<DienstvertretungDC>[] vertretungenNachZeilen = new List<DienstvertretungDC>[3];
|
||||
vertretungenNachZeilen[0] = new List<DienstvertretungDC>();
|
||||
vertretungenNachZeilen[1] = new List<DienstvertretungDC>();
|
||||
vertretungenNachZeilen[2] = new List<DienstvertretungDC>();
|
||||
List<DienstvertretungDC>[] vertretungenNachZeilen = new List<DienstvertretungDC>[lastRowIndex + 1];
|
||||
for (int i = 0; i <= lastRowIndex; i++)
|
||||
vertretungenNachZeilen[i] = new List<DienstvertretungDC>();
|
||||
|
||||
foreach (var b in block)
|
||||
vertretungenNachZeilen[b.Zeile].Add(b);
|
||||
|
||||
EmployeeDC currentEmployee = new EmployeeDC();
|
||||
foreach (var zeile in vertretungenNachZeilen)
|
||||
{
|
||||
if (zeile.Count > 0)
|
||||
currentEmployee = employee.First(e => e.EmployeeOid == zeile[0].EmployeeOid);
|
||||
}
|
||||
|
||||
double monthlyHours = 0;
|
||||
for (int i = 0; i < vertretungenNachZeilen.Length; i++)
|
||||
{
|
||||
@@ -287,12 +317,9 @@ namespace BeWo.Report.ReportObjects
|
||||
break;
|
||||
}
|
||||
|
||||
if (i % 2 == 0 && i != 0)
|
||||
{
|
||||
res.RosterReportRows[res.RosterReportRows.Count - 1 - 1].Title = currentEmployee.LastNameFirstName;
|
||||
currentEmployee = new EmployeeDC();
|
||||
}
|
||||
//row.Title = i == 0 ? emp.LastNameFirstName : null;
|
||||
row.Employee = currentEmployee;
|
||||
if (i == 0)
|
||||
row.Title = currentEmployee.LastNameFirstName;
|
||||
|
||||
DienstInfoDC dienst = null;
|
||||
foreach (var b in aktuellerBlock)
|
||||
@@ -320,6 +347,8 @@ namespace BeWo.Report.ReportObjects
|
||||
|
||||
}
|
||||
|
||||
res.RosterReportRows = res.RosterReportRows.OrderBy(r => r.Employee.LastNameFirstName).ThenBy(r => r.Pos).ToList();
|
||||
|
||||
return res;
|
||||
}
|
||||
}
|
||||
@@ -333,6 +362,8 @@ namespace BeWo.Report.ReportObjects
|
||||
|
||||
public int Pos { get; set; }
|
||||
|
||||
public EmployeeDC Employee { get; set; }
|
||||
|
||||
public double[] WeekSum { get; set; }
|
||||
|
||||
public double? MonthSum { get; set; }
|
||||
|
||||
@@ -142,7 +142,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
try
|
||||
{
|
||||
var lEntity = MapperFactory.ValueListEntryDC_ValueListEntry.MapToNewEntity(pEntry);
|
||||
DAOFactory.GenericDAO.Insert(lEntity);
|
||||
DAOFactory.GenericDAO.Insert(lEntity); // Hier Fehler bei Komponente E
|
||||
return MapperFactory.ValueListEntryDC_ValueListEntry.MapToNewDC(lEntity);
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
Reference in New Issue
Block a user