diff --git a/business-services/egov-hrms/src/main/java/org/egov/hrms/service/EmployeeService.java b/business-services/egov-hrms/src/main/java/org/egov/hrms/service/EmployeeService.java index f105cc7c7..ae4517421 100644 --- a/business-services/egov-hrms/src/main/java/org/egov/hrms/service/EmployeeService.java +++ b/business-services/egov-hrms/src/main/java/org/egov/hrms/service/EmployeeService.java @@ -661,7 +661,11 @@ public EmployeeResponse searchListOfEmployee(EmployeeSearchCriteria criteria, Re userSearchCriteria.put(HRMSConstants.HRMS_USER_SEARCH_CRITERA_ROLECODES,criteria.getRoles()); UserResponse userResponse = userService.getUserByTenantids(requestInfo, userSearchCriteria); userChecked =true; - if(!CollectionUtils.isEmpty(userResponse.getUser())) { + if(CollectionUtils.isEmpty(userResponse.getUser())) { + List employees = new ArrayList<>(); + return EmployeeResponse.builder().responseInfo(factory.createResponseInfoFromRequestInfo(requestInfo, true)) + .employees(employees).build(); + } else { mapOfUsers.putAll(userResponse.getUser().stream() .collect(Collectors.toMap(User::getUuid, Function.identity()))); }