parent
0b54cf8d67
commit
61443c1e06
|
|
@ -37,7 +37,10 @@ function buildWhereClause(filters) {
|
|||
}
|
||||
if ((filters.occupancyEffectiveDateString ?? '') !== '') {
|
||||
sqlWhereClause +=
|
||||
' and (o.occupancyStartDate <= ? and (o.occupancyEndDate is null or o.occupancyEndDate >= ?))';
|
||||
` and (
|
||||
o.occupancyEndDate is null
|
||||
or (o.occupancyStartDate <= ? and o.occupancyEndDate >= ?)
|
||||
)`;
|
||||
sqlParameters.push(dateStringToInteger(filters.occupancyEffectiveDateString), dateStringToInteger(filters.occupancyEffectiveDateString));
|
||||
}
|
||||
if ((filters.mapId ?? '') !== '') {
|
||||
|
|
|
|||
|
|
@ -98,7 +98,10 @@ function buildWhereClause(filters: GetLotOccupanciesFilters): {
|
|||
|
||||
if ((filters.occupancyEffectiveDateString ?? '') !== '') {
|
||||
sqlWhereClause +=
|
||||
' and (o.occupancyStartDate <= ? and (o.occupancyEndDate is null or o.occupancyEndDate >= ?))'
|
||||
` and (
|
||||
o.occupancyEndDate is null
|
||||
or (o.occupancyStartDate <= ? and o.occupancyEndDate >= ?)
|
||||
)`
|
||||
sqlParameters.push(
|
||||
dateStringToInteger(filters.occupancyEffectiveDateString!),
|
||||
dateStringToInteger(filters.occupancyEffectiveDateString!)
|
||||
|
|
|
|||
Loading…
Reference in New Issue