diff options
Diffstat (limited to 'ecomp-sdk')
-rw-r--r-- | ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ReportRuntime.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ReportRuntime.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ReportRuntime.java index b6f944a7..29c5f3c1 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ReportRuntime.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ReportRuntime.java @@ -2791,6 +2791,7 @@ public List getMapMarkers(ReportData rd, org.onap.portalsdk.analytics.xmlobj.Rep reportJSONRuntime.setTotalRows(getReportDataSize()); ArrayList<ColumnHeader> colList = new ArrayList<>(); ArrayList<Map<String,Object>> reportDataRows = new ArrayList<>(); + ArrayList<Map<String,Object>> reportTotalDataRows = new ArrayList<Map<String,Object>>(); for(rd.reportColumnHeaderRows.resetNext(); rd.reportColumnHeaderRows.hasNext(); ) { count++; ColumnHeaderRow chr = rd.reportColumnHeaderRows.getNext(); @@ -2815,10 +2816,27 @@ public List getMapMarkers(ReportData rd, org.onap.portalsdk.analytics.xmlobj.Rep reportDataRows.add(dvJSON); } } + if(rd.reportDataTotalRow != null) { + for(rd.reportDataTotalRow.resetNext(); rd.reportDataTotalRow.hasNext(); count++) { + dvJSON = new HashMap<String,Object>(); + DataRow dr = rd.reportDataTotalRow.getNext(); + for(dr.resetNext(); dr.hasNext(); ) { + DataValue dv = dr.getNext(); + try { + dvJSON.put(dv.getColId(), dv); + } catch (Exception ex) { + ex.printStackTrace(); + + } + } + reportTotalDataRows.add(dvJSON); + } + } reportJSONRuntime.setReportDataColumns(colList); reportJSONRuntime.setReportDataRows(reportDataRows); //reportJSONRuntime.setSqlWhole(getWholeSQL()); reportJSONRuntime.setPageSize(getPageSize()); + reportJSONRuntime.setReportTotalDataRows(reportTotalDataRows); } |