From ce979323abf98233058fdb232d89dbef7bcbef8b Mon Sep 17 00:00:00 2001 From: himanshukeshari-eGov Date: Mon, 23 Dec 2024 11:59:13 +0530 Subject: [PATCH] Added one preparedSTmList --- .../java/org/egov/hrms/repository/EmployeeRepository.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core-services/egov-hrms/src/main/java/org/egov/hrms/repository/EmployeeRepository.java b/core-services/egov-hrms/src/main/java/org/egov/hrms/repository/EmployeeRepository.java index 14a90cc373..f951e3f57d 100644 --- a/core-services/egov-hrms/src/main/java/org/egov/hrms/repository/EmployeeRepository.java +++ b/core-services/egov-hrms/src/main/java/org/egov/hrms/repository/EmployeeRepository.java @@ -48,6 +48,7 @@ public class EmployeeRepository { public EmployeeCountResponse fetchEmployees(EmployeeSearchCriteria criteria, RequestInfo requestInfo){ List employees = new ArrayList<>(); List preparedStmtList = new ArrayList<>(); + List preparedStmtListCount = new ArrayList<>(); if(hrmsUtils.isAssignmentSearchReqd(criteria)) { List empUuids = fetchEmployeesforAssignment(criteria, requestInfo); if (CollectionUtils.isEmpty(empUuids)) @@ -64,10 +65,10 @@ public EmployeeCountResponse fetchEmployees(EmployeeSearchCriteria criteria, Req criteria.setUuids(empUuids); } List employeesCount = new ArrayList<>(); - String queryCount = queryBuilder.getEmployeeSearchQueryWithoutPagination(criteria, preparedStmtList); + String queryCount = queryBuilder.getEmployeeSearchQueryWithoutPagination(criteria, preparedStmtListCount); int count=0; try { - employeesCount = jdbcTemplate.query(queryCount, preparedStmtList.toArray(),rowMapper); + employeesCount = jdbcTemplate.query(queryCount, preparedStmtListCount.toArray(),rowMapper); count = employeesCount.size(); }catch(Exception e) { log.error("Exception while making the db call: ",e);