- Überarbeitung Perseh Import für weiteres LWL Format

- Arbeitszeit Kopieren im EmployeeView eingebaut
- Diverse Kundenanpassungen (Christopherus Haus, Prof Eggers Stiftung, Trias)
- Bugfix History für Klienten
This commit is contained in:
Christian
2025-03-28 14:14:40 +01:00
parent 2336606407
commit 9dcb5c206c
29 changed files with 1504 additions and 385 deletions

View File

@@ -206,7 +206,7 @@ namespace BeWo.ServiceUtils.History
}
public static void MakeCustomerHistoryEntry(Customer lOriginal, CustomerDC newCustomer, long? Oid, StatementType statementType, List<Customer2Person> originalCustomer2PersonList, List<Customer2Organisation> originalC2OList, List<Employee2Customer> originale2CList)
public static void MakeCustomerHistoryEntry(Customer lOriginal, CustomerDC newCustomer, long? Oid, StatementType statementType, List<Customer2Person> originalCustomer2PersonList, List<Customer2Organisation> originalC2OList, List<Employee2Customer> originale2CList, List<AbsenceTime> originaleAbsenceTimeList)
{
var lCustomerHistory = new CustomerHistory
{
@@ -239,21 +239,22 @@ namespace BeWo.ServiceUtils.History
MakeHistoryEntry(lOriginal.Customer2PersonList, originalCustomer2PersonList, lOriginal.Oid, statementType);
MakeHistoryEntry(lOriginal.Customer2OrganisationList, originalC2OList, lOriginal.Oid, statementType);
MakeHistoryEntry(lOriginal.Employee2CustomerList, originale2CList, lOriginal.Oid, statementType);
MakeHistoryEntry(lOriginal.AbsenceTimes, originaleAbsenceTimeList, lOriginal.Oid, statementType);
var person = lOriginal.Person;
MakeNewPersonHistoryEntry(person, newCustomer, statementType);
if (newCustomer.AbsenceTimes != null)
{
foreach (var item in newCustomer.AbsenceTimes)
{
if (!item.CustomerOid.HasValue)
{
item.CustomerOid = lOriginal.Oid.Value;
}
}
}
CreateAbsenceTimeHistoryEntry(lOriginal.AbsenceTimes, newCustomer.AbsenceTimes);
//if (newCustomer.AbsenceTimes != null)
//{
// foreach (var item in newCustomer.AbsenceTimes)
// {
// if (!item.CustomerOid.HasValue)
// {
// item.CustomerOid = lOriginal.Oid.Value;
// }
// }
//}
//CreateAbsenceTimeHistoryEntry(lOriginal.AbsenceTimes, newCustomer.AbsenceTimes);
}
public static void MakeNewPersonHistoryEntry(Person originalPerson, PersonDC newPerson, StatementType statementType)
@@ -740,6 +741,13 @@ namespace BeWo.ServiceUtils.History
DAOFactory.GenericDAO.Insert(historyEntry);
}
else if (entityObj is AbsenceTime)
{
var at = entityObj as AbsenceTime;
var atDc = MapperFactory.AbsenceTimeDC_AbsenceTime.MapToNewDC(at);
atDc.CustomerOid = customerOid;
CreateAbsenceTimeHistoryEntry(atDc, sType);
}
}
}
}