zhaojinyu 3 месяцев назад
Сommit
d13c4067f4
100 измененных файлов с 5411 добавлено и 0 удалено
  1. 8 0
      .idea/.gitignore
  2. 25 0
      .idea/compiler.xml
  3. 15 0
      .idea/encodings.xml
  4. 25 0
      .idea/jarRepositories.xml
  5. 12 0
      .idea/misc.xml
  6. 6 0
      .idea/vcs.xml
  7. 22 0
      Dockerfile
  8. 383 0
      README.md
  9. BIN
      allatori/allatori.jar
  10. 35 0
      allatori/allatori.xml
  11. BIN
      allatori/class-winter-core-enhance-2.9.4.jar
  12. BIN
      allatori/class-winter-maven-plugin-enhance-2.9.4.jar
  13. 37 0
      allatori/class-winter-maven-plugin-pom.xml
  14. 125 0
      jnpf-datareport-univer-admin/pom.xml
  15. 18 0
      jnpf-datareport-univer-admin/src/main/java/jnpf/ReportUniverApplication.java
  16. 79 0
      jnpf-datareport-univer-admin/src/main/java/jnpf/aop/DataSourceBindAspect.java
  17. 121 0
      jnpf-datareport-univer-admin/src/main/java/jnpf/config/AuthFilter.java
  18. 40 0
      jnpf-datareport-univer-admin/src/main/java/jnpf/config/ReportAutoConfiguration.java
  19. 8 0
      jnpf-datareport-univer-admin/src/main/java/jnpf/properties/GatewayWhiteProperties.java
  20. 167 0
      jnpf-datareport-univer-admin/src/main/resources/application-dev.yml
  21. 166 0
      jnpf-datareport-univer-admin/src/main/resources/application-preview.yml
  22. 166 0
      jnpf-datareport-univer-admin/src/main/resources/application-prod.yml
  23. 166 0
      jnpf-datareport-univer-admin/src/main/resources/application-test.yml
  24. 84 0
      jnpf-datareport-univer-admin/src/main/resources/application.yml
  25. 327 0
      jnpf-datareport-univer-admin/src/main/resources/logback-spring.xml
  26. 39 0
      jnpf-datareport-univer-admin/target/classes/META-INF/spring-configuration-metadata.json
  27. 167 0
      jnpf-datareport-univer-admin/target/classes/application-dev.yml
  28. 166 0
      jnpf-datareport-univer-admin/target/classes/application-preview.yml
  29. 166 0
      jnpf-datareport-univer-admin/target/classes/application-prod.yml
  30. 166 0
      jnpf-datareport-univer-admin/target/classes/application-test.yml
  31. 84 0
      jnpf-datareport-univer-admin/target/classes/application.yml
  32. BIN
      jnpf-datareport-univer-admin/target/classes/jnpf/ReportUniverApplication.class
  33. BIN
      jnpf-datareport-univer-admin/target/classes/jnpf/aop/DataSourceBindAspect.class
  34. BIN
      jnpf-datareport-univer-admin/target/classes/jnpf/config/AuthFilter.class
  35. BIN
      jnpf-datareport-univer-admin/target/classes/jnpf/config/ReportAutoConfiguration.class
  36. BIN
      jnpf-datareport-univer-admin/target/classes/jnpf/properties/GatewayWhiteProperties.class
  37. 327 0
      jnpf-datareport-univer-admin/target/classes/logback-spring.xml
  38. BIN
      jnpf-datareport-univer-admin/target/jnpf-datareport-univer-admin-5.2.0-RELEASE.jar
  39. BIN
      jnpf-datareport-univer-admin/target/jnpf-datareport-univer-admin-5.2.0-RELEASE.jar.original
  40. 3 0
      jnpf-datareport-univer-admin/target/maven-archiver/pom.properties
  41. 6 0
      jnpf-datareport-univer-admin/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
  42. 5 0
      jnpf-datareport-univer-admin/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
  43. 21 0
      jnpf-datareport-univer-biz/pom.xml
  44. 18 0
      jnpf-datareport-univer-biz/src/main/java/jnpf/mapper/DictionaryDataMapper.java
  45. 14 0
      jnpf-datareport-univer-biz/src/main/java/jnpf/mapper/ReportMapper.java
  46. 14 0
      jnpf-datareport-univer-biz/src/main/java/jnpf/mapper/ReportVersionMapper.java
  47. 14 0
      jnpf-datareport-univer-biz/src/main/java/jnpf/mapper/UserMapper.java
  48. 20 0
      jnpf-datareport-univer-biz/src/main/java/jnpf/service/DictionaryDataService.java
  49. 72 0
      jnpf-datareport-univer-biz/src/main/java/jnpf/service/ReportService.java
  50. 88 0
      jnpf-datareport-univer-biz/src/main/java/jnpf/service/ReportVersionService.java
  51. 23 0
      jnpf-datareport-univer-biz/src/main/java/jnpf/service/UserService.java
  52. 36 0
      jnpf-datareport-univer-biz/src/main/java/jnpf/service/impl/DictionaryDataServiceImpl.java
  53. 268 0
      jnpf-datareport-univer-biz/src/main/java/jnpf/service/impl/ReportServiceImpl.java
  54. 273 0
      jnpf-datareport-univer-biz/src/main/java/jnpf/service/impl/ReportVersionServiceImpl.java
  55. 33 0
      jnpf-datareport-univer-biz/src/main/java/jnpf/service/impl/UserServiceImpl.java
  56. BIN
      jnpf-datareport-univer-biz/target/classes/jnpf/mapper/DictionaryDataMapper.class
  57. BIN
      jnpf-datareport-univer-biz/target/classes/jnpf/mapper/ReportMapper.class
  58. BIN
      jnpf-datareport-univer-biz/target/classes/jnpf/mapper/ReportVersionMapper.class
  59. BIN
      jnpf-datareport-univer-biz/target/classes/jnpf/mapper/UserMapper.class
  60. BIN
      jnpf-datareport-univer-biz/target/classes/jnpf/service/DictionaryDataService.class
  61. BIN
      jnpf-datareport-univer-biz/target/classes/jnpf/service/ReportService.class
  62. BIN
      jnpf-datareport-univer-biz/target/classes/jnpf/service/ReportVersionService.class
  63. BIN
      jnpf-datareport-univer-biz/target/classes/jnpf/service/UserService.class
  64. BIN
      jnpf-datareport-univer-biz/target/classes/jnpf/service/impl/DictionaryDataServiceImpl.class
  65. BIN
      jnpf-datareport-univer-biz/target/classes/jnpf/service/impl/ReportServiceImpl.class
  66. BIN
      jnpf-datareport-univer-biz/target/classes/jnpf/service/impl/ReportVersionServiceImpl.class
  67. BIN
      jnpf-datareport-univer-biz/target/classes/jnpf/service/impl/UserServiceImpl.class
  68. BIN
      jnpf-datareport-univer-biz/target/jnpf-datareport-univer-biz-5.2.0-RELEASE.jar
  69. 3 0
      jnpf-datareport-univer-biz/target/maven-archiver/pom.properties
  70. 12 0
      jnpf-datareport-univer-biz/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
  71. 12 0
      jnpf-datareport-univer-biz/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
  72. 22 0
      jnpf-datareport-univer-controller/pom.xml
  73. 382 0
      jnpf-datareport-univer-controller/src/main/java/jnpf/controller/ReportController.java
  74. 159 0
      jnpf-datareport-univer-controller/src/main/java/jnpf/controller/ReportDataController.java
  75. BIN
      jnpf-datareport-univer-controller/target/classes/jnpf/controller/ReportController.class
  76. BIN
      jnpf-datareport-univer-controller/target/classes/jnpf/controller/ReportDataController.class
  77. BIN
      jnpf-datareport-univer-controller/target/jnpf-datareport-univer-controller-5.2.0-RELEASE.jar
  78. 3 0
      jnpf-datareport-univer-controller/target/maven-archiver/pom.properties
  79. 2 0
      jnpf-datareport-univer-controller/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
  80. 2 0
      jnpf-datareport-univer-controller/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
  81. 56 0
      jnpf-datareport-univer-entity/pom.xml
  82. 26 0
      jnpf-datareport-univer-entity/src/main/java/jnpf/entity/DictionaryDataEntity.java
  83. 60 0
      jnpf-datareport-univer-entity/src/main/java/jnpf/entity/ReportEntity.java
  84. 66 0
      jnpf-datareport-univer-entity/src/main/java/jnpf/entity/ReportVersionEntity.java
  85. 30 0
      jnpf-datareport-univer-entity/src/main/java/jnpf/entity/UserEntity.java
  86. 18 0
      jnpf-datareport-univer-entity/src/main/java/jnpf/model/data/DataForm.java
  87. 63 0
      jnpf-datareport-univer-entity/src/main/java/jnpf/model/data/DataSetInfo.java
  88. 20 0
      jnpf-datareport-univer-entity/src/main/java/jnpf/model/data/DataSetPagination.java
  89. 40 0
      jnpf-datareport-univer-entity/src/main/java/jnpf/model/data/DataSetQuery.java
  90. 43 0
      jnpf-datareport-univer-entity/src/main/java/jnpf/model/data/MenuModel.java
  91. 19 0
      jnpf-datareport-univer-entity/src/main/java/jnpf/model/data/ModuleNameVO.java
  92. 60 0
      jnpf-datareport-univer-entity/src/main/java/jnpf/model/report/ReportCrForm.java
  93. 75 0
      jnpf-datareport-univer-entity/src/main/java/jnpf/model/report/ReportInfoVO.java
  94. 46 0
      jnpf-datareport-univer-entity/src/main/java/jnpf/model/report/ReportListVO.java
  95. 26 0
      jnpf-datareport-univer-entity/src/main/java/jnpf/model/report/ReportPagination.java
  96. 21 0
      jnpf-datareport-univer-entity/src/main/java/jnpf/model/report/ReportPreview.java
  97. 24 0
      jnpf-datareport-univer-entity/src/main/java/jnpf/model/report/ReportSelectVO.java
  98. 21 0
      jnpf-datareport-univer-entity/src/main/java/jnpf/model/report/ReportUpForm.java
  99. 23 0
      jnpf-datareport-univer-entity/src/main/java/jnpf/model/report/ReportVersionListVO.java
  100. 19 0
      jnpf-datareport-univer-entity/src/main/java/jnpf/model/report/TableTreeModel.java

+ 8 - 0
.idea/.gitignore

@@ -0,0 +1,8 @@
+# 默认忽略的文件
+/shelf/
+/workspace.xml
+# 基于编辑器的 HTTP 客户端请求
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml

+ 25 - 0
.idea/compiler.xml

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="CompilerConfiguration">
+    <annotationProcessing>
+      <profile name="Maven default annotation processors profile" enabled="true">
+        <sourceOutputDir name="target/generated-sources/annotations" />
+        <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
+        <outputRelativeToContentRoot value="true" />
+        <module name="jnpf-datareport-univer-admin" />
+        <module name="jnpf-datareport-univer-biz" />
+        <module name="jnpf-datareport-univer-entity" />
+        <module name="jnpf-datareport-univer-controller" />
+      </profile>
+    </annotationProcessing>
+  </component>
+  <component name="JavacSettings">
+    <option name="ADDITIONAL_OPTIONS_OVERRIDE">
+      <module name="jnpf-datareport-univer" options="-parameters" />
+      <module name="jnpf-datareport-univer-admin" options="-parameters" />
+      <module name="jnpf-datareport-univer-biz" options="-parameters" />
+      <module name="jnpf-datareport-univer-controller" options="-parameters" />
+      <module name="jnpf-datareport-univer-entity" options="-parameters" />
+    </option>
+  </component>
+</project>

+ 15 - 0
.idea/encodings.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Encoding">
+    <file url="file://$PROJECT_DIR$/jnpf-datareport-univer-admin/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/jnpf-datareport-univer-admin/src/main/resources" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/jnpf-datareport-univer-biz/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/jnpf-datareport-univer-biz/src/main/resources" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/jnpf-datareport-univer-controller/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/jnpf-datareport-univer-controller/src/main/resources" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/jnpf-datareport-univer-entity/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/jnpf-datareport-univer-entity/src/main/resources" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
+  </component>
+</project>

+ 25 - 0
.idea/jarRepositories.xml

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="RemoteRepositoriesConfiguration">
+    <remote-repository>
+      <option name="id" value="central" />
+      <option name="name" value="Central Repository" />
+      <option name="url" value="http://127.0.0.1:9999/repository/maven-public/" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="central" />
+      <option name="name" value="Maven Central repository" />
+      <option name="url" value="https://repo1.maven.org/maven2" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="central" />
+      <option name="name" value="Central Repository" />
+      <option name="url" value="http://maven.aliyun.com/nexus/content/groups/public" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="jboss.community" />
+      <option name="name" value="JBoss Community repository" />
+      <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
+    </remote-repository>
+  </component>
+</project>

+ 12 - 0
.idea/misc.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ExternalStorageConfigurationManager" enabled="true" />
+  <component name="MavenProjectsManager">
+    <option name="originalFiles">
+      <list>
+        <option value="$PROJECT_DIR$/pom.xml" />
+      </list>
+    </option>
+  </component>
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_23" project-jdk-name="21" project-jdk-type="JavaSDK" />
+</project>

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
+  </component>
+</project>

+ 22 - 0
Dockerfile

@@ -0,0 +1,22 @@
+# 基础镜像
+FROM bellsoft/liberica-openjre-rocky:21
+# FROM bellsoft/liberica-openjre-rocky:17
+# FROM bellsoft/liberica-openjre-rocky:11
+# FROM bellsoft/liberica-openjre-rocky:8
+LABEL maintainer=jnpf-team
+
+# 设置时区
+ENV TZ=Asia/Shanghai
+RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
+
+# 指定运行时的工作目录
+WORKDIR /data/jnpfsoft/univerApi
+
+# 将构建产物jar包拷贝到运行时目录中
+COPY jnpf-datareport-univer-admin/target/*.jar ./jnpf-univer-admin.jar
+
+# 指定容器内运行端口
+EXPOSE 32000
+
+# 指定容器启动时要运行的命令
+ENTRYPOINT ["/bin/sh","-c","java -javaagent:./jnpf-univer-admin.jar -Dfile.encoding=utf8 -Djava.security.egd=file:/dev/./urandom --add-opens java.base/java.lang=ALL-UNNAMED -XX:+DisableAttachMechanism -jar jnpf-univer-admin.jar"]

+ 383 - 0
README.md

@@ -0,0 +1,383 @@
+> 特别说明:源码、JDK、数据库、Redis等安装或存放路径禁止包含中文、空格、特殊字符等
+
+## 一 环境要求
+
+### 1.1 开发环境
+
+| 类目 | 版本说明或建议           |
+| --- |------------------|
+| 硬件 | 开发电脑建议使用I3及以上CPU,16G及以上内存  |
+| 操作系统 | Windows 10/11,MacOS |
+| JDK | 默认使用JDK 21,兼容JDK 8/11、JDK17(需调整部分代码),推荐使用 `OpenJDK`,如 `Liberica JDK`、`Eclipse Temurin`、`Alibaba Dragonwell`、`BiSheng` 等发行版; |
+| Maven | 依赖管理工具,推荐使用 `3.6.3` 及以上版本  |
+| Redis | 数据缓存,推荐使用 `5.0` 及以上版本 |
+| 数据库 | 兼容 `MySQL 5.7.x/8.x`、`SQLServer 2012+`、`Oracle 11g`、`PostgreSQL 12+`、`达梦数据库(DM8)`、`人大金仓数据库(KingbaseES_V8R6)` |
+| IDE   | 代码集成开发环境,推荐使用 `IDEA2024` 及以上版本,兼容 `Eclipse`、 `Spring Tool Suite` 等IDE工具 |
+| 文件存储 | 默认使用本地存储,兼容 `MinIO` 及多个云对象存储,如 `阿里云 OSS`、`华为云 OBS`、`七牛云 Kodo`、`腾讯云 COS` 等; |
+
+### 1.2 运行环境
+
+> 适用于测试或生产环境
+
+| 类目 | 版本说明或建议                               |
+| --- |-----------------------------------------------|
+| 服务器配置 | 建议至少在 4C/16G/50G的机器配置下运行;|
+| 操作系统 | 建议使用 `Windows Server 2019` 及以上版本或主流 `Linux` 发行版本,推荐使用 `Linux` 环境;兼容 `统信UOS`,`OpenEuler`,`麒麟服务器版` 等信创环境;    |
+| JRE | 默认使用JRE 21,兼容JRE 8/11、JRE17(需调整部分代码);推荐使用 `OpenJDK`,如 `Liberica JDK`、`Eclipse Temurin`、`Alibaba Dragonwell`、`BiSheng` 等发行版;   |
+| Redis | 数据缓存,推荐使用 `5.0` 及以上版本 |
+| 数据库 | 兼容 `MySQL 5.7.x/8.x`、`SQLServer 2012+`、`Oracle 11g`、`PostgreSQL 12+`、`达梦数据库(DM8)`、`人大金仓数据库(KingbaseES_V8R6)` |
+| 文件存储 | 默认使用本地存储,兼容 `MinIO` 及多个云对象存储,如 `阿里云 OSS`、`华为云 OBS`、`七牛云 Kodo`、`腾讯云 COS` 等; |
+
+## 二 关联项目
+
+| 项目                 | 分支            | 说明         |
+|--------------------|---------------|------------|
+| jnpf-common | v5.2.x-stable | 项目基础依赖源码 |
+| jnpf-java-datareport-univer-core | v5.2.x-stable | Univer报表核心依赖源码 |
+
+## 三 Maven私服配置
+
+> 建议使用 Apache Maven 3.6.3 及以上版本<br>以解决依赖无法从公共Maven仓库下载的问题<br>通过官方私服下载依赖完成后,由于IDEA的缓存可能会出现部分报红,重启IDEA即可
+
+打开Maven安装目录中的 `conf/settings.xml` 文件,<br/>
+在 `<servers></servers>` 中添加如下内容
+
+```xml
+<server>
+  <id>maven-releases</id>
+  <username>jnpf-user</username>
+  <password>HLrQ0MA%S1nE</password>
+</server>
+```
+
+在 `<mirrors></mirrors>` 中添加
+
+```xml
+<mirror>
+  <id>maven-releases</id>
+  <mirrorOf>*</mirrorOf>
+  <name>maven-releases</name>
+  <url>https://repository.jnpfsoft.com/repository/maven-public/</url>
+</mirror>
+```
+
+## 四 开发环境
+
+### 4.1 导入数据库脚本
+
+> 以 MySQL数据库为例<br>字符集:`utf8mb4` <br/>排序规则:`utf8mb4_general_ci`
+
+在MySQL创建 `jnpf_init` 数据库,并将 `jnpf-database/MySQL/jnpf_db_init.sql` 导入;
+
+### 4.2 导入依赖
+
+详见 `jnpf-java-datareport-univer-core` 项目中的 `README.md` 文档说明
+
+### 4.3 项目配置
+
+打开编辑 `jnpf-datareport-univer-admin/src/main/resources/application.yml`
+
+#### 4.3.1 指定环境配置
+
+环境说明:
+
+- `application-dev.yml` 开发环境(默认)
+- `application-preview.yml` 预生产环境
+- `application-test.yml` 测试环境
+- `application-prod.yml` 生产环境
+
+> 以开发环境为例,根据实际需求修改
+
+```yaml
+# application.yml第 6 行,可选值:dev(开发环境-默认)、test(测试环境)、preview(预生产环境)、prod(生产环境)
+active: dev
+```
+
+#### 4.3.2 配置域名
+
+打开编辑 `jnpf-datareport-univer-admin/src/main/resources/application.yml` ,修改以下配置
+
+```yaml
+  ApiDomain: http://127.0.0.1:30000 #主项目后端域名(文档预览中使用)
+  FrontDomain: http://127.0.0.1:3100 #前端域名(文档预览中使用)
+  AppDomain: http://127.0.0.1:8080 #app/h5端域名配置(文档预览中使用)
+```
+#### 4.3.3 调整运行端口
+> 根据实际需求调整
+
+打开编辑 `jnpf-datareport-univer-admin/src/main/resources/application-dev.yml`,第 5 行
+
+```yaml
+port: 32000 # 默认运行端口
+```
+
+#### 4.3.4 数据源配置
+
+配置参数说明:
+
+- `db-type`:数据库类型(可选值:`MySQL`、`SQLServer`、`Oracle`、`PostgreSQL`、`DM`、`KingbaseES`)
+- `host`:数据库主机地址
+- `port`:数据库端口
+- `dbname`:平台初始库
+- `username`:数据库用户名
+- `password`:数据库密码
+- `db-schema`:数据库模式
+- `prepare-url`:自定义JDBC连接配置
+
+打开编辑 `jnpf-datareport-univer-admin/src/main/resources/application-dev.yml`,修改以下配置
+
+##### 4.3.4.1 MySQL数据库
+
+```yaml
+  datasource:
+    db-type: MySQL
+    host: 127.0.0.1
+    port: 3306
+    db-name: jnpf_init
+    username: dbuser
+    password: dbpasswd
+    db-schema:
+    prepare-url:
+```
+
+##### 4.3.4.2 SQLServer数据库
+
+```yaml
+  datasource:
+    db-type: SQLServer
+    host: 127.0.0.1
+    port: 1433
+    db-name: jnpf_init
+    username: dbuser
+    password: dbpasswd
+    db-schema:
+    prepare-url:
+```
+
+##### 4.3.4.3 Oracle数据库
+
+```yaml
+  datasource:
+    db-type: Oracle
+    host: 127.0.0.1
+    port: 1521
+    db-name:
+    username: JNPF_INIT
+    password: dbpasswd
+    db-schema:
+    prepare-url: jdbc:oracle:thin:@127.0.0.1:1521:ORCL
+```
+
+##### 4.3.4.4 PostgreSQL数据库配置
+
+```yaml
+  datasource:
+    db-type: PostgreSQL
+    host: 127.0.0.1
+    port: 5432
+    db-name: jnpf_init
+    username: postgres
+    password: dbpasswd
+    db-schema: public
+    prepare-url:
+```
+
+##### 4.3.4.5 达梦dm8数据库
+
+```yaml
+  datasource:
+    db-type: DM
+    host: 127.0.0.1
+    port: 5236
+    db-name: JNPF_INIT
+    username: DBUSER
+    password: dbpasswd
+    db-schema: 
+    prepare-url:
+    tablespace: MAIN
+```
+
+##### 4.3.4.6 人大金仓KingbaseES数据库
+
+```yaml
+  datasource:
+    db-type: KingbaseES
+    host: 127.0.0.1
+    port: 54321
+    db-name: jnpf_init
+    username: system
+    password: dbpasswd
+    db-schema: public
+    prepare-url:
+```
+
+#### 4.3.5 Redis配置
+
+打开编辑 `jnpf-datareport-univer-admin/src/main/resources/application-dev.yml`,修改以下配置
+> 支持单机模式和集群模式,配置默认为单机模式
+
+**若使用Redis单机模式**
+> 第 71-82 行
+
+```yaml
+  redis:
+    database: 1 #缓存库编号
+    host: 127.0.0.1
+    port: 6379
+    password: 123456  # 密码为空时,请将本行注释
+    timeout: 3000 #超时时间(单位:秒)
+    lettuce: #Lettuce为Redis的Java驱动包
+      pool:
+        max-active: 8 # 连接池最大连接数
+        max-wait: -1ms  # 连接池最大阻塞等待时间(使用负值表示没有限制)
+        min-idle: 0 # 连接池中的最小空闲连接
+        max-idle: 8 # 连接池中的最大空闲连接
+```
+
+**若使用Redis集群模式**
+> 第 85-101 行
+
+```yaml
+ redis:
+   cluster:
+     nodes:
+       - 192.168.0.225:6380
+       - 192.168.0.225:6381
+       - 192.168.0.225:6382
+       - 192.168.0.225:6383
+       - 192.168.0.225:6384
+       - 192.168.0.225:6385
+   password: 123456 # 密码为空时,请将本行注释
+   timeout: 3000 # 超时时间(单位:秒)
+   lettuce: #Lettuce为Redis的Java驱动包
+     pool:
+       max-active: 8 # 连接池最大连接数
+       max-wait: -1ms  # 连接池最大阻塞等待时间(使用负值表示没有限制)
+       min-idle: 0 # 连接池中的最小空闲连接
+       max-idle: 8 # 连接池中的最大空闲连接
+```
+
+#### 4.3.6 静态资源配置
+
+打开编辑 `jnpf-datareport-univer-admin/src/main/resources/application-dev.yml` ,修改以下配置(第 121-166 行)
+> 默认使用本地存储,兼容 `MinIO` 及多个云对象存储,如阿里云 OSS、华为云 OBS、七牛云 Kodo、腾讯云 COS等
+
+```yaml
+  # ===================== 文件存储配置 =====================
+  file-storage: #文件存储配置,不使用的情况下可以不写
+    default-platform: local-plus-1 #默认使用的存储平台
+    thumbnail-suffix: ".min.jpg" #缩略图后缀,例如【.min.jpg】【.png】
+    local-plus: # 本地存储升级版
+      - platform: local-plus-1 # 存储平台标识
+        enable-storage: true  #启用存储
+        enable-access: true #启用访问(线上请使用 Nginx 配置,效率更高)
+        domain: "" # 访问域名,例如:“http://127.0.0.1:8030/”,注意后面要和 path-patterns 保持一致,“/”结尾,本地存储建议使用相对路径,方便后期更换域名
+        base-path: D:/project/jnpf-resources/ # 基础路径
+        path-patterns: /** # 访问路径
+        storage-path:  # 存储路径
+    aliyun-oss: # 阿里云 OSS ,不使用的情况下可以不写
+      - platform: aliyun-oss-1 # 存储平台标识
+        enable-storage: false  # 启用存储
+        access-key: ??
+        secret-key: ??
+        end-point: ??
+        bucket-name: ??
+        domain: ?? # 访问域名,注意“/”结尾,例如:https://abc.oss-cn-shanghai.aliyuncs.com/
+        base-path: hy/ # 基础路径
+    qiniu-kodo: # 七牛云 kodo ,不使用的情况下可以不写
+      - platform: qiniu-kodo-1 # 存储平台标识
+        enable-storage: false  # 启用存储
+        access-key: ??
+        secret-key: ??
+        bucket-name: ??
+        domain: ?? # 访问域名,注意“/”结尾,例如:http://abc.hn-bkt.clouddn.com/
+        base-path: base/ # 基础路径
+    tencent-cos: # 腾讯云 COS
+      - platform: tencent-cos-1 # 存储平台标识
+        enable-storage: false  # 启用存储
+        secret-id: ??
+        secret-key: ??
+        region: ?? #存仓库所在地域
+        bucket-name: ??
+        domain: ?? # 访问域名,注意“/”结尾,例如:https://abc.cos.ap-nanjing.myqcloud.com/
+        base-path: hy/ # 基础路径
+    minio: # MinIO,由于 MinIO SDK 支持 AWS S3,其它兼容 AWS S3 协议的存储平台也都可配置在这里
+      - platform: minio-1 # 存储平台标识
+        enable-storage: true  # 启用存储
+        access-key: Q9jJs2b6Tv
+        secret-key: Thj2WkpLu9DhmJyJ
+        end-point: http://192.168.0.207:9000/
+        bucket-name: jnpfsoftoss
+        domain:  # 访问域名,注意“/”结尾,例如:http://minio.abc.com/abc/
+        base-path:  # 基础路径
+```
+
+### 4.4 执行调试或运行
+
+#### 4.4.1 `jnpf-java-datareport-univer-core` 项目未使用加密
+
+- 在IDEA中, 展开右侧 `Maven` 中 `Profiles` 去除勾选 `encrypted` 选项, 再点击 Maven `刷新` 图标刷新Maven
+- 找到 `jnpf-datareport-univer-admin/src/main/java/jnpf/ReportUniverApplication.java`,右击运行即可。
+
+若使用JDK9及以上版本,在IDEA中,打开 `Edit Configurations` VM启动参数添加如下参数:
+
+ ```bash
+ --add-opens java.base/java.lang=ALL-UNNAMED
+ ```
+
+#### 4.4.2 `jnpf-java-datareport-univer-core` 项目使用加密
+
+- 在IDEA中,展开右侧 `Maven` 中 `Profiles` 勾选 `encrypted` 选项, 再点击Maven `刷新` 图标刷新Maven
+- 在IDEA中,双击右侧 `Maven` 中 `jnpf-datareport-univer` > `clean` 将会自动安装加密打包插件, 并创建创建 `jnpf-datareport-univer-entity/target/copylib` 复制依赖包用于下一步运行
+
+**参数说明**:
+
+```bash
+# 打开项目中`jnpf-datareport-univer-entity/target/copylib` 目录, 复制Jar包 `jnpf-datareport-univer-model-版本号.jar` 的文件名
+-javaagent:项目存放路径/jnpf-datareport-univer-entity/target/copylib/jnpf-datareport-univer-model-当前版本号.jar(上面复制的文件名)="decryptProjectPathPrefix=jnpf-datareport-univer-common___jnpf-datareport-univer-model"
+```  
+
+- 在IDEA中,打开 `Edit Configurations` VM启动参数添加如下参数
+
+若使用 JDK8 运行,需要替换下方命令示例中的Jar包路径
+
+ ``` bash
+-XX:+DisableAttachMechanism
+-javaagent:D:/Projects/IdeaProjects/jnpf-java-datareport-univer/jnpf-datareport-univer-entity/target/copylib/jnpf-datareport-univer-model-5.1.0-RELEASE.jar="decryptProjectPathPrefix=jnpf-datareport-univer-common___jnpf-datareport-univer-model"
+ ```
+
+若使用JDK 9及以上版本,需要替换下方命令示例中的Jar包路径
+
+ ``` bash
+--add-opens java.base/java.lang=ALL-UNNAMED
+-XX:+DisableAttachMechanism
+-javaagent:D:/Projects/IdeaProjects/jnpf-java-datareport-univer/jnpf-datareport-univer-entity/target/copylib/jnpf-datareport-univer-model-5.1.0-RELEASE.jar="decryptProjectPathPrefix=jnpf-datareport-univer-common___jnpf-datareport-univer-model"
+ ```
+## 五 项目发布
+
+### 5.1 `jnpf-java-datareport-univer-core` 项目未使用加密
+
+- 在IDEA中, 展开右侧 `Maven` 中 `Profiles` 去除勾选 `encrypted` 选项, 再点击Maven `刷新` 图标刷新Maven
+- 在IDEA中,双击右侧Maven中 `jnpf-datareport-univer` > `Lifecycle` > `clean` 清理项目
+- 在IDEA中,双击右侧Maven中 `jnpf-datareport-univer` > `Lifecycle` > `package` 打包项目
+- 打开 `jnpf-datareport-univer/jnpf-datareport-univer-entity/target`,将 `jnpf-datareport-univer-admin-5.1.0-RELEASE.jar` 上传至服务器
+
+### 5.2 `jnpf-java-datareport-univer-core` 项目使用加密
+
+- 在IDEA中, 展开右侧 `Maven` 中 `Profiles` 勾选 `encrypted` 选项, 再点击Maven `刷新` 图标刷新Maven
+- 在IDEA中,双击右侧 `Maven` > `jnpf-java-datareport-univer` > `clean` 将会自动安装加密打包插件
+- 在IDEA中,双击右侧 `Maven` > `jnpf-java-datareport-univer` > `Lifecycle` > `package` 打包项目
+- 打开 `jnpf-datareport-univer/jnpf-datareport-univer-admin/target`,将 `jnpf-datareport-univer-admin-5.1.0-RELEASE.jar` 上传至服务器
+- 启动命令
+
+**若使用 JDK/JRE 8 运行**
+ 
+```bash
+java -javaagent:./jnpf-datareport-univer-admin-5.1.0-RELEASE.jar -XX:+DisableAttachMechanism -jar jnpf-datareport-univer-admin-5.1.0-RELEASE.jar
+ ```
+
+**若使用 JDK/JRE 9及以上版本运行**
+ 
+```bash
+java -javaagent:./jnpf-datareport-univer-admin-5.1.0-RELEASE.jar --add-opens java.base/java.lang=ALL-UNNAMED -XX:+DisableAttachMechanism -jar jnpf-datareport-univer-admin-5.1.0-RELEASE.jar
+ ```

BIN
allatori/allatori.jar


+ 35 - 0
allatori/allatori.xml

@@ -0,0 +1,35 @@
+<config>
+    <input>
+        <jar in="${project.build.finalName}.jar" out="${project.build.finalName}.jar"/>
+    </input>
+
+    <keep-names>
+        <class access="protected+">
+            <field access="protected+"/>
+            <method access="protected+"/>
+        </class>
+    </keep-names>
+    <ignore-classes>
+        <!-- 注意:spring的框架相关的文件需要排除,避免启动报错 -->
+        <class template="class jnpf.properties.ReportProperties"/>
+    </ignore-classes>
+
+
+    <!-- 混淆设置 -->
+    <!--随机类名保持小写-->
+    <property name="classes-naming" value="abc"/>
+    <!-- 接口形参名保持不变 -->
+    <property name="local-variables-naming" value="keep-parameters"/>
+    <!-- 字符串加密 -->
+    <property name="string-encryption" value="maximum"/>
+    <property name="string-encryption-type" value="strong"/>
+    <property name="string-encryption-version" value="v4"/>
+    <!-- 行数混淆 -->
+    <property name="line-numbers" value="obfuscate"/>
+    <!-- 成员重新排序 -->
+    <property name="member-reorder" value="enable"/>
+    <!-- 数据jar压缩等级 -->
+    <property name="output-jar-compression-level" value="9"/>
+
+    <property name="log-file" value="log.xml"/>
+</config>

BIN
allatori/class-winter-core-enhance-2.9.4.jar


BIN
allatori/class-winter-maven-plugin-enhance-2.9.4.jar


+ 37 - 0
allatori/class-winter-maven-plugin-pom.xml

@@ -0,0 +1,37 @@
+<?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>
+
+    <groupId>com.idea-aedi</groupId>
+    <artifactId>class-winter-core</artifactId>
+    <version>enhance-2.9.4</version>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.idea-aedi</groupId>
+            <artifactId>class-winter-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-plugin-api</artifactId>
+            <version>3.8.1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.maven.plugin-tools</groupId>
+            <artifactId>maven-plugin-annotations</artifactId>
+            <version>3.6.1</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-project</artifactId>
+            <version>2.2.1</version>
+        </dependency>
+    </dependencies>
+</project>

+ 125 - 0
jnpf-datareport-univer-admin/pom.xml

@@ -0,0 +1,125 @@
+<?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.jnpf</groupId>
+        <artifactId>jnpf-datareport-univer</artifactId>
+        <version>5.2.0-RELEASE</version>
+    </parent>
+
+    <artifactId>jnpf-datareport-univer-admin</artifactId>
+
+
+    <dependencies>
+        <dependency>
+            <groupId>com.jnpf</groupId>
+            <artifactId>jnpf-common-security</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.jnpf</groupId>
+            <artifactId>jnpf-datareport-univer-controller</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+
+    <profiles>
+        <profile>
+            <!--JAR包加密-->
+            <id>encrypted</id>
+            <activation>
+                <jdk>[,]</jdk>
+            </activation>
+            <build>
+                <plugins>
+                    <!--安装加密打包插件-->
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-install-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>install-core</id>
+                                <phase>clean</phase>
+                                <configuration>
+                                    <file>${project.basedir}/../allatori/class-winter-core-${class-winter-maven-plugin.version}.jar</file>
+                                    <repositoryLayout>default</repositoryLayout>
+                                    <groupId>com.idea-aedi</groupId>
+                                    <artifactId>class-winter-core</artifactId>
+                                    <version>${class-winter-maven-plugin.version}</version>
+                                    <packaging>jar</packaging>
+                                    <generatePom>true</generatePom>
+                                </configuration>
+                                <goals>
+                                    <goal>install-file</goal>
+                                </goals>
+                            </execution>
+                            <execution>
+                                <id>install-maven</id>
+                                <phase>clean</phase>
+                                <configuration>
+                                    <file>${project.basedir}/../allatori/class-winter-maven-plugin-${class-winter-maven-plugin.version}.jar</file>
+                                    <repositoryLayout>default</repositoryLayout>
+                                    <groupId>com.idea-aedi</groupId>
+                                    <artifactId>class-winter-maven-plugin</artifactId>
+                                    <version>${class-winter-maven-plugin.version}</version>
+                                    <packaging>jar</packaging>
+                                    <generatePom>false</generatePom>
+                                    <pomFile>${project.basedir}/../allatori/class-winter-maven-plugin-pom.xml</pomFile>
+                                </configuration>
+                                <goals>
+                                    <goal>install-file</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <groupId>com.idea-aedi</groupId>
+                        <artifactId>class-winter-maven-plugin</artifactId>
+                        <!-- 相关配置 -->
+                        <configuration>
+                            <!--设置不存在的包表示此项目不加密-->
+                            <includePrefix>jnpf.noexists</includePrefix>
+                            <!--直接覆盖原文件-->
+                            <finalName>${build.finalName}</finalName>
+                            <!--项目中包含的已经加密的包-->
+                            <alreadyProtectedLibs>jnpf-datareport-univer-common${jnpf.datareport.core.jdk.version}-${project.version}.jar,jnpf-datareport-univer-model${jnpf.datareport.core.jdk.version}-${project.version}.jar</alreadyProtectedLibs>
+                            <!--检查启动参数-->
+                            <jvmArgCheck>-XX:+DisableAttachMechanism</jvmArgCheck>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>class-winter</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <mainClass>jnpf.ReportUniverApplication</mainClass>
+                    <layout>ZIP</layout>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>

+ 18 - 0
jnpf-datareport-univer-admin/src/main/java/jnpf/ReportUniverApplication.java

@@ -0,0 +1,18 @@
+package jnpf;
+
+import cn.xuyanwu.spring.file.storage.EnableFileStorage;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+
+@SpringBootApplication
+@EnableFileStorage
+public class ReportUniverApplication {
+
+    public static void main(String[] args) {
+        SpringApplication springApplication = new SpringApplication(ReportUniverApplication.class);
+        springApplication.run(args);
+        System.out.println("报表启动完成");
+    }
+
+}

+ 79 - 0
jnpf-datareport-univer-admin/src/main/java/jnpf/aop/DataSourceBindAspect.java

@@ -0,0 +1,79 @@
+package jnpf.aop;
+
+import cn.dev33.satoken.context.SaHolder;
+import jnpf.base.UserInfo;
+import jnpf.config.ConfigValueUtil;
+import jnpf.database.util.NotTenantPluginHolder;
+import jnpf.database.util.TenantDataSourceUtil;
+import jnpf.util.StringUtil;
+import jnpf.util.TenantHolder;
+import jnpf.util.UserProvider;
+import lombok.extern.slf4j.Slf4j;
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Pointcut;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.annotation.Order;
+import org.springframework.stereotype.Component;
+
+/**
+ *
+ * @author JNPF开发平台组
+ * @version V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date 2021/3/15 17:12
+ */
+@Slf4j
+@Aspect
+@Component
+@Order(1)
+public class DataSourceBindAspect {
+
+    @Autowired
+    private ConfigValueUtil configValueUtil;
+
+    @Pointcut("(execution(* jnpf.*.controller.*.*(..)) || execution(* jnpf.controller.*.*(..))))")
+    public void bindDataSource() {
+
+    }
+
+    /**
+     * NoDataSourceBind 不需要绑定数据库的注解
+     *
+     * @param pjp
+     * @return
+     * @throws Throwable
+     */
+    @Around("bindDataSource() && !@annotation(jnpf.util.NoDataSourceBind)")
+    public Object doAroundService(ProceedingJoinPoint pjp) throws Throwable {
+        if (configValueUtil.isMultiTenancy()) {
+            if(StringUtil.isEmpty(TenantHolder.getDatasourceId())){
+                UserInfo userInfo = UserProvider.getUser();
+                String url = null;
+                try{
+                    url = SaHolder.getRequest().getRequestPath();
+                }catch (Exception ee){ }
+                log.error("租户" + userInfo.getTenantId() + "数据库不存在, URL: {}, TOKEN: {}", url, userInfo.getToken());
+                return null;
+            }
+            return pjp.proceed();
+        }
+        Object obj = pjp.proceed();
+        return obj;
+    }
+
+
+
+    @Around("bindDataSource() && @annotation(jnpf.util.NoDataSourceBind)")
+    public Object doAroundService2(ProceedingJoinPoint pjp) throws Throwable {
+        try{
+            NotTenantPluginHolder.setNotSwitchAlwaysFlag();
+            //Filter中提前设置租户信息, 不需要切库的方法进行清除切库
+            TenantDataSourceUtil.clearLocalTenantInfo();
+            return pjp.proceed();
+        }finally {
+            NotTenantPluginHolder.clearNotSwitchAlwaysFlag();
+        }
+    }
+}

