From c2a96733e3c4a790fe7f54a89c754c9bfbbbd024 Mon Sep 17 00:00:00 2001 From: zack Date: Tue, 9 Jul 2019 18:32:58 +0800 Subject: [PATCH] =?UTF-8?q?DEMO-2528=20demo=E7=BC=96=E8=AF=91=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/demo/SaveReportToDatabase.java | 2 +- src/main/java/com/fr/function/ReportCheck.java | 5 +++-- .../java/com/fr/io/CreateGenericTemplate.java | 3 ++- src/main/java/com/fr/io/ExcelToCpt.java | 14 ++++++++------ src/main/java/com/fr/io/ExcuteDemo.java | 4 +++- src/main/java/com/fr/io/ExportApi.java | 3 +-- src/main/java/com/fr/io/ExportBatch.java | 10 ++++++---- src/main/java/com/fr/io/ExportExcel.java | 9 +++++---- src/main/java/com/fr/io/ExportReports.java | 12 +++++++----- src/main/java/com/fr/io/JavaPrint.java | 4 +++- src/main/java/com/fr/io/SaveReportToDatabase.java | 15 ++++++++------- src/main/java/com/fr/io/SetParameterWindow.java | 2 +- src/main/java/com/fr/io/SimpleDemo.java | 2 +- 13 files changed, 49 insertions(+), 36 deletions(-) diff --git a/src/main/java/com/fr/demo/SaveReportToDatabase.java b/src/main/java/com/fr/demo/SaveReportToDatabase.java index 5f458fb..49d3e3d 100644 --- a/src/main/java/com/fr/demo/SaveReportToDatabase.java +++ b/src/main/java/com/fr/demo/SaveReportToDatabase.java @@ -4,11 +4,11 @@ import com.fr.base.operator.common.CommonOperator; import com.fr.chart.activator.ChartBaseActivator; import com.fr.config.activator.BaseDBActivator; import com.fr.config.activator.ConfigurationActivator; -import com.fr.data.impl.config.activator.RestrictionActivator; import com.fr.env.operator.CommonOperatorImpl; import com.fr.module.Module; import com.fr.module.tool.ActivatorToolBox; import com.fr.report.ReportActivator; +import com.fr.report.RestrictionActivator; import com.fr.report.module.ReportBaseActivator; import com.fr.store.StateServerActivator; import com.fr.workspace.simple.SimpleWork; diff --git a/src/main/java/com/fr/function/ReportCheck.java b/src/main/java/com/fr/function/ReportCheck.java index 21d57da..92ef31d 100644 --- a/src/main/java/com/fr/function/ReportCheck.java +++ b/src/main/java/com/fr/function/ReportCheck.java @@ -1,13 +1,11 @@ // 自定义函数实现表间校验 package com.fr.function; -import java.util.HashMap; import com.fr.base.ResultFormula; import com.fr.base.operator.common.CommonOperator; import com.fr.chart.activator.ChartBaseActivator; import com.fr.config.activator.BaseDBActivator; import com.fr.config.activator.ConfigurationActivator; -import com.fr.data.impl.config.activator.RestrictionActivator; import com.fr.env.operator.CommonOperatorImpl; import com.fr.io.TemplateWorkBookIO; import com.fr.json.JSONArray; @@ -17,6 +15,7 @@ import com.fr.main.workbook.ResultWorkBook; import com.fr.module.Module; import com.fr.module.tool.ActivatorToolBox; import com.fr.report.ReportActivator; +import com.fr.report.RestrictionActivator; import com.fr.report.cell.CellElement; import com.fr.report.module.ReportBaseActivator; import com.fr.report.report.ResultReport; @@ -26,6 +25,8 @@ import com.fr.store.StateServerActivator; import com.fr.workspace.simple.SimpleWork; import com.fr.write.cal.WB; +import java.util.HashMap; + public class ReportCheck extends AbstractFunction { private static HashMap wMap = new HashMap(); diff --git a/src/main/java/com/fr/io/CreateGenericTemplate.java b/src/main/java/com/fr/io/CreateGenericTemplate.java index eca3c7e..9fd54e5 100644 --- a/src/main/java/com/fr/io/CreateGenericTemplate.java +++ b/src/main/java/com/fr/io/CreateGenericTemplate.java @@ -1,4 +1,5 @@ package com.fr.io; + import com.fr.base.TableData; import com.fr.base.operator.common.CommonOperator; import com.fr.chart.activator.ChartBaseActivator; @@ -6,13 +7,13 @@ import com.fr.config.activator.BaseDBActivator; import com.fr.config.activator.ConfigurationActivator; import com.fr.data.impl.DBTableData; import com.fr.data.impl.NameDatabaseConnection; -import com.fr.data.impl.config.activator.RestrictionActivator; import com.fr.env.operator.CommonOperatorImpl; import com.fr.general.data.TableDataColumn; import com.fr.main.impl.WorkBook; import com.fr.module.Module; import com.fr.module.tool.ActivatorToolBox; import com.fr.report.ReportActivator; +import com.fr.report.RestrictionActivator; import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.TemplateCellElement; import com.fr.report.cell.cellattr.core.group.DSColumn; diff --git a/src/main/java/com/fr/io/ExcelToCpt.java b/src/main/java/com/fr/io/ExcelToCpt.java index 53c973b..188acf0 100644 --- a/src/main/java/com/fr/io/ExcelToCpt.java +++ b/src/main/java/com/fr/io/ExcelToCpt.java @@ -1,24 +1,26 @@ package com.fr.io; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.OutputStream; + import com.fr.base.operator.common.CommonOperator; import com.fr.chart.activator.ChartBaseActivator; import com.fr.config.activator.BaseDBActivator; import com.fr.config.activator.ConfigurationActivator; -import com.fr.data.impl.config.activator.RestrictionActivator; import com.fr.env.operator.CommonOperatorImpl; -import com.fr.main.impl.WorkBook; import com.fr.io.importer.Excel2007ReportImporter; import com.fr.main.TemplateWorkBook; +import com.fr.main.impl.WorkBook; import com.fr.module.Module; import com.fr.module.tool.ActivatorToolBox; import com.fr.report.ReportActivator; +import com.fr.report.RestrictionActivator; import com.fr.report.module.ReportBaseActivator; import com.fr.store.StateServerActivator; import com.fr.workspace.simple.SimpleWork; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.OutputStream; + public class ExcelToCpt { public static void main(String[] args) throws Exception { // 首先需要定义执行所在的环境,这样才能正确读取数据库信息 diff --git a/src/main/java/com/fr/io/ExcuteDemo.java b/src/main/java/com/fr/io/ExcuteDemo.java index 0abb589..10849af 100644 --- a/src/main/java/com/fr/io/ExcuteDemo.java +++ b/src/main/java/com/fr/io/ExcuteDemo.java @@ -1,9 +1,9 @@ package com.fr.io; + import com.fr.base.operator.common.CommonOperator; import com.fr.chart.activator.ChartBaseActivator; import com.fr.config.activator.BaseDBActivator; import com.fr.config.activator.ConfigurationActivator; -import com.fr.data.impl.config.activator.RestrictionActivator; import com.fr.env.operator.CommonOperatorImpl; import com.fr.io.exporter.ExcelExporter; import com.fr.main.TemplateWorkBook; @@ -11,10 +11,12 @@ import com.fr.main.workbook.ResultWorkBook; import com.fr.module.Module; import com.fr.module.tool.ActivatorToolBox; import com.fr.report.ReportActivator; +import com.fr.report.RestrictionActivator; import com.fr.report.module.ReportBaseActivator; import com.fr.stable.WriteActor; import com.fr.store.StateServerActivator; import com.fr.workspace.simple.SimpleWork; + import java.io.File; import java.io.FileOutputStream; diff --git a/src/main/java/com/fr/io/ExportApi.java b/src/main/java/com/fr/io/ExportApi.java index 26b0df5..7c39f77 100644 --- a/src/main/java/com/fr/io/ExportApi.java +++ b/src/main/java/com/fr/io/ExportApi.java @@ -5,9 +5,7 @@ import com.fr.base.operator.common.CommonOperator; import com.fr.chart.activator.ChartBaseActivator; import com.fr.config.activator.BaseDBActivator; import com.fr.config.activator.ConfigurationActivator; -import com.fr.data.impl.config.activator.RestrictionActivator; import com.fr.env.operator.CommonOperatorImpl; -import com.fr.general.ModuleContext; import com.fr.io.exporter.CSVExporter; import com.fr.io.exporter.EmbeddedTableDataExporter; import com.fr.io.exporter.ExcelExporter; @@ -22,6 +20,7 @@ import com.fr.main.workbook.ResultWorkBook; import com.fr.module.Module; import com.fr.module.tool.ActivatorToolBox; import com.fr.report.ReportActivator; +import com.fr.report.RestrictionActivator; import com.fr.report.module.ReportBaseActivator; import com.fr.stable.WriteActor; import com.fr.store.StateServerActivator; diff --git a/src/main/java/com/fr/io/ExportBatch.java b/src/main/java/com/fr/io/ExportBatch.java index 9968d87..3123880 100644 --- a/src/main/java/com/fr/io/ExportBatch.java +++ b/src/main/java/com/fr/io/ExportBatch.java @@ -1,21 +1,23 @@ package com.fr.io; + +import com.fr.base.operator.common.CommonOperator; +import com.fr.chart.activator.ChartBaseActivator; import com.fr.config.activator.BaseDBActivator; import com.fr.config.activator.ConfigurationActivator; -import com.fr.data.impl.config.activator.RestrictionActivator; +import com.fr.env.operator.CommonOperatorImpl; import com.fr.io.exporter.ExcelExporter; import com.fr.main.TemplateWorkBook; import com.fr.main.workbook.ResultWorkBook; import com.fr.module.Module; import com.fr.module.tool.ActivatorToolBox; import com.fr.report.ReportActivator; +import com.fr.report.RestrictionActivator; import com.fr.report.module.ReportBaseActivator; import com.fr.stable.StableUtils; import com.fr.stable.WriteActor; import com.fr.store.StateServerActivator; import com.fr.workspace.simple.SimpleWork; -import com.fr.chart.activator.ChartBaseActivator; -import com.fr.base.operator.common.CommonOperator; -import com.fr.env.operator.CommonOperatorImpl; + import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; diff --git a/src/main/java/com/fr/io/ExportExcel.java b/src/main/java/com/fr/io/ExportExcel.java index 5e5e1e6..8e869a8 100644 --- a/src/main/java/com/fr/io/ExportExcel.java +++ b/src/main/java/com/fr/io/ExportExcel.java @@ -1,14 +1,11 @@ package com.fr.io; -import java.io.File; -import java.io.FileOutputStream; +import com.fr.base.Parameter; import com.fr.base.operator.common.CommonOperator; import com.fr.chart.activator.ChartBaseActivator; import com.fr.config.activator.BaseDBActivator; import com.fr.config.activator.ConfigurationActivator; -import com.fr.data.impl.config.activator.RestrictionActivator; import com.fr.env.operator.CommonOperatorImpl; -import com.fr.base.Parameter; import com.fr.io.exporter.ExcelExporter; import com.fr.io.exporter.LargeDataPageExcelExporter; import com.fr.io.exporter.PageExcel2007Exporter; @@ -21,12 +18,16 @@ import com.fr.main.workbook.ResultWorkBook; import com.fr.module.Module; import com.fr.module.tool.ActivatorToolBox; import com.fr.report.ReportActivator; +import com.fr.report.RestrictionActivator; import com.fr.report.core.ReportUtils; import com.fr.report.module.ReportBaseActivator; import com.fr.stable.WriteActor; import com.fr.store.StateServerActivator; import com.fr.workspace.simple.SimpleWork; +import java.io.File; +import java.io.FileOutputStream; + public class ExportExcel { public static void main(String[] args) { diff --git a/src/main/java/com/fr/io/ExportReports.java b/src/main/java/com/fr/io/ExportReports.java index 56128be..80e5492 100644 --- a/src/main/java/com/fr/io/ExportReports.java +++ b/src/main/java/com/fr/io/ExportReports.java @@ -1,20 +1,18 @@ package com.fr.io; -import java.io.File; -import java.io.FileOutputStream; -import java.io.OutputStream; + +import com.fr.base.Parameter; import com.fr.base.operator.common.CommonOperator; import com.fr.chart.activator.ChartBaseActivator; import com.fr.config.activator.BaseDBActivator; import com.fr.config.activator.ConfigurationActivator; -import com.fr.data.impl.config.activator.RestrictionActivator; import com.fr.env.operator.CommonOperatorImpl; -import com.fr.base.Parameter; import com.fr.io.exporter.PageExcelExporter; import com.fr.main.TemplateWorkBook; import com.fr.main.workbook.PageWorkBook; import com.fr.module.Module; import com.fr.module.tool.ActivatorToolBox; import com.fr.report.ReportActivator; +import com.fr.report.RestrictionActivator; import com.fr.report.core.ReportUtils; import com.fr.report.module.ReportBaseActivator; import com.fr.report.report.PageReport; @@ -22,6 +20,10 @@ import com.fr.stable.PageActor; import com.fr.store.StateServerActivator; import com.fr.workspace.simple.SimpleWork; +import java.io.File; +import java.io.FileOutputStream; +import java.io.OutputStream; + public class ExportReports { public static void main(String[] args) { // 首先需要定义执行所在的环境,这样才能正确读取数据库信息 diff --git a/src/main/java/com/fr/io/JavaPrint.java b/src/main/java/com/fr/io/JavaPrint.java index a2a8788..23a3e3b 100644 --- a/src/main/java/com/fr/io/JavaPrint.java +++ b/src/main/java/com/fr/io/JavaPrint.java @@ -1,16 +1,18 @@ package com.fr.io; + import com.fr.base.Parameter; import com.fr.config.activator.BaseDBActivator; import com.fr.config.activator.ConfigurationActivator; -import com.fr.data.impl.config.activator.RestrictionActivator; import com.fr.main.TemplateWorkBook; import com.fr.module.Module; import com.fr.module.tool.ActivatorToolBox; import com.fr.print.PrintUtils; import com.fr.report.ReportActivator; +import com.fr.report.RestrictionActivator; import com.fr.report.module.ReportBaseActivator; import com.fr.store.StateServerActivator; import com.fr.workspace.simple.SimpleWork; + import java.util.HashMap; public class JavaPrint { diff --git a/src/main/java/com/fr/io/SaveReportToDatabase.java b/src/main/java/com/fr/io/SaveReportToDatabase.java index 8156218..bd44bb7 100644 --- a/src/main/java/com/fr/io/SaveReportToDatabase.java +++ b/src/main/java/com/fr/io/SaveReportToDatabase.java @@ -1,24 +1,25 @@ package com.fr.io; -import java.io.File; -import java.io.FileInputStream; -import java.io.InputStream; -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.PreparedStatement; import com.fr.base.operator.common.CommonOperator; import com.fr.chart.activator.ChartBaseActivator; import com.fr.config.activator.BaseDBActivator; import com.fr.config.activator.ConfigurationActivator; -import com.fr.data.impl.config.activator.RestrictionActivator; import com.fr.env.operator.CommonOperatorImpl; import com.fr.module.Module; import com.fr.module.tool.ActivatorToolBox; import com.fr.report.ReportActivator; +import com.fr.report.RestrictionActivator; import com.fr.report.module.ReportBaseActivator; import com.fr.store.StateServerActivator; import com.fr.workspace.simple.SimpleWork; +import java.io.File; +import java.io.FileInputStream; +import java.io.InputStream; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.PreparedStatement; + public class SaveReportToDatabase { public static void main(String[] args) { SaveReport(); diff --git a/src/main/java/com/fr/io/SetParameterWindow.java b/src/main/java/com/fr/io/SetParameterWindow.java index 2781e5f..aea60a9 100644 --- a/src/main/java/com/fr/io/SetParameterWindow.java +++ b/src/main/java/com/fr/io/SetParameterWindow.java @@ -5,7 +5,6 @@ import com.fr.base.operator.common.CommonOperator; import com.fr.chart.activator.ChartBaseActivator; import com.fr.config.activator.BaseDBActivator; import com.fr.config.activator.ConfigurationActivator; -import com.fr.data.impl.config.activator.RestrictionActivator; import com.fr.env.operator.CommonOperatorImpl; import com.fr.general.Background; import com.fr.io.exporter.EmbeddedTableDataExporter; @@ -14,6 +13,7 @@ import com.fr.main.parameter.ReportParameterAttr; import com.fr.module.Module; import com.fr.module.tool.ActivatorToolBox; import com.fr.report.ReportActivator; +import com.fr.report.RestrictionActivator; import com.fr.report.module.ReportBaseActivator; import com.fr.store.StateServerActivator; import com.fr.workspace.simple.SimpleWork; diff --git a/src/main/java/com/fr/io/SimpleDemo.java b/src/main/java/com/fr/io/SimpleDemo.java index 7e29d3d..2f8f272 100644 --- a/src/main/java/com/fr/io/SimpleDemo.java +++ b/src/main/java/com/fr/io/SimpleDemo.java @@ -5,13 +5,13 @@ import com.fr.base.operator.common.CommonOperator; import com.fr.chart.activator.ChartBaseActivator; import com.fr.config.activator.BaseDBActivator; import com.fr.config.activator.ConfigurationActivator; -import com.fr.data.impl.config.activator.RestrictionActivator; import com.fr.env.operator.CommonOperatorImpl; import com.fr.general.FRFont; import com.fr.main.impl.WorkBook; import com.fr.module.Module; import com.fr.module.tool.ActivatorToolBox; import com.fr.report.ReportActivator; +import com.fr.report.RestrictionActivator; import com.fr.report.cell.CellElement; import com.fr.report.elementcase.TemplateElementCase; import com.fr.report.module.ReportBaseActivator;