MH: Auslaufende, nicht bewilligte HPs auf Startseite
This commit is contained in:
@@ -546,6 +546,27 @@ namespace BeWo.Data.Access
|
||||
Restrictions.And(Restrictions.IsNotNull("c.TerminationDate"), Restrictions.Between("c.TerminationDate", minDate, expiredUntil))))
|
||||
.List<SupportConcept>().Distinct().ToList();
|
||||
}
|
||||
public IEnumerable<SupportConcept> FindExpiringNotApprovedSupportConcepts(long? employeeOid, DateTime minDate, DateTime expiredUntil)
|
||||
{
|
||||
var c = CreateCriteriaIsActive<SupportConcept>();
|
||||
if (employeeOid == null)
|
||||
{
|
||||
return c
|
||||
.CreateCriteria(SupportConcept.PropertyName_CostBearer2SupportConceptList, JoinType.InnerJoin)
|
||||
.Add(Restrictions.Between(CostBearer2SupportConcept.PropertyName_RequestedEndDate, minDate, expiredUntil))
|
||||
.List<SupportConcept>();
|
||||
}
|
||||
|
||||
return c
|
||||
.CreateAlias(SupportConcept.PropertyName_CostBearer2SupportConceptList, "cb2sc", JoinType.InnerJoin)
|
||||
.CreateAlias(SupportConcept.PropertyName_Customer, "c", JoinType.InnerJoin)
|
||||
.CreateAlias("c.Employee2CustomerList", "e2c", JoinType.InnerJoin)
|
||||
.Add(Restrictions.Eq("e2c." + Employee2Customer.PropertyName_EmployeeOid, employeeOid.Value))
|
||||
.Add(Restrictions.Or(
|
||||
Restrictions.Between("cb2sc." + CostBearer2SupportConcept.PropertyName_RequestedEndDate, minDate, expiredUntil),
|
||||
Restrictions.And(Restrictions.IsNotNull("c.TerminationDate"), Restrictions.Between("c.TerminationDate", minDate, expiredUntil))))
|
||||
.List<SupportConcept>().Distinct().ToList();
|
||||
}
|
||||
|
||||
public IEnumerable<SupportConcept> FindSupportConceptsWithConferenceDate(long? employeeOid, DateTime conferenceDateUntil)
|
||||
{
|
||||
|
||||
@@ -31,6 +31,9 @@ namespace BeWo.Service.Plugins
|
||||
var list = MapperFactory.CompactSupportConceptDC_SupportConcept.MapToNewDCs(
|
||||
DAOFactory.SearchDAO.FindExpiringSupportConcepts(employeeOid, DateTime.Now.Date, expiredUntil));
|
||||
|
||||
list.AddRange(MapperFactory.CompactSupportConceptDC_SupportConcept.MapToNewDCs(
|
||||
DAOFactory.SearchDAO.FindExpiringNotApprovedSupportConcepts(employeeOid, DateTime.Now.Date, expiredUntil)));
|
||||
|
||||
return list.Where(s => s.StartDate.HasValue && s.EndDate.HasValue).ToList();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user