+ 121 - 0
jnpf-datareport-univer-admin/src/main/java/jnpf/config/AuthFilter.java

@@ -0,0 +1,121 @@
+package jnpf.config;
+
+import cn.dev33.satoken.context.SaHolder;
+import cn.dev33.satoken.exception.NotLoginException;
+import cn.dev33.satoken.filter.SaServletFilter;
+import cn.dev33.satoken.router.SaHttpMethod;
+import cn.dev33.satoken.router.SaRouter;
+import cn.dev33.satoken.stp.StpUtil;
+import cn.dev33.satoken.util.SaResult;
+import jnpf.base.ActionResultCode;
+import jnpf.constant.MsgCode;
+import jnpf.consts.AuthConsts;
+import jnpf.properties.GatewayWhite;
+import jnpf.util.IpUtil;
+import jnpf.util.StringUtil;
+import jnpf.util.UserProvider;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.http.HttpHeaders;
+
+import jakarta.servlet.http.HttpServletRequest;
+
+
+
+/**
+ * 网关验证token
+ *
+ * @author JNPF开发平台组
+ * @version V3.1.0
+ * @copyright 引迈信息技术有限公司(https://www.jnpfsoft.com)
+ * @date 2021-03-24
+ */
+@Slf4j
+@Configuration
+public class AuthFilter {
+
+    private static final String ALL = "*";
+    private static final String MAX_AGE = "18000L";
+
+    // 注册 Sa-Token全局过滤器
+    @Bean
+    public SaServletFilter getSaReactorFilter(GatewayWhite gatewayWhite) {
+        return new SaServletFilter()
+                // 拦截地址
+                .addInclude("/**")
+                .setExcludeList(gatewayWhite.excludeUrl)
+                // 鉴权方法:每次访问进入
+                .setAuth(obj -> {
+                    if(log.isInfoEnabled()){
+                        log.info("请求路径: {}", SaHolder.getRequest().getRequestPath());
+                    }
+                    //拦截路径
+                    SaRouter.match(gatewayWhite.blockUrl).match(o -> {
+                        //禁止访问URL 排除白名单
+                        String ip = getIpAddr();
+                        for (String o1 : gatewayWhite.whiteIp) {
+                            if(ip.startsWith(o1)){
+                                return false;
+                            }
+                        }
+                        log.info("非白名单IP访问限制接口:{}, {}", SaHolder.getRequest().getRequestPath(), ip);
+                        return true;
+                    }).back(MsgCode.AD101.get());
+                    //测试不验证 鉴权服务重启测试模式不清除Token就够了
+                    //SaRouter.match((r)->"true".equals(configValueUtil.getTestVersion())).stop();
+                    //白名单不拦截
+                    SaRouter.match(gatewayWhite.whiteUrl).stop();
+                    //内部请求不拦截
+                    SaRouter.match(t->{
+                        String innerToken = SaHolder.getRequest().getHeader(AuthConsts.INNER_TOKEN_KEY);
+                        return UserProvider.isValidInnerToken(innerToken);
+                    }).stop();
+                    // 登录校验 -- 拦截所有路由
+                    SaRouter.match("/**", r -> {
+                        //兼容Net、Java大小写不一致问题
+                        String token = StpUtil.getTokenValueNotCut();
+                        if(!StringUtil.isEmpty(token)){
+                            String[] tokenArr = token.split(" ");
+                            if(StpUtil.getLoginIdByToken(tokenArr[tokenArr.length-1]) != null){
+                                return;
+                            }
+                        }
+                        throw NotLoginException.newInstance(StpUtil.getLoginType(), NotLoginException.INVALID_TOKEN, NotLoginException.INVALID_TOKEN_MESSAGE, token);
+                    }).stop();
+                }).setError(e -> {
+                    SaHolder.getResponse().addHeader("Content-Type","application/json; charset=utf-8");
+                    if(e instanceof NotLoginException){
+                        return SaResult.error(ActionResultCode.SessionOverdue.getMessage()).setCode(ActionResultCode.SessionOverdue.getCode());
+                    }
+                    log.error(e.getMessage(), e);
+                    return SaResult.error(MsgCode.AD102.get()).setCode(ActionResultCode.Exception.getCode());
+                })
+                // 前置函数:在每次认证函数之前执行
+                .setBeforeAuth(obj -> {
+                    HttpServletRequest request = (HttpServletRequest) SaHolder.getRequest().getSource();
+                    // ---------- 设置跨域响应头 ----------
+                    SaHolder.getResponse()
+                            // 允许指定域访问跨域资源
+                            .setHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, request.getHeader(HttpHeaders.ORIGIN))
+                            // 允许的header参数
+                            .setHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_HEADERS, ALL)
+                            // 允许所有请求方式
+                            .setHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_METHODS, ALL)
+                            .setHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_CREDENTIALS, "true")
+                            .setHeader(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS, ALL)
+                            // 有效时间
+                            .setHeader(HttpHeaders.ACCESS_CONTROL_MAX_AGE, MAX_AGE);
+
+                    // 如果是预检请求,则立即返回到前端
+                    SaRouter.match(SaHttpMethod.OPTIONS)
+                            .back();
+                });
+    }
+
+    public static String getIpAddr() {
+        return IpUtil.getIpAddr();
+    }
+
+
+}

+ 40 - 0
jnpf-datareport-univer-admin/src/main/java/jnpf/config/ReportAutoConfiguration.java

@@ -0,0 +1,40 @@
+package jnpf.config;
+
+import jnpf.consts.ApiConst;
+import jnpf.properties.GatewayWhite;
+import jnpf.properties.GatewayWhiteProperties;
+import jnpf.properties.ReportProperties;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration(proxyBeanMethods = false)
+public class ReportAutoConfiguration {
+
+
+    @Bean
+    @ConfigurationProperties(prefix = GatewayWhite.PREFIX)
+    public GatewayWhite getGateWhite(){
+        return new GatewayWhiteProperties();
+    }
+
+
+    @Bean
+    @ConfigurationProperties(prefix = ReportProperties.PREFIX)
+    public ReportProperties getReportProperties(){
+        return new ReportProperties();
+    }
+
+
+    @Bean
+    public ApiConst initReportApiConst(JnpfOauthConfig jnpfOauthConfig){
+        ApiConst.ME = jnpfOauthConfig.getJnpfDomain() + "/api/oauth/me";
+        ApiConst.DATASET_LIST = jnpfOauthConfig.getJnpfDomain() + "/api/system/DataSet/getList";
+        ApiConst.DATASET_SAVE = jnpfOauthConfig.getJnpfDomain() + "/api/system/DataSet/save";
+        ApiConst.DATASET_DATA = jnpfOauthConfig.getJnpfDomain() + "/api/system/DataSet/Data";
+        ApiConst.SAVE_MENU = jnpfOauthConfig.getJnpfDomain() + "/api/system/Menu/saveReportMenu";
+        ApiConst.GET_MENU = jnpfOauthConfig.getJnpfDomain() + "/api/system/Menu/getReportMenu";
+        return new ApiConst();
+    }
+
+}

+ 8 - 0
jnpf-datareport-univer-admin/src/main/java/jnpf/properties/GatewayWhiteProperties.java

@@ -0,0 +1,8 @@
+package jnpf.properties;
+
+/**
+ * 根据需求重写网关URL
+ */
+public class GatewayWhiteProperties extends GatewayWhite {
+
+}

+ 167 - 0
jnpf-datareport-univer-admin/src/main/resources/application-dev.yml

