dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19718
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8721: Change value-type of result in case aggregate query builder from Double to Integer.
------------------------------------------------------------
revno: 8721
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-10-26 10:05:57 +0700
message:
Change value-type of result in case aggregate query builder from Double to Integer.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/caseaggregation/CaseAggregationConditionService.java
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/caseaggregation/DefaultCaseAggregationConditionService.java
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/CaseAggregateConditionTask.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseaggregation/CaseAggregationResultAction.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationForm.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 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/caseaggregation/CaseAggregationConditionService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/caseaggregation/CaseAggregationConditionService.java 2012-03-16 07:50:14 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/caseaggregation/CaseAggregationConditionService.java 2012-10-26 03:05:57 +0000
@@ -63,7 +63,7 @@
Collection<CaseAggregationCondition> getCaseAggregationCondition( Collection<DataElement> dataElements );
- Double parseConditition( CaseAggregationCondition aggregationCondition, OrganisationUnit orgunit, Period period );
+ Integer parseConditition( CaseAggregationCondition aggregationCondition, OrganisationUnit orgunit, Period period );
Collection<PatientDataValue> getPatientDataValues( CaseAggregationCondition aggregationCondition, OrganisationUnit orgunit, Period period );
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/caseaggregation/DefaultCaseAggregationConditionService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/caseaggregation/DefaultCaseAggregationConditionService.java 2012-10-16 04:05:28 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/caseaggregation/DefaultCaseAggregationConditionService.java 2012-10-26 03:05:57 +0000
@@ -222,7 +222,7 @@
}
@Override
- public Double parseConditition( CaseAggregationCondition aggregationCondition, OrganisationUnit orgunit,
+ public Integer parseConditition( CaseAggregationCondition aggregationCondition, OrganisationUnit orgunit,
Period period )
{
String sql = convertCondition( aggregationCondition, orgunit, period );
@@ -998,8 +998,8 @@
return sql;
}
- public Double calValue( Collection<Integer> patientIds, String operator )
+ public Integer calValue( Collection<Integer> patientIds, String operator )
{
- return new Double( patientIds.size() );
+ return patientIds.size();
}
}
=== 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-25 13:31:14 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/scheduling/CaseAggregateConditionTask.java 2012-10-26 03:05:57 +0000
@@ -51,7 +51,6 @@
import org.hisp.dhis.organisationunit.OrganisationUnit;
import org.hisp.dhis.organisationunit.OrganisationUnitService;
import org.hisp.dhis.period.Period;
-import org.hisp.dhis.period.PeriodType;
import org.hisp.dhis.period.RelativePeriods;
import org.hisp.dhis.setting.SystemSettingManager;
import org.springframework.jdbc.core.JdbcTemplate;
@@ -174,12 +173,12 @@
{
for ( Period period : periods )
{
- Double resultValue = aggregationConditionService.parseConditition( aggCondition, orgUnit,
+ Integer resultValue = aggregationConditionService.parseConditition( aggCondition, orgUnit,
period );
DataValue dataValue = dataValueService.getDataValue( orgUnit, dElement, period, optionCombo );
- if ( resultValue != null && resultValue != 0.0 )
+ if ( resultValue != null && resultValue != 0 )
{
// -----------------------------------------------------
// Add dataValue
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseaggregation/CaseAggregationResultAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseaggregation/CaseAggregationResultAction.java 2012-10-24 07:40:38 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseaggregation/CaseAggregationResultAction.java 2012-10-26 03:05:57 +0000
@@ -242,14 +242,14 @@
for ( Period period : periods )
{
- Double resultValue = aggregationConditionService.parseConditition( condition, orgUnit, period );
+ Integer resultValue = aggregationConditionService.parseConditition( condition, orgUnit, period );
DataValue dataValue = dataValueService.getDataValue( orgUnit, dElement, period, optionCombo );
String key = orgUnit.getId() + "-" + format.formatPeriod( period );
String keyStatus = key + "-" + dElement.getId();
- if ( resultValue != null && resultValue != 0.0 )
+ if ( resultValue != null && resultValue != 0 )
{
if ( dataValue == null )
{
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationForm.vm 2012-10-22 06:15:00 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationForm.vm 2012-10-26 03:05:57 +0000
@@ -30,7 +30,7 @@
</td>
<td>
<input type="button" class='small-button' value="<<" onclick="getPreviousPeriodForStart()" id="previousPeriodForStartBtn" disabled />
- <select id="sDateLB" name="sDateLB" style='width:330px;'></select>
+ <select id="sDateLB" name="sDateLB" style='width:295px;'></select>
<input type="button" class='small-button'value=">>" onclick="getNextPeriodForStart()" id="nextPeriodForStartBtn" disabled />
</td>
</tr>
@@ -41,7 +41,7 @@
</td>
<td>
<input type="button" class='small-button' value="<<" onclick="getPreviousPeriodForEnd()" id="previousPeriodForEndBtn" disabled />
- <select id="eDateLB" name="eDateLB" style='width:330px;'></select>
+ <select id="eDateLB" name="eDateLB" style='width:295px;'></select>
<input type="button" class='small-button' value=">>" onclick="getNextPeriodForEnd()" id="nextPeriodForEndBtn" disabled />
<i><span id='warningMessage' style="color:red"></span></i>
</td>