diff --git a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java index 3b342f172..acec40a3d 100644 --- a/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java +++ b/municipal-services/ws-services/src/main/java/org/egov/waterconnection/repository/builder/WsQueryBuilder.java @@ -302,8 +302,9 @@ public StringBuilder applyFilters(StringBuilder query, List preparedStat } } } else { - addClauseIfRequired(preparedStatement, query); + if (!StringUtils.isEmpty(criteria.getConnectionNumber())){ + addClauseIfRequired(preparedStatement, query); query.append(" conn.connectionno = ? "); preparedStatement.add(criteria.getConnectionNumber()); }