@@ -0,0 +1,167 @@
+# 应用服务器
+server:
+  tomcat:
+    uri-encoding: UTF-8 #tomcat编码
+  port: 32000 #tomcat端口
+
+spring:
+  devtools: #spring开发者工具模块
+    restart:
+      enabled: true #热部署开关
+    freemarker:
+      cache: false #spring内置freemarker缓存
+  thymeleaf:
+    cache: false #spring内置thymeleaf缓存
+
+  # ===================== 数据源配置 =====================
+  exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure #排除自动配置,手动配置druid
+  datasource:
+    db-type: MySQL #数据库类型(可选值 MySQL、SQLServer、Oracle、DM、KingbaseES、PostgreSQL,请严格按可选值填写)
+    host: 192.168.10.165
+    port: 3306
+    username: root
+    password: yt123456
+    db-name: jnpf_init
+    db-schema: #金仓达梦选填
+    prepare-url: #自定义url
+
+    # ===================== 动态多数据源 =====================
+    dynamic:
+      primary: master #设置默认的数据源或者数据源组,默认值即为master
+      strict: true #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
+      druid:
+        # 空闲时执行连接测试
+        test-while-idle: true
+        # 连接测试最小间隔
+        time-between-eviction-runs-millis: 60000
+        # 获取连接等待3秒 根据网络情况设定
+        max-wait: 3000
+        # 初始化4个连接
+        initial-size: 4
+        # 最大20个连接
+        max-active: 20
+        # 最少保持4个空闲连接
+        min-idle: 4
+        # 空闲连接保活, 超过配置的空闲时间会进行连接检查完成保活操作(数据库自身会断开达到空闲时间的连接, 程序使用断开的连接会报错)
+        keep-alive: true
+        # 解除注释后Druid连接池打印SQL语句 忽略日志等级配置
+        #filters: slf4j
+        slf4j:
+          statementLogEnabled: true
+          resultSetLogEnabled: false
+          connectionLogEnabled: false
+          dataSourceLogEnabled: false
+          statementCreateAfterLogEnabled: false
+          statementCloseAfterLogEnabled: false
+          statementExecuteAfterLogEnabled: false
+          #打印SQL替换参数
+          statementExecutableSqlLogEnable: true
+          statementPrepareAfterLogEnabled: false
+          statementPrepareCallAfterLogEnabled: false
+          statementParameterSetLogEnabled: false
+  #      datasource:
+  #        master:
+  #          url: jdbc:mysql://${spring.datasource.host}:${spring.datasource.port}/${spring.datasource.dbname}?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowMultiQueries=true&serverTimezone=UTC
+  #          username: ${spring.datasource.username}
+  #          password: ${spring.datasource.password}
+  #          driver-class-name: com.mysql.cj.jdbc.Driver
+
+  # ===================== Redis配置 =====================
+  # redis单机模式
+  data:
+    redis:
+      database: 1
+      host: usky-cloud-redis
+      port: 6379
+      password: 123456
+      timeout: 3000
+      lettuce: #Lettuce为Redis的Java驱动包
+        pool:
+          max-active: 8 # 连接池最大连接数
+          max-wait: -1ms  # 连接池最大阻塞等待时间(使用负值表示没有限制)
+          min-idle: 0 # 连接池中的最小空闲连接
+          max-idle: 8 # 连接池中的最大空闲连接
+
+# redis集群模式
+#  redis:
+#    cluster:
+#      nodes:
+#        - 192.168.0.225:6380
+#        - 192.168.0.225:6381
+#        - 192.168.0.225:6382
+#        - 192.168.0.225:6383
+#        - 192.168.0.225:6384
+#        - 192.168.0.225:6385
+#    password: 123456 # 密码为空时,请将本行注释
+#    timeout: 3000 # 超时时间(单位:秒)
+#    lettuce: #Lettuce为Redis的Java驱动包
+#      pool:
+#        max-active: 8 # 连接池最大连接数
+#        max-wait: -1ms  # 连接池最大阻塞等待时间(使用负值表示没有限制)
+#        min-idle: 0 # 连接池中的最小空闲连接
+#        max-idle: 8 # 连接池中的最大空闲连接
+
+# SpringDoc接口文档 访问地址:http://127.0.0.1:30000/doc.html
+springdoc:
+  default-flat-param-object: true
+  api-docs:
+    enabled: true
+#SpringDoc增强
+#knife4j:
+#  basic: #接口文档访问鉴权
+#    enable: true
+#    username: jnpf
+#    password: 123456
+
+config:
+  # ===================== 是否开启测试环境 =====================
+  TestVersion: false
+  # ===================== ApacheShardingSphere 配置开关 =====================
+  sharding-sphere-enabled: false
+  # ===================== 文件存储配置 =====================
+  file-storage: #文件存储配置,不使用的情况下可以不写
+    default-platform: local-plus-1 #默认使用的存储平台
+    thumbnail-suffix: ".min.jpg" #缩略图后缀,例如【.min.jpg】【.png】
+    local-plus: # 本地存储升级版
+      - platform: local-plus-1 # 存储平台标识
+        enable-storage: true  #启用存储
+        enable-access: true #启用访问(线上请使用 Nginx 配置,效率更高)
+        domain: "" # 访问域名,例如:“http://127.0.0.1:8030/”,注意后面要和 path-patterns 保持一致,“/”结尾,本地存储建议使用相对路径,方便后期更换域名
+        base-path: /data/wwwroot/jnpf-resources/ # 基础路径
+        path-patterns: /** # 访问路径
+        storage-path:  # 存储路径
+    aliyun-oss: # 阿里云 OSS ,不使用的情况下可以不写
+      - platform: aliyun-oss-1 # 存储平台标识
+        enable-storage: false  # 启用存储
+        access-key: ??
+        secret-key: ??
+        end-point: ??
+        bucket-name: ??
+        domain: ?? # 访问域名,注意“/”结尾,例如:https://abc.oss-cn-shanghai.aliyuncs.com/
+        base-path: hy/ # 基础路径
+    qiniu-kodo: # 七牛云 kodo ,不使用的情况下可以不写
+      - platform: qiniu-kodo-1 # 存储平台标识
+        enable-storage: false  # 启用存储
+        access-key: ??
+        secret-key: ??
+        bucket-name: ??
+        domain: ?? # 访问域名,注意“/”结尾,例如:http://abc.hn-bkt.clouddn.com/
+        base-path: base/ # 基础路径
+    tencent-cos: # 腾讯云 COS
+      - platform: tencent-cos-1 # 存储平台标识
+        enable-storage: false  # 启用存储
+        secret-id: ??
+        secret-key: ??
+        region: ?? #存仓库所在地域
+        bucket-name: ??
+        domain: ?? # 访问域名,注意“/”结尾,例如:https://abc.cos.ap-nanjing.myqcloud.com/
+        base-path: hy/ # 基础路径
+    minio: # MinIO,由于 MinIO SDK 支持 AWS S3,其它兼容 AWS S3 协议的存储平台也都可配置在这里
+      - platform: minio-1 # 存储平台标识
+        enable-storage: true  # 启用存储
+        access-key: Q9jJs2b6Tv
+        secret-key: Thj2WkpLu9DhmJyJ
+        end-point: http://192.168.0.207:9000/
+        bucket-name: jnpfsoftoss
+        domain:  # 访问域名,注意“/”结尾,例如:http://minio.abc.com/abc/
+        base-path:  # 基础路径

+ 166 - 0
jnpf-datareport-univer-admin/src/main/resources/application-preview.yml

@@ -0,0 +1,166 @@
+# 应用服务器
+server:
+  tomcat:
+    uri-encoding: UTF-8 #tomcat编码
+  port: 32000 #tomcat端口
+
+spring:
+  devtools: #spring开发者工具模块
+    restart:
+      enabled: true #热部署开关
+    freemarker:
+      cache: false #spring内置freemarker缓存
+  thymeleaf:
+    cache: false #spring内置thymeleaf缓存
+
+  # ===================== 数据源配置 =====================
+  exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure #排除自动配置,手动配置druid
+  datasource:
+    db-type: MySQL #数据库类型(可选值 MySQL、SQLServer、Oracle、DM、KingbaseES、PostgreSQL,请严格按可选值填写)
+    host: 127.0.0.1
+    port: 3306
+    username: root
+    password: 123456
+    db-name: jnpf_init
+    db-schema: #金仓达梦选填
+    prepare-url: #自定义url
+
+    # ===================== 动态多数据源 =====================
+    dynamic:
+      primary: master #设置默认的数据源或者数据源组,默认值即为master
+      strict: true #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
+      druid:
+        # 空闲时执行连接测试
+        test-while-idle: true
+        # 连接测试最小间隔
+        time-between-eviction-runs-millis: 60000
+        # 获取连接等待3秒 根据网络情况设定
+        max-wait: 3000
+        # 初始化4个连接
+        initial-size: 4
+        # 最大20个连接
+        max-active: 20
+        # 最少保持4个空闲连接
+        min-idle: 4
+        # 空闲连接保活, 超过配置的空闲时间会进行连接检查完成保活操作(数据库自身会断开达到空闲时间的连接, 程序使用断开的连接会报错)
+        keep-alive: true
+        # 解除注释后Druid连接池打印SQL语句 忽略日志等级配置
+        #filters: slf4j
+        slf4j:
+          statementLogEnabled: true
+          resultSetLogEnabled: false
+          connectionLogEnabled: false
+          dataSourceLogEnabled: false
+          statementCreateAfterLogEnabled: false
+          statementCloseAfterLogEnabled: false
+          statementExecuteAfterLogEnabled: false
+          #打印SQL替换参数
+          statementExecutableSqlLogEnable: true
+          statementPrepareAfterLogEnabled: false
+          statementPrepareCallAfterLogEnabled: false
+          statementParameterSetLogEnabled: false
+  #      datasource:
+  #        master:
+  #          url: jdbc:mysql://${spring.datasource.host}:${spring.datasource.port}/${spring.datasource.dbname}?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowMultiQueries=true&serverTimezone=UTC
+  #          username: ${spring.datasource.username}
+  #          password: ${spring.datasource.password}
+  #          driver-class-name: com.mysql.cj.jdbc.Driver
+
+  # ===================== Redis配置 =====================
+  # redis单机模式
+  redis:
+    database: 1 #缓存库编号
+    host: 127.0.0.1
+    port: 6379
+    password: 123456  # 密码为空时,请将本行注释
+    timeout: 3000 #超时时间(单位:秒)
+    lettuce: #Lettuce为Redis的Java驱动包
+      pool:
+        max-active: 8 # 连接池最大连接数
+        max-wait: -1ms  # 连接池最大阻塞等待时间(使用负值表示没有限制)
+        min-idle: 0 # 连接池中的最小空闲连接
+        max-idle: 8 # 连接池中的最大空闲连接
+
+# redis集群模式
+#  redis:
+#    cluster:
+#      nodes:
+#        - 192.168.0.225:6380
+#        - 192.168.0.225:6381
+#        - 192.168.0.225:6382
+#        - 192.168.0.225:6383
+#        - 192.168.0.225:6384
+#        - 192.168.0.225:6385
+#    password: 123456 # 密码为空时,请将本行注释
+#    timeout: 3000 # 超时时间(单位:秒)
+#    lettuce: #Lettuce为Redis的Java驱动包
+#      pool:
+#        max-active: 8 # 连接池最大连接数
+#        max-wait: -1ms  # 连接池最大阻塞等待时间(使用负值表示没有限制)
+#        min-idle: 0 # 连接池中的最小空闲连接
+#        max-idle: 8 # 连接池中的最大空闲连接
+
+# SpringDoc接口文档 访问地址:http://127.0.0.1:30000/doc.html
+springdoc:
+  default-flat-param-object: true
+  api-docs:
+    enabled: true
+#SpringDoc增强
+#knife4j:
+#  basic: #接口文档访问鉴权
+#    enable: true
+#    username: jnpf
+#    password: 123456
+
+config:
+  # ===================== 是否开启测试环境 =====================
+  TestVersion: false
+  # ===================== ApacheShardingSphere 配置开关 =====================
+  sharding-sphere-enabled: false
+  # ===================== 文件存储配置 =====================
+  file-storage: #文件存储配置,不使用的情况下可以不写
+    default-platform: local-plus-1 #默认使用的存储平台
+    thumbnail-suffix: ".min.jpg" #缩略图后缀,例如【.min.jpg】【.png】
+    local-plus: # 本地存储升级版
+      - platform: local-plus-1 # 存储平台标识
+        enable-storage: true  #启用存储
+        enable-access: true #启用访问(线上请使用 Nginx 配置,效率更高)
+        domain: "" # 访问域名,例如:“http://127.0.0.1:8030/”,注意后面要和 path-patterns 保持一致,“/”结尾,本地存储建议使用相对路径,方便后期更换域名
+        base-path: /data/wwwroot/jnpf-resources/ # 基础路径
+        path-patterns: /** # 访问路径
+        storage-path:  # 存储路径
+    aliyun-oss: # 阿里云 OSS ,不使用的情况下可以不写
+      - platform: aliyun-oss-1 # 存储平台标识
+        enable-storage: false  # 启用存储
+        access-key: ??
+        secret-key: ??
+        end-point: ??
+        bucket-name: ??
+        domain: ?? # 访问域名,注意“/”结尾,例如:https://abc.oss-cn-shanghai.aliyuncs.com/
+        base-path: hy/ # 基础路径
+    qiniu-kodo: # 七牛云 kodo ,不使用的情况下可以不写
+      - platform: qiniu-kodo-1 # 存储平台标识
+        enable-storage: false  # 启用存储
+        access-key: ??
+        secret-key: ??
+        bucket-name: ??
+        domain: ?? # 访问域名,注意“/”结尾,例如:http://abc.hn-bkt.clouddn.com/
+        base-path: base/ # 基础路径
+    tencent-cos: # 腾讯云 COS
+      - platform: tencent-cos-1 # 存储平台标识
+        enable-storage: false  # 启用存储
+        secret-id: ??
+        secret-key: ??
+        region: ?? #存仓库所在地域
+        bucket-name: ??
+        domain: ?? # 访问域名,注意“/”结尾,例如:https://abc.cos.ap-nanjing.myqcloud.com/
+        base-path: hy/ # 基础路径
+    minio: # MinIO,由于 MinIO SDK 支持 AWS S3,其它兼容 AWS S3 协议的存储平台也都可配置在这里
+      - platform: minio-1 # 存储平台标识
+        enable-storage: true  # 启用存储
+        access-key: Q9jJs2b6Tv
+        secret-key: Thj2WkpLu9DhmJyJ
+        end-point: http://192.168.0.207:9000/
+        bucket-name: jnpfsoftoss
+        domain:  # 访问域名,注意“/”结尾,例如:http://minio.abc.com/abc/
+        base-path:  # 基础路径

+ 166 - 0
jnpf-datareport-univer-admin/src/main/resources/application-prod.yml

@@ -0,0 +1,166 @@
+# 应用服务器
+server:
+  tomcat:
+    uri-encoding: UTF-8 #tomcat编码
+  port: 32000 #tomcat端口
+
+spring:
+  devtools: #spring开发者工具模块
+    restart:
+      enabled: true #热部署开关
+    freemarker:
+      cache: false #spring内置freemarker缓存
+  thymeleaf:
+    cache: false #spring内置thymeleaf缓存
+
+  # ===================== 数据源配置 =====================
+  exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure #排除自动配置,手动配置druid
+  datasource:
+    db-type: MySQL #数据库类型(可选值 MySQL、SQLServer、Oracle、DM、KingbaseES、PostgreSQL,请严格按可选值填写)
+    host: 127.0.0.1
+    port: 3306
+    username: root
+    password: 123456
+    db-name: jnpf_init
+    db-schema: #金仓达梦选填
+    prepare-url: #自定义url
+
+    # ===================== 动态多数据源 =====================
+    dynamic:
+      primary: master #设置默认的数据源或者数据源组,默认值即为master
+      strict: true #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
+      druid:
+        # 空闲时执行连接测试
+        test-while-idle: true
+        # 连接测试最小间隔
+        time-between-eviction-runs-millis: 60000
+        # 获取连接等待3秒 根据网络情况设定
+        max-wait: 3000
+        # 初始化4个连接
+        initial-size: 4
+        # 最大20个连接
+        max-active: 20
+        # 最少保持4个空闲连接
+        min-idle: 4
+        # 空闲连接保活, 超过配置的空闲时间会进行连接检查完成保活操作(数据库自身会断开达到空闲时间的连接, 程序使用断开的连接会报错)
+        keep-alive: true
+        # 解除注释后Druid连接池打印SQL语句 忽略日志等级配置
+        #filters: slf4j
+        slf4j:
+          statementLogEnabled: true
+          resultSetLogEnabled: false
+          connectionLogEnabled: false
+          dataSourceLogEnabled: false
+          statementCreateAfterLogEnabled: false
+          statementCloseAfterLogEnabled: false
+          statementExecuteAfterLogEnabled: false
+          #打印SQL替换参数
+          statementExecutableSqlLogEnable: true
+          statementPrepareAfterLogEnabled: false
+          statementPrepareCallAfterLogEnabled: false
+          statementParameterSetLogEnabled: false
+  #      datasource:
+  #        master:
+  #          url: jdbc:mysql://${spring.datasource.host}:${spring.datasource.port}/${spring.datasource.dbname}?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowMultiQueries=true&serverTimezone=UTC
+  #          username: ${spring.datasource.username}
+  #          password: ${spring.datasource.password}
+  #          driver-class-name: com.mysql.cj.jdbc.Driver
+
+  # ===================== Redis配置 =====================
+  # redis单机模式
+  redis:
+    database: 1 #缓存库编号
+    host: 127.0.0.1
+    port: 6379
+    password: 123456  # 密码为空时,请将本行注释
+    timeout: 3000 #超时时间(单位:秒)
+    lettuce: #Lettuce为Redis的Java驱动包
+      pool:
+        max-active: 8 # 连接池最大连接数
+        max-wait: -1ms  # 连接池最大阻塞等待时间(使用负值表示没有限制)
+        min-idle: 0 # 连接池中的最小空闲连接
+        max-idle: 8 # 连接池中的最大空闲连接
+
+# redis集群模式
+#  redis:
+#    cluster:
+#      nodes:
+#        - 192.168.0.225:6380
+#        - 192.168.0.225:6381
+#        - 192.168.0.225:6382
+#        - 192.168.0.225:6383
+#        - 192.168.0.225:6384
+#        - 192.168.0.225:6385
+#    password: 123456 # 密码为空时,请将本行注释
+#    timeout: 3000 # 超时时间(单位:秒)
+#    lettuce: #Lettuce为Redis的Java驱动包
+#      pool:
+#        max-active: 8 # 连接池最大连接数
+#        max-wait: -1ms  # 连接池最大阻塞等待时间(使用负值表示没有限制)
+#        min-idle: 0 # 连接池中的最小空闲连接
+#        max-idle: 8 # 连接池中的最大空闲连接
+
+# SpringDoc接口文档 访问地址:http://127.0.0.1:30000/doc.html
+springdoc:
+  default-flat-param-object: true
+  api-docs:
+    enabled: true
+#SpringDoc增强
+#knife4j:
+#  basic: #接口文档访问鉴权
+#    enable: true
+#    username: jnpf
+#    password: 123456
+
+config:
+  # ===================== 是否开启测试环境 =====================
+  TestVersion: false
+  # ===================== ApacheShardingSphere 配置开关 =====================
+  sharding-sphere-enabled: false
+  # ===================== 文件存储配置 =====================
+  file-storage: #文件存储配置,不使用的情况下可以不写
+    default-platform: local-plus-1 #默认使用的存储平台
+    thumbnail-suffix: ".min.jpg" #缩略图后缀,例如【.min.jpg】【.png】
+    local-plus: # 本地存储升级版
+      - platform: local-plus-1 # 存储平台标识
+        enable-storage: true  #启用存储
+        enable-access: true #启用访问(线上请使用 Nginx 配置,效率更高)
+        domain: "" # 访问域名,例如:“http://127.0.0.1:8030/”,注意后面要和 path-patterns 保持一致,“/”结尾,本地存储建议使用相对路径,方便后期更换域名
+        base-path: /data/wwwroot/jnpf-resources/ # 基础路径
+        path-patterns: /** # 访问路径
+        storage-path:  # 存储路径
+    aliyun-oss: # 阿里云 OSS ,不使用的情况下可以不写
+      - platform: aliyun-oss-1 # 存储平台标识
+        enable-storage: false  # 启用存储
+        access-key: ??
+        secret-key: ??
+        end-point: ??
+        bucket-name: ??
+        domain: ?? # 访问域名,注意“/”结尾,例如:https://abc.oss-cn-shanghai.aliyuncs.com/
+        base-path: hy/ # 基础路径
+    qiniu-kodo: # 七牛云 kodo ,不使用的情况下可以不写
+      - platform: qiniu-kodo-1 # 存储平台标识
+        enable-storage: false  # 启用存储
+        access-key: ??
+        secret-key: ??
+        bucket-name: ??
+        domain: ?? # 访问域名,注意“/”结尾,例如:http://abc.hn-bkt.clouddn.com/
+        base-path: base/ # 基础路径
+    tencent-cos: # 腾讯云 COS
+      - platform: tencent-cos-1 # 存储平台标识
+        enable-storage: false  # 启用存储
+        secret-id: ??
+        secret-key: ??
+        region: ?? #存仓库所在地域
+        bucket-name: ??
+        domain: ?? # 访问域名,注意“/”结尾,例如:https://abc.cos.ap-nanjing.myqcloud.com/
+        base-path: hy/ # 基础路径
+    minio: # MinIO,由于 MinIO SDK 支持 AWS S3,其它兼容 AWS S3 协议的存储平台也都可配置在这里
+      - platform: minio-1 # 存储平台标识
+        enable-storage: true  # 启用存储
+        access-key: Q9jJs2b6Tv
+        secret-key: Thj2WkpLu9DhmJyJ
+        end-point: http://192.168.0.207:9000/
+        bucket-name: jnpfsoftoss
+        domain:  # 访问域名,注意“/”结尾,例如:http://minio.abc.com/abc/
+        base-path:  # 基础路径

+ 166 - 0
jnpf-datareport-univer-admin/src/main/resources/application-test.yml

@@ -0,0 +1,166 @@
+# 应用服务器
+server:
+  tomcat:
+    uri-encoding: UTF-8 #tomcat编码
+  port: 32000 #tomcat端口
+
+spring:
+  devtools: #spring开发者工具模块
+    restart:
+      enabled: true #热部署开关
+    freemarker:
+      cache: false #spring内置freemarker缓存
+  thymeleaf:
+    cache: false #spring内置thymeleaf缓存
+
+  # ===================== 数据源配置 =====================
+  exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure #排除自动配置,手动配置druid
+  datasource:
+    db-type: MySQL #数据库类型(可选值 MySQL、SQLServer、Oracle、DM、KingbaseES、PostgreSQL,请严格按可选值填写)
+    host: 127.0.0.1
+    port: 3306
+    username: root
+    password: 123456
+    db-name: jnpf_init
+    db-schema: #金仓达梦选填
+    prepare-url: #自定义url
+
+    # ===================== 动态多数据源 =====================
+    dynamic:
+      primary: master #设置默认的数据源或者数据源组,默认值即为master
+      strict: true #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
+      druid:
+        # 空闲时执行连接测试
+        test-while-idle: true
+        # 连接测试最小间隔
+        time-between-eviction-runs-millis: 60000
+        # 获取连接等待3秒 根据网络情况设定
+        max-wait: 3000
+        # 初始化4个连接
+        initial-size: 4
+        # 最大20个连接
+        max-active: 20
+        # 最少保持4个空闲连接
+        min-idle: 4
+        # 空闲连接保活, 超过配置的空闲时间会进行连接检查完成保活操作(数据库自身会断开达到空闲时间的连接, 程序使用断开的连接会报错)
+        keep-alive: true
+        # 解除注释后Druid连接池打印SQL语句 忽略日志等级配置
+        #filters: slf4j
+        slf4j:
+          statementLogEnabled: true
+          resultSetLogEnabled: false
+          connectionLogEnabled: false
+          dataSourceLogEnabled: false
+          statementCreateAfterLogEnabled: false
+          statementCloseAfterLogEnabled: false
+          statementExecuteAfterLogEnabled: false
+          #打印SQL替换参数
+          statementExecutableSqlLogEnable: true
+          statementPrepareAfterLogEnabled: false
+          statementPrepareCallAfterLogEnabled: false
+          statementParameterSetLogEnabled: false
+  #      datasource:
+  #        master:
+  #          url: jdbc:mysql://${spring.datasource.host}:${spring.datasource.port}/${spring.datasource.dbname}?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowMultiQueries=true&serverTimezone=UTC
+  #          username: ${spring.datasource.username}
+  #          password: ${spring.datasource.password}
+  #          driver-class-name: com.mysql.cj.jdbc.Driver
+
+  # ===================== Redis配置 =====================
+  # redis单机模式
+  redis:
+    database: 1 #缓存库编号
+    host: 127.0.0.1
+    port: 6379
+    password: 123456  # 密码为空时,请将本行注释
+    timeout: 3000 #超时时间(单位:秒)
+    lettuce: #Lettuce为Redis的Java驱动包
+      pool:
+        max-active: 8 # 连接池最大连接数
+        max-wait: -1ms  # 连接池最大阻塞等待时间(使用负值表示没有限制)
+        min-idle: 0 # 连接池中的最小空闲连接
+        max-idle: 8 # 连接池中的最大空闲连接
+
+# redis集群模式
+#  redis:
+#    cluster:
+#      nodes:
+#        - 192.168.0.225:6380
+#        - 192.168.0.225:6381
+#        - 192.168.0.225:6382
+#        - 192.168.0.225:6383
+#        - 192.168.0.225:6384
+#        - 192.168.0.225:6385
+#    password: 123456 # 密码为空时,请将本行注释
+#    timeout: 3000 # 超时时间(单位:秒)
+#    lettuce: #Lettuce为Redis的Java驱动包
+#      pool:
+#        max-active: 8 # 连接池最大连接数
+#        max-wait: -1ms  # 连接池最大阻塞等待时间(使用负值表示没有限制)
+#        min-idle: 0 # 连接池中的最小空闲连接
+#        max-idle: 8 # 连接池中的最大空闲连接
+
+# SpringDoc接口文档 访问地址:http://127.0.0.1:30000/doc.html
+springdoc:
+  default-flat-param-object: true
+  api-docs:
+    enabled: true
+#SpringDoc增强
+#knife4j:
+#  basic: #接口文档访问鉴权
+#    enable: true
+#    username: jnpf
+#    password: 123456
+
+config:
+  # ===================== 是否开启测试环境 =====================
+  TestVersion: false
+  # ===================== ApacheShardingSphere 配置开关 =====================
+  sharding-sphere-enabled: false
+  # ===================== 文件存储配置 =====================
+  file-storage: #文件存储配置,不使用的情况下可以不写
+    default-platform: local-plus-1 #默认使用的存储平台
+    thumbnail-suffix: ".min.jpg" #缩略图后缀,例如【.min.jpg】【.png】
+    local-plus: # 本地存储升级版
+      - platform: local-plus-1 # 存储平台标识
+        enable-storage: true  #启用存储
+        enable-access: true #启用访问(线上请使用 Nginx 配置,效率更高)
+        domain: "" # 访问域名,例如:“http://127.0.0.1:8030/”,注意后面要和 path-patterns 保持一致,“/”结尾,本地存储建议使用相对路径,方便后期更换域名
+        base-path: /data/wwwroot/jnpf-resources/ # 基础路径
+        path-patterns: /** # 访问路径
+        storage-path:  # 存储路径
+    aliyun-oss: # 阿里云 OSS ,不使用的情况下可以不写
+      - platform: aliyun-oss-1 # 存储平台标识
+        enable-storage: false  # 启用存储
+        access-key: ??
+        secret-key: ??
+        end-point: ??
+        bucket-name: ??
+        domain: ?? # 访问域名,注意“/”结尾,例如:https://abc.oss-cn-shanghai.aliyuncs.com/
+        base-path: hy/ # 基础路径
+    qiniu-kodo: # 七牛云 kodo ,不使用的情况下可以不写
+      - platform: qiniu-kodo-1 # 存储平台标识
+        enable-storage: false  # 启用存储
+        access-key: ??
+        secret-key: ??
+        bucket-name: ??
+        domain: ?? # 访问域名,注意“/”结尾,例如:http://abc.hn-bkt.clouddn.com/
+        base-path: base/ # 基础路径
+    tencent-cos: # 腾讯云 COS
+      - platform: tencent-cos-1 # 存储平台标识
+        enable-storage: false  # 启用存储
+        secret-id: ??
+        secret-key: ??
+        region: ?? #存仓库所在地域
+        bucket-name: ??
+        domain: ?? # 访问域名,注意“/”结尾,例如:https://abc.cos.ap-nanjing.myqcloud.com/
+        base-path: hy/ # 基础路径
+    minio: # MinIO,由于 MinIO SDK 支持 AWS S3,其它兼容 AWS S3 协议的存储平台也都可配置在这里
+      - platform: minio-1 # 存储平台标识
+        enable-storage: true  # 启用存储
+        access-key: Q9jJs2b6Tv
+        secret-key: Thj2WkpLu9DhmJyJ
+        end-point: http://192.168.0.207:9000/
+        bucket-name: jnpfsoftoss
+        domain:  # 访问域名,注意“/”结尾,例如:http://minio.abc.com/abc/
+        base-path:  # 基础路径

+ 84 - 0
jnpf-datareport-univer-admin/src/main/resources/application.yml

@@ -0,0 +1,84 @@
+spring:
+  application:
+    name: jnpf-datareport
+  profiles:
+    # 指定环境配置 dev(开发环境-默认)、test(测试环境)、preview(预生产环境)、prod(生产环境)
+    active: dev
+  servlet:
+    multipart: #文件传输配置
+      max-file-size: 100MB #单个数据大小限制
+      max-request-size: 100MB #请求总数据大小限制
+      enabled: true  #是否启用分段上传支持
+  mvc:
+    hiddenmethod: #隐式方法过滤器
+      filter:
+        enabled: true #默认开启。开启以支持:PUT,DELETE表单提交方法
+  jackson: #序列化和反序列化json框架
+    serialization:
+      write-dates-as-timestamps: true #是否写入日期时间时间戳格式
+    time-zone: GMT+8 #指定日期格式化时区
+  main:
+    allow-bean-definition-overriding: true #允许同名bean后者覆盖,默认:true
+    allow-circular-references: true #允许Bean相互引用,默认:false
+
+config:
+  #===================== 访问域名 =====================
+  WebAnnexFilePath: WebAnnexFile
+  DataBackupFilePath: DataBackupFile
+  TemporaryFilePath: TemporaryFile
+  SystemFilePath: SystemFile
+  TemplateFilePath: TemplateFile
+  EmailFilePath: EmailFile
+  DocumentFilePath: DocumentFile
+  DocumentPreviewPath: DocumentPreview
+  UserAvatarFilePath: UserAvatar
+  IMContentFilePath: IMContentFile
+  MPMaterialFilePath: MPMaterial
+  TemplateCodePath: TemplateCode
+  BiVisualPath: BiVisualPath
+
+  ApiDomain: http://127.0.0.1:30000 #主项目后端域名(文档预览中使用)
+  FrontDomain: http://127.0.0.1:3100 #前端域名(文档预览中使用)
+  AppDomain: http://127.0.0.1:8080 #app/h5端域名配置(文档预览中使用)
+
+  #===================== 多租户 =====================
+  MultiTenancy: false #是否开启
+  MultiTenancyUrl: http://127.0.0.1:30006/api/tenant/DbName/ #多租户项目地址
+
+# 接口放行地址 与GatewayWhite中的默认URL合并
+gateway:
+  # 禁止访问接口
+  block-url:
+  ## 配置示例
+  #- /api/message/Notice
+  #- /api/permission/Users/*
+  # 不验证Token, 放行接口(默认记录日志)
+  white-url:
+  #  # 配置示例
+  #- /api/message/Notice
+  #- /api/permission/Users/*
+  # 放行接口(不记录日志)
+  exclude-url:
+  #  # 配置示例
+  #- /api/message/Notice
+  #- /api/permission/Users/*
+  # 入站IP(禁止配置以外的IP访问block-url配置的接口)
+  white-ip:
+  #- 192.168.0.10
+  #- 192.168.0.20
+
+# 日志配置
+logging:
+  config: classpath:logback-spring.xml
+  level:
+    #自定义第三方包名日志等级
+    # 解除注释后Druid连接池打印SQL语句
+    druid.sql.Statement: debug
+#    druid.sql.DataSource: debug
+#    druid.sql.Connection: debug
+#    druid.sql.ResultSet: debug
+log:
+  level:
+    # 等级 TRACE,DEBUG,INFO,WARN,ERROR(不区分大小写)
+    root: info
+  path: log/${spring.application.name}

+ 327 - 0
jnpf-datareport-univer-admin/src/main/resources/logback-spring.xml

@@ -0,0 +1,327 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+
+    <!--日志格式应用spring boot默认的格式,也可以自己更改-->
+    <include resource="org/springframework/boot/logging/logback/defaults.xml"/>
+    <property name="FILE_LOG_PATTERN" value="[%d{yyyy-MM-dd HH:mm:ss.SSS}] [%-5level] [%thread] [%logger{50}] [%M] [%line] - %msg%n" />
+    <springProperty scope="context" name="SERVICE_NAME" source="spring.application.name" defaultValue="jnpf"/>
+
+    <!--定义日志存放的位置,默认存放在项目启动的相对路径的目录-->
+    <springProperty scope="context" name="LOG_PATH" source="log.path" defaultValue="log/${SERVICE_NAME}"/>
+    <!-- 全局日志等级 -->
+    <springProperty scope="context" name="LOG_LEVEL_ROOT" source="log.level.root" defaultValue="INFO"/>
+    <!-- 服务自定义等级 如需自定义服务日志等级 修改下方的【自定义服务名】与nacos上的log.level.自定义服务名=等级 -->
+    <springProperty scope="context" name="LOG_LEVEL" source="log.level.jnpf-boot" defaultValue="${LOG_LEVEL_ROOT}"/>
+
+    <!-- 日志记录器,日期滚动记录,level为 ERROR 日志 -->
+    <appender name="FILE_ERROR" class="ch.qos.logback.core.rolling.RollingFileAppender">
+
+        <!-- 正在记录的日志文件的路径及文件名 -->
+        <file>${LOG_PATH}/log_error.log</file>
+
+        <!-- 日志记录器的滚动策略,按日期,按大小记录 -->
+        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+
+            <!-- 归档的日志文件的路径,%d{yyyy-MM-dd}指定日期格式,%i指定索引 -->
+            <fileNamePattern>${LOG_PATH}/error/%d{yyyy-MM-dd,aux}/log-error-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <!--日志最大的历史7天-->
+            <maxHistory>7</maxHistory>
+
+            <!-- 除按日志记录之外,还配置了日志文件不能超过2M,若超过2M,日志文件会以索引0开始,
+            命名日志文件,例如log-error-2013-12-21.0.log -->
+            <maxFileSize>10MB</maxFileSize>
+        </rollingPolicy>
+
+        <!-- 追加方式记录日志 -->
+        <append>true</append>
+
+        <!-- 日志文件的格式 -->
+        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+            <pattern>${FILE_LOG_PATTERN}</pattern>
+            <charset>utf-8</charset>
+        </encoder>
+
+        <!-- 此日志文件只记录error级别的 -->
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <level>error</level>
+            <onMatch>ACCEPT</onMatch>
+            <onMismatch>DENY</onMismatch>
+        </filter>
+    </appender>
+
+
+    <!-- 日志记录器,日期滚动记录,level为 INFO 日志 -->
+    <appender name="FILE_INFO" class="ch.qos.logback.core.rolling.RollingFileAppender">
+
+        <!-- 正在记录的日志文件的路径及文件名 -->
+        <file>${LOG_PATH}/log_info.log</file>
+
+        <!-- 日志记录器的滚动策略,按日期,按大小记录 -->
+        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+
+            <!-- 归档的日志文件的路径,%d{yyyy-MM-dd}指定日期格式,%i指定索引 -->
+            <fileNamePattern>${LOG_PATH}/info/%d{yyyy-MM-dd,aux}/log-info-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <!--日志最大的历史7天-->
+            <maxHistory>7</maxHistory>
+
+            <!-- 除按日志记录之外,还配置了日志文件不能超过2M,若超过2M,日志文件会以索引0开始,
+            命名日志文件,例如log-error-2013-12-21.0.log -->
+            <maxFileSize>10MB</maxFileSize>
+        </rollingPolicy>
+
+        <!-- 追加方式记录日志 -->
+        <append>true</append>
+
+        <!-- 日志文件的格式 -->
+        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+            <pattern>${FILE_LOG_PATTERN}</pattern>
+            <charset>utf-8</charset>
+        </encoder>
+
+        <!-- 此日志文件只记录info级别的 -->
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <level>info</level>
+            <onMatch>ACCEPT</onMatch>
+            <onMismatch>DENY</onMismatch>
+        </filter>
+    </appender>
+
+
+    <!-- 日志记录器,日期滚动记录,level为 WARN 日志 -->
+    <appender name="FILE_WARN" class="ch.qos.logback.core.rolling.RollingFileAppender">
+
+        <!-- 正在记录的日志文件的路径及文件名 -->
+        <file>${LOG_PATH}/log_warn.log</file>
+
+        <!-- 日志记录器的滚动策略,按日期,按大小记录 -->
+        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+
+            <!-- 归档的日志文件的路径,%d{yyyy-MM-dd}指定日期格式,%i指定索引 -->
+            <fileNamePattern>${LOG_PATH}/warn/%d{yyyy-MM-dd,aux}/log-warn-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <!--日志最大的历史7天-->
+            <maxHistory>7</maxHistory>
+
+            <!-- 除按日志记录之外,还配置了日志文件不能超过2M,若超过2M,日志文件会以索引0开始,
+            命名日志文件,例如log-error-2013-12-21.0.log -->
+            <maxFileSize>10MB</maxFileSize>
+        </rollingPolicy>
+
+        <!-- 追加方式记录日志 -->
+        <append>true</append>
+
+        <!-- 日志文件的格式 -->
+        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+            <pattern>${FILE_LOG_PATTERN}</pattern>
+            <charset>utf-8</charset>
+        </encoder>
+
+        <!-- 此日志文件只记录warn级别的 -->
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <level>warn</level>
+            <onMatch>ACCEPT</onMatch>
+            <onMismatch>DENY</onMismatch>
+        </filter>
+    </appender>
+
+    <!-- 日志记录器,日期滚动记录,level为 DEBUG 日志 -->
+    <appender name="FILE_DEBUG" class="ch.qos.logback.core.rolling.RollingFileAppender">
+
+        <!-- 正在记录的日志文件的路径及文件名 -->
+        <file>${LOG_PATH}/log_debug.log</file>
+
+        <!-- 日志记录器的滚动策略,按日期,按大小记录 -->
+        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+
+            <!-- 归档的日志文件的路径,%d{yyyy-MM-dd}指定日期格式,%i指定索引 -->
+            <fileNamePattern>${LOG_PATH}/debug/%d{yyyy-MM-dd,aux}/log-debug-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <!--日志最大的历史7天-->
+            <maxHistory>7</maxHistory>
+
+            <!-- 除按日志记录之外,还配置了日志文件不能超过2M,若超过2M,日志文件会以索引0开始,
+            命名日志文件,例如log-error-2013-12-21.0.log -->
+            <maxFileSize>10MB</maxFileSize>
+        </rollingPolicy>
+
+        <!-- 追加方式记录日志 -->
+        <append>true</append>
+
+        <!-- 日志文件的格式 -->
+        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+            <pattern>${FILE_LOG_PATTERN}</pattern>
+            <charset>utf-8</charset>
+        </encoder>
+
+        <!-- 此日志文件只记录debug级别的 -->
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <level>debug</level>
+            <onMatch>ACCEPT</onMatch>
+            <onMismatch>DENY</onMismatch>
+        </filter>
+    </appender>
+
+
+    <!-- 日志记录器,日期滚动记录,所有日志 -->
+    <appender name="FILE_ALL" class="ch.qos.logback.core.rolling.RollingFileAppender">
+
+        <!-- 正在记录的日志文件的路径及文件名 -->
+        <file>${LOG_PATH}/log_total.log</file>
+
+        <!-- 日志记录器的滚动策略,按日期,按大小记录 -->
+        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+
+            <!-- 归档的日志文件的路径,%d{yyyy-MM-dd}指定日期格式,%i指定索引 -->
+            <fileNamePattern>${LOG_PATH}/total/%d{yyyy-MM-dd,aux}/log-total-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <!--日志最大的历史7天-->
+            <maxHistory>7</maxHistory>
+
+            <!-- 除按日志记录之外,还配置了日志文件不能超过2M,若超过2M,日志文件会以索引0开始,
+            命名日志文件,例如log-error-2013-12-21.0.log -->
+            <maxFileSize>10MB</maxFileSize>
+        </rollingPolicy>
+
+        <!-- 追加方式记录日志 -->
+        <append>true</append>
+
+        <!-- 日志文件的格式 -->
+        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+            <pattern>${FILE_LOG_PATTERN}</pattern>
+            <charset>utf-8</charset>
+        </encoder>
+    </appender>
+
+
+    <!-- 日志记录器,日期滚动记录,level 根据配置动态输出日志 -->
+    <appender name="FILE_RELEASE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+
+        <!-- 正在记录的日志文件的路径及文件名 -->
+        <file>${LOG_PATH}/log_release.log</file>
+
+        <!-- 日志记录器的滚动策略,按日期,按大小记录 -->
+        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+
+            <!-- 归档的日志文件的路径,%d{yyyy-MM-dd}指定日期格式,%i指定索引 -->
+            <fileNamePattern>${LOG_PATH}/release/%d{yyyy-MM-dd,aux}/log-warn-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <!--日志最大的历史7天-->
+            <maxHistory>7</maxHistory>
+
+            <!-- 除按日志记录之外,还配置了日志文件不能超过2M,若超过2M,日志文件会以索引0开始,
+            命名日志文件,例如log-error-2013-12-21.0.log -->
+            <maxFileSize>10MB</maxFileSize>
+        </rollingPolicy>
+
+        <!-- 追加方式记录日志 -->
+        <append>true</append>
+
+        <!-- 日志文件的格式 -->
+        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+            <pattern>${FILE_LOG_PATTERN}</pattern>
+            <charset>utf-8</charset>
+        </encoder>
+
+        <!-- 此日志文件只记录warn级别的 -->
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <level>${LOG_LEVEL}</level>
+            <onMatch>ACCEPT</onMatch>
+            <onMismatch>DENY</onMismatch>
+        </filter>
+    </appender>
+    <!-- 异步输出 DEBUG -->
+    <appender name="ASYNC_FILE_DEBUG" class="ch.qos.logback.classic.AsyncAppender">
+        <discardingThreshold>0</discardingThreshold>
+        <queueSize>256</queueSize>
+        <appender-ref ref="FILE_DEBUG"/>
+    </appender>
+    <!-- 异步输出 INFO -->
+    <appender name="ASYNC_FILE_INFO" class="ch.qos.logback.classic.AsyncAppender">
+        <discardingThreshold>0</discardingThreshold>
+        <queueSize>256</queueSize>
+        <appender-ref ref="FILE_INFO"/>
+    </appender>
+    <!-- 异步输出 WARN -->
+    <appender name="ASYNC_FILE_WARN" class="ch.qos.logback.classic.AsyncAppender">
+        <discardingThreshold>0</discardingThreshold>
+        <queueSize>256</queueSize>
+        <appender-ref ref="FILE_WARN"/>
+    </appender>
+    <!-- 异步输出 ERROR -->
+    <appender name="ASYNC_FILE_ERROR" class="ch.qos.logback.classic.AsyncAppender">
+        <discardingThreshold>0</discardingThreshold>
+        <queueSize>256</queueSize>
+        <appender-ref ref="FILE_ERROR"/>
+    </appender>
+    <!-- 异步输出 ALL -->
+    <appender name="ASYNC_FILE_ALL" class="ch.qos.logback.classic.AsyncAppender">
+        <discardingThreshold>0</discardingThreshold>
+        <queueSize>256</queueSize>
+        <appender-ref ref="FILE_ALL"/>
+    </appender>
+
+
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>${CONSOLE_LOG_PATTERN}</pattern>
+            <charset>utf-8</charset>
+        </encoder>
+    </appender>
+
+
+    <!-- 异步输出 控制台 -->
+    <appender name="ASYNC_STDOUT" class="ch.qos.logback.classic.AsyncAppender">
+        <discardingThreshold>0</discardingThreshold>
+        <queueSize>256</queueSize>
+        <appender-ref ref="STDOUT"/>
+    </appender>
+
+
+    <!--<appender name="LOGSTASH" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
+        &lt;!&ndash; 必填:目标:LogStash的 IP:Port &ndash;&gt;
+        <destination>192.168.0.50:50000</destination>
+        &lt;!&ndash; 可选:保持程序存活时间 &ndash;&gt;
+        <keepAliveDuration>5 minutes</keepAliveDuration>
+        &lt;!&ndash; 可选:重连延迟时长 &ndash;&gt;
+        <reconnectionDelay>10 second</reconnectionDelay>
+        &lt;!&ndash; 可选:等待策略 &ndash;&gt;
+        <waitStrategyType>sleeping</waitStrategyType>
+        &lt;!&ndash;  ============ encoder必须配置,有多种可选 ============= &ndash;&gt;
+        &lt;!&ndash; 编码器二:LoggingEventCompositeJsonEncoder &ndash;&gt;
+        <encoder charset="UTF-8" class="net.logstash.logback.encoder.LoggingEventCompositeJsonEncoder">
+            <providers>
+                &lt;!&ndash; 时间戳:时区 &ndash;&gt;
+                <timestamp>
+                    <timeZone>UTC</timeZone>
+                </timestamp>
+                &lt;!&ndash; 模式 &ndash;&gt;
+                <pattern>
+                    <pattern>
+                        {
+                        "severity": "%level",
+                        "service": "${SERVICE_NAME:-}",
+                        "trace": "%X{X-B3-TraceId:-}",
+                        "span": "%X{X-B3-SpanId:-}",
+                        "exportable": "%X{X-Span-Export:-}",
+                        "pid": "${PID:-}",
+                        "thread": "%thread",
+                        "class": "%logger{40}",
+                        "msg": "%message"
+                        &lt;!&ndash;"idx_pre": "elk-original-third-access",&ndash;&gt;
+                        &lt;!&ndash;"json": "#asJson{%message}"  这个asJson可以把对应的字符串作为json对象取出来,这样es可以对json里面的字段索引了&ndash;&gt;
+                        }
+                    </pattern>
+                </pattern>
+            </providers>
+        </encoder>
+    </appender>-->
+
+
+    <root level="${LOG_LEVEL}">
+        <appender-ref ref="ASYNC_STDOUT"/>
+        <appender-ref ref="ASYNC_FILE_ERROR"/>
+        <appender-ref ref="ASYNC_FILE_INFO"/>
+        <appender-ref ref="ASYNC_FILE_WARN"/>
+        <appender-ref ref="ASYNC_FILE_DEBUG"/>
+        <appender-ref ref="ASYNC_FILE_ALL"/>
+        <!--<appender-ref ref="LOGSTASH"/>-->
+    </root>
+
+
+</configuration>

+ 39 - 0
jnpf-datareport-univer-admin/target/classes/META-INF/spring-configuration-metadata.json

@@ -0,0 +1,39 @@
+{
+  "groups": [
+    {
+      "name": "gateway",
+      "type": "jnpf.properties.GatewayWhite",
+      "sourceType": "jnpf.config.ReportAutoConfiguration",
+      "sourceMethod": "getGateWhite()"
+    },
+    {
+      "name": "report",
+      "type": "jnpf.properties.ReportProperties",
+      "sourceType": "jnpf.config.ReportAutoConfiguration",
+      "sourceMethod": "getReportProperties()"
+    }
+  ],
+  "properties": [
+    {
+      "name": "gateway.block-url",
+      "type": "java.util.List<java.lang.String>",
+      "sourceType": "jnpf.properties.GatewayWhite"
+    },
+    {
+      "name": "gateway.exclude-url",
+      "type": "java.util.List<java.lang.String>",
+      "sourceType": "jnpf.properties.GatewayWhite"
+    },
+    {
+      "name": "gateway.white-ip",
+      "type": "java.util.List<java.lang.String>",
+      "sourceType": "jnpf.properties.GatewayWhite"
+    },
+    {
+      "name": "gateway.white-url",
+      "type": "java.util.List<java.lang.String>",
+      "sourceType": "jnpf.properties.GatewayWhite"
+    }
+  ],
+  "hints": []
+}

+ 167 - 0
jnpf-datareport-univer-admin/target/classes/application-dev.yml

@@ -0,0 +1,167 @@
+# 应用服务器
+server:
+  tomcat:
+    uri-encoding: UTF-8 #tomcat编码
+  port: 32000 #tomcat端口
+
+spring:
+  devtools: #spring开发者工具模块
+    restart:
+      enabled: true #热部署开关
+    freemarker:
+      cache: false #spring内置freemarker缓存
+  thymeleaf:
+    cache: false #spring内置thymeleaf缓存
+
+  # ===================== 数据源配置 =====================
+  exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure #排除自动配置,手动配置druid
+  datasource:
+    db-type: MySQL #数据库类型(可选值 MySQL、SQLServer、Oracle、DM、KingbaseES、PostgreSQL,请严格按可选值填写)
+    host: 192.168.10.165
+    port: 3306
+    username: root
+    password: yt123456
+    db-name: jnpf_init
+    db-schema: #金仓达梦选填
+    prepare-url: #自定义url
+
+    # ===================== 动态多数据源 =====================
+    dynamic:
+      primary: master #设置默认的数据源或者数据源组,默认值即为master
+      strict: true #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
+      druid:
+        # 空闲时执行连接测试
+        test-while-idle: true
+        # 连接测试最小间隔
+        time-between-eviction-runs-millis: 60000
+        # 获取连接等待3秒 根据网络情况设定
+        max-wait: 3000
+        # 初始化4个连接
+        initial-size: 4
+        # 最大20个连接
+        max-active: 20
+        # 最少保持4个空闲连接
+        min-idle: 4
+        # 空闲连接保活, 超过配置的空闲时间会进行连接检查完成保活操作(数据库自身会断开达到空闲时间的连接, 程序使用断开的连接会报错)
+        keep-alive: true
+        # 解除注释后Druid连接池打印SQL语句 忽略日志等级配置
+        #filters: slf4j
+        slf4j:
+          statementLogEnabled: true
+          resultSetLogEnabled: false
+          connectionLogEnabled: false
+          dataSourceLogEnabled: false
+          statementCreateAfterLogEnabled: false
+          statementCloseAfterLogEnabled: false
+          statementExecuteAfterLogEnabled: false
+          #打印SQL替换参数
+          statementExecutableSqlLogEnable: true
+          statementPrepareAfterLogEnabled: false
+          statementPrepareCallAfterLogEnabled: false
+          statementParameterSetLogEnabled: false
+  #      datasource:
+  #        master:
+  #          url: jdbc:mysql://${spring.datasource.host}:${spring.datasource.port}/${spring.datasource.dbname}?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowMultiQueries=true&serverTimezone=UTC
+  #          username: ${spring.datasource.username}
+  #          password: ${spring.datasource.password}
+  #          driver-class-name: com.mysql.cj.jdbc.Driver
+
+  # ===================== Redis配置 =====================
+  # redis单机模式
+  data:
+    redis:
+      database: 1
+      host: usky-cloud-redis
+      port: 6379
+      password: 123456
+      timeout: 3000
+      lettuce: #Lettuce为Redis的Java驱动包
+        pool:
+          max-active: 8 # 连接池最大连接数
+          max-wait: -1ms  # 连接池最大阻塞等待时间(使用负值表示没有限制)
+          min-idle: 0 # 连接池中的最小空闲连接
+          max-idle: 8 # 连接池中的最大空闲连接
+
+# redis集群模式
+#  redis:
+#    cluster:
+#      nodes:
+#        - 192.168.0.225:6380
+#        - 192.168.0.225:6381
+#        - 192.168.0.225:6382
+#        - 192.168.0.225:6383
+#        - 192.168.0.225:6384
+#        - 192.168.0.225:6385
+#    password: 123456 # 密码为空时,请将本行注释
+#    timeout: 3000 # 超时时间(单位:秒)
+#    lettuce: #Lettuce为Redis的Java驱动包
+#      pool:
+#        max-active: 8 # 连接池最大连接数
+#        max-wait: -1ms  # 连接池最大阻塞等待时间(使用负值表示没有限制)
+#        min-idle: 0 # 连接池中的最小空闲连接
+#        max-idle: 8 # 连接池中的最大空闲连接
+
+# SpringDoc接口文档 访问地址:http://127.0.0.1:30000/doc.html
+springdoc:
+  default-flat-param-object: true
+  api-docs:
+    enabled: true
+#SpringDoc增强
+#knife4j:
+#  basic: #接口文档访问鉴权
+#    enable: true
+#    username: jnpf
+#    password: 123456
+
+config:
+  # ===================== 是否开启测试环境 =====================
+  TestVersion: false
+  # ===================== ApacheShardingSphere 配置开关 =====================
+  sharding-sphere-enabled: false
+  # ===================== 文件存储配置 =====================
+  file-storage: #文件存储配置,不使用的情况下可以不写
+    default-platform: local-plus-1 #默认使用的存储平台
+    thumbnail-suffix: ".min.jpg" #缩略图后缀,例如【.min.jpg】【.png】
+    local-plus: # 本地存储升级版
+      - platform: local-plus-1 # 存储平台标识
+        enable-storage: true  #启用存储
+        enable-access: true #启用访问(线上请使用 Nginx 配置,效率更高)
+        domain: "" # 访问域名,例如:“http://127.0.0.1:8030/”,注意后面要和 path-patterns 保持一致,“/”结尾,本地存储建议使用相对路径,方便后期更换域名
+        base-path: /data/wwwroot/jnpf-resources/ # 基础路径
+        path-patterns: /** # 访问路径
+        storage-path:  # 存储路径
+    aliyun-oss: # 阿里云 OSS ,不使用的情况下可以不写
+      - platform: aliyun-oss-1 # 存储平台标识
+        enable-storage: false  # 启用存储
+        access-key: ??
+        secret-key: ??
+        end-point: ??
+        bucket-name: ??
+        domain: ?? # 访问域名,注意“/”结尾,例如:https://abc.oss-cn-shanghai.aliyuncs.com/
+        base-path: hy/ # 基础路径
+    qiniu-kodo: # 七牛云 kodo ,不使用的情况下可以不写
+      - platform: qiniu-kodo-1 # 存储平台标识
+        enable-storage: false  # 启用存储
+        access-key: ??
+        secret-key: ??
+        bucket-name: ??
+        domain: ?? # 访问域名,注意“/”结尾,例如:http://abc.hn-bkt.clouddn.com/
+        base-path: base/ # 基础路径
+    tencent-cos: # 腾讯云 COS
+      - platform: tencent-cos-1 # 存储平台标识
+        enable-storage: false  # 启用存储
+        secret-id: ??
+        secret-key: ??
+        region: ?? #存仓库所在地域
+        bucket-name: ??
+        domain: ?? # 访问域名,注意“/”结尾,例如:https://abc.cos.ap-nanjing.myqcloud.com/
+        base-path: hy/ # 基础路径
+    minio: # MinIO,由于 MinIO SDK 支持 AWS S3,其它兼容 AWS S3 协议的存储平台也都可配置在这里
+      - platform: minio-1 # 存储平台标识
+        enable-storage: true  # 启用存储
+        access-key: Q9jJs2b6Tv
+        secret-key: Thj2WkpLu9DhmJyJ
+        end-point: http://192.168.0.207:9000/
+        bucket-name: jnpfsoftoss
+        domain:  # 访问域名,注意“/”结尾,例如:http://minio.abc.com/abc/
+        base-path:  # 基础路径

+ 166 - 0
jnpf-datareport-univer-admin/target/classes/application-preview.yml

@@ -0,0 +1,166 @@
+# 应用服务器
+server:
+  tomcat:
+    uri-encoding: UTF-8 #tomcat编码
+  port: 32000 #tomcat端口
+
+spring:
+  devtools: #spring开发者工具模块
+    restart:
+      enabled: true #热部署开关
+    freemarker:
+      cache: false #spring内置freemarker缓存
+  thymeleaf:
+    cache: false #spring内置thymeleaf缓存
+
+  # ===================== 数据源配置 =====================
+  exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure #排除自动配置,手动配置druid
+  datasource:
+    db-type: MySQL #数据库类型(可选值 MySQL、SQLServer、Oracle、DM、KingbaseES、PostgreSQL,请严格按可选值填写)
+    host: 127.0.0.1
+    port: 3306
+    username: root
+    password: 123456
+    db-name: jnpf_init
+    db-schema: #金仓达梦选填
+    prepare-url: #自定义url
+
+    # ===================== 动态多数据源 =====================
+    dynamic:
+      primary: master #设置默认的数据源或者数据源组,默认值即为master
+      strict: true #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
+      druid:
+        # 空闲时执行连接测试
+        test-while-idle: true
+        # 连接测试最小间隔
+        time-between-eviction-runs-millis: 60000
+        # 获取连接等待3秒 根据网络情况设定
+        max-wait: 3000
+        # 初始化4个连接
+        initial-size: 4
+        # 最大20个连接
+        max-active: 20
+        # 最少保持4个空闲连接
+        min-idle: 4
+        # 空闲连接保活, 超过配置的空闲时间会进行连接检查完成保活操作(数据库自身会断开达到空闲时间的连接, 程序使用断开的连接会报错)
+        keep-alive: true
+        # 解除注释后Druid连接池打印SQL语句 忽略日志等级配置
+        #filters: slf4j
+        slf4j:
+          statementLogEnabled: true
+          resultSetLogEnabled: false
+          connectionLogEnabled: false
+          dataSourceLogEnabled: false
+          statementCreateAfterLogEnabled: false
+          statementCloseAfterLogEnabled: false
+          statementExecuteAfterLogEnabled: false
+          #打印SQL替换参数
+          statementExecutableSqlLogEnable: true
+          statementPrepareAfterLogEnabled: false
+          statementPrepareCallAfterLogEnabled: false
+          statementParameterSetLogEnabled: false
+  #      datasource:
+  #        master:
+  #          url: jdbc:mysql://${spring.datasource.host}:${spring.datasource.port}/${spring.datasource.dbname}?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowMultiQueries=true&serverTimezone=UTC
+  #          username: ${spring.datasource.username}
+  #          password: ${spring.datasource.password}
+  #          driver-class-name: com.mysql.cj.jdbc.Driver
+
+  # ===================== Redis配置 =====================
+  # redis单机模式
+  redis:
+    database: 1 #缓存库编号
+    host: 127.0.0.1
+    port: 6379
+    password: 123456  # 密码为空时,请将本行注释
+    timeout: 3000 #超时时间(单位:秒)
+    lettuce: #Lettuce为Redis的Java驱动包
+      pool:
+        max-active: 8 # 连接池最大连接数
+        max-wait: -1ms  # 连接池最大阻塞等待时间(使用负值表示没有限制)
+        min-idle: 0 # 连接池中的最小空闲连接
+        max-idle: 8 # 连接池中的最大空闲连接
+
+# redis集群模式
+#  redis:
+#    cluster:
+#      nodes:
+#        - 192.168.0.225:6380
+#        - 192.168.0.225:6381
+#        - 192.168.0.225:6382
+#        - 192.168.0.225:6383
+#        - 192.168.0.225:6384
+#        - 192.168.0.225:6385
+#    password: 123456 # 密码为空时,请将本行注释
+#    timeout: 3000 # 超时时间(单位:秒)
+#    lettuce: #Lettuce为Redis的Java驱动包
+#      pool:
+#        max-active: 8 # 连接池最大连接数
+#        max-wait: -1ms  # 连接池最大阻塞等待时间(使用负值表示没有限制)
+#        min-idle: 0 # 连接池中的最小空闲连接
+#        max-idle: 8 # 连接池中的最大空闲连接
+
+# SpringDoc接口文档 访问地址:http://127.0.0.1:30000/doc.html
+springdoc:
+  default-flat-param-object: true
+  api-docs:
+    enabled: true
+#SpringDoc增强
+#knife4j:
+#  basic: #接口文档访问鉴权
+#    enable: true
+#    username: jnpf
+#    password: 123456
+
+config:
+  # ===================== 是否开启测试环境 =====================
+  TestVersion: false
+  # ===================== ApacheShardingSphere 配置开关 =====================
+  sharding-sphere-enabled: false
+  # ===================== 文件存储配置 =====================
+  file-storage: #文件存储配置,不使用的情况下可以不写
+    default-platform: local-plus-1 #默认使用的存储平台
+    thumbnail-suffix: ".min.jpg" #缩略图后缀,例如【.min.jpg】【.png】
+    local-plus: # 本地存储升级版
+      - platform: local-plus-1 # 存储平台标识
+        enable-storage: true  #启用存储
+        enable-access: true #启用访问(线上请使用 Nginx 配置,效率更高)
+        domain: "" # 访问域名,例如:“http://127.0.0.1:8030/”,注意后面要和 path-patterns 保持一致,“/”结尾,本地存储建议使用相对路径,方便后期更换域名
+        base-path: /data/wwwroot/jnpf-resources/ # 基础路径
+        path-patterns: /** # 访问路径
+        storage-path:  # 存储路径
+    aliyun-oss: # 阿里云 OSS ,不使用的情况下可以不写
+      - platform: aliyun-oss-1 # 存储平台标识
+        enable-storage: false  # 启用存储
+        access-key: ??
+        secret-key: ??
+        end-point: ??
+        bucket-name: ??
+        domain: ?? # 访问域名,注意“/”结尾,例如:https://abc.oss-cn-shanghai.aliyuncs.com/
+        base-path: hy/ # 基础路径
+    qiniu-kodo: # 七牛云 kodo ,不使用的情况下可以不写
+      - platform: qiniu-kodo-1 # 存储平台标识
+        enable-storage: false  # 启用存储
+        access-key: ??
+        secret-key: ??
+        bucket-name: ??
+        domain: ?? # 访问域名,注意“/”结尾,例如:http://abc.hn-bkt.clouddn.com/
+        base-path: base/ # 基础路径
+    tencent-cos: # 腾讯云 COS
+      - platform: tencent-cos-1 # 存储平台标识
+        enable-storage: false  # 启用存储
+        secret-id: ??
+        secret-key: ??
+        region: ?? #存仓库所在地域
+        bucket-name: ??
+        domain: ?? # 访问域名,注意“/”结尾,例如:https://abc.cos.ap-nanjing.myqcloud.com/
+        base-path: hy/ # 基础路径
+    minio: # MinIO,由于 MinIO SDK 支持 AWS S3,其它兼容 AWS S3 协议的存储平台也都可配置在这里
+      - platform: minio-1 # 存储平台标识
+        enable-storage: true  # 启用存储
+        access-key: Q9jJs2b6Tv
+        secret-key: Thj2WkpLu9DhmJyJ
+        end-point: http://192.168.0.207:9000/
+        bucket-name: jnpfsoftoss
+        domain:  # 访问域名,注意“/”结尾,例如:http://minio.abc.com/abc/
+        base-path:  # 基础路径

+ 166 - 0
jnpf-datareport-univer-admin/target/classes/application-prod.yml

@@ -0,0 +1,166 @@
+# 应用服务器
+server:
+  tomcat:
+    uri-encoding: UTF-8 #tomcat编码
+  port: 32000 #tomcat端口
+
+spring:
+  devtools: #spring开发者工具模块
+    restart:
+      enabled: true #热部署开关
+    freemarker:
+      cache: false #spring内置freemarker缓存
+  thymeleaf:
+    cache: false #spring内置thymeleaf缓存
+
+  # ===================== 数据源配置 =====================
+  exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure #排除自动配置,手动配置druid
+  datasource:
+    db-type: MySQL #数据库类型(可选值 MySQL、SQLServer、Oracle、DM、KingbaseES、PostgreSQL,请严格按可选值填写)
+    host: 127.0.0.1
+    port: 3306
+    username: root
+    password: 123456
+    db-name: jnpf_init
+    db-schema: #金仓达梦选填
+    prepare-url: #自定义url
+
+    # ===================== 动态多数据源 =====================
+    dynamic:
+      primary: master #设置默认的数据源或者数据源组,默认值即为master
+      strict: true #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
+      druid:
+        # 空闲时执行连接测试
+        test-while-idle: true
+        # 连接测试最小间隔
+        time-between-eviction-runs-millis: 60000
+        # 获取连接等待3秒 根据网络情况设定
+        max-wait: 3000
+        # 初始化4个连接
+        initial-size: 4
+        # 最大20个连接
+        max-active: 20
+        # 最少保持4个空闲连接
+        min-idle: 4
+        # 空闲连接保活, 超过配置的空闲时间会进行连接检查完成保活操作(数据库自身会断开达到空闲时间的连接, 程序使用断开的连接会报错)
+        keep-alive: true
+        # 解除注释后Druid连接池打印SQL语句 忽略日志等级配置
+        #filters: slf4j
+        slf4j:
+          statementLogEnabled: true
+          resultSetLogEnabled: false
+          connectionLogEnabled: false
+          dataSourceLogEnabled: false
+          statementCreateAfterLogEnabled: false
+          statementCloseAfterLogEnabled: false
+          statementExecuteAfterLogEnabled: false
+          #打印SQL替换参数
+          statementExecutableSqlLogEnable: true
+          statementPrepareAfterLogEnabled: false
+          statementPrepareCallAfterLogEnabled: false
+          statementParameterSetLogEnabled: false
+  #      datasource:
+  #        master:
+  #          url: jdbc:mysql://${spring.datasource.host}:${spring.datasource.port}/${spring.datasource.dbname}?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowMultiQueries=true&serverTimezone=UTC
+  #          username: ${spring.datasource.username}
+  #          password: ${spring.datasource.password}
+  #          driver-class-name: com.mysql.cj.jdbc.Driver
+
+  # ===================== Redis配置 =====================
+  # redis单机模式
+  redis:
+    database: 1 #缓存库编号
+    host: 127.0.0.1
+    port: 6379
+    password: 123456  # 密码为空时,请将本行注释
+    timeout: 3000 #超时时间(单位:秒)
+    lettuce: #Lettuce为Redis的Java驱动包
+      pool:
+        max-active: 8 # 连接池最大连接数
+        max-wait: -1ms  # 连接池最大阻塞等待时间(使用负值表示没有限制)
+        min-idle: 0 # 连接池中的最小空闲连接
+        max-idle: 8 # 连接池中的最大空闲连接
+
+# redis集群模式
+#  redis:
+#    cluster:
+#      nodes:
+#        - 192.168.0.225:6380
+#        - 192.168.0.225:6381
+#        - 192.168.0.225:6382
+#        - 192.168.0.225:6383
+#        - 192.168.0.225:6384
+#        - 192.168.0.225:6385
+#    password: 123456 # 密码为空时,请将本行注释
+#    timeout: 3000 # 超时时间(单位:秒)
+#    lettuce: #Lettuce为Redis的Java驱动包
+#      pool:
+#        max-active: 8 # 连接池最大连接数
+#        max-wait: -1ms  # 连接池最大阻塞等待时间(使用负值表示没有限制)
+#        min-idle: 0 # 连接池中的最小空闲连接
+#        max-idle: 8 # 连接池中的最大空闲连接
+
+# SpringDoc接口文档 访问地址:http://127.0.0.1:30000/doc.html
+springdoc:
+  default-flat-param-object: true
+  api-docs:
+    enabled: true
+#SpringDoc增强
+#knife4j:
+#  basic: #接口文档访问鉴权
+#    enable: true
+#    username: jnpf
+#    password: 123456
+
+config:
+  # ===================== 是否开启测试环境 =====================
+  TestVersion: false
+  # ===================== ApacheShardingSphere 配置开关 =====================
+  sharding-sphere-enabled: false
+  # ===================== 文件存储配置 =====================
+  file-storage: #文件存储配置,不使用的情况下可以不写
+    default-platform: local-plus-1 #默认使用的存储平台
+    thumbnail-suffix: ".min.jpg" #缩略图后缀,例如【.min.jpg】【.png】
+    local-plus: # 本地存储升级版
+      - platform: local-plus-1 # 存储平台标识
+        enable-storage: true  #启用存储
+        enable-access: true #启用访问(线上请使用 Nginx 配置,效率更高)
+        domain: "" # 访问域名,例如:“http://127.0.0.1:8030/”,注意后面要和 path-patterns 保持一致,“/”结尾,本地存储建议使用相对路径,方便后期更换域名
+        base-path: /data/wwwroot/jnpf-resources/ # 基础路径
+        path-patterns: /** # 访问路径
+        storage-path:  # 存储路径
+    aliyun-oss: # 阿里云 OSS ,不使用的情况下可以不写
+      - platform: aliyun-oss-1 # 存储平台标识
+        enable-storage: false  # 启用存储
+        access-key: ??
+        secret-key: ??
+        end-point: ??
+        bucket-name: ??
+        domain: ?? # 访问域名,注意“/”结尾,例如:https://abc.oss-cn-shanghai.aliyuncs.com/
+        base-path: hy/ # 基础路径
+    qiniu-kodo: # 七牛云 kodo ,不使用的情况下可以不写
+      - platform: qiniu-kodo-1 # 存储平台标识
+        enable-storage: false  # 启用存储
+        access-key: ??
+        secret-key: ??
+        bucket-name: ??
+        domain: ?? # 访问域名,注意“/”结尾,例如:http://abc.hn-bkt.clouddn.com/
+        base-path: base/ # 基础路径
+    tencent-cos: # 腾讯云 COS
+      - platform: tencent-cos-1 # 存储平台标识
+        enable-storage: false  # 启用存储
+        secret-id: ??
+        secret-key: ??
+        region: ?? #存仓库所在地域
+        bucket-name: ??
+        domain: ?? # 访问域名,注意“/”结尾,例如:https://abc.cos.ap-nanjing.myqcloud.com/
+        base-path: hy/ # 基础路径
+    minio: # MinIO,由于 MinIO SDK 支持 AWS S3,其它兼容 AWS S3 协议的存储平台也都可配置在这里
+      - platform: minio-1 # 存储平台标识
+        enable-storage: true  # 启用存储
+        access-key: Q9jJs2b6Tv
+        secret-key: Thj2WkpLu9DhmJyJ
+        end-point: http://192.168.0.207:9000/
+        bucket-name: jnpfsoftoss
+        domain:  # 访问域名,注意“/”结尾,例如:http://minio.abc.com/abc/
+        base-path:  # 基础路径

+ 166 - 0
jnpf-datareport-univer-admin/target/classes/application-test.yml

@@ -0,0 +1,166 @@
+# 应用服务器
+server:
+  tomcat:
+    uri-encoding: UTF-8 #tomcat编码
+  port: 32000 #tomcat端口
+
+spring:
+  devtools: #spring开发者工具模块
+    restart:
+      enabled: true #热部署开关
+    freemarker:
+      cache: false #spring内置freemarker缓存
+  thymeleaf:
+    cache: false #spring内置thymeleaf缓存
+
+  # ===================== 数据源配置 =====================
+  exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure #排除自动配置,手动配置druid
+  datasource:
+    db-type: MySQL #数据库类型(可选值 MySQL、SQLServer、Oracle、DM、KingbaseES、PostgreSQL,请严格按可选值填写)
+    host: 127.0.0.1
+    port: 3306
+    username: root
+    password: 123456
+    db-name: jnpf_init
+    db-schema: #金仓达梦选填
+    prepare-url: #自定义url
+
+    # ===================== 动态多数据源 =====================
+    dynamic:
+      primary: master #设置默认的数据源或者数据源组,默认值即为master
+      strict: true #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
+      druid:
+        # 空闲时执行连接测试
+        test-while-idle: true
+        # 连接测试最小间隔
+        time-between-eviction-runs-millis: 60000
+        # 获取连接等待3秒 根据网络情况设定
+        max-wait: 3000
+        # 初始化4个连接
+        initial-size: 4
+        # 最大20个连接
+        max-active: 20
+        # 最少保持4个空闲连接
+        min-idle: 4
+        # 空闲连接保活, 超过配置的空闲时间会进行连接检查完成保活操作(数据库自身会断开达到空闲时间的连接, 程序使用断开的连接会报错)
+        keep-alive: true
+        # 解除注释后Druid连接池打印SQL语句 忽略日志等级配置
+        #filters: slf4j
+        slf4j:
+          statementLogEnabled: true
+          resultSetLogEnabled: false
+          connectionLogEnabled: false
+          dataSourceLogEnabled: false
+          statementCreateAfterLogEnabled: false
+          statementCloseAfterLogEnabled: false
+          statementExecuteAfterLogEnabled: false
+          #打印SQL替换参数
+          statementExecutableSqlLogEnable: true
+          statementPrepareAfterLogEnabled: false
+          statementPrepareCallAfterLogEnabled: false
+          statementParameterSetLogEnabled: false
+  #      datasource:
+  #        master:
+  #          url: jdbc:mysql://${spring.datasource.host}:${spring.datasource.port}/${spring.datasource.dbname}?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowMultiQueries=true&serverTimezone=UTC
+  #          username: ${spring.datasource.username}
+  #          password: ${spring.datasource.password}
+  #          driver-class-name: com.mysql.cj.jdbc.Driver
+
+  # ===================== Redis配置 =====================
+  # redis单机模式
+  redis:
+    database: 1 #缓存库编号
+    host: 127.0.0.1
+    port: 6379
+    password: 123456  # 密码为空时,请将本行注释
+    timeout: 3000 #超时时间(单位:秒)
+    lettuce: #Lettuce为Redis的Java驱动包
+      pool:
+        max-active: 8 # 连接池最大连接数
+        max-wait: -1ms  # 连接池最大阻塞等待时间(使用负值表示没有限制)
+        min-idle: 0 # 连接池中的最小空闲连接
+        max-idle: 8 # 连接池中的最大空闲连接
+
+# redis集群模式
+#  redis:
+#    cluster:
+#      nodes:
+#        - 192.168.0.225:6380
+#        - 192.168.0.225:6381
+#        - 192.168.0.225:6382
+#        - 192.168.0.225:6383
+#        - 192.168.0.225:6384
+#        - 192.168.0.225:6385
+#    password: 123456 # 密码为空时,请将本行注释
+#    timeout: 3000 # 超时时间(单位:秒)
+#    lettuce: #Lettuce为Redis的Java驱动包
+#      pool:
+#        max-active: 8 # 连接池最大连接数
+#        max-wait: -1ms  # 连接池最大阻塞等待时间(使用负值表示没有限制)
+#        min-idle: 0 # 连接池中的最小空闲连接
+#        max-idle: 8 # 连接池中的最大空闲连接
+
+# SpringDoc接口文档 访问地址:http://127.0.0.1:30000/doc.html
+springdoc:
+  default-flat-param-object: true
+  api-docs:
+    enabled: true
+#SpringDoc增强
+#knife4j:
+#  basic: #接口文档访问鉴权
+#    enable: true
+#    username: jnpf
+#    password: 123456
+
+config:
+  # ===================== 是否开启测试环境 =====================
+  TestVersion: false
+  # ===================== ApacheShardingSphere 配置开关 =====================
+  sharding-sphere-enabled: false
+  # ===================== 文件存储配置 =====================
+  file-storage: #文件存储配置,不使用的情况下可以不写
+    default-platform: local-plus-1 #默认使用的存储平台
+    thumbnail-suffix: ".min.jpg" #缩略图后缀,例如【.min.jpg】【.png】
+    local-plus: # 本地存储升级版
+      - platform: local-plus-1 # 存储平台标识
+        enable-storage: true  #启用存储
+        enable-access: true #启用访问(线上请使用 Nginx 配置,效率更高)
+        domain: "" # 访问域名,例如:“http://127.0.0.1:8030/”,注意后面要和 path-patterns 保持一致,“/”结尾,本地存储建议使用相对路径,方便后期更换域名
+        base-path: /data/wwwroot/jnpf-resources/ # 基础路径
+        path-patterns: /** # 访问路径
+        storage-path:  # 存储路径
+    aliyun-oss: # 阿里云 OSS ,不使用的情况下可以不写
+      - platform: aliyun-oss-1 # 存储平台标识
+        enable-storage: false  # 启用存储
+        access-key: ??
+        secret-key: ??
+        end-point: ??
+        bucket-name: ??
+        domain: ?? # 访问域名,注意“/”结尾,例如:https://abc.oss-cn-shanghai.aliyuncs.com/
+        base-path: hy/ # 基础路径
+    qiniu-kodo: # 七牛云 kodo ,不使用的情况下可以不写
+      - platform: qiniu-kodo-1 # 存储平台标识
+        enable-storage: false  # 启用存储
+        access-key: ??
+        secret-key: ??
+        bucket-name: ??
+        domain: ?? # 访问域名,注意“/”结尾,例如:http://abc.hn-bkt.clouddn.com/
+        base-path: base/ # 基础路径
+    tencent-cos: # 腾讯云 COS
+      - platform: tencent-cos-1 # 存储平台标识
+        enable-storage: false  # 启用存储
+        secret-id: ??
+        secret-key: ??
+        region: ?? #存仓库所在地域
+        bucket-name: ??
+        domain: ?? # 访问域名,注意“/”结尾,例如:https://abc.cos.ap-nanjing.myqcloud.com/
+        base-path: hy/ # 基础路径
+    minio: # MinIO,由于 MinIO SDK 支持 AWS S3,其它兼容 AWS S3 协议的存储平台也都可配置在这里
+      - platform: minio-1 # 存储平台标识
+        enable-storage: true  # 启用存储
+        access-key: Q9jJs2b6Tv
+        secret-key: Thj2WkpLu9DhmJyJ
+        end-point: http://192.168.0.207:9000/
+        bucket-name: jnpfsoftoss
+        domain:  # 访问域名,注意“/”结尾,例如:http://minio.abc.com/abc/
+        base-path:  # 基础路径

+ 84 - 0
jnpf-datareport-univer-admin/target/classes/application.yml

@@ -0,0 +1,84 @@
+spring:
+  application:
+    name: jnpf-datareport
+  profiles:
+    # 指定环境配置 dev(开发环境-默认)、test(测试环境)、preview(预生产环境)、prod(生产环境)
+    active: dev
+  servlet:
+    multipart: #文件传输配置
+      max-file-size: 100MB #单个数据大小限制
+      max-request-size: 100MB #请求总数据大小限制
+      enabled: true  #是否启用分段上传支持
+  mvc:
+    hiddenmethod: #隐式方法过滤器
+      filter:
+        enabled: true #默认开启。开启以支持:PUT,DELETE表单提交方法
+  jackson: #序列化和反序列化json框架
+    serialization:
+      write-dates-as-timestamps: true #是否写入日期时间时间戳格式
+    time-zone: GMT+8 #指定日期格式化时区
+  main:
+    allow-bean-definition-overriding: true #允许同名bean后者覆盖,默认:true
+    allow-circular-references: true #允许Bean相互引用,默认:false
+
+config:
+  #===================== 访问域名 =====================
+  WebAnnexFilePath: WebAnnexFile
+  DataBackupFilePath: DataBackupFile
+  TemporaryFilePath: TemporaryFile
+  SystemFilePath: SystemFile
+  TemplateFilePath: TemplateFile
+  EmailFilePath: EmailFile
+  DocumentFilePath: DocumentFile
+  DocumentPreviewPath: DocumentPreview
+  UserAvatarFilePath: UserAvatar
+  IMContentFilePath: IMContentFile
+  MPMaterialFilePath: MPMaterial
+  TemplateCodePath: TemplateCode
+  BiVisualPath: BiVisualPath
+
+  ApiDomain: http://127.0.0.1:30000 #主项目后端域名(文档预览中使用)
+  FrontDomain: http://127.0.0.1:3100 #前端域名(文档预览中使用)
+  AppDomain: http://127.0.0.1:8080 #app/h5端域名配置(文档预览中使用)
+
+  #===================== 多租户 =====================
+  MultiTenancy: false #是否开启
+  MultiTenancyUrl: http://127.0.0.1:30006/api/tenant/DbName/ #多租户项目地址
+
+# 接口放行地址 与GatewayWhite中的默认URL合并
+gateway:
+  # 禁止访问接口
+  block-url:
+  ## 配置示例
+  #- /api/message/Notice
+  #- /api/permission/Users/*
+  # 不验证Token, 放行接口(默认记录日志)
+  white-url:
+  #  # 配置示例
+  #- /api/message/Notice
+  #- /api/permission/Users/*
+  # 放行接口(不记录日志)
+  exclude-url:
+  #  # 配置示例
+  #- /api/message/Notice
+  #- /api/permission/Users/*
+  # 入站IP(禁止配置以外的IP访问block-url配置的接口)
+  white-ip:
+  #- 192.168.0.10
+  #- 192.168.0.20
+
+# 日志配置
+logging:
+  config: classpath:logback-spring.xml
+  level:
+    #自定义第三方包名日志等级
+    # 解除注释后Druid连接池打印SQL语句
+    druid.sql.Statement: debug
+#    druid.sql.DataSource: debug
+#    druid.sql.Connection: debug
+#    druid.sql.ResultSet: debug
+log:
+  level:
+    # 等级 TRACE,DEBUG,INFO,WARN,ERROR(不区分大小写)
+    root: info
+  path: log/${spring.application.name}

BIN
jnpf-datareport-univer-admin/target/classes/jnpf/ReportUniverApplication.class


BIN
jnpf-datareport-univer-admin/target/classes/jnpf/aop/DataSourceBindAspect.class


BIN
jnpf-datareport-univer-admin/target/classes/jnpf/config/AuthFilter.class


BIN
jnpf-datareport-univer-admin/target/classes/jnpf/config/ReportAutoConfiguration.class


BIN
jnpf-datareport-univer-admin/target/classes/jnpf/properties/GatewayWhiteProperties.class


+ 327 - 0
jnpf-datareport-univer-admin/target/classes/logback-spring.xml

@@ -0,0 +1,327 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+
+    <!--日志格式应用spring boot默认的格式,也可以自己更改-->
+    <include resource="org/springframework/boot/logging/logback/defaults.xml"/>
+    <property name="FILE_LOG_PATTERN" value="[%d{yyyy-MM-dd HH:mm:ss.SSS}] [%-5level] [%thread] [%logger{50}] [%M] [%line] - %msg%n" />
+    <springProperty scope="context" name="SERVICE_NAME" source="spring.application.name" defaultValue="jnpf"/>
+
+    <!--定义日志存放的位置,默认存放在项目启动的相对路径的目录-->
+    <springProperty scope="context" name="LOG_PATH" source="log.path" defaultValue="log/${SERVICE_NAME}"/>
+    <!-- 全局日志等级 -->
+    <springProperty scope="context" name="LOG_LEVEL_ROOT" source="log.level.root" defaultValue="INFO"/>
+    <!-- 服务自定义等级 如需自定义服务日志等级 修改下方的【自定义服务名】与nacos上的log.level.自定义服务名=等级 -->
+    <springProperty scope="context" name="LOG_LEVEL" source="log.level.jnpf-boot" defaultValue="${LOG_LEVEL_ROOT}"/>
+
+    <!-- 日志记录器,日期滚动记录,level为 ERROR 日志 -->
+    <appender name="FILE_ERROR" class="ch.qos.logback.core.rolling.RollingFileAppender">
+
+        <!-- 正在记录的日志文件的路径及文件名 -->
+        <file>${LOG_PATH}/log_error.log</file>
+
+        <!-- 日志记录器的滚动策略,按日期,按大小记录 -->
+        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+
+            <!-- 归档的日志文件的路径,%d{yyyy-MM-dd}指定日期格式,%i指定索引 -->
+            <fileNamePattern>${LOG_PATH}/error/%d{yyyy-MM-dd,aux}/log-error-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <!--日志最大的历史7天-->
+            <maxHistory>7</maxHistory>
+
+            <!-- 除按日志记录之外,还配置了日志文件不能超过2M,若超过2M,日志文件会以索引0开始,
+            命名日志文件,例如log-error-2013-12-21.0.log -->
+            <maxFileSize>10MB</maxFileSize>
+        </rollingPolicy>
+
+        <!-- 追加方式记录日志 -->
+        <append>true</append>
+
+        <!-- 日志文件的格式 -->
+        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+            <pattern>${FILE_LOG_PATTERN}</pattern>
+            <charset>utf-8</charset>
+        </encoder>
+
+        <!-- 此日志文件只记录error级别的 -->
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <level>error</level>
+            <onMatch>ACCEPT</onMatch>
+            <onMismatch>DENY</onMismatch>
+        </filter>
+    </appender>
+
+
+    <!-- 日志记录器,日期滚动记录,level为 INFO 日志 -->
+    <appender name="FILE_INFO" class="ch.qos.logback.core.rolling.RollingFileAppender">
+
+        <!-- 正在记录的日志文件的路径及文件名 -->
+        <file>${LOG_PATH}/log_info.log</file>
+
+        <!-- 日志记录器的滚动策略,按日期,按大小记录 -->
+        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+
+            <!-- 归档的日志文件的路径,%d{yyyy-MM-dd}指定日期格式,%i指定索引 -->
+            <fileNamePattern>${LOG_PATH}/info/%d{yyyy-MM-dd,aux}/log-info-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <!--日志最大的历史7天-->
+            <maxHistory>7</maxHistory>
+
+            <!-- 除按日志记录之外,还配置了日志文件不能超过2M,若超过2M,日志文件会以索引0开始,
+            命名日志文件,例如log-error-2013-12-21.0.log -->
+            <maxFileSize>10MB</maxFileSize>
+        </rollingPolicy>
+
+        <!-- 追加方式记录日志 -->
+        <append>true</append>
+
+        <!-- 日志文件的格式 -->
+        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+            <pattern>${FILE_LOG_PATTERN}</pattern>
+            <charset>utf-8</charset>
+        </encoder>
+
+        <!-- 此日志文件只记录info级别的 -->
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <level>info</level>
+            <onMatch>ACCEPT</onMatch>
+            <onMismatch>DENY</onMismatch>
+        </filter>
+    </appender>
+
+
+    <!-- 日志记录器,日期滚动记录,level为 WARN 日志 -->
+    <appender name="FILE_WARN" class="ch.qos.logback.core.rolling.RollingFileAppender">
+
+        <!-- 正在记录的日志文件的路径及文件名 -->
+        <file>${LOG_PATH}/log_warn.log</file>
+
+        <!-- 日志记录器的滚动策略,按日期,按大小记录 -->
+        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+
+            <!-- 归档的日志文件的路径,%d{yyyy-MM-dd}指定日期格式,%i指定索引 -->
+            <fileNamePattern>${LOG_PATH}/warn/%d{yyyy-MM-dd,aux}/log-warn-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <!--日志最大的历史7天-->
+            <maxHistory>7</maxHistory>
+
+            <!-- 除按日志记录之外,还配置了日志文件不能超过2M,若超过2M,日志文件会以索引0开始,
+            命名日志文件,例如log-error-2013-12-21.0.log -->
+            <maxFileSize>10MB</maxFileSize>
+        </rollingPolicy>
+
+        <!-- 追加方式记录日志 -->
+        <append>true</append>
+
+        <!-- 日志文件的格式 -->
+        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+            <pattern>${FILE_LOG_PATTERN}</pattern>
+            <charset>utf-8</charset>
+        </encoder>
+
+        <!-- 此日志文件只记录warn级别的 -->
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <level>warn</level>
+            <onMatch>ACCEPT</onMatch>
+            <onMismatch>DENY</onMismatch>
+        </filter>
+    </appender>
+
+    <!-- 日志记录器,日期滚动记录,level为 DEBUG 日志 -->
+    <appender name="FILE_DEBUG" class="ch.qos.logback.core.rolling.RollingFileAppender">
+
+        <!-- 正在记录的日志文件的路径及文件名 -->
+        <file>${LOG_PATH}/log_debug.log</file>
+
+        <!-- 日志记录器的滚动策略,按日期,按大小记录 -->
+        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+
+            <!-- 归档的日志文件的路径,%d{yyyy-MM-dd}指定日期格式,%i指定索引 -->
+            <fileNamePattern>${LOG_PATH}/debug/%d{yyyy-MM-dd,aux}/log-debug-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <!--日志最大的历史7天-->
+            <maxHistory>7</maxHistory>
+
+            <!-- 除按日志记录之外,还配置了日志文件不能超过2M,若超过2M,日志文件会以索引0开始,
+            命名日志文件,例如log-error-2013-12-21.0.log -->
+            <maxFileSize>10MB</maxFileSize>
+        </rollingPolicy>
+
+        <!-- 追加方式记录日志 -->
+        <append>true</append>
+
+        <!-- 日志文件的格式 -->
+        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+            <pattern>${FILE_LOG_PATTERN}</pattern>
+            <charset>utf-8</charset>
+        </encoder>
+
+        <!-- 此日志文件只记录debug级别的 -->
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <level>debug</level>
+            <onMatch>ACCEPT</onMatch>
+            <onMismatch>DENY</onMismatch>
+        </filter>
+    </appender>
+
+
+    <!-- 日志记录器,日期滚动记录,所有日志 -->
+    <appender name="FILE_ALL" class="ch.qos.logback.core.rolling.RollingFileAppender">
+
+        <!-- 正在记录的日志文件的路径及文件名 -->
+        <file>${LOG_PATH}/log_total.log</file>
+
+        <!-- 日志记录器的滚动策略,按日期,按大小记录 -->
+        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+
+            <!-- 归档的日志文件的路径,%d{yyyy-MM-dd}指定日期格式,%i指定索引 -->
+            <fileNamePattern>${LOG_PATH}/total/%d{yyyy-MM-dd,aux}/log-total-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <!--日志最大的历史7天-->
+            <maxHistory>7</maxHistory>
+
+            <!-- 除按日志记录之外,还配置了日志文件不能超过2M,若超过2M,日志文件会以索引0开始,
+            命名日志文件,例如log-error-2013-12-21.0.log -->
+            <maxFileSize>10MB</maxFileSize>
+        </rollingPolicy>
+
+        <!-- 追加方式记录日志 -->
+        <append>true</append>
+
+        <!-- 日志文件的格式 -->
+        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+            <pattern>${FILE_LOG_PATTERN}</pattern>
+            <charset>utf-8</charset>
+        </encoder>
+    </appender>
+
+
+    <!-- 日志记录器,日期滚动记录,level 根据配置动态输出日志 -->
+    <appender name="FILE_RELEASE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+
+        <!-- 正在记录的日志文件的路径及文件名 -->
+        <file>${LOG_PATH}/log_release.log</file>
+
+        <!-- 日志记录器的滚动策略,按日期,按大小记录 -->
+        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+
+            <!-- 归档的日志文件的路径,%d{yyyy-MM-dd}指定日期格式,%i指定索引 -->
+            <fileNamePattern>${LOG_PATH}/release/%d{yyyy-MM-dd,aux}/log-warn-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <!--日志最大的历史7天-->
+            <maxHistory>7</maxHistory>
+
+            <!-- 除按日志记录之外,还配置了日志文件不能超过2M,若超过2M,日志文件会以索引0开始,
+            命名日志文件,例如log-error-2013-12-21.0.log -->
+            <maxFileSize>10MB</maxFileSize>
+        </rollingPolicy>
+
+        <!-- 追加方式记录日志 -->
+        <append>true</append>
+
+        <!-- 日志文件的格式 -->
+        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+            <pattern>${FILE_LOG_PATTERN}</pattern>
+            <charset>utf-8</charset>
+        </encoder>
+
+        <!-- 此日志文件只记录warn级别的 -->
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <level>${LOG_LEVEL}</level>
+            <onMatch>ACCEPT</onMatch>
+            <onMismatch>DENY</onMismatch>
+        </filter>
+    </appender>
+    <!-- 异步输出 DEBUG -->
+    <appender name="ASYNC_FILE_DEBUG" class="ch.qos.logback.classic.AsyncAppender">
+        <discardingThreshold>0</discardingThreshold>
+        <queueSize>256</queueSize>
+        <appender-ref ref="FILE_DEBUG"/>
+    </appender>
+    <!-- 异步输出 INFO -->
+    <appender name="ASYNC_FILE_INFO" class="ch.qos.logback.classic.AsyncAppender">
+        <discardingThreshold>0</discardingThreshold>
+        <queueSize>256</queueSize>
+        <appender-ref ref="FILE_INFO"/>
+    </appender>
+    <!-- 异步输出 WARN -->
+    <appender name="ASYNC_FILE_WARN" class="ch.qos.logback.classic.AsyncAppender">
+        <discardingThreshold>0</discardingThreshold>
+        <queueSize>256</queueSize>
+        <appender-ref ref="FILE_WARN"/>
+    </appender>
+    <!-- 异步输出 ERROR -->
+    <appender name="ASYNC_FILE_ERROR" class="ch.qos.logback.classic.AsyncAppender">
+        <discardingThreshold>0</discardingThreshold>
+        <queueSize>256</queueSize>
+        <appender-ref ref="FILE_ERROR"/>
+    </appender>
+    <!-- 异步输出 ALL -->
+    <appender name="ASYNC_FILE_ALL" class="ch.qos.logback.classic.AsyncAppender">
+        <discardingThreshold>0</discardingThreshold>
+        <queueSize>256</queueSize>
+        <appender-ref ref="FILE_ALL"/>
+    </appender>
+
+
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>${CONSOLE_LOG_PATTERN}</pattern>
+            <charset>utf-8</charset>
+        </encoder>
+    </appender>
+
+
+    <!-- 异步输出 控制台 -->
+    <appender name="ASYNC_STDOUT" class="ch.qos.logback.classic.AsyncAppender">
+        <discardingThreshold>0</discardingThreshold>
+        <queueSize>256</queueSize>
+        <appender-ref ref="STDOUT"/>
+    </appender>
+
+
+    <!--<appender name="LOGSTASH" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
+        &lt;!&ndash; 必填:目标:LogStash的 IP:Port &ndash;&gt;
+        <destination>192.168.0.50:50000</destination>
+        &lt;!&ndash; 可选:保持程序存活时间 &ndash;&gt;
+        <keepAliveDuration>5 minutes</keepAliveDuration>
+        &lt;!&ndash; 可选:重连延迟时长 &ndash;&gt;
+        <reconnectionDelay>10 second</reconnectionDelay>
+        &lt;!&ndash; 可选:等待策略 &ndash;&gt;
+        <waitStrategyType>sleeping</waitStrategyType>
+        &lt;!&ndash;  ============ encoder必须配置,有多种可选 ============= &ndash;&gt;
+        &lt;!&ndash; 编码器二:LoggingEventCompositeJsonEncoder &ndash;&gt;
+        <encoder charset="UTF-8" class="net.logstash.logback.encoder.LoggingEventCompositeJsonEncoder">
+            <providers>
+                &lt;!&ndash; 时间戳:时区 &ndash;&gt;
+                <timestamp>
+                    <timeZone>UTC</timeZone>
+                </timestamp>
+                &lt;!&ndash; 模式 &ndash;&gt;
+                <pattern>
+                    <pattern>
+                        {
+                        "severity": "%level",
+                        "service": "${SERVICE_NAME:-}",
+                        "trace": "%X{X-B3-TraceId:-}",
+                        "span": "%X{X-B3-SpanId:-}",
+                        "exportable": "%X{X-Span-Export:-}",
+                        "pid": "${PID:-}",
+                        "thread": "%thread",
+                        "class": "%logger{40}",
+                        "msg": "%message"
+                        &lt;!&ndash;"idx_pre": "elk-original-third-access",&ndash;&gt;
+                        &lt;!&ndash;"json": "#asJson{%message}"  这个asJson可以把对应的字符串作为json对象取出来,这样es可以对json里面的字段索引了&ndash;&gt;
+                        }
+                    </pattern>
+                </pattern>
+            </providers>
+        </encoder>
+    </appender>-->
+
+
+    <root level="${LOG_LEVEL}">
+        <appender-ref ref="ASYNC_STDOUT"/>
+        <appender-ref ref="ASYNC_FILE_ERROR"/>
+        <appender-ref ref="ASYNC_FILE_INFO"/>
+        <appender-ref ref="ASYNC_FILE_WARN"/>
+        <appender-ref ref="ASYNC_FILE_DEBUG"/>
+        <appender-ref ref="ASYNC_FILE_ALL"/>
+        <!--<appender-ref ref="LOGSTASH"/>-->
+    </root>
+
+
+</configuration>

BIN
jnpf-datareport-univer-admin/target/jnpf-datareport-univer-admin-5.2.0-RELEASE.jar


BIN
jnpf-datareport-univer-admin/target/jnpf-datareport-univer-admin-5.2.0-RELEASE.jar.original


+ 3 - 0
jnpf-datareport-univer-admin/target/maven-archiver/pom.properties

@@ -0,0 +1,3 @@
+artifactId=jnpf-datareport-univer-admin
+groupId=com.jnpf
+version=5.2.0-RELEASE

+ 6 - 0
jnpf-datareport-univer-admin/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst

@@ -0,0 +1,6 @@
+jnpf\aop\DataSourceBindAspect.class
+jnpf\ReportUniverApplication.class
+jnpf\config\AuthFilter.class
+META-INF\spring-configuration-metadata.json
+jnpf\config\ReportAutoConfiguration.class
+jnpf\properties\GatewayWhiteProperties.class

+ 5 - 0
jnpf-datareport-univer-admin/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst

@@ -0,0 +1,5 @@
+C:\Users\zhaojinyu\Desktop\USKY\jnpf5.2\jnpf-java-datareport-univer\jnpf-datareport-univer-admin\src\main\java\jnpf\aop\DataSourceBindAspect.java
+C:\Users\zhaojinyu\Desktop\USKY\jnpf5.2\jnpf-java-datareport-univer\jnpf-datareport-univer-admin\src\main\java\jnpf\config\AuthFilter.java
+C:\Users\zhaojinyu\Desktop\USKY\jnpf5.2\jnpf-java-datareport-univer\jnpf-datareport-univer-admin\src\main\java\jnpf\config\ReportAutoConfiguration.java
+C:\Users\zhaojinyu\Desktop\USKY\jnpf5.2\jnpf-java-datareport-univer\jnpf-datareport-univer-admin\src\main\java\jnpf\properties\GatewayWhiteProperties.java
+C:\Users\zhaojinyu\Desktop\USKY\jnpf5.2\jnpf-java-datareport-univer\jnpf-datareport-univer-admin\src\main\java\jnpf\ReportUniverApplication.java

+ 21 - 0
jnpf-datareport-univer-biz/pom.xml

@@ -0,0 +1,21 @@
+<?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.jnpf</groupId>
+        <artifactId>jnpf-datareport-univer</artifactId>
+        <version>5.2.0-RELEASE</version>
+    </parent>
+
+    <artifactId>jnpf-datareport-univer-biz</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.jnpf</groupId>
+            <artifactId>jnpf-datareport-univer-entity</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+</project>

+ 18 - 0
jnpf-datareport-univer-biz/src/main/java/jnpf/mapper/DictionaryDataMapper.java

@@ -0,0 +1,18 @@
+
+package jnpf.mapper;
+
+import jnpf.base.mapper.SuperMapper;
+import jnpf.entity.DictionaryDataEntity;
+
+
+/**
+ * 字典数据
+ *
+ * @author JNPF开发平台组
+ * @version V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date 2019年9月27日 上午9:18
+ */
+public interface DictionaryDataMapper extends SuperMapper<DictionaryDataEntity> {
+
+}

