@@ -0,0 +1,1255 @@
+package org.opencps.api.controller.util;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Aimport org.opencps.api.statistic.model.StatisticDossierModel;%0A%0Aimport com.liferay.portal.kernel.json.JSONArray;%0Aimport com.liferay.portal.kernel.json.JSONObject;%0Aimport com.liferay.portal.kernel.log.Log;%0Aimport com.liferay.portal.kernel.log.LogFactoryUtil;%0A%0Apublic class StatisticUtils %7B%0A%0A%09static Log _log = LogFactoryUtil.getLog(StatisticUtils.class);%0A%0A%09public static List%3CStatisticDossierModel%3E mapperStatisticDossierList(JSONArray statistics) %7B%0A%0A%09%09List%3CStatisticDossierModel%3E results = new ArrayList%3CStatisticDossierModel%3E();%0A%0A%09%09try %7B%0A%09%09%09if (statistics != null && statistics.length() %3E 0) %7B%0A%09%09%09%09for (int i = 0; i %3C statistics.length(); i++) %7B%0A%09%09%09%09%09JSONObject statistic = statistics.getJSONObject(i);%0A%09%09%09%09%09StatisticDossierModel ett = new StatisticDossierModel();%0A%09%09%09%09%09ett.setCount(statistic.getLong(%22count%22));%0A%09%09%09%09%09ett.setDossierStatus(statistic.getString(%22dossierStatus%22));%0A%09%09%09%09%09ett.setDossierSubStatus(statistic.getString(%22dossierSubStatus%22));%0A%09%09%09%09%09ett.setLevel(statistic.getInt(%22level%22));%0A%09%09%09%09%09ett.setStatusName(statistic.getString(%22statusName%22));%0A%09%09%09%09%09results.add(ett);%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%0A%09%09%7D catch (Exception e) %7B%0A%09%09%09_log.error(e);%0A%09%09%7D%0A%0A%09%09return results;%0A%09%7D%0A%0A%7D%0A

Add StatisticUtils