From 088b132615317e4a3f1a459a57d0a04218a0ea15 Mon Sep 17 00:00:00 2001 From: trungnt Date: Mon, 3 Apr 2017 10:33:39 +0700 Subject: [PATCH 1/3] fix bug empty statistic json --- .../statisticsmgt/util/StatisticsUtil.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/portlets/opencps-portlet/docroot/WEB-INF/src/org/opencps/statisticsmgt/util/StatisticsUtil.java b/portlets/opencps-portlet/docroot/WEB-INF/src/org/opencps/statisticsmgt/util/StatisticsUtil.java index 479045cdac..ab678f04b6 100644 --- a/portlets/opencps-portlet/docroot/WEB-INF/src/org/opencps/statisticsmgt/util/StatisticsUtil.java +++ b/portlets/opencps-portlet/docroot/WEB-INF/src/org/opencps/statisticsmgt/util/StatisticsUtil.java @@ -987,7 +987,7 @@ public static JSONArray renderData( groupId, PortletPropsValues.DATAMGT_MASTERDATA_GOVERNMENT_AGENCY); } - else if(filterKey.equals("domain")){ + else if (filterKey.equals("domain")) { dictCollection = DictCollectionLocalServiceUtil.getDictCollection( groupId, @@ -1053,8 +1053,8 @@ else if(filterKey.equals("domain")){ int level = 0; // Tham chieu den bang du lieu danh muc - - if(dictCollection != null){ + + if (dictCollection != null) { dictItem = DictItemLocalServiceUtil.getDictItemInuseByItemCode( dictCollection.getDictCollectionId(), @@ -1076,8 +1076,7 @@ else if(filterKey.equals("domain")){ StringPool.PERIOD); } - - + // luu vao json item.put("code", code); @@ -1315,11 +1314,11 @@ else if(filterKey.equals("domain")){ item.put("keys", keys); item.put("period-labels", periods); - + item.put("start-month", startMonth); - + item.put("start-year", startYear); - + item.put("period", period); } @@ -1362,8 +1361,7 @@ else if(filterKey.equals("domain")){ * @return */ public static JSONArray sortByCodes(JSONArray jsonArray, String[] codes) { - - JSONArray temp = JSONFactoryUtil.createJSONArray(); + JSONArray temp = jsonArray; if (codes != null && codes.length > 0 && jsonArray != null) { for (int c = 0; c < codes.length; c++) { for (int j = 0; j < jsonArray.length(); j++) { From 52fcc135ff2c1f51eee7c33393d4089e2fb5045f Mon Sep 17 00:00:00 2001 From: trungnt Date: Mon, 3 Apr 2017 10:36:46 +0700 Subject: [PATCH 2/3] fix bug empty statistic json --- .../org/opencps/statisticsmgt/util/StatisticsUtil.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/portlets/opencps-portlet/docroot/WEB-INF/src/org/opencps/statisticsmgt/util/StatisticsUtil.java b/portlets/opencps-portlet/docroot/WEB-INF/src/org/opencps/statisticsmgt/util/StatisticsUtil.java index ab678f04b6..39a53767c3 100644 --- a/portlets/opencps-portlet/docroot/WEB-INF/src/org/opencps/statisticsmgt/util/StatisticsUtil.java +++ b/portlets/opencps-portlet/docroot/WEB-INF/src/org/opencps/statisticsmgt/util/StatisticsUtil.java @@ -1361,8 +1361,9 @@ else if (filterKey.equals("domain")) { * @return */ public static JSONArray sortByCodes(JSONArray jsonArray, String[] codes) { - JSONArray temp = jsonArray; + if (codes != null && codes.length > 0 && jsonArray != null) { + JSONArray temp = JSONFactoryUtil.createJSONArray(); for (int c = 0; c < codes.length; c++) { for (int j = 0; j < jsonArray.length(); j++) { JSONObject object = jsonArray.getJSONObject(j); @@ -1372,9 +1373,12 @@ public static JSONArray sortByCodes(JSONArray jsonArray, String[] codes) { } } } + return temp; + } + else { + return jsonArray; } - return temp; } /** From 2a6eee247928c3dec23604ceeb270ccb902b0549 Mon Sep 17 00:00:00 2001 From: Khoa Vu Dang Date: Tue, 4 Apr 2017 08:54:09 +0700 Subject: [PATCH 3/3] Update language --- .../docroot/WEB-INF/src/content/Language_vi.properties | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hooks/opencps-hook/docroot/WEB-INF/src/content/Language_vi.properties b/hooks/opencps-hook/docroot/WEB-INF/src/content/Language_vi.properties index a0225888f1..403b49c2a2 100644 --- a/hooks/opencps-hook/docroot/WEB-INF/src/content/Language_vi.properties +++ b/hooks/opencps-hook/docroot/WEB-INF/src/content/Language_vi.properties @@ -1141,4 +1141,5 @@ system-cus = H\u1ec7 th\u1ed1ng \u0111ang x\u1eed l\u00fd error-cus = L\u1ed7i x\u1eed l\u00fd denied-cus = \u0110\u00e3 t\u1eeb ch\u1ed1i canceled-cus = \u0110\u00e3 h\u1ee7y h\u1ed3 s\u01a1 -please-add-note-before-send = H\u00e3y nh\u1eadp \u00fd ki\u1ebfn tr\u01b0\u1edbc khi chuy\u1ec3n b\u01b0\u1edbc \ No newline at end of file +please-add-note-before-send = H\u00e3y nh\u1eadp \u00fd ki\u1ebfn tr\u01b0\u1edbc khi chuy\u1ec3n b\u01b0\u1edbc +has-sign = K\u00fd s\u1ed1 \ No newline at end of file