+ 14 - 0
jnpf-datareport-univer-biz/src/main/java/jnpf/mapper/ReportMapper.java

@@ -0,0 +1,14 @@
+package jnpf.mapper;
+
+import jnpf.base.mapper.SuperMapper;
+import jnpf.entity.ReportEntity;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+public interface ReportMapper extends SuperMapper<ReportEntity> {
+
+}

+ 14 - 0
jnpf-datareport-univer-biz/src/main/java/jnpf/mapper/ReportVersionMapper.java

@@ -0,0 +1,14 @@
+package jnpf.mapper;
+
+import jnpf.base.mapper.SuperMapper;
+import jnpf.entity.ReportVersionEntity;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+public interface ReportVersionMapper extends SuperMapper<ReportVersionEntity> {
+
+}

+ 14 - 0
jnpf-datareport-univer-biz/src/main/java/jnpf/mapper/UserMapper.java

@@ -0,0 +1,14 @@
+package jnpf.mapper;
+
+import jnpf.base.mapper.SuperMapper;
+import jnpf.entity.UserEntity;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+public interface UserMapper extends SuperMapper<UserEntity> {
+
+}

+ 20 - 0
jnpf-datareport-univer-biz/src/main/java/jnpf/service/DictionaryDataService.java

@@ -0,0 +1,20 @@
+package jnpf.service;
+
+import jnpf.base.service.SuperService;
+import jnpf.entity.DictionaryDataEntity;
+
+import java.util.List;
+
+
+/**
+ * 字典数据
+ *
+ * @author JNPF开发平台组
+ * @version V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date 2019年9月27日 上午9:18
+ */
+public interface DictionaryDataService extends SuperService<DictionaryDataEntity> {
+
+    List<DictionaryDataEntity> getDictionName(List<String> id);
+}

