class PatchingRepositoryImpl implements PatchingRepository, Constants {

    @Override
    public List<Map<String, Object>> getPatchingProgress(String assetGroup,
            LocalDate startDate, LocalDate endDate) throws DataException {
        Map<String, Object> mustFilter = new HashMap<>();
        mustFilter.put(CommonUtils.convertAttributetoKeyword("ag"), assetGroup);

        Map<String, Object> rangeMap = new HashMap<>();
        rangeMap.put("gte", startDate.format(DateTimeFormatter.ISO_DATE));
        rangeMap.put("lte", endDate.format(DateTimeFormatter.ISO_DATE));

        Map<String, Object> dateRangeMap = new HashMap<>();
        dateRangeMap.put("date", rangeMap);

        mustFilter.put("range", dateRangeMap);
      try{  return elasticSearchRepository.getSortedDataFromES("assetgroup_stats",
                "patching", mustFilter, null, null, Arrays.asList("date",
                        "unpatched_instances", "patched_instances",
                        "total_instances", "patching_percentage"), null, null);
      } catch(Exception e){
          throw new DataException(e);
      }
    }

}