MitarbeiterauslastungRO - Zusätzlich Aufgliederung der Teamansicht pro Mitarbeiter
This commit is contained in:
@@ -59,9 +59,8 @@ namespace BeWo.Report.ReportObjects
|
||||
}
|
||||
|
||||
|
||||
public static MitarbeiterauslastungRO Create(IList<long> employeeOids, IList<long> teamOids, DateTime startDate, DateTime endDate)
|
||||
public static MitarbeiterauslastungRO Create(IList<long> employeeOids, IList<long> teamOids, DateTime startDate, DateTime endDate, bool teamnachklient = true)
|
||||
{
|
||||
|
||||
var ro = new MitarbeiterauslastungRO();
|
||||
ro.ReportStartDate = startDate;
|
||||
ro.ReportEndDate = endDate;
|
||||
@@ -95,26 +94,7 @@ namespace BeWo.Report.ReportObjects
|
||||
td = teamOid2Details[teamTemp.Oid.Value];
|
||||
}
|
||||
|
||||
var customers = DAOFactory.SearchDAO.FindCustomerOfTeam(teamOid);
|
||||
|
||||
if (customers.Count > 0)
|
||||
{
|
||||
|
||||
foreach (var c in customers)
|
||||
{
|
||||
var empDetail = new EmployeeDetail();
|
||||
ro.EmployeeDetailList.Add(empDetail);
|
||||
td.EmployeeDetailList.Add(empDetail);
|
||||
|
||||
empDetail.Teams = new List<Team> { teamTemp };
|
||||
empDetail.Employee = null;
|
||||
empDetail.Customer = c;
|
||||
empDetail.LastName = c.Person.LastName;
|
||||
empDetail.FirstName = c.Person.FirstName;
|
||||
empDetail.FullName = String.Format("{0}, {1}", empDetail.LastName, empDetail.FirstName);
|
||||
}
|
||||
}
|
||||
else
|
||||
if (!teamnachklient && teamTemp.MemberList != null && teamTemp.MemberList.Count > 0)
|
||||
{
|
||||
foreach (Employee emp in teamTemp.MemberList)
|
||||
{
|
||||
@@ -127,14 +107,31 @@ namespace BeWo.Report.ReportObjects
|
||||
empDetail.LastName = emp.Person.LastName;
|
||||
empDetail.FirstName = emp.Person.FirstName;
|
||||
empDetail.FullName = String.Format("{0}, {1}", empDetail.LastName, empDetail.FirstName);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var customers = DAOFactory.SearchDAO.FindCustomerOfTeam(teamOid);
|
||||
|
||||
if (customers.Count > 0)
|
||||
{
|
||||
|
||||
foreach (var c in customers)
|
||||
{
|
||||
var empDetail = new EmployeeDetail();
|
||||
ro.EmployeeDetailList.Add(empDetail);
|
||||
td.EmployeeDetailList.Add(empDetail);
|
||||
|
||||
empDetail.Teams = new List<Team> { teamTemp };
|
||||
empDetail.Employee = null;
|
||||
empDetail.Customer = c;
|
||||
empDetail.LastName = c.Person.LastName;
|
||||
empDetail.FirstName = c.Person.FirstName;
|
||||
empDetail.FullName = String.Format("{0}, {1}", empDetail.LastName, empDetail.FirstName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -156,8 +153,6 @@ namespace BeWo.Report.ReportObjects
|
||||
empDetail.FullName = String.Format("{0}, {1}", empDetail.LastName, empDetail.FirstName);
|
||||
}
|
||||
|
||||
|
||||
|
||||
foreach (EmployeeDetail employee in ro.EmployeeDetailList)
|
||||
{
|
||||
if (employee.Employee != null && employee.Teams.Count > 0)
|
||||
|
||||
Reference in New Issue
Block a user