dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #20217
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9141: local vn - Fixed in generating report inside of entry form.
------------------------------------------------------------
revno: 9141
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-11-28 17:16:05 +0700
message:
local vn - Fixed in generating report inside of entry form.
modified:
local/vn/dhis-service-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/importitem/hibernate/HibernateImportReportStore.java
local/vn/dhis-service-spreadsheet-reporting/src/main/resources/META-INF/dhis/beans.xml
local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exporting/GenerateExcelReportGeneric.java
local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exporting/action/GenerateExcelReportFlowAction.java
local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exporting/action/ValidateGenerateExportReportAction.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/vn/dhis-service-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/importitem/hibernate/HibernateImportReportStore.java'
--- local/vn/dhis-service-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/importitem/hibernate/HibernateImportReportStore.java 2011-08-03 08:38:38 +0000
+++ local/vn/dhis-service-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/importitem/hibernate/HibernateImportReportStore.java 2012-11-28 10:16:05 +0000
@@ -8,7 +8,7 @@
import org.hibernate.criterion.Projections;
import org.hibernate.criterion.Restrictions;
import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.period.PeriodStore;
+import org.hisp.dhis.period.PeriodService;
import org.hisp.dhis.period.PeriodType;
import org.hisp.dhis.reportsheet.importitem.ImportItem;
import org.hisp.dhis.reportsheet.importitem.ImportReport;
@@ -60,11 +60,11 @@
this.sessionFactory = sessionFactory;
}
- private PeriodStore periodStore;
+ private PeriodService periodService;
- public void setPeriodStore( PeriodStore periodStore )
+ public void setPeriodService( PeriodService periodService )
{
- this.periodStore = periodStore;
+ this.periodService = periodService;
}
// ----------------------------------------------------------------------
@@ -127,7 +127,7 @@
public int addImportReport( ImportReport importReport )
{
- PeriodType periodType = periodStore.getPeriodType( importReport.getPeriodType().getClass() );
+ PeriodType periodType = periodService.reloadPeriodType( importReport.getPeriodType() );
importReport.setPeriodType( periodType );
@@ -178,7 +178,7 @@
public void updateImportReport( ImportReport importReport )
{
- PeriodType periodType = periodStore.getPeriodType( importReport.getPeriodType().getClass() );
+ PeriodType periodType = periodService.reloadPeriodType( importReport.getPeriodType() );
importReport.setPeriodType( periodType );
@@ -222,5 +222,4 @@
return criteria.setProjection( Projections.distinct( Projections.property( "sheetNo" ) ) ).list();
}
-
}
=== modified file 'local/vn/dhis-service-spreadsheet-reporting/src/main/resources/META-INF/dhis/beans.xml'
--- local/vn/dhis-service-spreadsheet-reporting/src/main/resources/META-INF/dhis/beans.xml 2012-07-02 09:36:27 +0000
+++ local/vn/dhis-service-spreadsheet-reporting/src/main/resources/META-INF/dhis/beans.xml 2012-11-28 10:16:05 +0000
@@ -33,7 +33,7 @@
<bean id="org.hisp.dhis.reportsheet.importitem.ImportReportStore"
class="org.hisp.dhis.reportsheet.importitem.hibernate.HibernateImportReportStore">
<property name="sessionFactory" ref="sessionFactory"/>
- <property name="periodStore" ref="org.hisp.dhis.period.PeriodStore" />
+ <property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
</bean>
<bean id="org.hisp.dhis.reportsheet.importitem.ImportReportService"
=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exporting/GenerateExcelReportGeneric.java'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exporting/GenerateExcelReportGeneric.java 2012-11-26 09:12:15 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exporting/GenerateExcelReportGeneric.java 2012-11-28 10:16:05 +0000
@@ -280,6 +280,11 @@
return generateByDataSet;
}
+ public void setGenerateByDataSet( boolean generateByDataSet )
+ {
+ this.generateByDataSet = generateByDataSet;
+ }
+
// -------------------------------------------------------------------------
// Supporting methods
// -------------------------------------------------------------------------
@@ -724,5 +729,4 @@
selectionManager.setDownloadFilePath( outputReportFile.getPath() );
}
-
}
=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exporting/action/GenerateExcelReportFlowAction.java'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exporting/action/GenerateExcelReportFlowAction.java 2012-11-26 09:12:15 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exporting/action/GenerateExcelReportFlowAction.java 2012-11-28 10:16:05 +0000
@@ -80,16 +80,16 @@
this.showSubItem = showSubItem;
}
- private Boolean generateByDefault;
+ private Boolean generateByDataSet;
- public boolean getGenerateByDefault()
+ public boolean getGenerateByDataSet()
{
- return (generateByDefault == null) ? false : generateByDefault;
+ return (generateByDataSet == null) ? false : generateByDataSet;
}
- public void setGenerateByDefault( Boolean generateByDefault )
+ public void setGenerateByDataSet( Boolean generateByDataSet )
{
- this.generateByDefault = generateByDefault;
+ this.generateByDataSet = generateByDataSet;
}
// -------------------------------------------------------------------------
=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exporting/action/ValidateGenerateExportReportAction.java'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exporting/action/ValidateGenerateExportReportAction.java 2012-11-27 04:26:35 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/exporting/action/ValidateGenerateExportReportAction.java 2012-11-28 10:16:05 +0000
@@ -165,7 +165,7 @@
return ERROR;
}
- exportReportIds[0] = exportReport.getId() + "";
+ exportReportIds = new String[] { exportReport.getId() + "" };
}
if ( exportReportIds == null || exportReportIds.length == 0 )
@@ -214,7 +214,6 @@
// {
// return ERROR;
// }
-
/** Validate for whether data set completed or not * */
// Period period = PeriodType.createPeriodExternalId( periodIndex );
//