dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #09318
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2436: Fixed minor bug in RoutineReports Section
------------------------------------------------------------
revno: 2436
committer: Bharath <chbharathk@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2010-12-29 10:22:35 +0530
message:
Fixed minor bug in RoutineReports Section
modified:
local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/routine/action/GenerateRoutineReportAnalyserResultAction.java
--
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-reports-national/src/main/java/org/hisp/dhis/reports/routine/action/GenerateRoutineReportAnalyserResultAction.java'
--- local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/routine/action/GenerateRoutineReportAnalyserResultAction.java 2010-12-22 07:29:08 +0000
+++ local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/routine/action/GenerateRoutineReportAnalyserResultAction.java 2010-12-29 04:52:35 +0000
@@ -238,6 +238,11 @@
System.out.println( orgUnitList.get( 0 ).getName()+ " : " + selReportObj.getName()+" : Report Generation Start Time is : " + new Date() );
+ OrganisationUnitGroup orgUnitGroup = organisationUnitGroupService.getOrganisationUnitGroup( Integer.parseInt( organisationUnitGroupId ) );
+
+ List<OrganisationUnit> orgGroupMembers = new ArrayList<OrganisationUnit>( orgUnitGroup.getMembers() );
+
+
selectedPeriod = periodService.getPeriod( availablePeriods );
sDate = format.parseDate( String.valueOf( selectedPeriod.getStartDate() ) );
@@ -704,33 +709,22 @@
{
if ( organisationUnitGroupId.equalsIgnoreCase( "ALL" ) )
{
- // System.out.println( "Inside organisation Unit Group " + organisationUnitGroupId );
- //System.out.println( tempStr + ":" + deCodeString + ",start date:" + tempStartDate.getTime() + " ,end date :" + tempEndDate.getTime() + " , org unit :" + currentOrgUnit + " , report model: " + reportModelTB );
tempStr = reportService.getResultDataValue( deCodeString, tempStartDate.getTime(), tempEndDate.getTime(), currentOrgUnit, reportModelTB );
- // System.out.println( tempStr );
}
else if ( organisationUnitGroupId.equalsIgnoreCase( "Selected_Only" ) )
{
- //System.out.println( "Inside organisation Unit Group " + organisationUnitGroupId );
tempStr = reportService.getIndividualResultDataValue( deCodeString, tempStartDate.getTime(), tempEndDate.getTime(), currentOrgUnit, reportModelTB );
}
else
{
- OrganisationUnitGroup orgUnitGroup = organisationUnitGroupService.getOrganisationUnitGroup( Integer.parseInt( organisationUnitGroupId ) );
-
- //System.out.println( "Inside organisation Unit Group " + orgUnitGroup.getName() );
- List<OrganisationUnit> orgGroupMembers = new ArrayList<OrganisationUnit>( orgUnitGroup.getMembers() );
- //System.out.println( "Size of Group member : " + orgGroupMembers.size() );
-
- List<OrganisationUnit> orgUnitList = new ArrayList<OrganisationUnit>( organisationUnitService.getOrganisationUnitWithChildren( ouIDTB ) );
-
- //System.out.println( "Size of Child member : " + orgUnitList.size() );
- orgGroupMembers.retainAll( orgUnitList );
- //System.out.println( "Size of member after retain : " + orgGroupMembers.size() );
+
+ List<OrganisationUnit> orgUnitList = new ArrayList<OrganisationUnit>( organisationUnitService.getOrganisationUnitWithChildren( currentOrgUnit.getId() ) );
+
+ orgUnitList.retainAll( orgGroupMembers );
double temp = 0.0;
double value = 0.0;
- for ( OrganisationUnit unit : orgGroupMembers )
+ for ( OrganisationUnit unit : orgUnitList )
{
tempStr = reportService.getResultDataValue( deCodeString, tempStartDate.getTime(), tempEndDate.getTime(), unit, reportModelTB );