Files
eip4-platform/platform-report/pom.xml
zhengwr 702b5e9229 feat(report): JOR(jatools)报表引擎重宿主 — platform-report 后端 + /api/report 端点
EIP3 真报表=jatools JOR 套打模板(非 amis 表格)。本批次把报表引擎重宿主进 EIP4
(复用客户已持有的预编译引擎 jar,非移植 900 源文件;非重建引擎)。Phase 1 后端完成+真验。

- platform-report 模块:18 个预编译 jar(jatools 引擎 + 改造版 BeanShell + itext/jxl/
  jsqlparser/jfreechart/barcode4j/zxing/…)经项目内 local-repo(install-libs.sh)正常依赖,
  打进 fat jar(BOOT-INF/lib 已确认,非 system scope)。
- ReportService:走 jatools.engine.ReportJob(查询参数 setParameter→declareExternalVariables
  →SQL ${PARAM});headless(java.awt.headless)。三格式 HTML/PDF/XLS。
- JatoolsConfig:把 EIP4 spring.datasource 注入引擎 System2.properties(无 CWD 文件依赖)+
  注册 CJK 字体供 PDF。
- ReportController:GET /api/report/render/{templateId}?format=html|pdf|xls&<查询参数>;
  按 templateId 从 view_template(type=200)的 <reportfile> CDATA 取 JOR 渲染;?tpl= dev 覆盖。
- SecurityConfig:X-Frame-Options DENY→SAMEORIGIN(报表查看器同源 iframe 内嵌;生产 nginx 单源)。

真验:全 reactor mvn clean install 绿(0 失败);8093 端点 GET /api/report/render/{id} 三格式
HTTP 200(HTML 48K/PDF 106K/XLS 21K);查询参数 PROJECTID 流进 SQL 48×;浏览器内 amis 菜单页
(查询表单+iframe 查看器)渲染出 JOR 套打报表(在建工程项目收付款信息表,公式列/分组小计/签字栏)。

边界:Phase 2 前端「报表页 body 换查看器」当前以单页 sys_page_schema 运行态改动演示(非本提交代码);
铺到全部 339 张 type=200 报表页 = Phase 3(转换器侧生成查看器 body)。数据保真须对完整客户库验证
(eip4dev 为部分 dev 库,部分报表源表缺)。design 见 docs/plans/2026-06-25-报表迁移-JOR引擎重宿主-design.md。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 17:56:50 +08:00

105 lines
5.8 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.eip4</groupId>
<artifactId>eip4-platform</artifactId>
<version>0.1.0-SNAPSHOT</version>
</parent>
<artifactId>platform-report</artifactId>
<name>platform-report</name>
<description>EIP3 JOR (jatools) 报表引擎重宿主:用预编译成品 jar headless 渲染 JOR 套打模板为 HTML/PDF/XLS</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>21</maven.compiler.release>
</properties>
<!-- 预编译报表引擎 jar 装入项目内本地仓(local-repo/,随码提交)。
坐标 com.dsasp.thirdparty:*:eip3,由 install-libs.sh 用 mvn install:install-file 生成。
不用 system scope —— system scope 不会被 spring-boot-maven-plugin 打进 fat jar。 -->
<repositories>
<repository>
<id>eip3-local</id>
<url>file://${project.basedir}/local-repo</url>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<!-- ===== JOR(jatools) 报表引擎预编译成品 ===== -->
<!-- 引擎本体 -->
<dependency><groupId>com.dsasp.thirdparty</groupId><artifactId>jatools</artifactId><version>eip3</version></dependency>
<!-- jatools 改造版 BeanShell(公式求值核心,含 8 个自定义类):必须用这份 fork,非 stock bsh -->
<dependency><groupId>com.dsasp.thirdparty</groupId><artifactId>bsh</artifactId><version>eip3</version></dependency>
<!-- PDF 导出 -->
<dependency><groupId>com.dsasp.thirdparty</groupId><artifactId>itext</artifactId><version>eip3</version></dependency>
<!-- XLS 导出 -->
<dependency><groupId>com.dsasp.thirdparty</groupId><artifactId>jxl</artifactId><version>eip3</version></dependency>
<!-- 报表 SQL 解析 -->
<dependency><groupId>com.dsasp.thirdparty</groupId><artifactId>jsqlparser</artifactId><version>eip3</version></dependency>
<!-- 图表(B 类报表,jfreechart + jcommon + jatools chart 封装) -->
<dependency><groupId>com.dsasp.thirdparty</groupId><artifactId>jfreechart</artifactId><version>eip3</version></dependency>
<dependency><groupId>com.dsasp.thirdparty</groupId><artifactId>jcommon</artifactId><version>eip3</version></dependency>
<dependency><groupId>com.dsasp.thirdparty</groupId><artifactId>jchart</artifactId><version>eip3</version></dependency>
<!-- 条码 / 二维码 -->
<dependency><groupId>com.dsasp.thirdparty</groupId><artifactId>barcode4j</artifactId><version>eip3</version></dependency>
<dependency><groupId>com.dsasp.thirdparty</groupId><artifactId>zxing</artifactId><version>eip3</version></dependency>
<!-- 引擎运行期依赖的旧版 commons / log4j1 / jaxen / xerces。给独立坐标避免与平台托管版本误判去重。 -->
<dependency><groupId>com.dsasp.thirdparty</groupId><artifactId>commons-beanutils</artifactId><version>eip3</version></dependency>
<dependency><groupId>com.dsasp.thirdparty</groupId><artifactId>commons-collections</artifactId><version>eip3</version></dependency>
<dependency><groupId>com.dsasp.thirdparty</groupId><artifactId>commons-httpclient</artifactId><version>eip3</version></dependency>
<dependency><groupId>com.dsasp.thirdparty</groupId><artifactId>commons-lang</artifactId><version>eip3</version></dependency>
<dependency><groupId>com.dsasp.thirdparty</groupId><artifactId>commons-logging</artifactId><version>eip3</version></dependency>
<dependency><groupId>com.dsasp.thirdparty</groupId><artifactId>log4j</artifactId><version>eip3</version></dependency>
<dependency><groupId>com.dsasp.thirdparty</groupId><artifactId>jaxen</artifactId><version>eip3</version></dependency>
<dependency><groupId>com.dsasp.thirdparty</groupId><artifactId>xerces</artifactId><version>eip3</version></dependency>
<!-- ===== Spring(控制器 / 注入 DataSource 配置) ===== -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- JdbcTemplate:按 templateId 从 view_template(type=200) 取 JOR 模板。
DataSource 由运行宿主 platform-app 提供(spring.datasource.*)。 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<!-- 数据库驱动:模板 <Connection> 按驱动类名加载 org.postgresql.Driver,需在 classpath -->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>21</release>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</build>
</project>