+ 72 - 0
jnpf-datareport-univer-biz/src/main/java/jnpf/service/ReportService.java

@@ -0,0 +1,72 @@
+package jnpf.service;
+
+import jnpf.base.service.SuperService;
+import jnpf.entity.ReportEntity;
+import jnpf.model.report.ReportCrForm;
+import jnpf.model.report.ReportInfoVO;
+import jnpf.model.report.ReportPagination;
+import jnpf.model.report.ReportUpForm;
+
+import java.util.List;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+public interface ReportService extends SuperService<ReportEntity> {
+
+    /**
+     * 列表
+     *
+     * @return 实体类
+     */
+    List<ReportEntity> getList(ReportPagination pagination);
+
+    /**
+     * 创建
+     */
+    void create(ReportCrForm form);
+
+    /**
+     * 更新
+     */
+    void update(String id,ReportEntity entity);
+
+    /**
+     * 获取详情
+     *
+     * @return ReportInfoVO
+     */
+    ReportInfoVO getVersionInfo(String versionId);
+
+    /**
+     * 保存或者发布 通过type:0-保存,1-发布
+     *
+     * @param form
+     */
+    void saveOrRelease(ReportUpForm form);
+
+    /**
+     * 下拉选择
+     *
+     */
+    List<ReportEntity> getTreeList();
+
+    /**
+     * 删除
+     * @param id
+     */
+    void delete(String id);
+
+    /**
+     * 导入模板
+     * @param infoVO
+     * @param type
+     * @return
+     */
+    String importData(ReportInfoVO infoVO,Integer type);
+
+
+}

