Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #845 from egovernments/ISTE-177
Browse files Browse the repository at this point in the history
added fromDate,toDate search criteria for planesearch for reindexing
  • Loading branch information
pradeepkumarcm-egov authored Jul 3, 2024
2 parents 6dd413a + c086f5d commit 9157e7a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ public class DemandCriteria {
private Long periodFrom;

private Long periodTo;

private Long fromDate;

private Long toDate;

private Type type;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,18 @@ public void addDemandCriteria(StringBuilder demandQuery, DemandCriteria demandCr
preparedStatementValues.add(demandCriteria.getPeriodTo());
}

if(demandCriteria.getFromDate() != null){
addAndClause(demandQuery);
demandQuery.append(" dmd.createdtime >= ? ");
preparedStatementValues.add(demandCriteria.getFromDate());
}

if(demandCriteria.getToDate() != null){
addAndClause(demandQuery);
demandQuery.append(" dmd.createdtime <= ? ");
preparedStatementValues.add(demandCriteria.getToDate());
}

if (demandCriteria.getConsumerCode() != null && !demandCriteria.getConsumerCode().isEmpty()) {
addAndClause(demandQuery);
demandQuery.append("dmd.consumercode IN ("
Expand Down

0 comments on commit 9157e7a

Please sign in to comment.