Skip to content

Commit

Permalink
HCMPRE-2212 making facilityId in plan search a set for multiple drop …
Browse files Browse the repository at this point in the history
…down search, changes filterMap signature.
  • Loading branch information
Priyanka-eGov committed Jan 27, 2025
1 parent b561a96 commit fcce569
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,16 +192,16 @@ public void enrichSearchRequest(PlanFacilitySearchRequest planFacilitySearchRequ
PlanFacilitySearchCriteria planFacilitySearchCriteria = planFacilitySearchRequest.getPlanFacilitySearchCriteria();

// Filter map for filtering facility meta data present in additional details
Map<String, String> filtersMap = new LinkedHashMap<>();
Map<String, Set<String>> filtersMap = new LinkedHashMap<>();

// Add facility status as a filter if present in search criteria
if(!ObjectUtils.isEmpty(planFacilitySearchCriteria.getFacilityStatus())) {
filtersMap.put(FACILITY_STATUS_SEARCH_PARAMETER_KEY, planFacilitySearchCriteria.getFacilityStatus());
filtersMap.put(FACILITY_STATUS_SEARCH_PARAMETER_KEY, Collections.singleton(planFacilitySearchCriteria.getFacilityStatus()));
}

// Add facility type as a filter if present in search criteria
if(!ObjectUtils.isEmpty(planFacilitySearchCriteria.getFacilityType())) {
filtersMap.put(FACILITY_TYPE_SEARCH_PARAMETER_KEY, planFacilitySearchCriteria.getFacilityType());
filtersMap.put(FACILITY_TYPE_SEARCH_PARAMETER_KEY, Collections.singleton(planFacilitySearchCriteria.getFacilityType()));
}

if(!CollectionUtils.isEmpty(filtersMap))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ public class PlanFacilitySearchCriteria {
private Integer limit = null;

@JsonIgnore
private Map<String, String> filtersMap = null;
private Map<String, Set<String>> filtersMap = null;

}

0 comments on commit fcce569

Please sign in to comment.