+ 88 - 0
jnpf-datareport-univer-biz/src/main/java/jnpf/service/ReportVersionService.java

@@ -0,0 +1,88 @@
+package jnpf.service;
+
+import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
+import jnpf.base.Pagination;
+import jnpf.base.service.SuperService;
+import jnpf.entity.ReportVersionEntity;
+import jnpf.model.report.ReportCrForm;
+import jnpf.model.report.ReportPagination;
+import jnpf.model.report.UploaderVO;
+import jnpf.univer.model.UniverPreview;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+public interface ReportVersionService extends SuperService<ReportVersionEntity> {
+
+    /**
+     * 创建版本
+     *
+     * @param form
+     */
+    void create(ReportCrForm form);
+
+    /**
+     * 获取版本列表
+     *
+     * @param templateId
+     * @return
+     */
+    List<ReportVersionEntity> getList(String templateId, SFunction<ReportVersionEntity, ?>... columns);
+
+    /**
+     * 复制版本(点击新增版本)
+     *
+     * @param versionId
+     */
+    String copyVersion(String versionId);
+
+    /**
+     * 根据id删除版本
+     *
+     * @param templateId
+     * @return
+     */
+    void removeByTemplateId(String templateId);
+
+    /**
+     * 预览数据
+     *
+     * @return
+     */
+    UniverPreview preview(String id, ReportPagination pagination, Map<String, Object> params);
+
+    /**
+     * 预览数据
+     *
+     * @return
+     */
+    UniverPreview previewTemplate(String id, ReportPagination pagination, Map<String, Object> params);
+
+    /**
+     * 导入excel
+     *
+     * @param multipartFile
+     */
+    UniverPreview importExcel(MultipartFile multipartFile) throws IOException;
+
+    /**
+     * 导出excel
+     *
+     */
+    UploaderVO downExcel(ReportPagination pagination, Map<String, Object> params);
+
+    /**
+     * 导出excel
+     *
+     * @param pagination
+     */
+    UploaderVO downExcel(ReportPagination pagination);
+}

+ 23 - 0
jnpf-datareport-univer-biz/src/main/java/jnpf/service/UserService.java

@@ -0,0 +1,23 @@
+package jnpf.service;
+
+import jnpf.base.service.SuperService;
+import jnpf.entity.UserEntity;
+
+import java.util.List;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+public interface UserService extends SuperService<UserEntity> {
+
+    /**
+     *
+     * @param idList
+     * @return
+     */
+    List<UserEntity> getUserName(List<String> idList);
+
+}

+ 36 - 0
jnpf-datareport-univer-biz/src/main/java/jnpf/service/impl/DictionaryDataServiceImpl.java

@@ -0,0 +1,36 @@
+package jnpf.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import jnpf.base.service.SuperServiceImpl;
+import jnpf.entity.DictionaryDataEntity;
+import jnpf.mapper.DictionaryDataMapper;
+import jnpf.service.DictionaryDataService;
+import org.springframework.stereotype.Service;
+
+import java.util.*;
+
+/**
+ * 字典数据
+ *
+ * @author JNPF开发平台组
+ * @version V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date 2019年9月27日 上午9:18
+ */
+@Service
+public class DictionaryDataServiceImpl extends SuperServiceImpl<DictionaryDataMapper, DictionaryDataEntity> implements DictionaryDataService {
+
+    @Override
+    public List<DictionaryDataEntity> getDictionName(List<String> id) {
+        List<DictionaryDataEntity> dictionList = new ArrayList<>();
+        if (id.size() > 0) {
+            QueryWrapper<DictionaryDataEntity> queryWrapper = new QueryWrapper<>();
+            queryWrapper.lambda().and(
+                    t -> t.in(DictionaryDataEntity::getId, id)
+            );
+            dictionList = this.list(queryWrapper);
+        }
+        return dictionList;
+    }
+
+}

+ 268 - 0
jnpf-datareport-univer-biz/src/main/java/jnpf/service/impl/ReportServiceImpl.java

@@ -0,0 +1,268 @@
+package jnpf.service.impl;
+
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.http.Method;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import jnpf.base.ActionResult;
+import jnpf.base.UserInfo;
+import jnpf.base.service.SuperServiceImpl;
+import jnpf.constant.MsgCode;
+import jnpf.consts.ApiConst;
+import jnpf.emnus.DataSetTypeEnum;
+import jnpf.entity.ReportEntity;
+import jnpf.entity.ReportVersionEntity;
+import jnpf.exception.DataException;
+import jnpf.mapper.ReportMapper;
+import jnpf.model.data.DataForm;
+import jnpf.model.data.DataSetInfo;
+import jnpf.model.data.DataSetPagination;
+import jnpf.model.report.ReportCrForm;
+import jnpf.model.report.ReportInfoVO;
+import jnpf.model.report.ReportPagination;
+import jnpf.model.report.ReportUpForm;
+import jnpf.service.ReportService;
+import jnpf.service.ReportVersionService;
+import jnpf.util.*;
+import org.apache.commons.collections4.CollectionUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.*;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Service
+public class ReportServiceImpl extends SuperServiceImpl<ReportMapper, ReportEntity> implements ReportService {
+
+
+    @Autowired
+    private ReportVersionService versionService;
+
+    @Override
+    public List<ReportEntity> getList(ReportPagination pagination) {
+        QueryWrapper<ReportEntity> queryWrapper = new QueryWrapper<>();
+        String keyword = pagination.getKeyword();
+        if (ObjectUtil.isNotEmpty(keyword)) {
+            queryWrapper.lambda().and(t -> t.like(ReportEntity::getEnCode, keyword).or().like(ReportEntity::getFullName, keyword));
+        }
+        if (ObjectUtil.isNotEmpty(pagination.getCategory())) {
+            queryWrapper.lambda().eq(ReportEntity::getCategory, pagination.getCategory());
+        }
+        if (ObjectUtil.isNotEmpty(pagination.getState())) {
+            queryWrapper.lambda().eq(ReportEntity::getEnabledMark, pagination.getState());
+        }
+        queryWrapper.lambda().orderByAsc(ReportEntity::getSortCode).orderByDesc(ReportEntity::getCreatorTime);
+        Page<ReportEntity> page = new Page<>(pagination.getCurrentPage(), pagination.getPageSize());
+        IPage<ReportEntity> userPage = this.page(page, queryWrapper);
+        return pagination.setData(userPage.getRecords(), page.getTotal());
+    }
+
+    @Override
+    public void create(ReportCrForm form) {
+        ReportEntity entity = JsonUtil.getJsonToBean(form, ReportEntity.class);
+        UserInfo userInfo = UserProvider.getUser();
+        this.creUpdateCheck(entity, true, true);
+        String id = StringUtil.isNotEmpty(entity.getId()) ? entity.getId() : RandomUtil.uuId();
+        entity.setId(id);
+        entity.setEnabledMark(0);
+        entity.setCreatorUserId(userInfo.getUserId());
+        entity.setCreatorTime(new Date());
+        entity.setLastModifyUserId(null);
+        entity.setLastModifyTime(null);
+        this.setIgnoreLogicDelete().removeById(entity.getId());
+        this.setIgnoreLogicDelete().saveOrUpdate(entity);
+        this.clearIgnoreLogicDelete();
+        form.setId(id);
+        List<ReportVersionEntity> list = versionService.getList(id, ReportVersionEntity::getId);
+        if (CollectionUtils.isEmpty(list)) {
+            versionService.create(form);
+        }
+    }
+
+    @Override
+    public void update(String id, ReportEntity entity) {
+        ReportEntity report = getById(id);
+        this.creUpdateCheck(entity, !report.getFullName().equals(entity.getFullName()), !report.getEnCode().equals(entity.getEnCode()));
+        entity.setId(id);
+        updateById(entity);
+    }
+
+    @Override
+    public ReportInfoVO getVersionInfo(String versionId) {
+        ReportVersionEntity versionEntity = versionService.getById(versionId);
+        ReportEntity entity = this.getById(versionEntity.getTemplateId());
+        ReportInfoVO vo = JsonUtil.getJsonToBean(versionEntity, ReportInfoVO.class);
+        vo.setVersionId(versionId);
+        vo.setId(entity.getId());
+        vo.setFullName(entity.getFullName());
+        vo.setAllowExport(entity.getAllowExport());
+        vo.setAllowPrint(entity.getAllowPrint());
+        vo.setCategory(entity.getCategory());
+        vo.setEnCode(entity.getEnCode());
+        vo.setSortCode(entity.getSortCode());
+        DataSetPagination pagination = new DataSetPagination();
+        pagination.setObjectId(versionId);
+        pagination.setObjectType(DataSetTypeEnum.REPORT_VER.getCode());
+        String json = ReportUtil.http(ApiConst.DATASET_LIST, Method.GET, JsonUtil.entityToMap(pagination));
+        ActionResult result = JsonUtil.getJsonToBean(json, ActionResult.class);
+        List<DataSetInfo> dataSetList = new ArrayList<>();
+        if (ObjectUtil.isNotEmpty(result.getData())) {
+            dataSetList = JsonUtil.getJsonToList(result.getData(), DataSetInfo.class);
+        }
+        vo.setDataSetList(dataSetList);
+        return vo;
+    }
+
+    @Override
+    public void saveOrRelease(ReportUpForm form) {
+        ReportVersionEntity versionEntity = versionService.getById(form.getVersionId());
+        ReportVersionEntity versionNew = JsonUtil.getJsonToBean(form, ReportVersionEntity.class);
+        versionNew.setId(versionEntity.getId());
+        versionNew.setState(versionEntity.getState());
+        ReportEntity entity = this.getById(form.getId());
+        //发布流程
+        if (Objects.equals(form.getType(), 1)) {
+            //改流程版本
+            if (StringUtil.isNotEmpty(form.getVersionId())) {
+                boolean isRelease = Objects.equals(versionNew.getState(), 2);
+                ReportVersionEntity info = versionService.getList(form.getId(), ReportVersionEntity::getId, ReportVersionEntity::getState).stream().filter(t -> Objects.equals(t.getState(), 1)).findFirst().orElse(null);
+                if (info != null) {
+                    // 变更归档状态,排序码
+                    info.setSortCode(0L);
+                    info.setState(2);
+                    versionService.updateById(info);
+                }
+                versionNew.setState(1);
+                versionNew.setSortCode(1L);
+                entity.setEnabledMark(1);
+                if (isRelease) {
+                    versionService.updateById(versionNew);
+                    return;
+                }
+            }
+        }
+        versionService.updateById(versionNew);
+        //数据集创建
+        String versionId = versionNew.getId();
+        List<DataSetInfo> dataSetList = form.getDataSetList() != null ? form.getDataSetList() : new ArrayList<>();
+        DataForm dataForm = new DataForm();
+        dataForm.setObjectId(versionId);
+        dataForm.setObjectType(DataSetTypeEnum.REPORT_VER.getCode());
+        dataForm.setList(dataSetList);
+        ReportUtil.http(ApiConst.DATASET_SAVE, Method.POST, JsonUtil.entityToMap(dataForm));
+        entity.setAllowExport(form.getAllowExport());
+        entity.setAllowPrint(form.getAllowPrint());
+        entity.setLastModifyTime(new Date());
+        entity.setLastModifyUserId(UserProvider.getLoginUserId());
+        this.updateById(entity);
+    }
+
+    @Override
+    public List<ReportEntity> getTreeList() {
+        QueryWrapper<ReportEntity> query = new QueryWrapper<>();
+        query.lambda().eq(ReportEntity::getEnabledMark, 1);
+        query.lambda().orderByAsc(ReportEntity::getSortCode).orderByDesc(ReportEntity::getCreatorTime);
+        List<ReportEntity> list = this.list(query);
+        return list;
+    }
+
+    @Override
+    public void delete(String id) {
+        removeById(id);
+        versionService.removeByTemplateId(id);
+    }
+
+    @Override
+    public String importData(ReportInfoVO infoVO, Integer type) {
+        ReportEntity entity = JsonUtil.getJsonToBean(infoVO, ReportEntity.class);
+        StringJoiner stringJoiner = new StringJoiner("、");
+        //id为空切名称不存在时
+        QueryWrapper<ReportEntity> queryWrapper = new QueryWrapper<>();
+        queryWrapper.lambda().eq(ReportEntity::getId, entity.getId());
+        if (this.getById(infoVO.getId()) != null) {
+            if (Objects.equals(type, 0)) {
+                stringJoiner.add("ID");
+            } else {
+                entity.setId(RandomUtil.uuId());
+            }
+        }
+        queryWrapper = new QueryWrapper<>();
+        queryWrapper.lambda().eq(ReportEntity::getEnCode, entity.getEnCode());
+        if (this.count(queryWrapper) > 0) {
+            stringJoiner.add(MsgCode.IMP009.get());
+        }
+        queryWrapper = new QueryWrapper<>();
+        queryWrapper.lambda().eq(ReportEntity::getFullName, entity.getFullName());
+        if (this.count(queryWrapper) > 0) {
+            stringJoiner.add(MsgCode.IMP008.get());
+        }
+        if (stringJoiner.length() > 0 && ObjectUtil.equal(type, 1)) {
+            String copyNum = UUID.randomUUID().toString().substring(0, 5);
+            entity.setFullName(entity.getFullName() + ".副本" + copyNum);
+            entity.setEnCode(entity.getEnCode() + copyNum);
+        } else if (ObjectUtil.equal(type, 0) && stringJoiner.length() > 0) {
+            return stringJoiner + MsgCode.IMP007.get();
+        }
+        entity.setEnabledMark(0);
+        entity.setCreatorTime(new Date());
+        entity.setCreatorUserId(UserProvider.getLoginUserId());
+        entity.setLastModifyTime(null);
+        entity.setLastModifyUserId(null);
+        this.setIgnoreLogicDelete().removeById(entity);
+        this.setIgnoreLogicDelete().saveOrUpdate(entity);
+        this.clearIgnoreLogicDelete();
+        //版本添加
+        ReportVersionEntity versionEntity = JsonUtil.getJsonToBean(infoVO, ReportVersionEntity.class);
+        String versionId = RandomUtil.uuId();
+        versionEntity.setId(versionId);
+        versionEntity.setTemplateId(entity.getId());
+        versionEntity.setCreatorUserId(UserProvider.getLoginUserId());
+        versionEntity.setCreatorTime(new Date());
+        versionEntity.setVersion(1);
+        versionEntity.setState(0);
+        versionEntity.setSortCode(0l);
+        versionService.save(versionEntity);
+        //数据集创建
+        List<DataSetInfo> dataSetList = infoVO.getDataSetList() != null ? infoVO.getDataSetList() : new ArrayList<>();
+        if (dataSetList.size() > 0) {
+            DataForm dataForm = new DataForm();
+            dataForm.setObjectId(versionId);
+            dataForm.setObjectType(DataSetTypeEnum.REPORT_VER.getCode());
+            dataForm.setList(dataSetList);
+            ReportUtil.http(ApiConst.DATASET_SAVE, Method.POST, JsonUtil.entityToMap(dataForm));
+        }
+        return "";
+    }
+
+    public void creUpdateCheck(ReportEntity entity, Boolean fullNameCheck, Boolean encodeCheck) {
+        String fullName = entity.getFullName();
+        String encode = entity.getEnCode();
+        // 名称长度验证
+        if (fullName.length() > 80) {
+            throw new DataException(MsgCode.EXIST005.get());
+        }
+        QueryWrapper<ReportEntity> query = new QueryWrapper<>();
+        //重名验证
+        if (fullNameCheck) {
+            query.lambda().eq(ReportEntity::getFullName, fullName);
+            if (this.list(query).size() > 0) {
+                throw new DataException(MsgCode.EXIST003.get());
+            }
+        }
+        //编码验证
+        if (encodeCheck) {
+            query.clear();
+            query.lambda().eq(ReportEntity::getEnCode, encode);
+            if (this.list(query).size() > 0) {
+                throw new DataException(MsgCode.EXIST002.get());
+            }
+        }
+    }
+
+}

+ 273 - 0
jnpf-datareport-univer-biz/src/main/java/jnpf/service/impl/ReportVersionServiceImpl.java

@@ -0,0 +1,273 @@
+package jnpf.service.impl;
+
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.http.Method;
+import cn.hutool.json.JSONUtil;
+import cn.xuyanwu.spring.file.storage.FileInfo;
+import com.baomidou.dynamic.datasource.annotation.DSTransactional;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
+import com.google.common.collect.ImmutableList;
+import jnpf.base.ActionResult;
+import jnpf.base.service.SuperServiceImpl;
+import jnpf.constant.MsgCode;
+import jnpf.consts.ApiConst;
+import jnpf.emnus.DataSetTypeEnum;
+import jnpf.entity.ReportEntity;
+import jnpf.entity.ReportVersionEntity;
+import jnpf.exception.DataException;
+import jnpf.mapper.ReportVersionMapper;
+import jnpf.model.DataQuery;
+import jnpf.model.data.*;
+import jnpf.model.report.ReportCrForm;
+import jnpf.model.report.ReportPagination;
+import jnpf.model.report.UploaderVO;
+import jnpf.service.ReportService;
+import jnpf.service.ReportVersionService;
+import jnpf.univer.chart.UniverChartModel;
+import jnpf.univer.data.custom.UniverCustom;
+import jnpf.univer.model.UniverPreview;
+import jnpf.univer.model.UniverWorkBook;
+import jnpf.util.*;
+import lombok.Cleanup;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.*;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Service
+public class ReportVersionServiceImpl extends SuperServiceImpl<ReportVersionMapper, ReportVersionEntity> implements ReportVersionService {
+
+    @Autowired
+    private ReportService reportService;
+
+    @Override
+    @DSTransactional
+    public void create(ReportCrForm form) {
+        String versionId = RandomUtil.uuId();
+        ReportVersionEntity entity = JsonUtil.getJsonToBean(form, ReportVersionEntity.class);
+        entity.setId(versionId);
+        entity.setTemplateId(form.getId());
+        entity.setCreatorUserId(UserProvider.getLoginUserId());
+        entity.setCreatorTime(new Date());
+        List<ReportVersionEntity> verList = getList(entity.getId(), ReportVersionEntity::getVersion);
+        int version = verList.stream().map(ReportVersionEntity::getVersion).max(Comparator.naturalOrder()).orElse(0) + 1;
+        entity.setVersion(version);
+        entity.setState(0);
+        entity.setSortCode(0l);
+        this.setIgnoreLogicDelete().removeById(entity.getId());
+        this.setIgnoreLogicDelete().saveOrUpdate(entity);
+        this.clearIgnoreLogicDelete();
+        List<DataSetInfo> dataSetList = form.getDataSetList() != null ? form.getDataSetList() : new ArrayList<>();
+        if (dataSetList.size() > 0) {
+            //数据集创建
+            DataForm dataForm = new DataForm();
+            dataForm.setObjectId(versionId);
+            dataForm.setObjectType(DataSetTypeEnum.REPORT_VER.getCode());
+            dataForm.setList(dataSetList);
+            ReportUtil.http(ApiConst.DATASET_SAVE, Method.POST, JsonUtil.entityToMap(dataForm));
+        }
+    }
+
+    @Override
+    public List<ReportVersionEntity> getList(String templateId, SFunction<ReportVersionEntity, ?>... columns) {
+        QueryWrapper<ReportVersionEntity> queryWrapper = new QueryWrapper<>();
+        if (columns != null && columns.length > 0) {
+            queryWrapper.lambda().select(columns);
+        }
+        queryWrapper.lambda().eq(ReportVersionEntity::getTemplateId, templateId);
+        queryWrapper.lambda().orderByDesc(ReportVersionEntity::getSortCode).orderByAsc(ReportVersionEntity::getState);
+        return this.list(queryWrapper);
+    }
+
+    @Override
+    public String copyVersion(String versionId) {
+        ReportVersionEntity entity = this.getById(versionId);
+        ReportVersionEntity versionEntity = JsonUtil.getJsonToBean(entity, ReportVersionEntity.class);
+        String newVersionId = RandomUtil.uuId();
+        versionEntity.setId(newVersionId);
+        List<ReportVersionEntity> verList = getList(entity.getTemplateId(), ReportVersionEntity::getVersion);
+        int version = verList.stream().map(ReportVersionEntity::getVersion).max(Comparator.naturalOrder()).orElse(0) + 1;
+        versionEntity.setVersion(version);
+        versionEntity.setState(0);
+        versionEntity.setSortCode(0l);
+        versionEntity.setCreatorTime(new Date());
+        versionEntity.setCreatorUserId(UserProvider.getLoginUserId());
+        versionEntity.setLastModifyTime(null);
+        versionEntity.setLastModifyUserId(null);
+        DataSetPagination pagination = new DataSetPagination();
+        pagination.setObjectId(versionId);
+        pagination.setObjectType(DataSetTypeEnum.REPORT_VER.getCode());
+        String json = ReportUtil.http(ApiConst.DATASET_LIST, Method.GET, JsonUtil.entityToMap(pagination));
+        ActionResult result = JsonUtil.getJsonToBean(json, ActionResult.class);
+        List<DataSetInfo> dataSetList = new ArrayList<>();
+        if (ObjectUtil.isNotEmpty(result.getData())) {
+            dataSetList.addAll(JsonUtil.getJsonToList(result.getData(), DataSetInfo.class));
+        }
+        if (dataSetList.size() > 0) {
+            for (DataSetInfo item : dataSetList) {
+                item.setId(null);
+                item.setObjectType(DataSetTypeEnum.REPORT_VER.getCode());
+                item.setObjectId(newVersionId);
+            }
+            DataForm dataForm = new DataForm();
+            dataForm.setObjectId(newVersionId);
+            dataForm.setObjectType(DataSetTypeEnum.REPORT_VER.getCode());
+            dataForm.setList(dataSetList);
+            ReportUtil.http(ApiConst.DATASET_SAVE, Method.POST, JsonUtil.entityToMap(dataForm));
+        }
+        this.save(versionEntity);
+        return newVersionId;
+    }
+
+    @Override
+    public void removeByTemplateId(String templateId) {
+        QueryWrapper<ReportVersionEntity> queryWrapper = new QueryWrapper<>();
+        queryWrapper.lambda().eq(ReportVersionEntity::getTemplateId, templateId);
+        this.remove(queryWrapper);
+    }
+
+    @Override
+    public UniverPreview preview(String id, ReportPagination pagination, Map<String, Object> params) {
+        ReportVersionEntity entity = getById(id);
+        if (ObjectUtil.isEmpty(entity)) {
+            throw new DataException(MsgCode.FA015.get());
+        }
+        if (ObjectUtil.isEmpty(entity.getSnapshot())) {
+            throw new DataException(MsgCode.FA105.get());
+        }
+        //获取当前
+        UniverWorkBook univerWorkBook = JsonUtil.getJsonToBean(entity.getSnapshot(), UniverWorkBook.class);
+        List<String> sheetOrder = univerWorkBook.getSheetOrder();
+        ReportEntity report = reportService.getById(entity.getTemplateId());
+        DataSetQuery query = new DataSetQuery();
+        query.setModuleId(entity.getTemplateId());
+        query.setId(id);
+        query.setType(DataSetTypeEnum.REPORT_VER.getCode());
+        query.setMap(params);
+        query.setConvertConfig(entity.getConvertConfig());
+        String json = ReportUtil.http(ApiConst.DATASET_DATA, Method.POST, JsonUtil.entityToMap(query));
+        Map<String, Map<String, List<Map<String, Object>>>> sheetData = new HashMap<>();
+        //全部数据
+        if (StringUtil.isNotEmpty(json)) {
+            Map<String, List<Map<String, Object>>> dataList = new HashMap<>();
+            try {
+                ActionResult result = JsonUtil.getJsonToBean(json, ActionResult.class);
+                if (ObjectUtil.isNotEmpty(result) && result.getData() instanceof Map) {
+                    Map<String, List<Map<String, Object>>> data = JsonUtil.getJsonToBean(result.getData(),Map.class);
+                    dataList.putAll(data);
+                }
+            }catch (Exception e){}
+            for (String sheetId : sheetOrder) {
+                sheetData.put(sheetId, dataList);
+            }
+        }
+        //当前数据
+        String sheetId = StringUtil.isNotEmpty(pagination.getSheetId()) ? pagination.getSheetId() : !sheetOrder.isEmpty() ? sheetOrder.get(0) : null;
+        if (StringUtil.isNotEmpty(sheetId)) {
+            List<DataQuery> dataQueryList = StringUtil.isNotEmpty(entity.getQueryList()) ? JsonUtil.getJsonToList(entity.getQueryList(), DataQuery.class) : new ArrayList<>();
+            List<Object> queryList = new ArrayList<>();
+            for (DataQuery dataQuery : dataQueryList) {
+                if (Objects.equals(sheetId, dataQuery.getSheet())) {
+                    queryList.addAll(dataQuery.getQueryList());
+                }
+            }
+            if (queryList.size() > 0) {
+                query.setQueryList(JSONUtil.toJsonStr(queryList));
+                String sheetJson = ReportUtil.http(ApiConst.DATASET_DATA, Method.POST, JsonUtil.entityToMap(query));
+                if (StringUtil.isNotEmpty(sheetJson)) {
+                    Map<String, List<Map<String, Object>>> dataList = new HashMap<>();
+                    try {
+                        ActionResult result = JsonUtil.getJsonToBean(sheetJson, ActionResult.class);
+                        if (ObjectUtil.isNotEmpty(result) && result.getData() instanceof Map) {
+                            Map<String, List<Map<String, Object>>> data = JsonUtil.getJsonToBean(result.getData(),Map.class);
+                            dataList.putAll(data);
+                        }
+                    }catch (Exception e){}
+                    sheetData.put(sheetId, dataList);
+                }
+            }
+        }
+
+        UniverConvert convert = new UniverConvert();
+        UniverPreview vo = convert.transform(entity.getSnapshot(), entity.getCells(), entity.getSortList(), sheetData);
+        vo.setVersionId(id);
+        vo.setQueryList(entity.getQueryList());
+        vo.setFullName(report.getFullName());
+        vo.setAllowExport(report.getAllowExport());
+        vo.setAllowPrint(report.getAllowPrint());
+        return vo;
+    }
+
+    @Override
+    public UniverPreview previewTemplate(String id, ReportPagination pagination, Map<String, Object> params) {
+        ReportVersionEntity entity = getList(id, ReportVersionEntity::getId, ReportVersionEntity::getState).stream().filter(t -> Objects.equals(t.getState(), 1)).findFirst().orElse(null);
+        if (ObjectUtil.isEmpty(entity)) {
+            throw new DataException(MsgCode.FA015.get());
+        }
+        return preview(entity.getId(), pagination, params);
+    }
+
+    @Override
+    public UniverPreview importExcel(MultipartFile multipartFile) throws IOException {
+        UniverCustom cellData = new UniverCustom();
+        UniverWorkBook univerWorkBook = UniverExcel.formFile(multipartFile);
+        UniverPreview vo = new UniverPreview();
+        vo.setSnapshot(JSONUtil.toJsonStr(univerWorkBook));
+        vo.setCells(JSONUtil.toJsonStr(cellData));
+        return vo;
+    }
+
+    @Override
+    public UploaderVO downExcel(ReportPagination pagination, Map<String, Object> params) {
+        String id = pagination.getId();
+        UploaderVO vo = new UploaderVO();
+        ReportVersionEntity versionEntity = getById(id);
+        if (ObjectUtil.isEmpty(versionEntity)) {
+            return vo;
+        }
+        ReportEntity entity = reportService.getById(versionEntity.getTemplateId());
+        UniverPreview preview = preview(id, pagination, params);
+        pagination.setSnapshot(preview.getSnapshot());
+        pagination.setFullName(entity.getFullName());
+        vo = downExcel(pagination);
+        return vo;
+    }
+
+    @Override
+    public UploaderVO downExcel(ReportPagination pagination) {
+        UploaderVO vo = new UploaderVO();
+        if (StringUtil.isNotEmpty(pagination.getSnapshot())) {
+            try {
+                List<UniverChartModel> chartList = new ArrayList<>();
+                @Cleanup XSSFWorkbook workbook = new XSSFWorkbook();
+                List<String> sheetList = ImmutableList.of(pagination.getSheetId());
+                UniverExcel.downExcel(pagination.getSnapshot(), chartList, workbook, sheetList);
+                String fileName = pagination.getFullName() + ".xlsx";
+                @Cleanup ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+                workbook.write(outputStream);
+                String type = "Temporary";
+                String url = "/api/Report/data/Download?name=" + fileName + "&encryption=";
+                String temporaryFilePath = FilePathUtil.getFilePath(type);
+                FileInfo fileInfo = FileUploadUtils.uploadFile(outputStream.toByteArray(), temporaryFilePath, fileName);
+                vo.setName(fileInfo.getFilename());
+                vo.setUrl(UploaderUtil.uploaderFile(url, fileInfo.getFilename() + "#" + type));
+            } catch (Exception e) {
+                log.error("报表导出excel异常:" + e.getMessage());
+                throw new DataException(MsgCode.FA107.get());
+            }
+        }
+        return vo;
+    }
+
+}

+ 33 - 0
jnpf-datareport-univer-biz/src/main/java/jnpf/service/impl/UserServiceImpl.java

@@ -0,0 +1,33 @@
+package jnpf.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import jnpf.base.service.SuperServiceImpl;
+import jnpf.entity.UserEntity;
+import jnpf.mapper.UserMapper;
+import jnpf.service.UserService;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Service
+public class UserServiceImpl extends SuperServiceImpl<UserMapper, UserEntity> implements UserService {
+
+    @Override
+    public List<UserEntity> getUserName(List<String> idList) {
+        List<UserEntity> list = new ArrayList<>();
+        if(idList.size()>0){
+            QueryWrapper<UserEntity> queryWrapper = new QueryWrapper<>();
+            queryWrapper.lambda().in(UserEntity::getId, idList);
+            list = this.list(queryWrapper);
+        }
+        return list;
+    }
+}

BIN
jnpf-datareport-univer-biz/target/classes/jnpf/mapper/DictionaryDataMapper.class


BIN
jnpf-datareport-univer-biz/target/classes/jnpf/mapper/ReportMapper.class


BIN
jnpf-datareport-univer-biz/target/classes/jnpf/mapper/ReportVersionMapper.class


BIN
jnpf-datareport-univer-biz/target/classes/jnpf/mapper/UserMapper.class


BIN
jnpf-datareport-univer-biz/target/classes/jnpf/service/DictionaryDataService.class


BIN
jnpf-datareport-univer-biz/target/classes/jnpf/service/ReportService.class


BIN
jnpf-datareport-univer-biz/target/classes/jnpf/service/ReportVersionService.class


BIN
jnpf-datareport-univer-biz/target/classes/jnpf/service/UserService.class


BIN
jnpf-datareport-univer-biz/target/classes/jnpf/service/impl/DictionaryDataServiceImpl.class


BIN
jnpf-datareport-univer-biz/target/classes/jnpf/service/impl/ReportServiceImpl.class


BIN
jnpf-datareport-univer-biz/target/classes/jnpf/service/impl/ReportVersionServiceImpl.class


BIN
jnpf-datareport-univer-biz/target/classes/jnpf/service/impl/UserServiceImpl.class


BIN
jnpf-datareport-univer-biz/target/jnpf-datareport-univer-biz-5.2.0-RELEASE.jar


+ 3 - 0
jnpf-datareport-univer-biz/target/maven-archiver/pom.properties

@@ -0,0 +1,3 @@
+artifactId=jnpf-datareport-univer-biz
+groupId=com.jnpf
+version=5.2.0-RELEASE

+ 12 - 0
jnpf-datareport-univer-biz/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst

@@ -0,0 +1,12 @@
+jnpf\service\impl\DictionaryDataServiceImpl.class
+jnpf\service\impl\ReportVersionServiceImpl.class
+jnpf\mapper\ReportVersionMapper.class
+jnpf\service\DictionaryDataService.class
+jnpf\service\impl\UserServiceImpl.class
+jnpf\mapper\ReportMapper.class
+jnpf\service\impl\ReportServiceImpl.class
+jnpf\mapper\UserMapper.class
+jnpf\service\ReportVersionService.class
+jnpf\mapper\DictionaryDataMapper.class
+jnpf\service\ReportService.class
+jnpf\service\UserService.class

+ 12 - 0
jnpf-datareport-univer-biz/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst

@@ -0,0 +1,12 @@
+C:\Users\zhaojinyu\Desktop\USKY\jnpf5.2\jnpf-java-datareport-univer\jnpf-datareport-univer-biz\src\main\java\jnpf\mapper\DictionaryDataMapper.java
+C:\Users\zhaojinyu\Desktop\USKY\jnpf5.2\jnpf-java-datareport-univer\jnpf-datareport-univer-biz\src\main\java\jnpf\mapper\ReportMapper.java
+C:\Users\zhaojinyu\Desktop\USKY\jnpf5.2\jnpf-java-datareport-univer\jnpf-datareport-univer-biz\src\main\java\jnpf\mapper\ReportVersionMapper.java
+C:\Users\zhaojinyu\Desktop\USKY\jnpf5.2\jnpf-java-datareport-univer\jnpf-datareport-univer-biz\src\main\java\jnpf\mapper\UserMapper.java
+C:\Users\zhaojinyu\Desktop\USKY\jnpf5.2\jnpf-java-datareport-univer\jnpf-datareport-univer-biz\src\main\java\jnpf\service\DictionaryDataService.java
+C:\Users\zhaojinyu\Desktop\USKY\jnpf5.2\jnpf-java-datareport-univer\jnpf-datareport-univer-biz\src\main\java\jnpf\service\impl\DictionaryDataServiceImpl.java
+C:\Users\zhaojinyu\Desktop\USKY\jnpf5.2\jnpf-java-datareport-univer\jnpf-datareport-univer-biz\src\main\java\jnpf\service\impl\ReportServiceImpl.java
+C:\Users\zhaojinyu\Desktop\USKY\jnpf5.2\jnpf-java-datareport-univer\jnpf-datareport-univer-biz\src\main\java\jnpf\service\impl\ReportVersionServiceImpl.java
+C:\Users\zhaojinyu\Desktop\USKY\jnpf5.2\jnpf-java-datareport-univer\jnpf-datareport-univer-biz\src\main\java\jnpf\service\impl\UserServiceImpl.java
+C:\Users\zhaojinyu\Desktop\USKY\jnpf5.2\jnpf-java-datareport-univer\jnpf-datareport-univer-biz\src\main\java\jnpf\service\ReportService.java
+C:\Users\zhaojinyu\Desktop\USKY\jnpf5.2\jnpf-java-datareport-univer\jnpf-datareport-univer-biz\src\main\java\jnpf\service\ReportVersionService.java
+C:\Users\zhaojinyu\Desktop\USKY\jnpf5.2\jnpf-java-datareport-univer\jnpf-datareport-univer-biz\src\main\java\jnpf\service\UserService.java

+ 22 - 0
jnpf-datareport-univer-controller/pom.xml

@@ -0,0 +1,22 @@
+<?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.jnpf</groupId>
+        <artifactId>jnpf-datareport-univer</artifactId>
+        <version>5.2.0-RELEASE</version>
+    </parent>
+
+    <artifactId>jnpf-datareport-univer-controller</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.jnpf</groupId>
+            <artifactId>jnpf-datareport-univer-biz</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+</project>

+ 382 - 0
jnpf-datareport-univer-controller/src/main/java/jnpf/controller/ReportController.java

