← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4086: Bug Fixed in Data Analyser

 

------------------------------------------------------------
revno: 4086
committer: Mithilesh Kumar Thakur<mithilesh.hisp@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-07-07 13:02:49 +0530
message:
  Bug Fixed in Data Analyser
modified:
  local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateDataStatusDataSetWiseResultAction.java
  local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/dataStatusDataSetWiseResult.vm


--
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 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateDataStatusDataSetWiseResultAction.java'
--- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateDataStatusDataSetWiseResultAction.java	2011-05-18 11:12:17 +0000
+++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateDataStatusDataSetWiseResultAction.java	2011-07-07 07:32:49 +0000
@@ -238,7 +238,18 @@
     {
         return ouDataSetMapColor;
     }
+    
+    private Map<OrganisationUnit, Integer> ouMaporgChildCount;
+    
+    public Map<OrganisationUnit, Integer> getOuMaporgChildCount()
+    {
+        return ouMaporgChildCount;
+    }
 
+    public void setOuMaporgChildCount( Map<OrganisationUnit, Integer> ouMaporgChildCount )
+    {
+        this.ouMaporgChildCount = ouMaporgChildCount;
+    }
     // ---------------------------------------------------------------
     // Action Implementation
     // ---------------------------------------------------------------
@@ -259,6 +270,8 @@
         //dsMapSummaryStatusResult = new HashMap<DataSet, Map<OrganisationUnit, List<Integer>>>();
         
         ouDataSetMapColor = new HashMap<OrganisationUnit, List<Integer>>();
+        ouMaporgChildCount = new HashMap<OrganisationUnit, Integer>();
+        
         
         // Period Related Info
         PeriodType periodType = periodService.getPeriodTypeByName( periodTypeId );
@@ -332,7 +345,14 @@
         Iterator<DataSet> dsIterator = dataSetList.iterator();
         while( dsIterator.hasNext() )
         {
-            DataSet dSet = dsIterator.next();
+            DataSet dSet = (DataSet) dsIterator.next();
+            
+            // Remove Line Listing data sets
+            if ( dSet.getId() == 8 || dSet.getId() == 9 || dSet.getId() == 10 || dSet.getId() == 14 || dSet.getId() == 15 || dSet.getId() == 35 || dSet.getId() == 36 || dSet.getId() == 37 || dSet.getId() == 38 )
+            {
+                dsIterator.remove();
+                continue;
+            }       
             //List<Source> dso = new ArrayList<Source>( dSet.getSources() );
             List<OrganisationUnit> dso = new ArrayList<OrganisationUnit>( dSet.getSources() );
 
@@ -369,6 +389,10 @@
             while ( orgUnitListIterator.hasNext() )
             {
                 OrganisationUnit orgUnit = orgUnitListIterator.next();
+                
+                ouMaporgChildCount.put( orgUnit, orgUnit.getChildren().size() );
+                //orgUnit.getChildren().size();
+                
                 orgUnitInfo = "" + orgUnit.getId();
                 if ( maxOULevel < organisationUnitService.getLevelOfOrganisationUnit( orgUnit ) )
                     maxOULevel = organisationUnitService.getLevelOfOrganisationUnit( orgUnit );

=== modified file 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/dataStatusDataSetWiseResult.vm'
--- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/dataStatusDataSetWiseResult.vm	2011-05-24 08:25:51 +0000
+++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/dataStatusDataSetWiseResult.vm	2011-07-07 07:32:49 +0000
@@ -81,13 +81,15 @@
 						#foreach($chiildorgUnit in $orgUnitList)
 						#set( $count1 = $minOULevel )
 						#set( $curOrgUnitLevel = $organisationUnitService.getLevelOfOrganisationUnit( $chiildorgUnit ) )
-						#set( $orgunitCount = $ouMapForChildDSAssociation.get( $chiildorgUnit ) )
+						##set( $orgunitCount = $ouMapForChildDSAssociation.get( $chiildorgUnit ) )
+						#set( $orgunitChildCount = $ouMaporgChildCount.get( $chiildorgUnit ) )
 						##set( $orgunitColor = $ouDataSetMapColor.get( $chiildorgUnit ) )
 						
 						<tr class="TableHeadingCellStyles">
 							#foreach( $levelName in $levelNames )
 								#if( $count1 == $curOrgUnitLevel )
-									<td>$chiildorgUnit.name #if( $orgunitCount !=-1 ) ( $orgunitCount ) #end</td>
+									<!--<td>$chiildorgUnit.name #if( $orgunitCount !=-1 ) ( $orgunitCount ) #end</td>-->
+									<td>$chiildorgUnit.name  ( $orgunitChildCount ) </td>
 								#else
 									<td>&nbsp;</td>
 								#end