Modified getOrdersIdsByDates query to get the intersecting projects between start and end dates
In this way it's possible to get all the projects for wich some part of their lenght is comprehended between the defined start and end dates, with the previous strategy only the projects which were completely included in the interval were being listed. FEA: ItEr77S15FilteringEnhancements
This commit is contained in:
parent
49b5b941bd
commit
eefd4026fd
1 changed files with 4 additions and 4 deletions
|
|
@ -320,11 +320,11 @@ public class OrderDAO extends IntegrationEntityDAO<Order> implements
|
|||
String strQuery = "SELECT t.taskSource.schedulingData.orderElement.id "
|
||||
+ "FROM TaskElement t "
|
||||
+ "WHERE t.parent IS NULL ";
|
||||
if (startDate != null) {
|
||||
strQuery += "AND t.startDate.date >= :startDate ";
|
||||
}
|
||||
if (endDate != null) {
|
||||
strQuery += "AND t.endDate.date <= :endDate ";
|
||||
strQuery += "AND t.startDate.date <= :endDate ";
|
||||
}
|
||||
if (startDate != null) {
|
||||
strQuery += "AND t.endDate.date >= :startDate ";
|
||||
}
|
||||
|
||||
Query query = getSession().createQuery(strQuery);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue