← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10748: Minor fix

 

------------------------------------------------------------
revno: 10748
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-05-02 22:55:43 +0200
message:
  Minor fix
modified:
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/datasetreport/jdbc/AnalyticsDataSetReportStore.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/datasetreport/jdbc/AnalyticsDataSetReportStore.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/datasetreport/jdbc/AnalyticsDataSetReportStore.java	2013-05-02 20:51:27 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/datasetreport/jdbc/AnalyticsDataSetReportStore.java	2013-05-02 20:55:43 +0000
@@ -184,6 +184,16 @@
         params.setPeriods( getList( period ) );
         params.setOrganisationUnits( getList( unit ) );
         
-        return analyticsService.getAggregatedDataValueMap( params );
+        Map<String, Double> map = analyticsService.getAggregatedDataValueMap( params );
+
+        Map<String, Double> dataMap = new HashMap<String, Double>();
+        
+        for ( Entry<String, Double> entry : map.entrySet() )
+        {
+            String[] split = entry.getKey().split( SEPARATOR );            
+            dataMap.put( split[0], entry.getValue() );
+        }
+        
+        return dataMap;
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml	2013-04-15 19:04:24 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml	2013-05-02 20:55:43 +0000
@@ -133,6 +133,10 @@
 	<property name="jdbcTemplate" ref="jdbcTemplate" />
   </bean>
 
+  <bean id="org.hisp.dhis.datasetreport.AnalyticsDataSetReportStore" class="org.hisp.dhis.datasetreport.jdbc.AnalyticsDataSetReportStore">
+    <property name="analyticsService" ref="org.hisp.dhis.analytics.AnalyticsService" />
+  </bean>
+  
   <!-- Dashboard -->
 
   <bean id="org.hisp.dhis.dashboard.DashboardContentStore" class="org.hisp.dhis.dashboard.hibernate.HibernateDashboardContentStore">