← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8500: Improve Aggregate Query Builder (WIP).

 

------------------------------------------------------------
revno: 8500
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-10-12 13:24:32 +0700
message:
  Improve Aggregate Query Builder (WIP).
modified:
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/CaseAggregateConditionTask.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/schedule/ScheduleCaseAggregateConditionAction.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 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/CaseAggregateConditionTask.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/CaseAggregateConditionTask.java	2012-10-11 02:33:30 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/CaseAggregateConditionTask.java	2012-10-12 06:24:32 +0000
@@ -177,22 +177,21 @@
                     Double resultValue = aggregationConditionService.parseConditition( aggCondition, orgUnit, period );
 
                     DataValue dataValue = dataValueService.getDataValue( orgUnit, dElement, period, optionCombo );
-
+                    
                     if ( resultValue != null && resultValue != 0.0 )
                     {
-                        // -----------------------------------------
+                        // -----------------------------------------------------
                         // Add dataValue
-                        // -----------------------------------------
-                        
+                        // -----------------------------------------------------
                         if ( dataValue == null )
                         {
                             dataValue = new DataValue( dElement, period, orgUnit, "" + resultValue, "", new Date(),
                                 null, optionCombo );
                             dataValueService.addDataValue( dataValue );
                         }
-                        // -----------------------------------------
+                        // -----------------------------------------------------
                         // Update dataValue
-                        // -----------------------------------------
+                        // -----------------------------------------------------
                         else
                         {
                             dataValue.setValue( "" + resultValue );
@@ -205,18 +204,16 @@
                         }
                     }
 
-                    // -----------------------------------------
+                    // ---------------------------------------------------------
                     // Delete dataValue
-                    // -----------------------------------------
+                    // ---------------------------------------------------------
                     else if ( dataValue != null )
                     {
                         dataValueService.deleteDataValue( dataValue );
                     }
-
                 }
             }
         }
-
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/schedule/ScheduleCaseAggregateConditionAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/schedule/ScheduleCaseAggregateConditionAction.java	2012-10-10 08:50:17 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/schedule/ScheduleCaseAggregateConditionAction.java	2012-10-12 06:24:32 +0000
@@ -179,6 +179,8 @@
         {
             systemSettingManager.saveSystemSetting( KEY_SCHEDULED_AGGREGATE_QUERY_BUILDER_PERIOD_TYPES,
                 (HashSet<String>) scheduledPeriodTypes );
+            systemSettingManager.saveSystemSetting(
+                KEY_AGGREGATE_QUERY_BUILDER_ORGUNITGROUPSET_AGG_LEVEL, orgUnitGroupSetAggLevel );
             
             if ( Scheduler.STATUS_RUNNING.equals( schedulingManager.getTaskStatus() ) )
             {