@@ -0,0 +1,382 @@
+package jnpf.controller;
+
+import cn.hutool.http.Method;
+import cn.xuyanwu.spring.file.storage.FileInfo;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jnpf.base.ActionResult;
+import jnpf.base.vo.DownloadVO;
+import jnpf.base.vo.ListVO;
+import jnpf.base.vo.PageListVO;
+import jnpf.base.vo.PaginationVO;
+import jnpf.constant.GlobalConst;
+import jnpf.constant.MsgCode;
+import jnpf.consts.ApiConst;
+import jnpf.emnus.ModuleTypeEnum;
+import jnpf.entity.DictionaryDataEntity;
+import jnpf.entity.ReportEntity;
+import jnpf.entity.ReportVersionEntity;
+import jnpf.entity.UserEntity;
+import jnpf.exception.DataException;
+import jnpf.model.data.DataSetInfo;
+import jnpf.model.data.MenuModel;
+import jnpf.model.data.ModuleNameVO;
+import jnpf.model.report.*;
+import jnpf.service.DictionaryDataService;
+import jnpf.service.ReportService;
+import jnpf.service.ReportVersionService;
+import jnpf.service.UserService;
+import jnpf.util.*;
+import org.apache.commons.collections4.CollectionUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Tag(name = "报表信息", description = "Report")
+@RestController
+@RequestMapping("/api/Report")
+public class ReportController {
+
+    @Autowired
+    private ReportService reportService;
+    @Autowired
+    private UserService userService;
+    @Autowired
+    private DictionaryDataService dictionaryDataService;
+    @Autowired
+    private ReportVersionService versionService;
+
+
+    @Operation(summary = "列表")
+    @GetMapping
+    public ActionResult<PageListVO<ReportListVO>> list(ReportPagination paginationPrint) {
+        List<ReportEntity> list = reportService.getList(paginationPrint);
+        List<String> userId = new ArrayList<>();
+        userId.addAll(list.stream().filter(t -> StringUtil.isNotEmpty(t.getCreatorUserId())).map(ReportEntity::getCreatorUserId).collect(Collectors.toList()));
+        userId.addAll(list.stream().filter(t -> StringUtil.isNotEmpty(t.getLastModifyUserId())).map(ReportEntity::getLastModifyUserId).collect(Collectors.toList()));
+        List<UserEntity> userList = userService.getUserName(userId);
+        List<String> dictionary = new ArrayList<>();
+        dictionary.addAll(list.stream().map(ReportEntity::getCategory).collect(Collectors.toList()));
+        List<DictionaryDataEntity> dictionList = dictionaryDataService.getDictionName(dictionary);
+        List<ReportListVO> listVOS = new ArrayList<>();
+        for (ReportEntity entity : list) {
+            ReportListVO vo = JsonUtil.getJsonToBean(entity, ReportListVO.class);
+            vo.setState(vo.getEnabledMark());
+            DictionaryDataEntity dataEntity = dictionList.stream().filter(t -> t.getId().equals(entity.getCategory())).findFirst().orElse(null);
+            vo.setCategory(dataEntity != null ? dataEntity.getFullName() : "");
+            //创建者
+            UserEntity creatorUser = userList.stream().filter(t -> t.getId().equals(entity.getCreatorUserId())).findFirst().orElse(null);
+            vo.setCreatorUser(creatorUser != null ? creatorUser.getRealName() + "/" + creatorUser.getAccount() : entity.getCreatorUserId());
+            //修改人
+            UserEntity lastModifyUser = userList.stream().filter(t -> t.getId().equals(entity.getLastModifyUserId())).findFirst().orElse(null);
+            vo.setLastModifyUser(lastModifyUser != null ? lastModifyUser.getRealName() + "/" + lastModifyUser.getAccount() : entity.getLastModifyUserId());
+            listVOS.add(vo);
+        }
+        PaginationVO paginationVO = JsonUtil.getJsonToBean(paginationPrint, PaginationVO.class);
+        return ActionResult.page(listVOS, paginationVO);
+    }
+
+    @PostMapping
+    @Operation(summary = "新建")
+    @Parameters({
+            @Parameter(name = "form", description = "模型", required = true),
+    })
+    public ActionResult create(@RequestBody ReportCrForm form) {
+        form.setAllowExport(1);
+        form.setAllowPrint(1);
+        reportService.create(form);
+        return ActionResult.success(MsgCode.SU001.get(), form.getId());
+    }
+
+    @Operation(summary = "详情")
+    @Parameters({
+            @Parameter(name = "id", description = "模板id")
+    })
+    @GetMapping("/{id}")
+    public ActionResult<ReportInfoVO> info(@PathVariable("id") String id) {
+        ReportEntity byId = reportService.getById(id);
+        ReportInfoVO vo = JsonUtil.getJsonToBean(byId, ReportInfoVO.class);
+        return ActionResult.success(vo);
+    }
+
+    @Operation(summary = "更新")
+    @PutMapping("/{id}")
+    @Parameters({
+            @Parameter(name = "id", description = "主键", required = true),
+            @Parameter(name = "form", description = "模型", required = true),
+    })
+    public ActionResult update(@PathVariable("id") String id, @RequestBody ReportUpForm form) {
+        ReportEntity entity = JsonUtil.getJsonToBean(form, ReportEntity.class);
+        reportService.update(id, entity);
+        return ActionResult.success(MsgCode.SU004.get());
+    }
+
+    @Operation(summary = "删除")
+    @Parameters({
+            @Parameter(name = "id", description = "模板id", required = true)
+    })
+    @DeleteMapping("/{id}")
+    public ActionResult delete(@PathVariable String id) {
+        if (reportService.getById(id) != null) {
+            reportService.delete(id);
+            return ActionResult.success(MsgCode.SU003.get());
+        } else {
+            return ActionResult.fail(MsgCode.FA003.get());
+        }
+    }
+
+    /*============版本增删改==============*/
+    @Operation(summary = "版本详情")
+    @Parameters({
+            @Parameter(name = "versionId", description = "版本id", required = true)
+    })
+    @GetMapping("/Info/{versionId}")
+    public ActionResult<ReportInfoVO> versionInfo(@PathVariable String versionId) {
+        ReportInfoVO info = reportService.getVersionInfo(versionId);
+        return ActionResult.success(info);
+    }
+
+    @Operation(summary = "版本新增")
+    @Parameters({
+            @Parameter(name = "versionId", description = "版本id", required = true)
+    })
+    @PostMapping("/Info/{versionId}")
+    public ActionResult copyVersion(@PathVariable String versionId) {
+        String newVersionId = versionService.copyVersion(versionId);
+        return ActionResult.success(MsgCode.SU005.get(), newVersionId);
+    }
+
+    @Operation(summary = "版本删除")
+    @Parameters({
+            @Parameter(name = "versionId", description = "版本id", required = true)
+    })
+    @DeleteMapping("/Info/{versionId}")
+    public ActionResult deleteVersion(@PathVariable String versionId) {
+        ReportVersionEntity entity = versionService.getById(versionId);
+        if (entity != null) {
+            List<ReportVersionEntity> list = versionService.getList(entity.getTemplateId(), ReportVersionEntity::getId);
+            if (list.size() == 1) {
+                return ActionResult.fail(MsgCode.SYS043.get());
+            }
+            if (Objects.equals(entity.getState(), 1)) {
+                return ActionResult.fail(MsgCode.SYS044.get());
+            }
+            if (Objects.equals(entity.getState(), 2)) {
+                return ActionResult.fail(MsgCode.SYS045.get());
+            }
+            versionService.removeById(versionId);
+        }
+        return ActionResult.success(MsgCode.SU003.get());
+    }
+
+    @Operation(summary = "版本列表")
+    @Parameters({
+            @Parameter(name = "id", description = "模板id", required = true)
+    })
+    @GetMapping("/Version/{id}")
+    public ActionResult<List<ReportVersionListVO>> versionList(@PathVariable String id) {
+        List<ReportVersionEntity> list = versionService.getList(id, ReportVersionEntity::getId, ReportVersionEntity::getState, ReportVersionEntity::getVersion);
+        List<ReportVersionListVO> listVO = new ArrayList<>();
+        for (ReportVersionEntity jsonEntity : list) {
+            ReportVersionListVO vo = JsonUtil.getJsonToBean(jsonEntity, ReportVersionListVO.class);
+            vo.setFullName("报表版本V" + vo.getVersion());
+            listVO.add(vo);
+        }
+        if (listVO.isEmpty()) {
+            return ActionResult.fail(MsgCode.PRI008.get());
+        }
+        return ActionResult.success(listVO);
+    }
+
+    @Operation(summary = "保存或者发布")
+    @PostMapping("/Save")
+    public ActionResult saveOrRelease(@RequestBody ReportUpForm form) {
+        reportService.saveOrRelease(form);
+        if (Objects.equals(form.getType(), 1)) {
+            return ActionResult.success(MsgCode.SU011.get());
+        }
+        return ActionResult.success(MsgCode.SU002.get());
+    }
+
+    @Operation(summary = "复制")
+    @Parameters({
+            @Parameter(name = "id", description = "模板id", required = true)
+    })
+    @PostMapping("/{id}/Actions/Copy")
+    public ActionResult copy(@PathVariable String id) {
+        ReportEntity entity = reportService.getById(id);
+        String copyNum = UUID.randomUUID().toString().substring(0, 5);
+        String fullName = entity.getFullName() + ".副本" + copyNum;
+        if (fullName.length() > 50) {
+            return ActionResult.fail(MsgCode.PRI006.get());
+        }
+        List<ReportVersionEntity> list = versionService.getList(id, ReportVersionEntity::getId);
+        ReportInfoVO info = new ReportInfoVO();
+        List<DataSetInfo> listVO = new ArrayList<>();
+        if (CollectionUtils.isNotEmpty(list)) {
+            info = reportService.getVersionInfo(list.get(0).getId());
+            List<DataSetInfo> dataSetList = info.getDataSetList() != null ? info.getDataSetList() : new ArrayList<>();
+            for (DataSetInfo dataSetInfo : dataSetList) {
+                dataSetInfo.setObjectId(null);
+                dataSetInfo.setId(null);
+                listVO.add(dataSetInfo);
+            }
+        }
+        ReportCrForm form = JsonUtil.getJsonToBean(info, ReportCrForm.class);
+        form.setFullName(fullName);
+        form.setEnCode(entity.getEnCode() + copyNum);
+        form.setCategory(entity.getCategory());
+        form.setSortCode(entity.getSortCode());
+        form.setDescription(entity.getDescription());
+        form.setId(null);
+        reportService.create(form);
+        return ActionResult.success(MsgCode.SU007.get());
+    }
+
+    @Operation(summary = "导出")
+    @Parameters({
+            @Parameter(name = "id", description = "模板id")
+    })
+    @GetMapping("/{id}/Actions/Export")
+    public ActionResult<DownloadVO> export(@PathVariable String id) {
+        DownloadVO vo = new DownloadVO();
+        ReportEntity entity = reportService.getById(id);
+        List<ReportVersionEntity> list = versionService.getList(id, ReportVersionEntity::getId);
+        if (CollectionUtils.isEmpty(list)) {
+            throw new DataException(MsgCode.FA001.get());
+        }
+        ReportInfoVO info = reportService.getVersionInfo(list.get(0).getId());
+        String json = JsonUtil.getObjectToString(info);
+        String tableName = ModuleTypeEnum.REPORT_TEMPLATE.getTableName();
+        String fileName = entity.getFullName() + "_" + DateUtil.dateFormatByPattern(new Date(), "yyyyMMddHHmmss") + "." + tableName;
+        try {
+            String type = "Temporary";
+            String url = "/api/Report/data/Download?name=" + fileName + "&encryption=";
+            String temporaryFilePath = FilePathUtil.getFilePath(type);
+            FileInfo fileInfo = FileUploadUtils.uploadFile(json.getBytes(GlobalConst.DEFAULT_CHARSET), temporaryFilePath, fileName);
+            vo.setName(fileInfo.getFilename());
+            vo.setUrl(UploaderUtil.uploaderFile(url, fileInfo.getFilename() + "#" + type));
+        } catch (Exception e) {
+
+        }
+        return ActionResult.success(vo);
+    }
+
+    @Operation(summary = "导入")
+    @PostMapping(value = "/Actions/Import", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
+    public ActionResult importData(@RequestPart("file") MultipartFile multipartFile,
+                                   @RequestParam("type") Integer type) throws DataException {
+        //判断是否为.rp结尾
+        if (FileUtil.existsSuffix(multipartFile, ModuleTypeEnum.REPORT_TEMPLATE.getTableName())) {
+            return ActionResult.fail(MsgCode.IMP002.get());
+        }
+        //读取文件内容
+        String fileContent = FileUtil.getFileContent(multipartFile);
+        ReportInfoVO infVo = JsonUtil.getJsonToBean(fileContent, ReportInfoVO.class);
+        String str = reportService.importData(infVo, type);
+        if (StringUtil.isNotEmpty(str)) {
+            return ActionResult.fail(str);
+        }
+        return ActionResult.success(MsgCode.IMP001.get());
+    }
+
+    @Operation(summary = "下拉列表")
+    @GetMapping("/Selector")
+    public ActionResult<ListVO<ReportSelectVO>> selectorList() {
+        List<ReportEntity> list = reportService.getTreeList();
+        List<String> dictionary = new ArrayList<>();
+        dictionary.addAll(list.stream().map(ReportEntity::getCategory).collect(Collectors.toList()));
+        List<DictionaryDataEntity> dictionList = dictionaryDataService.getDictionName(dictionary);
+        Map<String, List<ReportEntity>> map = list.stream().collect(Collectors.groupingBy(ReportEntity::getCategory));
+        List<ReportSelectVO> listVO = new ArrayList<>();
+        for (DictionaryDataEntity entity : dictionList) {
+            List<ReportEntity> entityList = map.get(entity.getId()) != null ? map.get(entity.getId()) : new ArrayList<>();
+            if (entityList.size() > 0) {
+                ReportSelectVO vo = new ReportSelectVO();
+                vo.setId(entity.getId());
+                vo.setFullName(entity.getFullName());
+                vo.setHasChildren(true);
+                vo.setChildren(JsonUtil.getJsonToList(entityList, ReportSelectVO.class));
+                listVO.add(vo);
+            }
+        }
+        ListVO vo = new ListVO<>();
+        vo.setList(listVO);
+        return ActionResult.success(vo);
+    }
+
+    @Operation(summary = "报表发布菜单")
+    @Parameters({
+            @Parameter(name = "id", description = "模板id", required = true)
+    })
+    @PostMapping("/{id}/Actions/Module")
+    public ActionResult module(@PathVariable String id, @RequestBody MenuModel model) {
+        ReportEntity entity = reportService.getById(id);
+        if (entity == null) {
+            return ActionResult.fail(MsgCode.FA012.get());
+        }
+        model.setId(id);
+        model.setFullName(entity.getFullName());
+        model.setEncode(entity.getEnCode());
+        model.setType(10);
+        model.setApp(0);
+        entity.setPlatformRelease(model.getPlatformRelease());
+        String json = ReportUtil.http(ApiConst.SAVE_MENU, Method.POST, JsonUtil.entityToMap(model));
+        ActionResult result = JsonUtil.getJsonToBean(json, ActionResult.class);
+        if (result == null) {
+            return ActionResult.fail(MsgCode.FA101.get());
+        }
+        if (!Objects.equals(result.getCode(), 200)) {
+            return ActionResult.fail(result.getMsg());
+        }
+        reportService.update(id, entity);
+        return ActionResult.success(MsgCode.SU011.get());
+    }
+
+    @Operation(summary = "获取报表发布菜单")
+    @Parameters({
+            @Parameter(name = "id", description = "模板id", required = true)
+    })
+    @GetMapping("/{id}/getReleaseMenu")
+    public ActionResult getReleaseMenu(@PathVariable String id) {
+        ReportEntity entity = reportService.getById(id);
+        if (entity == null) {
+            return ActionResult.fail(MsgCode.FA012.get());
+        }
+        MenuModel model = new MenuModel();
+        model.setId(id);
+        String json = ReportUtil.http(ApiConst.GET_MENU, Method.POST, JsonUtil.entityToMap(model));
+        ActionResult result = JsonUtil.getJsonToBean(json, ActionResult.class);
+        ModuleNameVO moduleNameVO = new ModuleNameVO();
+        if (Objects.equals(result.getCode(), 200)) {
+            moduleNameVO = JsonUtil.getJsonToBean(result.getData(), ModuleNameVO.class);
+        }
+        ReportInfoVO vo = JsonUtil.getJsonToBean(entity, ReportInfoVO.class);
+        vo.setAppIsRelease(0);
+        vo.setPcIsRelease(0);
+        if (moduleNameVO != null) {
+            if (StringUtil.isNotEmpty(moduleNameVO.getPcNames())) {
+                vo.setPcIsRelease(1);
+                vo.setPcReleaseName(moduleNameVO.getPcNames());
+            }
+            if (StringUtil.isNotEmpty(moduleNameVO.getAppNames())) {
+                vo.setAppIsRelease(1);
+                vo.setAppReleaseName(moduleNameVO.getAppNames());
+            }
+        }
+        return ActionResult.success(vo);
+    }
+
+}

+ 159 - 0
jnpf-datareport-univer-controller/src/main/java/jnpf/controller/ReportDataController.java

@@ -0,0 +1,159 @@
+package jnpf.controller;
+
+import cn.hutool.core.codec.Base64;
+import cn.hutool.http.HttpRequest;
+import cn.hutool.http.Method;
+import cn.xuyanwu.spring.file.storage.FileInfo;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jnpf.base.ActionResult;
+import jnpf.enums.ImageEnum;
+import jnpf.model.report.ReportPagination;
+import jnpf.model.report.UploaderVO;
+import jnpf.service.ReportVersionService;
+import jnpf.univer.model.UniverPreview;
+import jnpf.util.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.IOException;
+import java.util.Map;
+import java.util.Objects;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Tag(name = "报表数据", description = "Report")
+@RestController
+@RequestMapping("/api/Report/data")
+public class ReportDataController {
+
+    @Autowired
+    private ReportVersionService reportVersionService;
+
+    @Operation(summary = "预览")
+    @Parameters({
+            @Parameter(name = "id", description = "模板id")
+    })
+    @PostMapping("/{id}/preview")
+    public ActionResult preview(@PathVariable String id, @RequestBody Map<String, Object> params) {
+        ReportPagination pagination = JsonUtil.getJsonToBean(params, ReportPagination.class);
+        UniverPreview preview = reportVersionService.preview(id, pagination, params);
+        return ActionResult.success(preview);
+    }
+
+    @Operation(summary = "预览")
+    @Parameters({
+            @Parameter(name = "id", description = "模板id")
+    })
+    @PostMapping("/{id}/previewTemplate")
+    public ActionResult previewTemplate(@PathVariable String id, @RequestBody Map<String, Object> params) {
+        ReportPagination pagination = JsonUtil.getJsonToBean(params, ReportPagination.class);
+        UniverPreview preview = reportVersionService.previewTemplate(id, pagination, params);
+        return ActionResult.success(preview);
+    }
+
+    @Operation(summary = "上传图片")
+    @PostMapping(value = "/upload/file", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
+    public ActionResult upload(@RequestPart("file") MultipartFile file) {
+        UploaderVO vo = new UploaderVO();
+        String type = "annex";
+        try {
+            String filePath = FilePathUtil.getFilePath(type);
+            String fileName = RandomUtil.uuId() + ".jpeg";
+            byte[] bytes = file.getBytes();
+            String url = "/api/Report/data/Download?name=" + fileName + "&encryption=";
+            FileInfo fileInfo = FileUploadUtils.uploadFile(bytes, filePath, fileName);
+            vo.setName(fileInfo.getFilename());
+            vo.setUrl(UploaderUtil.uploaderFile(url, fileInfo.getFilename() + "#" + type));
+        } catch (Exception e) {
+        }
+        return ActionResult.success(vo);
+    }
+
+    @Operation(summary = "远端接口下载图片")
+    @PostMapping(value = "/downImg")
+    public ActionResult upload(@RequestBody ReportPagination pagination) {
+        UploaderVO vo = new UploaderVO();
+        String type = "annex";
+        try {
+            byte[] bytes = null;
+            String imgValue = pagination.getImgValue();
+            String imgType = pagination.getImgType();
+            if (StringUtil.isNotEmpty(imgValue)) {
+                if (Objects.equals(ImageEnum.BASE64.name(), imgType)) {
+                    String regex = "data:image/\\w+;base64,";
+                    String base64Img = imgValue;
+                    Pattern pattern = Pattern.compile(regex);
+                    Matcher matcher = pattern.matcher(imgValue);
+                    if (matcher.find()) {
+                        base64Img = imgValue.replace(matcher.group(),"");
+                    }
+                    bytes = Base64.decode(base64Img);
+                } else {
+                    HttpRequest request = HttpRequest.of(imgValue).method(Method.GET);
+                    bytes = request.execute().bodyBytes();
+                }
+            }
+            if (bytes != null && bytes.length > 0) {
+                String filePath = FilePathUtil.getFilePath(type);
+                String fileName = RandomUtil.uuId() + ".jpeg";
+                String url = "/api/Report/data/Download?name=" + fileName + "&encryption=";
+                FileInfo fileInfo = FileUploadUtils.uploadFile(bytes, filePath, fileName);
+                vo.setName(fileInfo.getFilename());
+                vo.setUrl(UploaderUtil.uploaderFile(url, fileInfo.getFilename() + "#" + type));
+            }
+        } catch (Exception e) {
+        }
+        return ActionResult.success(vo);
+    }
+
+    @Operation(summary = "上传excel")
+    @PostMapping(value = "/ImportExcel", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
+    public ActionResult importExcel(@RequestPart("file") MultipartFile multipartFile) throws IOException {
+        UniverPreview preview = reportVersionService.importExcel(multipartFile);
+        return ActionResult.success(preview);
+    }
+
+    @Operation(summary = "下载excel")
+    @Parameters({
+            @Parameter(name = "id", description = "模板id")
+    })
+    @PostMapping("/{id}/DownExcel")
+    public ActionResult down(@PathVariable String id, @RequestBody Map<String, Object> params) {
+        ReportPagination pagination = JsonUtil.getJsonToBean(params, ReportPagination.class);
+        pagination.setId(id);
+        UploaderVO vo = reportVersionService.downExcel(pagination);
+        return ActionResult.success(vo);
+    }
+
+    @NoDataSourceBind()
+    @Operation(summary = "下载文件")
+    @GetMapping("/Download")
+    public void downExcel(String encryption, String name) {
+        String fileNameAll = DesUtil.aesDecode(encryption).replaceAll("\n", "");
+        if (!StringUtil.isEmpty(fileNameAll)) {
+            String[] data = fileNameAll.split("#");
+            String fileName = data.length > 1 ? data[1] : "";
+            String type = data.length > 2 ? data[2] : "";
+            String typePath = FilePathUtil.getFilePath(type.toLowerCase());
+            byte[] bytes = FileUploadUtils.downloadFileByte(typePath, fileName, false);
+            if (fileName.endsWith(".jpeg")) {
+                FileDownloadUtil.flushImage(bytes, fileName);
+            } else {
+                FileDownloadUtil.downloadFile(bytes, fileName, name);
+            }
+        }
+    }
+
+}

BIN
jnpf-datareport-univer-controller/target/classes/jnpf/controller/ReportController.class


BIN
jnpf-datareport-univer-controller/target/classes/jnpf/controller/ReportDataController.class


BIN
jnpf-datareport-univer-controller/target/jnpf-datareport-univer-controller-5.2.0-RELEASE.jar


+ 3 - 0
jnpf-datareport-univer-controller/target/maven-archiver/pom.properties

@@ -0,0 +1,3 @@
+artifactId=jnpf-datareport-univer-controller
+groupId=com.jnpf
+version=5.2.0-RELEASE

+ 2 - 0
jnpf-datareport-univer-controller/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst

@@ -0,0 +1,2 @@
+jnpf\controller\ReportController.class
+jnpf\controller\ReportDataController.class

+ 2 - 0
jnpf-datareport-univer-controller/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst

@@ -0,0 +1,2 @@
+C:\Users\zhaojinyu\Desktop\USKY\jnpf5.2\jnpf-java-datareport-univer\jnpf-datareport-univer-controller\src\main\java\jnpf\controller\ReportController.java
+C:\Users\zhaojinyu\Desktop\USKY\jnpf5.2\jnpf-java-datareport-univer\jnpf-datareport-univer-controller\src\main\java\jnpf\controller\ReportDataController.java

+ 56 - 0
jnpf-datareport-univer-entity/pom.xml

@@ -0,0 +1,56 @@
+<?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.jnpf</groupId>
+        <artifactId>jnpf-datareport-univer</artifactId>
+        <version>5.2.0-RELEASE</version>
+    </parent>
+
+    <artifactId>jnpf-datareport-univer-entity</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.jnpf</groupId>
+            <artifactId>jnpf-datareport-univer-common${jnpf.datareport.core.jdk.version}</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+
+
+    <profiles>
+        <profile>
+            <!--JAR包加密-->
+            <id>encrypted</id>
+            <activation>
+                <jdk>[,]</jdk>
+            </activation>
+            <build>
+                <plugins>
+                    <!--复制驱动包-->
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-dependency-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>copy-dependencies</id>
+                                <phase>clean</phase>
+                                <goals>
+                                    <goal>copy-dependencies</goal>
+                                </goals>
+                                <configuration>
+                                    <includeGroupIds>com.jnpf</includeGroupIds>
+                                    <includeArtifactIds>jnpf-datareport-univer-model${jnpf.datareport.core.jdk.version}</includeArtifactIds>
+                                    <outputDirectory>${project.build.directory}/copylib</outputDirectory>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+</project>

+ 26 - 0
jnpf-datareport-univer-entity/src/main/java/jnpf/entity/DictionaryDataEntity.java

@@ -0,0 +1,26 @@
+package jnpf.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import jnpf.base.entity.SuperExtendEntity;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+@TableName("base_dictionary_data")
+public class DictionaryDataEntity extends SuperExtendEntity.SuperExtendDEEntity<String> implements Serializable {
+
+    /**
+     * 名称
+     */
+    @TableField("f_full_name")
+    private String fullName;
+
+}

+ 60 - 0
jnpf-datareport-univer-entity/src/main/java/jnpf/entity/ReportEntity.java

@@ -0,0 +1,60 @@
+package jnpf.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import jnpf.base.entity.SuperExtendEntity;
+import lombok.Data;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+@TableName("report_template")
+public class ReportEntity extends SuperExtendEntity.SuperExtendDEEntity<String> {
+
+    /**
+     * 主版本
+     */
+    @TableField("f_version_id")
+    private String versionId;
+
+    /**
+     * 名称
+     */
+    @TableField("F_FULL_NAME")
+    private String fullName;
+
+    /**
+     * 编码
+     */
+    @TableField("F_EN_CODE")
+    private String enCode;
+
+    /**
+     * 分类
+     */
+    @TableField("F_CATEGORY")
+    private String category;
+
+    /**
+     * 导出
+     */
+    @TableField("F_ALLOW_EXPORT")
+    private Integer allowExport;
+
+    /**
+     * 打印
+     */
+    @TableField("F_ALLOW_PRINT")
+    private Integer allowPrint;
+
+    /**
+     * 发布时勾选平台类型
+     */
+    @TableField("F_PLATFORM_RELEASE" )
+    private String platformRelease;
+
+}

+ 66 - 0
jnpf-datareport-univer-entity/src/main/java/jnpf/entity/ReportVersionEntity.java

@@ -0,0 +1,66 @@
+package jnpf.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import jnpf.base.entity.SuperExtendEntity;
+import lombok.Data;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+@TableName("report_version")
+public class ReportVersionEntity  extends SuperExtendEntity.SuperExtendDEEntity<String> {
+
+    /**
+     * 主版本
+     */
+    @TableField("f_template_id")
+    private String templateId;
+
+    /**
+     * 版本
+     */
+    @TableField("f_version")
+    private Integer version;
+
+    /**
+     * 状态(0.设计中,1.启用中,2.已归档)
+     */
+    @TableField("f_state")
+    private Integer state;
+
+    /**
+     * 模板json
+     */
+    @TableField("f_snapshot")
+    private String snapshot;
+
+    /**
+     * 模板json
+     */
+    @TableField("f_cells")
+    private String cells;
+
+    /**
+     * 模板json
+     */
+    @TableField("f_query_list")
+    private String queryList;
+
+    /**
+     * 模板json
+     */
+    @TableField("f_convert_config")
+    private String convertConfig;
+
+    /**
+     * 模板json
+     */
+    @TableField("f_sort_list")
+    private String sortList;
+
+}

+ 30 - 0
jnpf-datareport-univer-entity/src/main/java/jnpf/entity/UserEntity.java

@@ -0,0 +1,30 @@
+package jnpf.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import jnpf.base.entity.SuperExtendEntity;
+import lombok.Data;
+
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+@TableName("base_user")
+public class UserEntity extends SuperExtendEntity.SuperExtendDEEntity<String> {
+    /**
+     * 账户
+     */
+    @TableField("F_ACCOUNT")
+    private String account;
+
+    /**
+     * 姓名
+     */
+    @TableField("F_REAL_NAME")
+    private String realName;
+
+}

+ 18 - 0
jnpf-datareport-univer-entity/src/main/java/jnpf/model/data/DataForm.java

@@ -0,0 +1,18 @@
+package jnpf.model.data;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+public class DataForm {
+    private String ObjectType;
+    private String ObjectId;
+    private List<DataSetInfo> list;
+}

+ 63 - 0
jnpf-datareport-univer-entity/src/main/java/jnpf/model/data/DataSetInfo.java

@@ -0,0 +1,63 @@
+package jnpf.model.data;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
+import jnpf.model.report.TableTreeModel;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+@Schema(description = "数据集合详情")
+public class DataSetInfo implements Serializable {
+    @Schema(description = "主键")
+    private String id;
+
+    @Schema(description = "关联数据类型")
+    private String objectType;
+
+    @Schema(description = "关联数据类型")
+    private String objectId;
+
+    @NotBlank
+    @Schema(description = "数据集名称")
+    private String fullName;
+
+    @NotBlank
+    @Schema(description = "数据库连接")
+    private String dbLinkId;
+
+    @Schema(description = "数据sql语句")
+    private String dataConfigJson;
+
+    @Schema(description = "参数json")
+    private String parameterJson;
+
+    @Schema(description = "字段json")
+    private String fieldJson;
+
+    @Schema(description = "类型:1-sql语句,2-配置式")
+    private Integer type;
+
+    @Schema(description = "sql语句")
+    private String visualConfigJson;
+
+    @Schema(description = "配置式json")
+    private String filterConfigJson;
+
+    @Schema(description = "数据接口名称")
+    private String treePropsName;
+
+    @Schema(description = "数据接口id")
+    private String interfaceId;
+
+    @Schema(description = "字段信息")
+    private List<TableTreeModel> children;
+}

+ 20 - 0
jnpf-datareport-univer-entity/src/main/java/jnpf/model/data/DataSetPagination.java

@@ -0,0 +1,20 @@
+package jnpf.model.data;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import jnpf.base.Pagination;
+import lombok.Data;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+@Schema(description = "数据集列表参数")
+public class DataSetPagination extends Pagination {
+    @Schema(description = "数据集数据类型:参考枚举DataSetTypeEnum")
+    private String objectType;
+    @Schema(description = "数据集数据id")
+    private String objectId;
+}

+ 40 - 0
jnpf-datareport-univer-entity/src/main/java/jnpf/model/data/DataSetQuery.java

@@ -0,0 +1,40 @@
+package jnpf.model.data;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
+import lombok.Data;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 打印模板-数查询对象
+ *
+ * @author JNPF开发平台组 YY
+ * @version V3.2.0
+ * @copyright 引迈信息技术有限公司
+ * @date 2019年9月30日
+ */
+@Data
+public class DataSetQuery {
+
+    @NotBlank(message = "必填")
+    @Schema(description = "模板id")
+    private String id;
+
+    @NotBlank(message = "必填")
+    @Schema(description = "表单id")
+    private String formId;
+
+    @Schema(description = "数据来源:打印=printVersion,报表=reportVersion")
+    private String type;
+
+    private String queryList;
+
+    private String convertConfig;
+
+    private String moduleId;
+
+    @Schema(description = "查询参数")
+    private Map<String, Object> map = new HashMap<>();
+}

+ 43 - 0
jnpf-datareport-univer-entity/src/main/java/jnpf/model/data/MenuModel.java

@@ -0,0 +1,43 @@
+package jnpf.model.data;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 可视化菜单对象
+ *
+ * @author JNPF开发平台组
+ * @version V3.4
+ * @copyright 引迈信息技术有限公司(https://www.jnpfsoft.com)
+ * @date 2022/4/6
+ */
+@Data
+public class MenuModel {
+	/**
+	 * 功能id
+	 */
+	private String id;
+
+	/**
+	 * 功能名
+	 */
+	private String fullName;
+
+	/**
+	 * 功能编码
+	 */
+	private String encode;
+
+	private Integer pc;
+
+	private Integer app;
+
+	private List<String> pcModuleParentId;
+
+	private List<String> appModuleParentId;
+
+	private Integer type;
+
+	private String platformRelease;
+}

+ 19 - 0
jnpf-datareport-univer-entity/src/main/java/jnpf/model/data/ModuleNameVO.java

@@ -0,0 +1,19 @@
+package jnpf.model.data;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/12/3 下午2:39
+ */
+@Data
+public class ModuleNameVO {
+    private List<String> pcIds;
+    private List<String> appIds;
+    private String pcNames;
+    private String appNames;
+}

+ 60 - 0
jnpf-datareport-univer-entity/src/main/java/jnpf/model/report/ReportCrForm.java

@@ -0,0 +1,60 @@
+package jnpf.model.report;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import jnpf.model.data.DataSetInfo;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+@Schema(description = "基础信息")
+public class ReportCrForm {
+
+    @Schema(description = "主键id")
+    private String id;
+
+    @Schema(description = "名称")
+    private String fullName;
+
+    @Schema(description = "编码")
+    private String enCode;
+
+    @Schema(description = "分类")
+    private String category;
+
+    @Schema(description = "排序")
+    private Long sortCode;
+
+    @Schema(description = "说明")
+    private String description;
+
+    @Schema(description = "模板内容")
+    private String cells;
+
+    @Schema(description = "模板内容")
+    private String snapshot;
+
+    @Schema(description = "模板内容")
+    private String queryList;
+
+    @Schema(description = "模板内容")
+    private String convertConfig;
+
+    @Schema(description = "模板内容")
+    private String sortList;
+
+    @Schema(description = "导出")
+    private Integer allowExport;
+
+    @Schema(description = "打印")
+    private Integer allowPrint;
+
+    @Schema(description = "数据集")
+    private List<DataSetInfo> dataSetList;
+}

+ 75 - 0
jnpf-datareport-univer-entity/src/main/java/jnpf/model/report/ReportInfoVO.java

@@ -0,0 +1,75 @@
+package jnpf.model.report;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import jnpf.model.data.DataSetInfo;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+@Schema(description = "模板详情")
+public class ReportInfoVO {
+
+    @Schema(description = "模板id")
+    private String id;
+
+    @Schema(description = "版本id")
+    private String versionId;
+
+    @Schema(description = "名称")
+    private String fullName;
+
+    @Schema(description = "编码")
+    private String enCode;
+
+    @Schema(description = "分类")
+    private String category;
+
+    @Schema(description = "模板内容")
+    private String cells;
+
+    @Schema(description = "模板内容")
+    private String snapshot;
+
+    @Schema(description = "搜索列表")
+    private String queryList;
+
+    @Schema(description = "转换配置")
+    private String convertConfig;
+
+    @Schema(description = "排序")
+    private String sortList;
+
+    @Schema(description = "是否导出")
+    private Integer allowExport;
+
+    @Schema(description = "是否打印")
+    private Integer allowPrint;
+
+    @Schema(description = "排序")
+    private Long sortCode;
+
+    @Schema(description = "发布时勾选平台类型" )
+    private String platformRelease;
+
+    @Schema(description = "pc已发布菜单名称" )
+    private String pcReleaseName;
+
+    @Schema(description = "app已发布菜单名称" )
+    private String appReleaseName;
+
+    @Schema(description = "pc是否发布" )
+    private Integer pcIsRelease;
+
+    @Schema(description = "app是否发布" )
+    private Integer appIsRelease;
+
+    @Schema(description = "模板内容")
+    private List<DataSetInfo> dataSetList;
+}

+ 46 - 0
jnpf-datareport-univer-entity/src/main/java/jnpf/model/report/ReportListVO.java

@@ -0,0 +1,46 @@
+package jnpf.model.report;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+public class ReportListVO {
+    @Schema(description = "主键id")
+    private String id;
+
+    @Schema(description = "名称")
+    private String fullName;
+
+    @Schema(description = "编码")
+    private String enCode;
+
+    @Schema(description = "分类")
+    private String category;
+
+    @Schema(description = "创建人")
+    private String creatorUser;
+
+    @Schema(description = "创建时间")
+    private Long creatorTime;
+
+    @Schema(description = "修改人")
+    private String lastModifyUser;
+
+    @Schema(description = "修改时")
+    private Long lastModifyTime;
+
+    @Schema(description = "排序")
+    private Long sortCode;
+
+    @Schema(description = "有效标志")
+    private Integer enabledMark;
+
+    @Schema(description = "状态")
+    private Integer state;
+}

+ 26 - 0
jnpf-datareport-univer-entity/src/main/java/jnpf/model/report/ReportPagination.java

@@ -0,0 +1,26 @@
+package jnpf.model.report;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import jnpf.base.Pagination;
+import lombok.Data;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+@Schema(description = "分页模型")
+public class ReportPagination extends Pagination {
+    @Schema(description = "分类")
+    private String category;
+    @Schema(description = "标志")
+    private Integer state;
+    private String sheetId;
+    private String snapshot;
+    private String fullName;
+    private String id;
+    private String imgValue;
+    private String imgType;
+}

+ 21 - 0
jnpf-datareport-univer-entity/src/main/java/jnpf/model/report/ReportPreview.java

@@ -0,0 +1,21 @@
+package jnpf.model.report;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/17 下午1:58
+ */
+@Data
+public class ReportPreview {
+
+    @Schema(description = "模板内容")
+    private String customs;
+
+    @Schema(description = "模板内容")
+    private String snapshot;
+
+}

+ 24 - 0
jnpf-datareport-univer-entity/src/main/java/jnpf/model/report/ReportSelectVO.java

@@ -0,0 +1,24 @@
+package jnpf.model.report;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+public class ReportSelectVO {
+    @Schema(description = "主键id")
+    private String id;
+    @Schema(description = "名称")
+    private String fullName;
+    @Schema(description = "是否有子集")
+    private Boolean hasChildren;
+    @Schema(description = "子集对象")
+    private List<ReportSelectVO> children;
+}

+ 21 - 0
jnpf-datareport-univer-entity/src/main/java/jnpf/model/report/ReportUpForm.java

@@ -0,0 +1,21 @@
+package jnpf.model.report;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+@Schema(description = "表单基础信息")
+public class ReportUpForm extends ReportCrForm {
+
+    @Schema(description = "版本id")
+    private String versionId;
+
+    @Schema(description = "动作类型:0-保存,1-发布")
+    private Integer type;
+}

+ 23 - 0
jnpf-datareport-univer-entity/src/main/java/jnpf/model/report/ReportVersionListVO.java

@@ -0,0 +1,23 @@
+package jnpf.model.report;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+@Schema(description = "版本")
+public class ReportVersionListVO {
+    @Schema(description = "状态")
+    private Integer state;
+    @Schema(description = "主键")
+    private String id;
+    @Schema(description = "名称")
+    private String fullName;
+    @Schema(description = "版本")
+    private String version;
+}

+ 19 - 0
jnpf-datareport-univer-entity/src/main/java/jnpf/model/report/TableTreeModel.java

@@ -0,0 +1,19 @@
+package jnpf.model.report;
+
+import jnpf.util.treeutil.SumTree;
+import lombok.Data;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+public class TableTreeModel extends SumTree<TableTreeModel> {
+
+    private String fullName;
+
+    private String label;
+
+}

Некоторые файлы не были показаны из-за большого количества измененных файлов