Jelajahi Sumber

first commit

zhaojinyu 3 bulan lalu
melakukan
ce930ec950
100 mengubah file dengan 5924 tambahan dan 0 penghapusan
  1. 8 0
      .idea/.gitignore
  2. 21 0
      .idea/compiler.xml
  3. 11 0
      .idea/encodings.xml
  4. 20 0
      .idea/jarRepositories.xml
  5. 12 0
      .idea/misc.xml
  6. 6 0
      .idea/vcs.xml
  7. 46 0
      README.md
  8. TEMPAT SAMPAH
      allatori/allatori.jar
  9. 36 0
      allatori/allatori.xml
  10. TEMPAT SAMPAH
      allatori/class-winter-core-enhance-2.9.4.jar
  11. TEMPAT SAMPAH
      allatori/class-winter-maven-plugin-enhance-2.9.4.jar
  12. 37 0
      allatori/class-winter-maven-plugin-pom.xml
  13. 162 0
      jnpf-datareport-univer-common/pom.xml
  14. 11 0
      jnpf-datareport-univer-common/src/main/java/jnpf/consts/ApiConst.java
  15. 208 0
      jnpf-datareport-univer-common/src/main/java/jnpf/exception/ResultException.java
  16. 8 0
      jnpf-datareport-univer-common/src/main/java/jnpf/properties/ReportProperties.java
  17. 207 0
      jnpf-datareport-univer-common/src/main/java/jnpf/util/ChartUtil.java
  18. 95 0
      jnpf-datareport-univer-common/src/main/java/jnpf/util/ReportUtil.java
  19. 1008 0
      jnpf-datareport-univer-common/src/main/java/jnpf/util/UniverConvert.java
  20. 894 0
      jnpf-datareport-univer-common/src/main/java/jnpf/util/UniverExcel.java
  21. 16 0
      jnpf-datareport-univer-common/src/main/java/jnpf/util/excel/ExcelParser.java
  22. 567 0
      jnpf-datareport-univer-common/src/main/java/jnpf/util/excel/UniverHSSFExcel.java
  23. 692 0
      jnpf-datareport-univer-common/src/main/java/jnpf/util/excel/UniverXSSFExcel.java
  24. TEMPAT SAMPAH
      jnpf-datareport-univer-common/target/classes/jnpf/consts/ApiConst.class
  25. TEMPAT SAMPAH
      jnpf-datareport-univer-common/target/classes/jnpf/exception/ResultException.class
  26. TEMPAT SAMPAH
      jnpf-datareport-univer-common/target/classes/jnpf/properties/ReportProperties.class
  27. TEMPAT SAMPAH
      jnpf-datareport-univer-common/target/classes/jnpf/util/ChartUtil$1.class
  28. TEMPAT SAMPAH
      jnpf-datareport-univer-common/target/classes/jnpf/util/ChartUtil.class
  29. TEMPAT SAMPAH
      jnpf-datareport-univer-common/target/classes/jnpf/util/ReportUtil$1.class
  30. TEMPAT SAMPAH
      jnpf-datareport-univer-common/target/classes/jnpf/util/ReportUtil$2.class
  31. TEMPAT SAMPAH
      jnpf-datareport-univer-common/target/classes/jnpf/util/ReportUtil.class
  32. TEMPAT SAMPAH
      jnpf-datareport-univer-common/target/classes/jnpf/util/UniverConvert$1.class
  33. TEMPAT SAMPAH
      jnpf-datareport-univer-common/target/classes/jnpf/util/UniverConvert.class
  34. TEMPAT SAMPAH
      jnpf-datareport-univer-common/target/classes/jnpf/util/UniverExcel$1.class
  35. TEMPAT SAMPAH
      jnpf-datareport-univer-common/target/classes/jnpf/util/UniverExcel.class
  36. TEMPAT SAMPAH
      jnpf-datareport-univer-common/target/classes/jnpf/util/excel/ExcelParser.class
  37. TEMPAT SAMPAH
      jnpf-datareport-univer-common/target/classes/jnpf/util/excel/UniverHSSFExcel$1.class
  38. TEMPAT SAMPAH
      jnpf-datareport-univer-common/target/classes/jnpf/util/excel/UniverHSSFExcel.class
  39. TEMPAT SAMPAH
      jnpf-datareport-univer-common/target/classes/jnpf/util/excel/UniverXSSFExcel$1.class
  40. TEMPAT SAMPAH
      jnpf-datareport-univer-common/target/classes/jnpf/util/excel/UniverXSSFExcel.class
  41. TEMPAT SAMPAH
      jnpf-datareport-univer-common/target/jnpf-datareport-univer-common-5.2.0-RELEASE.jar
  42. 3 0
      jnpf-datareport-univer-common/target/maven-archiver/pom.properties
  43. 17 0
      jnpf-datareport-univer-common/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
  44. 10 0
      jnpf-datareport-univer-common/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
  45. 177 0
      jnpf-datareport-univer-model/pom.xml
  46. 11 0
      jnpf-datareport-univer-model/src/main/java/jnpf/enums/CellDataEnum.java
  47. 22 0
      jnpf-datareport-univer-model/src/main/java/jnpf/enums/FormatTypeEnum.java
  48. 46 0
      jnpf-datareport-univer-model/src/main/java/jnpf/enums/HorizontalEnum.java
  49. 11 0
      jnpf-datareport-univer-model/src/main/java/jnpf/enums/ImageEnum.java
  50. 11 0
      jnpf-datareport-univer-model/src/main/java/jnpf/enums/OperatorEnum.java
  51. 57 0
      jnpf-datareport-univer-model/src/main/java/jnpf/enums/ResourceEnum.java
  52. 43 0
      jnpf-datareport-univer-model/src/main/java/jnpf/enums/StyleTypeEnum.java
  53. 52 0
      jnpf-datareport-univer-model/src/main/java/jnpf/enums/SubTypeEnum.java
  54. 45 0
      jnpf-datareport-univer-model/src/main/java/jnpf/enums/UniverDataEnum.java
  55. 52 0
      jnpf-datareport-univer-model/src/main/java/jnpf/enums/ValidationType.java
  56. 46 0
      jnpf-datareport-univer-model/src/main/java/jnpf/enums/VerticalEnum.java
  57. 51 0
      jnpf-datareport-univer-model/src/main/java/jnpf/enums/operatorTypeEnum.java
  58. 20 0
      jnpf-datareport-univer-model/src/main/java/jnpf/model/DataQuery.java
  59. 16 0
      jnpf-datareport-univer-model/src/main/java/jnpf/model/DataSortModel.java
  60. 25 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/chart/UniverChartField.java
  61. 18 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/chart/UniverChartModel.java
  62. 20 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/data/cell/UniverCell.java
  63. 46 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/data/cell/UniverDataConfig.java
  64. 19 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/data/custom/UniverCustom.java
  65. 27 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/data/resource/UniverConfig.java
  66. 19 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/data/resource/UniverCustomFilters.java
  67. 24 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/data/resource/UniverDrawing.java
  68. 15 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/data/resource/UniverFilters.java
  69. 17 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/data/resource/UniverNum.java
  70. 17 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/data/resource/UniverOffset.java
  71. 20 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/data/resource/UniverRef.java
  72. 23 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/data/resource/UniverRule.java
  73. 27 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/data/resource/UniverTransform.java
  74. 15 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/data/resource/UniverValue.java
  75. 30 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/model/UniverPreview.java
  76. 37 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/model/UniverWorkBook.java
  77. 24 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/properties/UniverBody.java
  78. 60 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/properties/UniverBodyConfig.java
  79. 43 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/properties/UniverDocumentStyle.java
  80. 21 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/properties/UniverDocumentStyleConfig.java
  81. 32 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/properties/UniverProperties.java
  82. 16 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/resources/UniverResource.java
  83. 67 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/resources/UniverResourceData.java
  84. 38 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/sheet/UniverSheet.java
  85. 17 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/sheet/UniverSheetCell.java
  86. 50 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/sheet/UniverSheetCellData.java
  87. 23 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/sheet/UniverSheetColumnData.java
  88. 17 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/sheet/UniverSheetColumnHeader.java
  89. 19 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/sheet/UniverSheetFreeze.java
  90. 47 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/sheet/UniverSheetRange.java
  91. 31 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/sheet/UniverSheetRowData.java
  92. 17 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/sheet/UniverSheetRowHeader.java
  93. 98 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/style/UniverStyle.java
  94. 35 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/style/UniverStyleBorder.java
  95. 17 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/style/UniverStyleBorderStyle.java
  96. 17 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/style/UniverStyleColor.java
  97. 19 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/style/UniverStylePadding.java
  98. 14 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/style/UniverStylePattern.java
  99. 23 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/style/UniverStyleTextDecoration.java
  100. 25 0
      jnpf-datareport-univer-model/src/main/java/jnpf/univer/style/UniverStyleTextRotation.java

+ 8 - 0
.idea/.gitignore

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

+ 21 - 0
.idea/compiler.xml

@@ -0,0 +1,21 @@
+<?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-model" />
+        <module name="jnpf-datareport-univer-common" />
+      </profile>
+    </annotationProcessing>
+  </component>
+  <component name="JavacSettings">
+    <option name="ADDITIONAL_OPTIONS_OVERRIDE">
+      <module name="jnpf-datareport-univer-common" options="-parameters" />
+      <module name="jnpf-datareport-univer-core" options="-parameters" />
+      <module name="jnpf-datareport-univer-model" options="-parameters" />
+    </option>
+  </component>
+</project>

+ 11 - 0
.idea/encodings.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Encoding">
+    <file url="file://$PROJECT_DIR$/jnpf-datareport-univer-common/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/jnpf-datareport-univer-common/src/main/resources" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/jnpf-datareport-univer-model/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/jnpf-datareport-univer-model/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>

+ 20 - 0
.idea/jarRepositories.xml

@@ -0,0 +1,20 @@
+<?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="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>

+ 46 - 0
README.md

@@ -0,0 +1,46 @@
+> 特别说明:源码、JDK、数据库、Redis等安装或存放路径禁止包含中文、空格、特殊字符等
+
+## 一 环境要求
+
+| 类目 | 版本说明或建议           |
+| --- |------------------|
+| 硬件 | 开发电脑建议使用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` 及以上版本  |
+| IDE   | 代码集成开发环境,推荐使用 `IDEA2024` 及以上版本,兼容 `Eclipse`、 `Spring Tool Suite` 等IDE工具 |
+
+## 二 关联项目
+> 为以下项目提供基础依赖
+
+| 项目            | 分支            | 说明         |
+|---------------|---------------|------------|
+| jnpf-common | v5.2.x-stable | 项目基础依赖源码 |
+| jnpf-java-datareport-univer | v5.2.x-stable | Univer报表源码 |
+
+## 三 选择是否加密
+
+> 是否加密将会影响 `jnpf-java-datareport-univer` 项目的启动方式
+> 如果此项目选择加密 `jnpf-java-datareport-univer` 项目也需要选择加密
+
+### 3.1 不使用加密
+
+在IDEA中, 展开右侧 `Maven` 中 `Profiles` 去除勾选 `encrypted` 选项, 再点击Maven `刷新` 图标刷新 Maven
+
+### 3.2 使用加密
+
+在IDEA中, 展开右侧 `Maven` 中 `Profiles` 勾选 `encrypted` 选项, 再点击Maven `刷新` 图标刷新 Maven
+
+#### 3.2.1 安装加密插件
+
+在IDEA中,双击右侧 `Maven` 中 `jnpf-datareport-univer-core` > `clean` 将会自动安装加密打包插件
+
+## 四 使用方式
+
+### 4.1 本地安装
+
+在IDEA中,双击右侧 `Maven` 中 `jnpf-datareport-univer-core` > `Lifecycle` > `install`,将 `jnpf-datareport-univer-core` 包安装至本地
+
+### 4.2 发布到私服
+
+在IDEA中,双击右侧 `Maven` 中 `jnpf-datareport-univer-core` > `Lifecycle` > `deploy` 发布至私服。

TEMPAT SAMPAH
allatori/allatori.jar


+ 36 - 0
allatori/allatori.xml

@@ -0,0 +1,36 @@
+<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"/>
+        <class template="class jnpf.univer.*"/>
+    </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>

TEMPAT SAMPAH
allatori/class-winter-core-enhance-2.9.4.jar


TEMPAT SAMPAH
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>

+ 162 - 0
jnpf-datareport-univer-common/pom.xml

@@ -0,0 +1,162 @@
+<?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-core</artifactId>
+        <version>5.2.0-RELEASE</version>
+    </parent>
+
+    <artifactId>jnpf-datareport-univer-common</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.jnpf</groupId>
+            <artifactId>jnpf-common-database</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.jnpf</groupId>
+            <artifactId>jnpf-common-swagger</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.jnpf</groupId>
+            <artifactId>jnpf-common-file</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi</artifactId>
+            <version>${poi.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi-ooxml-full</artifactId>
+            <version>${poi.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi-ooxml</artifactId>
+            <version>${poi.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.jnpf</groupId>
+            <artifactId>jnpf-datareport-univer-model</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+
+    <profiles>
+
+        <profile>
+            <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>package</phase>
+                                <goals>
+                                    <goal>copy-dependencies</goal>
+                                </goals>
+                                <configuration>
+                                    <includeGroupIds>com.jnpf,org.apache.poi,cn.dev33,cn.hutool,org.apache.poi,org.springframework,org.apache.tomcat.embed</includeGroupIds>
+                                    <includeArtifactIds>jnpf-common-core,poi,sa-token-core,hutool-all,poi-ooxml,spring-web,tomcat-embed-core</includeArtifactIds>
+                                    <outputDirectory>${project.build.directory}/copylib</outputDirectory>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <!--复制allatori配置重写配置中的包路径-->
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-resources-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>copy-and-filter-allatori-config</id>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>copy-resources</goal>
+                                </goals>
+                                <configuration>
+                                    <outputDirectory>${project.build.directory}</outputDirectory>
+                                    <resources>
+                                        <resource>
+                                            <directory>${project.basedir}/../allatori</directory>
+                                            <includes>
+                                                <include>allatori.xml</include>
+                                            </includes>
+                                            <filtering>true</filtering>
+                                        </resource>
+                                    </resources>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <!--Jar混淆-->
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>run-allatori</id>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>exec</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                        <configuration>
+                            <executable>java</executable>
+                            <arguments>
+                                <argument>-Xms128m</argument>
+                                <argument>-Xmx512m</argument>
+                                <argument>-jar</argument>
+                                <!-- Copy allatori.jar to 'allatori' directory to use the commented line -->
+                                <argument>${project.basedir}/../allatori/allatori.jar</argument>
+                                <!-- <argument>${basedir}/allatori/allatori.jar</argument> -->
+                                <argument>${project.build.directory}/allatori.xml</argument>
+                            </arguments>
+                        </configuration>
+                    </plugin>
+                    <!--Jar加密-->
+                    <plugin>
+                        <groupId>com.idea-aedi</groupId>
+                        <artifactId>class-winter-maven-plugin</artifactId>
+                        <!-- 相关配置 -->
+                        <configuration>
+                            <!--需要处理的包名-->
+                            <includePrefix>jnpf</includePrefix>
+                            <!--直接覆盖原文件-->
+                            <finalName>${build.finalName}</finalName>
+                            <!--编译中依赖的第三方包路径-->
+                            <supportFile>${project.build.directory}/copylib</supportFile>
+                            <!--检查启动参数-->
+                            <jvmArgCheck>-XX:+DisableAttachMechanism</jvmArgCheck>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>class-winter</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
+</project>

+ 11 - 0
jnpf-datareport-univer-common/src/main/java/jnpf/consts/ApiConst.java

@@ -0,0 +1,11 @@
+package jnpf.consts;
+
+public class ApiConst {
+
+    public static String ME;
+    public static String DATASET_LIST;
+    public static String DATASET_SAVE;
+    public static String DATASET_DATA;
+    public static String SAVE_MENU;
+    public static String GET_MENU;
+}

+ 208 - 0
jnpf-datareport-univer-common/src/main/java/jnpf/exception/ResultException.java

@@ -0,0 +1,208 @@
+package jnpf.exception;
+
+import cn.dev33.satoken.exception.NotLoginException;
+import cn.dev33.satoken.exception.NotPermissionException;
+import cn.dev33.satoken.exception.NotRoleException;
+import cn.dev33.satoken.exception.SameTokenInvalidException;
+import com.alibaba.fastjson.JSON;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServletRequest;
+import jnpf.base.ActionResult;
+import jnpf.base.ActionResultCode;
+import jnpf.config.ConfigValueUtil;
+import jnpf.constant.MsgCode;
+import jnpf.util.*;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.web.ErrorProperties;
+import org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController;
+import org.springframework.boot.web.servlet.error.DefaultErrorAttributes;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Controller;
+import org.springframework.validation.ObjectError;
+import org.springframework.web.bind.MethodArgumentNotValidException;
+import org.springframework.web.bind.annotation.ControllerAdvice;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author JNPF开发平台组
+ * @version V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date 2021/3/16 10:10
+ */
+@Slf4j
+@Controller
+@ControllerAdvice
+public class ResultException extends BasicErrorController {
+
+    @Autowired
+    private ConfigValueUtil configValueUtil;
+
+    public ResultException(){
+        super(new DefaultErrorAttributes(), new ErrorProperties());
+    }
+
+    @ResponseBody
+    @ExceptionHandler(value = LoginException.class)
+    public ActionResult loginException(LoginException e) {
+        ActionResult result = ActionResult.fail(ActionResultCode.Fail.getCode(), e.getMessage());
+        result.setData(e.getData());
+        return result;
+    }
+
+    @ResponseBody
+    @ExceptionHandler(value = ImportException.class)
+    public ActionResult loginException(ImportException e) {
+        ActionResult result = ActionResult.fail(ActionResultCode.Fail.getCode(), e.getMessage());
+        return result;
+    }
+
+    /**
+     * 自定义异常内容返回
+     *
+     * @param e
+     * @return
+     */
+    @ResponseBody
+    @ExceptionHandler(value = DataException.class)
+    public ActionResult dataException(DataException e) {
+        ActionResult result = ActionResult.fail(ActionResultCode.Fail.getCode(), e.getMessage());
+        return result;
+    }
+
+    /**
+     * 租户数据库异常
+     *
+     * @param e
+     * @return
+     */
+    @ResponseBody
+    @ExceptionHandler(value = TenantDatabaseException.class)
+    public ActionResult<String> tenantDatabaseException(TenantDatabaseException e) {
+        String msg;
+        if(e.getMessage() == null){
+            if (configValueUtil.getMultiTenancyUrl().contains("https")) {
+                // https 官网提示
+                msg = MsgCode.LOG109.get();
+            } else {
+                msg = MsgCode.LOG110.get();
+            }
+        }else{
+            msg = e.getMessage();
+        }
+        return ActionResult.fail(ActionResultCode.Fail.getCode(), msg);
+    }
+
+    @ResponseBody
+    @ExceptionHandler(value = MethodArgumentNotValidException.class)
+    public ActionResult methodArgumentNotValidException(MethodArgumentNotValidException e) {
+        Map<String, String> map = new HashMap<>(16);
+        List<ObjectError> allErrors = e.getBindingResult().getAllErrors();
+        for (int i = 0; i < allErrors.size(); i++) {
+            String s = allErrors.get(i).getCodes()[0];
+            //用分割的方法得到字段名
+            String[] parts = s.split("\\.");
+            String part1 = parts[parts.length - 1];
+            map.put(part1, allErrors.get(i).getDefaultMessage());
+        }
+        String json = JSON.toJSONString(map);
+        ActionResult result = ActionResult.fail(ActionResultCode.ValidateError.getCode(), json);
+        return result;
+    }
+
+    @ResponseBody
+    @ExceptionHandler(value = WorkFlowException.class)
+    public ActionResult workFlowException(WorkFlowException e) {
+        if (e.getCode() == 200) {
+            List<Map<String, Object>> list = JsonUtil.getJsonToListMap(e.getMessage());
+            return ActionResult.success(list);
+        } else {
+            return ActionResult.fail(e.getMessage());
+        }
+    }
+
+    @ResponseBody
+    @ExceptionHandler(value = WxErrorException.class)
+    public ActionResult wxErrorException(WxErrorException e) {
+        return ActionResult.fail(e.getError().getErrorCode(), MsgCode.AD103.get());
+    }
+
+    @ResponseBody
+    @ExceptionHandler(value = ServletException.class)
+    public void exception(ServletException e) throws Exception {
+        log.error("系统异常:" + e.getMessage(), e);
+        throw new Exception();
+    }
+
+    @ResponseBody
+    @ExceptionHandler(value = Exception.class)
+    public ActionResult exception(Exception e) {
+        log.error("系统异常:" + e.getMessage(), e);
+        if(e instanceof ConnectDatabaseException || e.getCause() instanceof ConnectDatabaseException){
+            Throwable t = e;
+            if(e.getCause() instanceof ConnectDatabaseException){
+                t = e.getCause();
+            }
+            return ActionResult.fail(ActionResultCode.Fail.getCode(), t.getMessage());
+        }
+        return ActionResult.fail(ActionResultCode.Fail.getCode(), MsgCode.AD102.get());
+    }
+
+    /**
+     * 权限码异常
+     */
+    @ResponseBody
+    @ExceptionHandler(NotPermissionException.class)
+    public ActionResult<Void> handleNotPermissionException(NotPermissionException e) {
+        return ActionResult.fail(ActionResultCode.Fail.getCode(),  MsgCode.AD104.get());
+    }
+
+    /**
+     * 角色权限异常
+     */
+    @ResponseBody
+    @ExceptionHandler(NotRoleException.class)
+    public ActionResult<Void> handleNotRoleException(NotRoleException e) {
+        return ActionResult.fail(ActionResultCode.ValidateError.getCode(), MsgCode.AD104.get());
+    }
+
+    /**
+     * 认证失败
+     */
+    @ResponseBody
+    @ExceptionHandler(NotLoginException.class)
+    public ActionResult<Void> handleNotLoginException(NotLoginException e) {
+        return ActionResult.fail(ActionResultCode.SessionOverdue.getCode(), MsgCode.AD105.get());
+    }
+
+    /**
+     * 无效认证
+     */
+    @ResponseBody
+    @ExceptionHandler(SameTokenInvalidException.class)
+    public ActionResult<Void> handleIdTokenInvalidException(SameTokenInvalidException e) {
+        return ActionResult.fail(ActionResultCode.SessionOverdue.getCode(), MsgCode.AD106.get());
+    }
+
+    /**
+     * 覆盖默认的JSON响应
+     */
+    @Override
+    @RequestMapping
+    public ResponseEntity<Map<String, Object>> error(HttpServletRequest request) {
+        HttpStatus status = getStatus(request);
+
+        if (status == HttpStatus.NOT_FOUND) {
+            return new ResponseEntity<>(status);
+        }
+        return super.error(request);
+    }
+
+}

+ 8 - 0
jnpf-datareport-univer-common/src/main/java/jnpf/properties/ReportProperties.java

@@ -0,0 +1,8 @@
+package jnpf.properties;
+
+
+public class ReportProperties {
+
+    public static final String PREFIX = "report";
+
+}

+ 207 - 0
jnpf-datareport-univer-common/src/main/java/jnpf/util/ChartUtil.java

@@ -0,0 +1,207 @@
+package jnpf.util;
+
+import jnpf.univer.chart.UniverChartField;
+import jnpf.univer.chart.UniverChartModel;
+import jnpf.univer.data.cell.UniverDataConfig;
+import jnpf.ureport.definition.value.AggregateType;
+import jnpf.ureport.definition.value.DatasetValue;
+import jnpf.ureport.utils.DataUtils;
+
+import java.math.BigDecimal;
+import java.util.*;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/9/10 下午3:18
+ */
+public class ChartUtil {
+
+    public static void chart(List<UniverChartModel> chartList, Map<String, List<Map<String, Object>>> dataListAll, List<UniverDataConfig> echartsList) {
+        for (UniverDataConfig model : echartsList) {
+            UniverChartModel chartModel = new UniverChartModel();
+            chartModel.setDrawingId(model.getDrawingId());
+            chartModel.setSubUnitId(model.getSubUnitId());
+            chartModel.setUnitId(model.getUnitId());
+            UniverDataConfig config = model.getOption() != null ? model.getOption() : new UniverDataConfig();
+            //数据
+            Set<String> datasetName = new HashSet<>();
+            String classifyNameField = config.getClassifyNameField();
+            config.setClassifyNameField(fieldName(classifyNameField, datasetName));
+
+            String seriesNameField = config.getSeriesNameField();
+            config.setSeriesNameField(fieldName(seriesNameField, datasetName));
+
+            String seriesDataField = config.getSeriesDataField();
+            config.setSeriesDataField(fieldName(seriesDataField, datasetName));
+
+            String maxField = config.getMaxField();
+            config.setMaxField(fieldName(maxField, datasetName));
+
+            List<Map<String, Object>> dataList = new ArrayList<>();
+            for (String dataName : datasetName) {
+                List<Map<String, Object>> data =  dataListAll.get(dataName)!=null?dataListAll.get(dataName):new ArrayList<>();
+                dataList.addAll(data);
+            }
+            UniverChartField chartField = chart(dataList, config);
+            chartModel.setField(chartField);
+            chartList.add(chartModel);
+        }
+    }
+
+    private static UniverChartField chart(List<Map<String, Object>> dataList, UniverDataConfig dataConfig) {
+        String classifyName = dataConfig.getClassifyNameField();
+        String seriesName = dataConfig.getSeriesNameField();
+        String seriesData = dataConfig.getSeriesDataField();
+        String maxField = dataConfig.getMaxField();
+        Map<Object, Map<Object, List<Object>>> chartDataMap = new HashMap<>();
+        Map<Object, List<Object>> maxDatMap = new HashMap<>();
+        for (int i = 0; i < dataList.size(); i++) {
+            Map<String, Object> data = dataList.get(i);
+            Object classify = data.get(classifyName);
+            if (classify == null) {
+                continue;
+            }
+            Object value = data.get(seriesData);
+            if (value == null) {
+                continue;
+            }
+            Object series = data.get(seriesName) != null ? data.get(seriesName) : "";
+            Map<Object, List<Object>> categoryMap = chartDataMap.get(series) != null ? chartDataMap.get(series) : new HashMap<>();
+            List<Object> valueList = categoryMap.get(classify) != null ? categoryMap.get(classify) : new ArrayList<>();
+            valueList.add(value);
+            categoryMap.put(classify, valueList);
+            chartDataMap.put(series, categoryMap);
+
+            Object max = data.get(maxField);
+            if (max != null) {
+                List<Object> maxData = maxDatMap.get(classify) != null ? maxDatMap.get(classify) : new ArrayList<>();
+                maxData.add(max);
+                maxDatMap.put(classify, maxData);
+            }
+        }
+        return chartData(chartDataMap, maxDatMap, dataConfig);
+    }
+
+    private static UniverChartField chartData(Map<Object, Map<Object, List<Object>>> seriesDataMap, Map<Object, List<Object>> maxDataMap, UniverDataConfig dataConfig) {
+        UniverChartField chartField = new UniverChartField();
+        List<String> seriesNameList = new ArrayList<>();
+        Map<Object, List<List<String>>> classifyMap = new HashMap<>();
+        List<Integer> maxCount = new ArrayList<>();
+        maxCount.add(0);
+        for (Object series : seriesDataMap.keySet()) {
+            seriesNameList.add(String.valueOf(series));
+            Map<Object, List<Object>> classifyNameMap = seriesDataMap.get(series);
+            for (Object classify : classifyNameMap.keySet()) {
+                List<List<String>> categroyList = new ArrayList<>();
+                if (classifyMap.get(classify) != null) {
+                    categroyList.addAll(classifyMap.get(classify));
+                }
+                List<Object> valueList = classifyNameMap.get(classify);
+                List<String> data = data(valueList, dataConfig);
+                for (int i = 0; i < data.size(); i++) {
+                    List<String> classifyData = new ArrayList<>();
+                    classifyData.add(data.get(i));
+                    categroyList.add(classifyData);
+                }
+                classifyMap.put(classify, categroyList);
+                maxCount.add(categroyList.size());
+            }
+        }
+        if (StringUtil.isNotEmpty(dataConfig.getSeriesNameField())) {
+            chartField.setSeriesNameField(seriesNameList);
+        }
+        List<String> maxFieldList = new ArrayList<>();
+        List<String> classifyNameList = new ArrayList<>();
+        for (Object classify : classifyMap.keySet()) {
+            classifyNameList.add(String.valueOf(classify));
+            List<Object> objects = maxDataMap.get(classify) != null ? maxDataMap.get(classify) : new ArrayList<>();
+            if (objects.isEmpty()) {
+                objects.add(new BigDecimal(0));
+            }
+            dataConfig.setSummaryType(AggregateType.max.name());
+            List<String> data = data(objects, dataConfig);
+            maxFieldList.add(data.get(0));
+        }
+        List<List<String>> seriesDataList = new ArrayList<>();
+        for (int i = 0; i < Collections.max(maxCount); i++) {
+            List<String> seriesData = new ArrayList<>();
+            for (int k = 0; k < classifyNameList.size(); k++) {
+                String category = classifyNameList.get(k);
+                List<List<String>> categoryList = classifyMap.get(category) != null ? classifyMap.get(category) : new ArrayList<>();
+                List<String> categoryData = categoryList.size() - 1 >= i ? categoryList.get(i) : new ArrayList<>();
+                String data = categoryData.size() > 0 ? categoryData.get(0) : "";
+                seriesData.add(data);
+            }
+            seriesDataList.add(seriesData);
+        }
+        chartField.setClassifyNameField(classifyNameList);
+        chartField.setSeriesDataField(seriesDataList);
+        if (StringUtil.isNotEmpty(dataConfig.getMaxField())) {
+            chartField.setMaxField(maxFieldList);
+        }
+        return chartField;
+    }
+
+    private static List<String> data(List<Object> list, UniverDataConfig dataConfig) {
+        List<String> result = new ArrayList<>();
+        if (list.isEmpty()) {
+            return result;
+        }
+        String chartType = AggregateType.value(dataConfig.getSummaryType()) != null ? dataConfig.getSummaryType() : AggregateType.select.name();
+        DatasetValue expr = new DatasetValue();
+        expr.setProperty(chartType);
+        AggregateType value = AggregateType.value(chartType);
+        List<Map<String, Object>> dataList = new ArrayList<>();
+        for (Object data : list) {
+            Map<String, Object> dataMap = new HashMap<>();
+            dataMap.put(chartType, data);
+            dataList.add(dataMap);
+        }
+        List<BigDecimal> bindDataList = DataUtils.dataList(expr, dataList);
+        switch (value) {
+            case sum:
+                result.add(bindDataList.stream().reduce(BigDecimal.ZERO, BigDecimal::add).doubleValue() + "");
+                break;
+            case avg:
+                BigDecimal sumDecimal = bindDataList.stream().reduce(BigDecimal.ZERO, BigDecimal::add);
+                if (bindDataList.isEmpty()) {
+                    bindDataList.add(new BigDecimal(0));
+                }
+                result.add(sumDecimal.divide(new BigDecimal(bindDataList.size()), 8, BigDecimal.ROUND_HALF_UP).doubleValue() + "");
+                break;
+            case max:
+                if (bindDataList.isEmpty()) {
+                    bindDataList.add(new BigDecimal(0));
+                }
+                result.add(bindDataList.stream().reduce(bindDataList.get(0), BigDecimal::max).doubleValue() + "");
+                break;
+            case min:
+                if (bindDataList.isEmpty()) {
+                    bindDataList.add(new BigDecimal(0));
+                }
+                result.add(bindDataList.stream().reduce(bindDataList.get(0), BigDecimal::min).doubleValue() + "");
+                break;
+            case count:
+                result.add(list.size() + "");
+                break;
+            default:
+                for (Object data : list) {
+                    result.add(String.valueOf(data));
+                }
+                break;
+        }
+        return result;
+    }
+
+    private static String fieldName(String field, Set<String> datasetName) {
+        String fieldName = field;
+        if (StringUtil.isNotEmpty(fieldName)) {
+            String[] params = fieldName.split("\\.");
+            datasetName.add(params[0]);
+            fieldName = params.length == 2 ? params[1] : fieldName;
+        }
+        return fieldName;
+    }
+}

+ 95 - 0
jnpf-datareport-univer-common/src/main/java/jnpf/util/ReportUtil.java

@@ -0,0 +1,95 @@
+package jnpf.util;
+
+import cn.hutool.core.lang.TypeReference;
+import cn.hutool.http.HttpRequest;
+import cn.hutool.http.HttpResponse;
+import cn.hutool.http.Method;
+import cn.hutool.json.JSONUtil;
+import jnpf.base.ActionResult;
+import jnpf.base.UserInfo;
+import jnpf.consts.ApiConst;
+import jnpf.database.util.TenantDataSourceUtil;
+import jnpf.model.login.MeInfoVO;
+import jnpf.model.tenant.TenantVO;
+import lombok.extern.slf4j.Slf4j;
+
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * 报表工具类
+ */
+@Slf4j
+public class ReportUtil {
+
+    public static UserInfo initUserInfo(String token) {
+        UserInfo userInfo = UserProvider.getLocalLoginUser();
+        if (userInfo == null) {
+            try {
+                HttpResponse response = HttpRequest.get(ApiConst.ME).header(Constants.AUTHORIZATION, token).execute();
+                if (response.isOk()) {
+                    String result = response.body();
+                    try {
+                        ActionResult<MeInfoVO> out = JSONUtil.toBean(result, new TypeReference<ActionResult<MeInfoVO>>() {
+                        }, false);
+                        if (Objects.equals(out.getCode(), Constants.SUCCESS)) {
+                            MeInfoVO meInfoVO = out.getData();
+                            if (StringUtil.isNotEmpty(meInfoVO.getUserId())) {
+                                // 构造用户信息
+                                String tenantId = meInfoVO.getTenantId();
+                                userInfo = new UserInfo();
+                                userInfo.setId(meInfoVO.getUserId());
+                                userInfo.setUserId(meInfoVO.getUserId());
+                                userInfo.setUserName(meInfoVO.getUserName());
+                                userInfo.setUserAccount(meInfoVO.getUserAccount());
+                                userInfo.setTenantId(tenantId);
+                                UserProvider.setLocalLoginUser(userInfo);
+                                // 设置租户信息
+                                if (TenantDataSourceUtil.isMultiTenancy()) {
+                                    // 直接从租户系统获取租户信息
+                                    TenantVO tenantVO = TenantDataSourceUtil.getRemoteTenantInfo(tenantId);
+                                    TenantDataSourceUtil.switchTenant(tenantId, tenantVO);
+                                    userInfo.setTenantDbType(tenantVO.getType());
+                                    userInfo.setTenantDbConnectionString(tenantVO.getDbName());
+                                }
+                                return userInfo;
+                            }
+                            if (log.isDebugEnabled()) {
+                                log.debug("获取用户信息: {}", result);
+                            }
+                        }else{
+                            log.error("主系统未成功返回用户信息: {}", out);
+                        }
+                    } catch (Exception e) {
+                        log.error("用户信息解析失败:" + result, e);
+                    }
+                }
+            } catch (Exception e) {
+                log.error("获取用户信息错误: {}", e.getMessage());
+            }
+        }
+        return userInfo;
+    }
+
+    public static String http(String url, Method method, Map<String, Object> params) {
+        HttpRequest request = HttpRequest.of(url).method(method);
+        switch (method){
+            case GET:
+                request.form(params);
+                break;
+            default:
+                request.body(JsonUtil.getObjectToString(params));
+                break;
+        }
+        request.header(Constants.AUTHORIZATION, UserProvider.getToken());
+        request.setConnectionTimeout(50000);
+        request.setReadTimeout(60000);
+        String json = "{}";
+        try {
+            json = request.execute().body();
+        } catch (Exception e) {
+            log.error(e.getMessage());
+        }
+        return json;
+    }
+}

+ 1008 - 0
jnpf-datareport-univer-common/src/main/java/jnpf/util/UniverConvert.java

@@ -0,0 +1,1008 @@
+package jnpf.util;
+
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.json.JSONUtil;
+import com.google.common.collect.ImmutableList;
+import jnpf.constant.MsgCode;
+import jnpf.enums.*;
+import jnpf.enums.UniverDataEnum;
+import jnpf.exception.DataException;
+import jnpf.model.DataQuery;
+import jnpf.model.DataSortModel;
+import jnpf.univer.chart.UniverChartModel;
+import jnpf.univer.data.cell.UniverDataConfig;
+import jnpf.univer.data.custom.UniverCustom;
+import jnpf.univer.data.resource.UniverDrawing;
+import jnpf.univer.model.UniverPreview;
+import jnpf.univer.model.UniverWorkBook;
+import jnpf.univer.resources.*;
+import jnpf.univer.sheet.*;
+import jnpf.ureport.build.Dataset;
+import jnpf.ureport.build.ReportBuilder;
+import jnpf.ureport.cell.down.DownCellbuilder;
+import jnpf.ureport.cell.right.RightCellbuilder;
+import jnpf.ureport.definition.*;
+import jnpf.ureport.definition.value.*;
+import jnpf.ureport.model.*;
+import jnpf.ureport.utils.DataUtils;
+import jnpf.util.type.SortType;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.poi.ss.util.CellRangeAddress;
+import org.apache.poi.ss.util.CellReference;
+
+import java.math.BigDecimal;
+import java.util.*;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+public class UniverConvert {
+
+
+    //-------------------------------------解析数据------------------------------------------------
+
+    public UniverPreview transform(String snapshot, String cells, String sort, Map<String, Map<String, List<Map<String, Object>>>> sheetData) {
+        UniverWorkBook univerWorkBook = StringUtil.isNotEmpty(snapshot) ? JsonUtil.getJsonToBean(snapshot, UniverWorkBook.class) : new UniverWorkBook();
+        UniverCustom custom = StringUtil.isNotEmpty(cells) ? JsonUtil.getJsonToBean(cells, UniverCustom.class) : new UniverCustom();
+        List<DataQuery> sortListAll = StringUtil.isNotEmpty(sort) ? JsonUtil.getJsonToList(sort, DataQuery.class) : new ArrayList<>();
+        //排序
+        Map<String, Map<String, List<DataSortModel>>> sortMap = new HashMap<>();
+        for (DataQuery dataQuery : sortListAll) {
+            String sheetId = dataQuery.getSheet();
+            Map<String, List<DataSortModel>> dataBaseMap = sortMap.get(sheetId) != null ? sortMap.get(sheetId) : new HashMap<>();
+            List<DataSortModel> sortList = dataQuery.getSortList();
+            for (DataSortModel dataModel : sortList) {
+                DataSortModel sortModel = JsonUtil.getJsonToBean(dataModel, DataSortModel.class);
+                String[] params = sortModel.getVModel().split("\\.");
+                if (params.length == 2) {
+                    String datasetName = params[0];
+                    String property = params[1];
+                    sortModel.setVModel(property);
+                    List<DataSortModel> dataSortModels = dataBaseMap.get(datasetName) != null ? dataBaseMap.get(datasetName) : new ArrayList<>();
+                    dataSortModels.add(sortModel);
+                    dataBaseMap.put(datasetName, dataSortModels);
+                }
+            }
+            sortMap.put(sheetId, dataBaseMap);
+        }
+        //图表
+        Map<String, UniverDataConfig> floatEcharts = custom.getFloatEcharts();
+        List<UniverResource> resources = univerWorkBook.getResources();
+        Map<String, List<UniverDataConfig>> echartMap = drawing(resources, floatEcharts);
+        List<UniverSheet> sheetList = new ArrayList<>();
+        List<UniverChartModel> chartList = new ArrayList<>();
+        for (String sheetOrder : univerWorkBook.getSheetOrder()) {
+            UniverSheet univerSheet = univerWorkBook.getSheets().get(sheetOrder);
+            Map<String, List<Map<String, Object>>> dataList = sheetData.get(sheetOrder) != null ? sheetData.get(sheetOrder) : new HashMap<>();
+            Map<String, List<DataSortModel>> sortDataMap = sortMap.get(sheetOrder) != null ? sortMap.get(sheetOrder) : new HashMap<>();
+            if (ObjectUtil.isNotEmpty(univerSheet)) {
+                List<UniverDataConfig> cellList = custom.getCells().stream().filter(t -> Objects.equals(sheetOrder, t.getSheet())).collect(Collectors.toList());
+                UniverSheet sheet = buildLuckySheetDate(univerSheet, cellList, dataList, sortDataMap, resources);
+                List<UniverDataConfig> echartsList = echartMap.get(sheetOrder) != null ? echartMap.get(sheetOrder) : new ArrayList<>();
+                ChartUtil.chart(chartList, dataList, echartsList);
+                sheetList.add(sheet);
+            }
+        }
+        Map<String, UniverSheet> sheet = sheetList.stream().collect(Collectors.toMap(UniverSheet::getId, Function.identity()));
+        univerWorkBook.setSheets(sheet);
+        UniverPreview vo = new UniverPreview();
+        vo.setSnapshot(JSONUtil.toJsonStr(univerWorkBook));
+        vo.setCells(cells);
+
+        vo.setChartData(JSONUtil.toJsonStr(chartList));
+        return vo;
+    }
+
+    private UniverSheet buildLuckySheetDate(UniverSheet sheet, List<UniverDataConfig> cell, Map<String, List<Map<String, Object>>> sheetDataMap, Map<String, List<DataSortModel>> sortDataMap, List<UniverResource> resources) {
+        List<UniverDataConfig> datasourceData = cell.stream().filter(t -> CellDataEnum.dataSource.name().equals(t.getType())).collect(Collectors.toList());
+        if (datasourceData.isEmpty()) {
+            return sheet;
+        }
+        //处理数据
+        Map<String, List<Map<String, Object>>> dataList = new HashMap<>();
+        for (String key : sheetDataMap.keySet()) {
+            List<Map<String, Object>> list = sheetDataMap.get(key) != null ? sheetDataMap.get(key) : new ArrayList<>();
+            List<DataSortModel> dataSortList = sortDataMap.get(key) != null ? sortDataMap.get(key) : new ArrayList<>();
+            StringJoiner joiner = new StringJoiner(",");
+            for (DataSortModel dataSortModel : dataSortList) {
+                String vModel = dataSortModel.getVModel();
+                boolean isDesc = Objects.equals(SortType.DESC, dataSortModel.getType());
+                joiner.add((isDesc ? "-" : "") + vModel);
+            }
+            List<Map<String, Object>> data = DataUtils.orderDataList(list, joiner.toString());
+            dataList.put(key, data);
+        }
+        List<Integer> rowMax = new ArrayList<>();
+        rowMax.add(0);
+        List<Integer> columnMax = new ArrayList<>();
+        columnMax.add(0);
+        Map<Integer, Map<Integer, UniverSheetCellData>> cellData = sheet.getCellData();
+        for (Integer rowKey : cellData.keySet()) {
+            rowMax.add(rowKey);
+            Map<Integer, UniverSheetCellData> cellDataMap = cellData.get(rowKey);
+            columnMax.addAll(cellDataMap.keySet());
+        }
+        List<UniverSheetRange> mergeData = sheet.getMergeData();
+        Map<Integer, UniverSheetRowData> sheetRowData = sheet.getRowData();
+        Map<Integer, UniverSheetColumnData> sheetColumnData = sheet.getColumnData();
+        ReportDefinition reportDefinition = new ReportDefinition();
+        List<RowDefinition> rows = new ArrayList<>();
+        List<ColumnDefinition> columns = new ArrayList<>();
+        List<CellDefinition> cells = new ArrayList<>();
+        reportDefinition.setRows(rows);
+        reportDefinition.setColumns(columns);
+        reportDefinition.setCells(cells);
+        Map<String, Dataset> datasetMap = new HashMap<>();
+        for (String key : dataList.keySet()) {
+            Dataset dataset = new Dataset();
+            dataset.setName(key);
+            dataset.setData(dataList.get(key));
+            datasetMap.put(key, dataset);
+        }
+        reportDefinition.setDatasetMap(datasetMap);
+        Map<String, Functions> functionMap = new HashMap<>();
+        //冻结
+        UniverSheetFreeze freeze = sheet.getFreeze() != null ? sheet.getFreeze() : new UniverSheetFreeze();
+        int freezeRow = freeze.getStartRow();
+        int freezeColumn = freeze.getStartColumn();
+        for (int i = 0; i <= Collections.max(rowMax); i++) {
+            RowDefinition rowDefinition = new RowDefinition();
+            rowDefinition.setRowNumber(i);
+            rowDefinition.setSheetRowData(sheetRowData.get(i));
+            rowDefinition.setFreeze(Objects.equals(freezeRow - 1, i));
+            Map<Integer, UniverSheetCellData> columnData = cellData.get(i) != null ? cellData.get(i) : new HashMap<>();
+            for (int j = 0; j <= Collections.max(columnMax); j++) {
+                ColumnDefinition columnDefinition = new ColumnDefinition();
+                columnDefinition.setColumnNumber(j);
+                columnDefinition.setFreeze(Objects.equals(freezeColumn - 1, j));
+                columnDefinition.setSheetColumnData(sheetColumnData.get(j));
+                UniverSheetCellData sheetCellData = columnData.get(j) != null ? columnData.get(j) : new UniverSheetCellData();
+                //合并
+                int rowSpan = 0;
+                int colSpan = 0;
+                StyleModel styleModel = new StyleModel();
+                Optional<UniverSheetRange> range = mergeData.stream().filter(t -> t.getStartRow().equals(rowDefinition.getRowNumber()) && t.getStartColumn().equals(columnDefinition.getColumnNumber())).findFirst();
+                if (range.isPresent()) {
+                    UniverSheetRange sheetRange = range.get();
+                    rowSpan = sheetRange.getEndRow() - sheetRange.getStartRow();
+                    colSpan = sheetRange.getEndColumn() - sheetRange.getStartColumn();
+                    if (rowSpan > 0) {
+                        for (int row = sheetRange.getStartRow() + 1; row <= sheetRange.getEndRow() - 1; row++) {
+                            Map<Integer, UniverSheetCellData> dataMap = cellData.get(row);
+                            if (dataMap != null) {
+                                UniverSheetCellData startData = dataMap.get(sheetRange.getStartColumn());
+                                if (startData != null) {
+                                    styleModel.setL(startData.getS());
+                                }
+                                UniverSheetCellData endData = dataMap.get(sheetRange.getEndColumn());
+                                if (endData != null) {
+                                    styleModel.setR(endData.getS());
+                                }
+                            }
+                        }
+                    }
+                    if (colSpan > 0) {
+                        Map<Integer, UniverSheetCellData> startDataMap = cellData.get(sheetRange.getStartRow());
+                        Map<Integer, UniverSheetCellData> endDataMap = cellData.get(sheetRange.getEndRow());
+                        for (int col = sheetRange.getStartColumn() + 1; col <= sheetRange.getEndColumn() - 1; col++) {
+                            if (startDataMap != null) {
+                                UniverSheetCellData startData = startDataMap.get(col);
+                                if (startData != null) {
+                                    styleModel.setT(startData.getS());
+                                }
+                            }
+                            if (endDataMap != null) {
+                                UniverSheetCellData endData = endDataMap.get(col);
+                                if (endData != null) {
+                                    styleModel.setB(endData.getS());
+                                }
+                            }
+                        }
+                    }
+                    Map<Integer, UniverSheetCellData> startDataMap = cellData.get(sheetRange.getStartRow());
+                    if (startDataMap != null) {
+                        UniverSheetCellData leftTopData = startDataMap.get(sheetRange.getStartColumn());
+                        if (leftTopData != null) {
+                            styleModel.setLt(leftTopData.getS());
+                        }
+                        UniverSheetCellData rightTopData = startDataMap.get(sheetRange.getEndColumn());
+                        if (rightTopData != null) {
+                            styleModel.setRt(rightTopData.getS());
+                        }
+                    }
+                    Map<Integer, UniverSheetCellData> endDataMap = cellData.get(sheetRange.getEndRow());
+                    if (endDataMap != null) {
+                        UniverSheetCellData leftBodData = endDataMap.get(sheetRange.getStartColumn());
+                        if (leftBodData != null) {
+                            styleModel.setLb(leftBodData.getS());
+                        }
+                        UniverSheetCellData rightBodData = endDataMap.get(sheetRange.getEndColumn());
+                        if (rightBodData != null) {
+                            styleModel.setRb(rightBodData.getS());
+                        }
+                    }
+                }
+                CellDefinition cellDefinition = new CellDefinition();
+                String definitionName = new CellReference(i, j).formatAsString();
+                cellDefinition.setName(definitionName);
+                cellDefinition.setRowNumber(i + 1);
+                cellDefinition.setColumnNumber(j + 1);
+                cellDefinition.setRowSpan(rowSpan > 0 ? rowSpan + 1 : rowSpan);
+                cellDefinition.setColSpan(colSpan > 0 ? colSpan + 1 : colSpan);
+                cellDefinition.setSheetColumnData(sheetColumnData.get(j));
+                cellDefinition.setSheetRowData(sheetRowData.get(i));
+                cellDefinition.setCellData(sheetCellData);
+                cellDefinition.setStyleModel(styleModel);
+
+                //判断函数
+                String function = sheetCellData.getF() != null ? sheetCellData.getF().toString() : "";
+                if (StringUtil.isNotEmpty(function)) {
+                    if (function.startsWith("=")) {
+                        List<CellRangeAddress> list = new ArrayList<>();
+                        functionName(function, list);
+                        Map<Integer, Map<Integer, String>> functionCell = new HashMap<>();
+                        for (CellRangeAddress rangeAddress : list) {
+                            int startRow = rangeAddress.getFirstRow();
+                            int startCol = rangeAddress.getFirstColumn();
+                            int endRow = rangeAddress.getLastRow();
+                            int endCol = rangeAddress.getLastColumn();
+                            List<CellReference> cellsRange = getCellsRange(startRow, endRow, startCol, endCol);
+                            List<String> rangeName = new ArrayList<>();
+                            for (CellReference reference : cellsRange) {
+                                int row = reference.getRow();
+                                int col = reference.getCol();
+                                Map<Integer, String> rowMap = functionCell.get(row) != null ? functionCell.get(row) : new HashMap<>();
+                                rowMap.put(col, reference.formatAsString());
+                                functionCell.put(row, rowMap);
+                                rangeName.add(reference.formatAsString());
+                            }
+                            if (cellsRange.size() > 1) {
+                                function = function.replace(rangeAddress.formatAsString(), String.join(",", rangeName));
+                            }
+                        }
+                        List<String> functionNameList = new ArrayList<>();
+                        List<Integer> rowList = new ArrayList<>(functionCell.keySet()).stream().sorted(Comparator.reverseOrder()).collect(Collectors.toList());
+                        for (Integer row : rowList) {
+                            Map<Integer, String> rowMap = functionCell.get(row) != null ? functionCell.get(row) : new HashMap<>();
+                            List<Integer> colList = new ArrayList<>(rowMap.keySet()).stream().sorted(Comparator.reverseOrder()).collect(Collectors.toList());
+                            for (Integer col : colList) {
+                                functionNameList.add(rowMap.get(col));
+                            }
+                        }
+                        Functions functions = new Functions();
+                        functions.setFunction(function);
+                        functions.setName(definitionName);
+                        functions.setFunctionName(functionNameList);
+                        functionMap.put(definitionName, functions);
+                        sheetCellData.setF(function);
+                        sheetCellData.setV(null);
+                    }
+                }
+                //数据类型
+                Expand expand = Expand.None;
+                String value = sheetCellData.getV() != null ? sheetCellData.getV().toString() : null;
+                Value values = new SimpleValue(value);
+                UniverDataConfig univerCellData = cell.stream().filter(t -> Objects.equals(t.getRow(), rowDefinition.getRowNumber()) && Objects.equals(t.getCol(), columnDefinition.getColumnNumber())).findFirst().orElse(new UniverDataConfig());
+                UniverDataConfig univerDataConfig = univerCellData.getCustom() != null ? univerCellData.getCustom() : new UniverDataConfig();
+                if (Objects.equals(CellDataEnum.dataSource.name(), univerCellData.getType())) {
+                    String datasetName = "";
+                    String property = "";
+                    String fillDirection = univerDataConfig.getFillDirection();
+                    String fileName = univerDataConfig.getField();
+                    String summaryType = univerDataConfig.getSummaryType();
+                    if (StringUtils.isNotEmpty(fileName)) {
+                        String[] params = fileName.split("\\.");
+                        if (params.length == 2) {
+                            datasetName = params[0];
+                            property = params[1];
+                        }
+                    }
+                    AggregateType aggregate = AggregateType.none;
+                    Integer type = univerDataConfig.getPolymerizationType();
+                    boolean isSelect = Objects.equals(type, UniverDataEnum.select.getCode());
+                    boolean isGroup = Objects.equals(type, UniverDataEnum.group.getCode());
+                    boolean isSummary = Objects.equals(type, UniverDataEnum.summary.getCode());
+                    if (isSelect || isGroup) {
+                        expand = Objects.equals(UniverDataEnum.cellDirection.getName(), fillDirection) ? Expand.Down : Expand.Right;
+                        aggregate = isGroup ? AggregateType.group : AggregateType.select;
+                    } else if (isSummary) {
+                        aggregate = AggregateType.value(summaryType);
+                    }
+                    DatasetValue datasetValue = new DatasetValue();
+                    datasetValue.setDatasetName(datasetName);
+                    datasetValue.setProperty(property);
+                    datasetValue.setAggregate(aggregate);
+                    values = datasetValue;
+                }
+
+                String leftName = "";
+                String leftType = univerDataConfig.getLeftParentCellType();
+                if (StringUtil.isNotEmpty(leftType)) {
+                    UniverDataEnum dataType = UniverDataEnum.getData(leftType);
+                    if (dataType != null) {
+                        switch (dataType) {
+                            case cellNone:
+                                leftName = UniverDataEnum.cellRoot.getName();
+                                break;
+                            case cellCustom:
+                                leftName = univerDataConfig.getLeftParentCellCustomRowName() + univerDataConfig.getLeftParentCellCustomColName();
+                                break;
+                        }
+                    }
+                }
+                cellDefinition.setLeftType(leftType);
+                cellDefinition.setLeftParentCellName(leftName);
+                String topName = "";
+                String topType = univerDataConfig.getTopParentCellType();
+                if (StringUtil.isNotEmpty(topType)) {
+                    UniverDataEnum dataType = UniverDataEnum.getData(topType);
+                    if (dataType != null) {
+                        switch (dataType) {
+                            case cellNone:
+                                topName = UniverDataEnum.cellRoot.getName();
+                                break;
+                            case cellCustom:
+                                topName = univerDataConfig.getTopParentCellCustomRowName() + univerDataConfig.getTopParentCellCustomColName();
+                                break;
+                        }
+                    }
+                }
+                cellDefinition.setTopType(topType);
+                cellDefinition.setTopParentCellName(topName);
+                cellDefinition.setExpand(expand);
+                cellDefinition.setValue(values);
+                boolean notAdd = mergeData.stream().filter(t -> t.getStartRow() <= rowDefinition.getRowNumber() && t.getStartColumn() <= columnDefinition.getColumnNumber() && t.getEndRow() >= rowDefinition.getRowNumber() && t.getEndColumn() >= columnDefinition.getColumnNumber()).count() > 0;
+                if (!notAdd || mergeData.isEmpty() || range.isPresent()) {
+                    cells.add(cellDefinition);
+                }
+                columnDefinition.setColumnNumber(columnDefinition.getColumnNumber() + 1);
+                if (columns.stream().filter(t -> Objects.equals(t.getColumnNumber(), columnDefinition.getColumnNumber())).count() == 0) {
+                    columns.add(columnDefinition);
+                }
+            }
+            rowDefinition.setRowNumber(rowDefinition.getRowNumber() + 1);
+            rows.add(rowDefinition);
+        }
+        rebuild(reportDefinition);
+        rebuildReportDefinition(reportDefinition);
+        ReportBuilder reportBuilder = new ReportBuilder();
+        Report report = reportBuilder.buildReport(reportDefinition);
+        UniverSheet result = sheet(sheet, report, functionMap);
+        resource(sheet.getId(), report, resources);
+        return result;
+    }
+
+    private UniverSheet sheet(UniverSheet sheet, Report report, Map<String, Functions> functionMap) {
+        sheet.setCellData(new HashMap<>());
+        sheet.setMergeData(new ArrayList<>());
+        sheet.setRowData(new HashMap<>());
+        sheet.setColumnData(new HashMap<>());
+        Map<Integer, UniverSheetRowData> rowData = new HashMap<>();
+        Map<Integer, UniverSheetColumnData> columnData = new HashMap<>();
+        UniverSheet result = JsonUtil.getJsonToBean(sheet, UniverSheet.class);
+        List<Row> rows = report.getRows();
+        List<Column> columns = report.getColumns();
+        Map<Row, Map<Column, Cell>> cellMap = report.getRowColCellMap();
+        Map<Integer, Map<Integer, UniverSheetCellData>> cellData = new HashMap<>();
+        Map<Integer, Map<Integer, Cell>> cellFunctionMap = new HashMap<>();
+        List<UniverSheetRange> mergeData = new ArrayList<>();
+        //获取冻结位置
+        UniverSheetFreeze sheetFreeze = sheet.getFreeze() != null ? sheet.getFreeze() : new UniverSheetFreeze();
+        int freezeRow = sheetFreeze.getStartRow();
+        List<Integer> freezeRowList = new ArrayList<>();
+        freezeRowList.add(freezeRow);
+        int freezeColumn = sheetFreeze.getStartColumn();
+        List<Integer> freezeColumnList = new ArrayList<>();
+        freezeColumnList.add(freezeColumn);
+        //绘制格子
+        for (int i = 0; i < rows.size(); i++) {
+            Row row = rows.get(i);
+            rowData.put(i, row.getSheetRowData());
+            if (row.getFreeze()) {
+                freezeRowList.add(i + 1);
+            }
+            for (int j = 0; j < columns.size(); j++) {
+                Column col = columns.get(j);
+                Cell cell = null;
+                if (cellMap.containsKey(row)) {
+                    Map<Column, Cell> colMap = cellMap.get(row);
+                    if (colMap.containsKey(col)) {
+                        cell = colMap.get(col);
+                    }
+                }
+                if (cell == null) {
+                    continue;
+                }
+                if (col.getFreeze()) {
+                    freezeColumnList.add(j + 1);
+                }
+                cell.setReference(new CellReference(i, j));
+                UniverSheetCellData sheetCellData = JsonUtil.getJsonToBean(cell.getCellData(), UniverSheetCellData.class);
+                //获取函数格子
+                String cellName = cell.getName();
+                if (functionMap.get(cellName) != null) {
+                    Map<Integer, Cell> data = cellFunctionMap.get(i) != null ? cellFunctionMap.get(i) : new HashMap<>();
+                    data.put(j, cell);
+                    cellFunctionMap.put(i, data);
+                }
+
+                //合并格子
+                int startRow = i;
+                int endRow = i + (cell.getRowSpan() > 0 ? cell.getRowSpan() - 1 : cell.getRowSpan());
+                int startCol = j;
+                int endCol = j + (cell.getColSpan() > 0 ? cell.getColSpan() - 1 : cell.getColSpan());
+                int rowSpan = cell.getRowSpan();
+                int colSpan = cell.getColSpan();
+                StyleModel styleModel = cell.getStyleModel();
+                if (colSpan > 0 || rowSpan > 0) {
+                    //左、右边框
+                    boolean isL = ObjectUtil.isNotEmpty(styleModel.getL());
+                    boolean isR = ObjectUtil.isNotEmpty(styleModel.getR());
+                    for (int rowCount = startRow; rowCount <= endRow; rowCount++) {
+                        Map<Integer, UniverSheetCellData> dataMap = cellData.get(rowCount) != null ? cellData.get(rowCount) : new HashMap<>();
+                        UniverSheetCellData startData = dataMap.get(startCol) != null ? dataMap.get(startCol) : new UniverSheetCellData();
+                        startData.setS(isL ? styleModel.getL() : sheetCellData.getS());
+                        dataMap.put(startCol, startData);
+
+                        UniverSheetCellData endData = dataMap.get(endCol) != null ? dataMap.get(endCol) : new UniverSheetCellData();
+                        endData.setS(isR ? styleModel.getR() : sheetCellData.getS());
+                        dataMap.put(endCol, endData);
+
+                        cellData.put(rowCount, dataMap);
+                    }
+
+                    //上、下边框
+                    boolean isT = ObjectUtil.isNotEmpty(styleModel.getT());
+                    boolean isB = ObjectUtil.isNotEmpty(styleModel.getB());
+                    for (int columnCount = startCol; columnCount <= endCol; columnCount++) {
+                        Map<Integer, UniverSheetCellData> startDataMap = cellData.get(startRow) != null ? cellData.get(startRow) : new HashMap<>();
+                        UniverSheetCellData startData = startDataMap.get(columnCount) != null ? startDataMap.get(columnCount) : new UniverSheetCellData();
+                        startData.setS(isT ? styleModel.getT() : sheetCellData.getS());
+                        startDataMap.put(columnCount, startData);
+                        cellData.put(startRow, startDataMap);
+
+                        Map<Integer, UniverSheetCellData> endDataMap = cellData.get(endRow) != null ? cellData.get(endRow) : new HashMap<>();
+                        UniverSheetCellData endData = endDataMap.get(columnCount) != null ? endDataMap.get(columnCount) : new UniverSheetCellData();
+                        endData.setS(isB ? styleModel.getB() : sheetCellData.getS());
+                        endDataMap.put(columnCount, endData);
+                        cellData.put(endRow, endDataMap);
+                    }
+
+                    //角样式
+                    boolean isLT = ObjectUtil.isNotEmpty(styleModel.getLt());
+                    boolean isRT = ObjectUtil.isNotEmpty(styleModel.getRt());
+                    Map<Integer, UniverSheetCellData> startDataMap = cellData.get(startRow) != null ? cellData.get(startRow) : new HashMap<>();
+                    UniverSheetCellData leftTopData = startDataMap.get(startCol) != null ? startDataMap.get(startCol) : new UniverSheetCellData();
+                    leftTopData.setS(isLT ? styleModel.getLt() : sheetCellData.getS());
+                    startDataMap.put(startCol, leftTopData);
+                    UniverSheetCellData rightTopData = startDataMap.get(endCol) != null ? startDataMap.get(endCol) : new UniverSheetCellData();
+                    rightTopData.setS(isRT ? styleModel.getRt() : sheetCellData.getS());
+                    startDataMap.put(endCol, rightTopData);
+                    cellData.put(startRow, startDataMap);
+
+                    boolean isLB = ObjectUtil.isNotEmpty(styleModel.getLb());
+                    boolean isRB = ObjectUtil.isNotEmpty(styleModel.getRb());
+                    Map<Integer, UniverSheetCellData> endDataMap = cellData.get(endRow) != null ? cellData.get(endRow) : new HashMap<>();
+                    UniverSheetCellData leftBottomData = endDataMap.get(startCol) != null ? endDataMap.get(startCol) : new UniverSheetCellData();
+                    leftBottomData.setS(isLB ? styleModel.getLb() : sheetCellData.getS());
+                    endDataMap.put(startCol, leftBottomData);
+                    UniverSheetCellData rightBottomData = endDataMap.get(endCol) != null ? endDataMap.get(endCol) : new UniverSheetCellData();
+                    rightBottomData.setS(isRB ? styleModel.getRb() : sheetCellData.getS());
+                    endDataMap.put(endCol, rightBottomData);
+                    cellData.put(endRow, endDataMap);
+
+                    boolean notRange = mergeData.stream().filter(t -> t.getStartRow() <= startRow && t.getStartColumn() <= startCol && t.getEndRow() >= startRow && t.getEndColumn() >= startCol).count() > 0;
+                    if (!notRange) {
+                        UniverSheetRange range = new UniverSheetRange();
+                        range.setStartRow(startRow);
+                        range.setEndRow(endRow);
+                        range.setStartColumn(startCol);
+                        range.setEndColumn(endCol);
+                        mergeData.add(range);
+                    }
+                }
+                //赋值
+                Object sheetData = cell.getData();
+                Integer dataType = 1;
+                try {
+                    new BigDecimal(String.valueOf(sheetData));
+                    dataType = 2;
+                } catch (Exception e) {
+                }
+                if (sheetData instanceof Boolean) {
+                    dataType = 3;
+                }
+                if (ObjectUtil.isNotEmpty(sheetCellData.getF())) {
+                    dataType = 4;
+                }
+                sheetCellData.setT(dataType);
+                sheetCellData.setV(sheetData);
+                columnData.put(j, col.getSheetColumnData());
+                Map<Integer, UniverSheetCellData> cellDataMap = cellData.get(i) != null ? cellData.get(i) : new HashMap<>();
+                cellDataMap.put(j, sheetCellData);
+                cellData.put(i, cellDataMap);
+            }
+        }
+        //修改函数
+        List<Integer> rowList = new ArrayList<>(cellFunctionMap.keySet()).stream().sorted(Comparator.naturalOrder()).collect(Collectors.toList());
+        for (Integer row : rowList) {
+            Map<Integer, Cell> rowMap = cellFunctionMap.get(row) != null ? cellFunctionMap.get(row) : new HashMap<>();
+            List<Integer> colList = new ArrayList<>(rowMap.keySet()).stream().sorted(Comparator.naturalOrder()).collect(Collectors.toList());
+            for (Integer col : colList) {
+                Cell cell = rowMap.get(col);
+                Functions model = functionMap.get(cell.getName());
+                if (model != null) {
+                    model.setRowNumber(row);
+                    model.setColNumber(col);
+                    functionList(cell, model, report);
+                    //赋值
+                    UniverSheetCellData data = JsonUtil.getJsonToBean(cell.getCellData(), UniverSheetCellData.class);
+                    data.setT(4);
+                    Map<Integer, UniverSheetCellData> cellDataMap = cellData.get(row) != null ? cellData.get(row) : new HashMap<>();
+                    cellDataMap.put(col, data);
+                    cellData.put(row, cellDataMap);
+                }
+            }
+        }
+        //赋值数据
+        result.setCellData(cellData);
+        result.setMergeData(mergeData);
+        result.setRowData(rowData);
+        result.setColumnData(columnData);
+        List<Integer> rowMax = new ArrayList<>();
+        rowMax.add(sheet.getRowCount());
+        rowMax.add(rows.size());
+        result.setRowCount(Collections.max(rowMax));
+        List<Integer> columnMax = new ArrayList<>();
+        columnMax.add(sheet.getColumnCount());
+        columnMax.add(columns.size());
+        result.setColumnCount(Collections.max(columnMax));
+
+        //赋值冻结数据
+        UniverSheetFreeze freeze = new UniverSheetFreeze();
+        freeze.setStartRow(Collections.max(freezeRowList));
+        freeze.setStartColumn(Collections.max(freezeColumnList));
+        freeze.setYSplit(freeze.getStartRow() > -1 ? freeze.getStartRow() : 0);
+        freeze.setXSplit(freeze.getStartColumn() > -1 ? freeze.getStartColumn() : 0);
+        result.setFreeze(freeze);
+        return result;
+    }
+
+    private void functionList(Cell cell, Functions model, Report report) {
+        String function = new String(model.getFunction());
+        Map<String, List<Cell>> cellsMap = report.getCellsMap();
+        int endRow = model.getRowNumber();
+        int endCol = model.getColNumber();
+        Map<String, List<String>> functionName = new LinkedHashMap<>();
+        for (String name : model.getFunctionName()) {
+            Map<String, List<String>> leftTop = model.getLeftTop();
+            Map<String, List<String>> leftBottom = model.getLeftBottom();
+            Map<String, List<String>> rightTop = model.getRightTop();
+            Map<String, List<String>> rightBottom = model.getRightBottom();
+            List<String> leftTopListAll = leftTop.get(name) != null ? leftTop.get(name) : new ArrayList<>();
+            List<String> leftBottomListAll = leftBottom.get(name) != null ? leftBottom.get(name) : new ArrayList<>();
+            List<String> rightTopListAll = rightTop.get(name) != null ? rightTop.get(name) : new ArrayList<>();
+            List<String> rightBottomListAll = rightBottom.get(name) != null ? rightBottom.get(name) : new ArrayList<>();
+            List<String> leftTopList = new ArrayList<>();
+            List<String> leftBottomList = new ArrayList<>();
+            List<String> rightTopList = new ArrayList<>();
+            List<String> rightBottomList = new ArrayList<>();
+            List<Cell> cellList = cellsMap.get(name) != null ? cellsMap.get(name) : new ArrayList<>();
+            for (Cell functionCell : cellList) {
+                int rowSpan = cell.getRowSpan();
+                int colSpan = cell.getColSpan();
+                CellReference reference = functionCell.getReference();
+                if (functionCell.getReference() != null) {
+                    int functionRow = reference.getRow();
+                    int functionCol = reference.getCol();
+                    String format = reference.formatAsString();
+                    //左上角
+                    if (endRow >= functionRow && endCol >= functionCol) {
+                        if (!leftTopListAll.contains(format)) {
+                            leftTopList.add(format);
+                        }else if (rowSpan > 0 && functionRow <= endRow && endRow <= functionRow + rowSpan - 1){
+                            leftTopList.add(format);
+                        }else if (colSpan > 0 && functionCol <= endCol && endCol <= functionCol + colSpan - 1){
+                            leftTopList.add(format);
+                        }
+                    }
+                    //左下角
+                    if (endRow < functionRow && endCol >= functionCol) {
+                        if (!leftBottomListAll.contains(format)) {
+                            leftBottomList.add(format);
+                        }
+                    }
+                    //右上角
+                    if (endRow > functionRow) {
+                        if (!rightTopListAll.contains(format)) {
+                            rightTopList.add(format);
+                        }
+                    }
+                    //右下角
+                    if (endRow < functionRow || (endRow == functionRow && endCol >= functionCol)) {
+                        if (!rightBottomListAll.contains(format)) {
+                            rightBottomList.add(format);
+                        }
+                    }
+                }
+            }
+            List<String> nameList = functionName.get(name) != null ? functionName.get(name) : new ArrayList<>();
+            if (leftTopList.size() > 0) {
+                leftTopListAll.addAll(leftTopList);
+                nameList.addAll(leftTopList);
+                leftTop.put(name, leftTopListAll);
+            } else if (rightTopList.size() > 0) {
+                rightTopListAll.addAll(rightTopList);
+                nameList.addAll(rightTopList);
+                rightTop.put(name, rightTopListAll);
+            } else if (leftBottomList.size() > 0) {
+                leftBottomListAll.addAll(leftBottomList);
+                nameList.addAll(leftBottomList);
+                leftBottom.put(name, leftBottomListAll);
+            } else if (rightBottomList.size() > 0) {
+                rightBottomListAll.addAll(rightBottomList);
+                nameList.addAll(rightBottomList);
+                rightBottom.put(name, rightBottomListAll);
+            } else {
+                if (cellList.size() == 1) {
+                    nameList.add(cellList.get(0).getReference().formatAsString());
+                }
+            }
+            if (nameList.size() > 0) {
+                functionName.put(name, nameList);
+            }
+        }
+        if (!functionName.isEmpty()) {
+            for (String name : functionName.keySet()) {
+                List<String> functionNameList = functionName.get(name);
+                if (functionNameList.size() > 255) {
+                    function = function.replaceAll(name, functionNameList.get(0) + ":" + functionNameList.get(functionNameList.size() - 1));
+                } else {
+                    function = function.replaceAll(name, String.join(",", functionNameList));
+                }
+            }
+            cell.getCellData().setF(function);
+        }
+    }
+
+    private void rebuild(ReportDefinition report) {
+        List<CellDefinition> cells = report.getCells();
+        Map<String, CellDefinition> cellsMap = new HashMap<>();
+        Map<String, CellDefinition> cellsRowColMap = new HashMap<>();
+        for (CellDefinition cell : cells) {
+            cellsMap.put(cell.getName(), cell);
+            int rowNum = cell.getRowNumber();
+            int colNum = cell.getColumnNumber();
+            int rowSpan = cell.getRowSpan() > 0 ? cell.getRowSpan() : 1;
+            int colSpan = cell.getColSpan() > 0 ? cell.getColSpan() : 1;
+            int rowStart = rowNum;
+            int rowEnd = rowNum + rowSpan;
+            int colStart = colNum;
+            int colEnd = colNum + colSpan;
+            for (int i = rowStart; i < rowEnd; i++) {
+                cellsRowColMap.put(i + "," + colNum, cell);
+            }
+            for (int i = colStart; i < colEnd; i++) {
+                cellsRowColMap.put(rowNum + "," + i, cell);
+            }
+        }
+        for (CellDefinition cell : cells) {
+            int rowNumber = cell.getRowNumber();
+            int colNumber = cell.getColumnNumber();
+            Value value = cell.getValue();
+            boolean isData = value instanceof DatasetValue;
+
+            String leftType = cell.getLeftType();
+            String leftParentCellName = cell.getLeftParentCellName();
+            CellDefinition leftTargetCell = cellsMap.get(leftParentCellName);
+            if (leftTargetCell == null) {
+                if (colNumber > 1) {
+                    leftTargetCell = cellsRowColMap.get(rowNumber + "," + (colNumber - 1));
+                    if (isData) {
+                        for (int i = colNumber; i > 0; i--) {
+                            CellDefinition definition = cellsRowColMap.get(rowNumber + "," + (i - 1));
+                            if (definition != null) {
+                                Value definitionValue = definition.getValue();
+                                if (definitionValue instanceof DatasetValue) {
+                                    leftTargetCell = definition;
+                                    break;
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+            cell.setLeftParentCell(leftTargetCell);
+
+            String topType = cell.getTopType();
+            String topParentCellName = cell.getTopParentCellName();
+            CellDefinition topTargetCell = cellsMap.get(topParentCellName);
+            if (topTargetCell == null) {
+                if (rowNumber > 1) {
+                    topTargetCell = cellsRowColMap.get((rowNumber - 1) + "," + colNumber);
+                    if (isData) {
+                        for (int i = rowNumber; i > 0; i--) {
+                            CellDefinition definition = cellsRowColMap.get((i - 1) + "," + colNumber);
+                            if (definition != null) {
+                                Value definitionValue = definition.getValue();
+                                if (definitionValue instanceof DatasetValue) {
+                                    topTargetCell = definition;
+                                    break;
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+            cell.setTopParentCell(topTargetCell);
+
+            if (isData) {
+                DatasetValue datasetValue = (DatasetValue) value;
+                AggregateType aggregate = datasetValue.getAggregate();
+                List<AggregateType> aggregateType = ImmutableList.of(AggregateType.select, AggregateType.group);
+                if (Objects.equals(topType, UniverDataEnum.cellNone.getName()) && Objects.equals(leftType, UniverDataEnum.cellNone.getName())) {
+                    if (!aggregateType.contains(aggregate)) {
+                        cell.setTopParentCell(null);
+                        cell.setLeftParentCell(null);
+                    }
+                }
+            }
+        }
+    }
+
+    //赋值左、上父格
+    private void rebuildReportDefinition(ReportDefinition reportDefinition) {
+        List<CellDefinition> cells = reportDefinition.getCells();
+        for (CellDefinition cell : cells) {
+            List<String> rowName = new ArrayList<>();
+            addRowChildCell(cell, cell, rowName);
+            Set<String> row = new HashSet<>(rowName);
+            List<String> columnName = new ArrayList<>();
+            addColumnChildCell(cell, cell, columnName);
+            Set<String> column = new HashSet<>(columnName);
+            if (row.size() < rowName.size() || column.size() < columnName.size()) {
+                throw new DataException(MsgCode.FA106.get());
+            }
+        }
+        for (CellDefinition cell : cells) {
+            Expand expand = cell.getExpand();
+            switch (expand) {
+                case Down:
+                    DownCellbuilder downCellbuilder = new DownCellbuilder();
+                    downCellbuilder.buildParentCell(cell, cells);
+                    break;
+                case Right:
+                    RightCellbuilder rightCellbuilder = new RightCellbuilder();
+                    rightCellbuilder.buildParentCell(cell, cells);
+                    break;
+            }
+        }
+    }
+
+    //添加上父格
+    private static void addRowChildCell(CellDefinition cell, CellDefinition childCell, List<String> rowName) {
+        CellDefinition leftCell = cell.getLeftParentCell();
+        if (leftCell == null) {
+            return;
+        }
+        if (rowName.contains(leftCell.getName())) {
+            rowName.add(leftCell.getName());
+            return;
+        }
+        rowName.add(leftCell.getName());
+        List<CellDefinition> childrenCells = leftCell.getRowChildrenCells();
+        childrenCells.add(childCell);
+        addRowChildCell(leftCell, childCell, rowName);
+    }
+
+    //添加左父格
+    private static void addColumnChildCell(CellDefinition cell, CellDefinition childCell, List<String> columnName) {
+        CellDefinition topCell = cell.getTopParentCell();
+        if (topCell == null) {
+            return;
+        }
+        if (columnName.contains(topCell.getName())) {
+            columnName.add(topCell.getName());
+            return;
+        }
+        columnName.add(topCell.getName());
+        List<CellDefinition> childrenCells = topCell.getColumnChildrenCells();
+        childrenCells.add(childCell);
+        addColumnChildCell(topCell, childCell, columnName);
+    }
+
+    //解析函数,获取所在的格子
+    private static void functionName(String functionText, List<CellRangeAddress> list) {
+        Stack<Integer> stack = new Stack<>();
+        List<String> result = new ArrayList<>();
+        for (int i = 0; i < functionText.length(); i++) {
+            char c = functionText.charAt(i);
+            if (c == '(') {
+                stack.push(i);
+            } else if (c == ')') {
+                if (!stack.isEmpty()) {
+                    int start = stack.pop();
+                    result.add(functionText.substring(start + 1, i));
+                }
+            }
+        }
+        List<String> splitList = ImmutableList.of(",","=");
+        for (String range : result){
+            for (String split : splitList){
+                String[] name = range.split(split);
+                for (String cell : name){
+                    try {
+                        CellRangeAddress cellRange = CellRangeAddress.valueOf(cell);
+                        if (!list.contains(cellRange)) {
+                            list.add(cellRange);
+                        }
+                    }catch (Exception e){
+                    }
+                }
+            }
+        }
+    }
+
+    //函数区间的格子
+    private static List<CellReference> getCellsRange(int startRow, int endRow, int startCol, int endCol) {
+        int rangeStartRow = startRow;
+        int rangeStartCol = startCol;
+        int rangeEndRow = endRow;
+        int rangeEndCol = endCol;
+        if (startRow > endRow || startCol > endCol) {
+            rangeStartRow = endRow;
+            rangeStartCol = endCol;
+            rangeEndRow = startRow;
+            rangeEndCol = startCol;
+        }
+        List<CellReference> referenceList = new ArrayList<>();
+        if (rangeStartRow >= 0) {
+            for (int rowNum = rangeStartRow; rowNum <= rangeEndRow; rowNum++) {
+                for (int colNum = rangeStartCol; colNum <= rangeEndCol; colNum++) {
+                    CellReference reference = new CellReference(rowNum, colNum);
+                    referenceList.add(reference);
+                }
+            }
+        }
+        return referenceList;
+    }
+
+    private static void resource(String sheet, Report report, List<UniverResource> resources) {
+        Map<String, List<Cell>> cellsMap = report.getCellsMap();
+        //条件
+        format(sheet, cellsMap, resources);
+        //数据验证
+        dataValidation(sheet, cellsMap, resources);
+    }
+
+    //调整数据格式、数据管理的所在格子
+    private static List<UniverSheetRange> resourceRange(Map<String, List<Cell>> cellsMap, List<UniverSheetRange> sheetRanges) {
+        List<UniverSheetRange> rangeList = new ArrayList<>();
+        for (UniverSheetRange sheetRange : sheetRanges) {
+            int startRow = sheetRange.getStartRow();
+            int endRow = sheetRange.getEndRow();
+            int startCol = sheetRange.getStartColumn();
+            int endCol = sheetRange.getEndColumn();
+            List<CellReference> cellReferenceList = getCellsRange(startRow, endRow, startCol, endCol);
+            for (CellReference cellReference : cellReferenceList) {
+                List<Cell> cellList = cellsMap.get(cellReference.formatAsString()) != null ? cellsMap.get(cellReference.formatAsString()) : new ArrayList<>();
+                for (Cell cell : cellList) {
+                    CellReference reference = cell.getReference();
+                    if (reference != null) {
+                        UniverSheetRange range = JsonUtil.getJsonToBean(sheetRange, UniverSheetRange.class);
+                        range.setStartRow(reference.getRow());
+                        range.setStartColumn((int) reference.getCol());
+                        range.setEndRow(range.getStartRow());
+                        range.setEndColumn(range.getStartColumn());
+                        rangeList.add(range);
+                    }
+                }
+            }
+        }
+        return rangeList.isEmpty() ? sheetRanges : rangeList;
+    }
+
+    //处理图表数据
+    private static Map<String, List<UniverDataConfig>> drawing(List<UniverResource> resources, Map<String, UniverDataConfig> floatEcharts) {
+        UniverResource drawing = resources.stream().filter(t -> ResourceEnum.SHEET_DRAWING_PLUGIN.name().equals(t.getName())).findFirst().orElse(null);
+        Map<String, List<UniverDataConfig>> echartMap = new HashMap<>();
+        if (ObjectUtil.isNotEmpty(drawing) && ObjectUtil.isNotEmpty(drawing.getData())) {
+            Map<String, Object> data = JsonUtil.stringToMap(drawing.getData());
+            data.forEach((key, value) -> {
+                UniverResourceData jsonToBean = JsonUtil.getJsonToBean(value, UniverResourceData.class);
+                Map<String, UniverDrawing> drawingMap = jsonToBean.getData() != null ? jsonToBean.getData() : new HashMap<>();
+                for (String id : drawingMap.keySet()) {
+                    UniverDataConfig univerDataConfig = floatEcharts.get(id);
+                    UniverDrawing univerDrawing = drawingMap.get(id);
+                    if (univerDataConfig != null && univerDrawing != null) {
+                        univerDataConfig.setDrawingId(univerDrawing.getDrawingId());
+                        univerDataConfig.setUnitId(univerDrawing.getUnitId());
+                        univerDataConfig.setSubUnitId(univerDrawing.getSubUnitId());
+                        List<UniverDataConfig> echartList = echartMap.get(key) != null ? echartMap.get(key) : new ArrayList<>();
+                        echartList.add(univerDataConfig);
+                        echartMap.put(key, echartList);
+                    }
+                }
+            });
+        }
+        return echartMap;
+    }
+
+    //解析数据格式
+    private static void format(String sheet, Map<String, List<Cell>> cellsMap, List<UniverResource> resources) {
+        UniverResource formatting = resources.stream().filter(t -> ResourceEnum.SHEET_CONDITIONAL_FORMATTING_PLUGIN.name().equals(t.getName())).findFirst().orElse(null);
+        Map<String, List<UniverResourceData>> foramtMap = new HashMap<>();
+        if (formatting != null && ObjectUtil.isNotEmpty(formatting.getData())) {
+            Map<String, Object> data = JsonUtil.stringToMap(formatting.getData());
+            data.forEach((key, value) -> {
+                foramtMap.put(key, JsonUtil.getJsonToList(value, UniverResourceData.class));
+            });
+            if (foramtMap.get(sheet) != null) {
+                List<UniverResourceData> dataList = foramtMap.get(sheet);
+                for (UniverResourceData resourceData : dataList) {
+                    List<UniverSheetRange> sheetRanges = resourceData.getRanges();
+                    List<UniverSheetRange> rangesList = resourceRange(cellsMap, sheetRanges);
+                    resourceData.setRanges(rangesList);
+                }
+            }
+            formatting.setData(JSONUtil.toJsonStr(foramtMap));
+        }
+    }
+
+    //解析数据验证
+    private static void dataValidation(String sheet, Map<String, List<Cell>> cellsMap, List<UniverResource> resources) {
+        UniverResource validation = resources.stream().filter(t -> ResourceEnum.SHEET_DATA_VALIDATION_PLUGIN.name().equals(t.getName())).findFirst().orElse(null);
+        Map<String, List<UniverResourceData>> validationMap = new HashMap<>();
+        if (validation != null && ObjectUtil.isNotEmpty(validation.getData())) {
+            Map<String, Object> data = JsonUtil.stringToMap(validation.getData());
+            data.forEach((key, value) -> {
+                validationMap.put(key, JsonUtil.getJsonToList(value, UniverResourceData.class));
+            });
+            if (validationMap.get(sheet) != null) {
+                List<UniverResourceData> dataList = validationMap.get(sheet);
+                for (UniverResourceData resourceData : dataList) {
+                    List<UniverSheetRange> sheetRanges = resourceData.getRanges();
+                    List<UniverSheetRange> rangesList = resourceRange(cellsMap, sheetRanges);
+                    resourceData.setRanges(rangesList);
+                }
+            }
+            validation.setData(JSONUtil.toJsonStr(validationMap));
+        }
+    }
+
+    private static void filter(String sheet, Map<String, List<Cell>> cellsMap, List<UniverResource> resources) {
+        UniverResource filter = resources.stream().filter(t -> ResourceEnum.SHEET_FILTER_PLUGIN.name().equals(t.getName())).findFirst().orElse(null);
+        Map<String, UniverResourceData> filterMap = new HashMap<>();
+        if (filter != null && ObjectUtil.isNotEmpty(filter.getData())) {
+            Map<String, Object> data = JsonUtil.stringToMap(filter.getData());
+            data.forEach((key, value) -> {
+                filterMap.put(key, JsonUtil.getJsonToBean(value, UniverResourceData.class));
+            });
+            if (filterMap.get(sheet) != null) {
+                UniverResourceData resourceData = filterMap.get(sheet);
+                if (resourceData != null) {
+                    UniverSheetRange sheetRange = resourceData.getRef();
+                    List<UniverSheetRange> rangesList = resourceRange(cellsMap, ImmutableList.of(sheetRange));
+                    Map<Integer, List<UniverSheetRange>> rangesMap = rangesList.stream().collect(Collectors.groupingBy(UniverSheetRange::getStartRow));
+                    int startRow = Collections.min(rangesMap.keySet());
+                    int startCol = Collections.min(rangesMap.get(startRow).stream().map(UniverSheetRange::getStartColumn).collect(Collectors.toList()));
+                    int endRow = Collections.max(rangesMap.keySet());
+                    int endCol = Collections.max(rangesMap.get(endRow).stream().map(UniverSheetRange::getEndColumn).collect(Collectors.toList()));
+                    UniverSheetRange range = JsonUtil.getJsonToBean(sheetRange, UniverSheetRange.class);
+                    range.setStartRow(startRow);
+                    range.setStartColumn(startCol);
+                    range.setEndRow(endRow);
+                    range.setEndColumn(endCol);
+                    resourceData.setRef(range);
+                }
+                filter.setData(JSONUtil.toJsonStr(filterMap));
+            }
+        }
+    }
+}

+ 894 - 0
jnpf-datareport-univer-common/src/main/java/jnpf/util/UniverExcel.java

@@ -0,0 +1,894 @@
+package jnpf.util;
+
+import cn.hutool.core.codec.Base64;
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.http.HttpRequest;
+import cn.hutool.http.Method;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.io.Files;
+import jnpf.constant.MsgCode;
+import jnpf.enums.*;
+import jnpf.exception.DataException;
+import jnpf.univer.chart.UniverChartModel;
+import jnpf.univer.data.resource.*;
+import jnpf.univer.model.UniverWorkBook;
+import jnpf.univer.properties.UniverProperties;
+import jnpf.univer.resources.UniverResource;
+import jnpf.univer.resources.UniverResourceData;
+import jnpf.univer.sheet.*;
+import jnpf.univer.style.UniverStyle;
+import jnpf.univer.style.UniverStyleBorder;
+import jnpf.univer.style.UniverStyleTextDecoration;
+import jnpf.univer.style.UniverStyleTextRotation;
+import jnpf.util.excel.ExcelParser;
+import jnpf.util.excel.UniverHSSFExcel;
+import jnpf.util.excel.UniverXSSFExcel;
+import jnpf.util.type.RequestType;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.poi.ss.usermodel.Font;
+import org.apache.poi.ss.usermodel.*;
+import org.apache.poi.ss.util.CellRangeAddress;
+import org.apache.poi.ss.util.CellRangeAddressList;
+import org.apache.poi.xssf.model.StylesTable;
+import org.apache.poi.xssf.usermodel.*;
+import org.openxmlformats.schemas.spreadsheetml.x2006.main.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.awt.Color;
+import java.io.IOException;
+import java.util.List;
+import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/9/29 下午5:17
+ */
+@Slf4j
+public class UniverExcel {
+
+    private static Map<String, ExcelParser> excelMap = ImmutableMap.of(
+            "xlsx", new UniverXSSFExcel(),
+            "xls", new UniverHSSFExcel()
+    );
+
+    public static UniverWorkBook formFile(MultipartFile file) throws IOException {
+        //todo 推荐使用xlsx方法
+        String fileName = file.getOriginalFilename();
+        String type = Files.getFileExtension(fileName);
+        ExcelParser excelParser = excelMap.get(type);
+        if (excelParser == null) {
+            throw new DataException(MsgCode.ETD110.get());
+        }
+        UniverWorkBook univerWorkBook = excelParser.formFile(file.getInputStream());
+        return univerWorkBook;
+    }
+
+    public static void downExcel(String snapshot, List<UniverChartModel> chartList, XSSFWorkbook workbook, List<String> sheetList) {
+        Map<UniverStyle, XSSFCellStyle> styleMap = new HashMap<>();
+        UniverWorkBook univerWorkBook = JsonUtil.getJsonToBean(snapshot, UniverWorkBook.class);
+        List<UniverResource> resources = univerWorkBook.getResources() != null ? univerWorkBook.getResources() : new ArrayList<>();
+        for (String sheetOrder : univerWorkBook.getSheetOrder()) {
+            UniverSheet univerSheet = univerWorkBook.getSheets().get(sheetOrder);
+            if (ObjectUtil.isNotEmpty(univerSheet)) {
+                if (!sheetList.contains(sheetOrder)) {
+                    continue;
+                }
+                XSSFSheet sheet = workbook.createSheet(univerSheet.getName());
+                workbook.setSheetHidden(workbook.getSheetIndex(sheet), Objects.equals(univerSheet.getHidden(), 1));
+                Map<Integer, UniverSheetRowData> rowData = univerSheet.getRowData();
+                Map<Integer, UniverSheetColumnData> colData = univerSheet.getColumnData();
+                XSSFDrawing drawing = sheet.createDrawingPatriarch();
+                //冻结位置
+                UniverSheetFreeze freeze = univerSheet.getFreeze() != null ? univerSheet.getFreeze() : new UniverSheetFreeze();
+                sheet.createFreezePane(freeze.getStartColumn(), freeze.getStartRow());
+
+                //遍历数据
+                univerSheet.getCellData().forEach((rowKey, sheetRow) -> {
+                    XSSFRow row = sheet.createRow(rowKey);
+                    UniverSheetRowData sheetRowData = rowData.get(rowKey);
+                    if (ObjectUtil.isNotEmpty(sheetRowData)) {
+                        row.setZeroHeight(Objects.equals(sheetRowData.getHd(), 1));
+                        if (ObjectUtil.isNotEmpty(sheetRowData.getH())) {
+                            row.setHeightInPoints(sheetRowData.getH());
+                        }
+                    }
+                    sheetRow.forEach((colKey, sheetCol) -> {
+                        UniverSheetRange range = univerSheet.getMergeData().stream().filter(t -> Objects.equals(t.getStartRow(), rowKey) && Objects.equals(t.getStartColumn(), colKey)).findFirst().orElse(null);
+                        Object value = sheetCol.getV();
+                        Object formula = sheetCol.getF();
+                        Object style = sheetCol.getS();
+                        XSSFCell cell = row.createCell(colKey);
+                        UniverSheetColumnData columnData = colData.get(colKey);
+                        if (ObjectUtil.isNotEmpty(columnData)) {
+                            sheet.setColumnWidth(colKey, (short) (columnData.getW() * 1.33 * 35));
+                            sheet.setColumnHidden(colKey, Objects.equals(columnData.getHd(), 1));
+                        }
+                        if (ObjectUtil.isNotEmpty(sheetCol.getP())){
+                            UniverProperties properties = JsonUtil.getJsonToBean(sheetCol.getP(), UniverProperties.class);
+                            if (properties.getBody() != null) {
+                                cell.setCellType(CellType.STRING);
+                                cell.setCellValue(properties.getBody().getDataStream());
+                            }
+                        }
+                        if (ObjectUtil.isNotEmpty(value) && ObjectUtil.isEmpty(formula)) {
+                            if (Objects.equals(sheetCol.getT(), 2)) {
+                                cell.setCellType(CellType.NUMERIC);
+                                cell.setCellValue(Double.valueOf(value.toString()));
+                            } else if (Objects.equals(sheetCol.getT(), 3)) {
+                                cell.setCellType(CellType.BOOLEAN);
+                                cell.setCellValue(Boolean.valueOf(value.toString()));
+                            } else {
+                                cell.setCellType(CellType.STRING);
+                                cell.setCellValue(value.toString());
+                            }
+                        }
+                        if (ObjectUtil.isNotEmpty(formula)) {
+                            try {
+                                cell.setCellFormula(formula.toString().substring(1));
+                            }catch (Exception e){
+                                cell.setCellType(CellType.STRING);
+                                cell.setCellValue(formula.toString());
+                            }
+                        }
+                        if (ObjectUtil.isNotEmpty(style)) {
+                            UniverStyle basicStyle = univerWorkBook.getStyles().get(style);
+                            if (ObjectUtil.isNotEmpty(basicStyle)) {
+                                UniverStyleBorder bd = basicStyle.getBd();
+                                if (ObjectUtil.isNotEmpty(styleMap.get(basicStyle))) {
+                                    bdAnchor(bd, rowKey, colKey, range, drawing);
+                                    cell.setCellStyle(styleMap.get(basicStyle));
+                                } else {
+                                    XSSFCellStyle cellStyle = workbook.createCellStyle();
+                                    if (ObjectUtil.isNotEmpty(basicStyle.getBg()) && ObjectUtil.isNotEmpty(basicStyle.getBg().getRgb())) {
+                                        String bgGrb = basicStyle.getBg().getRgb();
+                                        XSSFColor color = color(bgGrb);
+                                        if (color != null) {
+                                            cellStyle.setFillForegroundColor(color);
+                                            cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
+                                        }
+                                    }
+                                    if (ObjectUtil.isNotEmpty(bd)) {
+                                        if (ObjectUtil.isNotEmpty(bd.getT()) && ObjectUtil.isNotEmpty(bd.getT().getCl())) {
+                                            String bdt = bd.getT().getCl().getRgb();
+                                            if (ObjectUtil.isNotEmpty(bdt)) {
+                                                XSSFColor color = color(bdt);
+                                                if (color != null) {
+                                                    cellStyle.setTopBorderColor(color);
+                                                }
+                                            }
+                                            StyleTypeEnum bdStyle = StyleTypeEnum.getStyle(bd.getT().getS());
+                                            if (ObjectUtil.isNotEmpty(bdStyle)) {
+                                                cellStyle.setBorderTop(bdStyle.getBorderStyle());
+                                            }
+                                        }
+                                        if (ObjectUtil.isNotEmpty(bd.getL()) && ObjectUtil.isNotEmpty(bd.getL().getCl())) {
+                                            String bdl = bd.getL().getCl().getRgb();
+                                            if (ObjectUtil.isNotEmpty(bdl)) {
+                                                XSSFColor color = color(bdl);
+                                                if (color != null) {
+                                                    cellStyle.setLeftBorderColor(color);
+                                                }
+                                            }
+                                            StyleTypeEnum bdStyle = StyleTypeEnum.getStyle(bd.getL().getS());
+                                            if (ObjectUtil.isNotEmpty(bdStyle)) {
+                                                cellStyle.setBorderLeft(bdStyle.getBorderStyle());
+                                            }
+                                        }
+                                        if (ObjectUtil.isNotEmpty(bd.getB()) && ObjectUtil.isNotEmpty(bd.getB().getCl())) {
+                                            String bdb = bd.getB().getCl().getRgb();
+                                            if (ObjectUtil.isNotEmpty(bdb)) {
+                                                XSSFColor color = color(bdb);
+                                                if (color != null) {
+                                                    cellStyle.setBottomBorderColor(color);
+                                                }
+                                            }
+                                            StyleTypeEnum bdStyle = StyleTypeEnum.getStyle(bd.getB().getS());
+                                            if (ObjectUtil.isNotEmpty(bdStyle)) {
+                                                cellStyle.setBorderBottom(bdStyle.getBorderStyle());
+                                            }
+                                        }
+                                        if (ObjectUtil.isNotEmpty(bd.getR()) && ObjectUtil.isNotEmpty(bd.getR().getCl())) {
+                                            String bdr = bd.getR().getCl().getRgb();
+                                            if (ObjectUtil.isNotEmpty(bdr)) {
+                                                XSSFColor color = color(bdr);
+                                                if (color != null) {
+                                                    cellStyle.setRightBorderColor(color);
+                                                }
+                                            }
+                                            StyleTypeEnum bdStyle = StyleTypeEnum.getStyle(bd.getR().getS());
+                                            if (ObjectUtil.isNotEmpty(bdStyle)) {
+                                                cellStyle.setBorderRight(bdStyle.getBorderStyle());
+                                            }
+                                        }
+                                        bdAnchor(bd, rowKey, colKey, range, drawing);
+                                    }
+                                    HorizontalAlignment alignment = ObjectUtil.isNotEmpty(basicStyle.getHt()) ? HorizontalEnum.getHorizontalValue(basicStyle.getHt()) : null;
+                                    if (ObjectUtil.isNotEmpty(alignment)) {
+                                        cellStyle.setAlignment(alignment);
+                                    }
+                                    VerticalAlignment verticalValue = ObjectUtil.isNotEmpty(basicStyle.getVt()) ? VerticalEnum.getVerticalValue(basicStyle.getVt()) : null;
+                                    if (ObjectUtil.isNotEmpty(verticalValue)) {
+                                        cellStyle.setVerticalAlignment(verticalValue);
+                                    }
+                                    if (ObjectUtil.isNotEmpty(basicStyle.getN()) && ObjectUtil.isNotEmpty(basicStyle.getN().getPattern())) {
+                                        DataFormat format = workbook.createDataFormat();
+                                        cellStyle.setDataFormat(format.getFormat(basicStyle.getN().getPattern()));
+                                    }
+                                    if (ObjectUtil.isNotEmpty(basicStyle.getTb()) && Objects.equals(basicStyle.getTb(), 3)) {
+                                        cellStyle.setWrapText(true);
+                                    }
+                                    if (ObjectUtil.isNotEmpty(basicStyle.getTr())) {
+                                        UniverStyleTextRotation tr = basicStyle.getTr();
+                                        int v = tr.getV();
+                                        int rotation = tr.getA();
+                                        if (Objects.equals(v, 1)) {
+                                            rotation = -255;
+                                        }
+                                        cellStyle.setRotation((short) -rotation);
+                                    }
+                                    XSSFFont font = workbook.createFont();
+                                    if (ObjectUtil.isNotEmpty(basicStyle.getFf())) {
+                                        font.setFontName(basicStyle.getFf());
+                                    }
+                                    if (ObjectUtil.isNotEmpty(basicStyle.getFs())) {
+                                        font.setFontHeight(basicStyle.getFs());
+                                    }
+                                    if (ObjectUtil.isNotEmpty(basicStyle.getIt())) {
+                                        font.setItalic(Objects.equals(basicStyle.getIt(), 1));
+                                    }
+                                    if (ObjectUtil.isNotEmpty(basicStyle.getBl())) {
+                                        font.setBold(Objects.equals(basicStyle.getBl(), 1));
+                                    }
+                                    if (ObjectUtil.isNotEmpty(basicStyle.getCl()) && ObjectUtil.isNotEmpty(basicStyle.getCl().getRgb())) {
+                                        XSSFColor color = color(basicStyle.getCl().getRgb());
+                                        if (color != null) {
+                                            font.setColor(color);
+                                        }
+                                    }
+                                    if (ObjectUtil.isNotEmpty(basicStyle.getUl()) && ObjectUtil.isNotEmpty(basicStyle.getUl().getS())) {
+                                        font.setUnderline(Objects.equals(basicStyle.getUl().getS(), 1) ? Font.U_SINGLE : Font.U_NONE);
+                                    }
+                                    if (ObjectUtil.isNotEmpty(basicStyle.getSt()) && ObjectUtil.isNotEmpty(basicStyle.getSt().getS())) {
+                                        font.setStrikeout(Objects.equals(basicStyle.getSt().getS(), 1));
+                                    }
+                                    cellStyle.setFont(font);
+                                    cell.setCellStyle(cellStyle);
+                                    styleMap.put(basicStyle, cellStyle);
+                                }
+                            }
+                        }
+                    });
+                });
+                //合并单元格
+                for (UniverSheetRange region : new HashSet<>(univerSheet.getMergeData())) {
+                    sheet.addMergedRegion(new CellRangeAddress(region.getStartRow(), region.getEndRow(), region.getStartColumn(), region.getEndColumn()));
+                }
+                //图片
+                drawing(sheetOrder, resources, chartList, drawing, workbook);
+                //条件
+                format(sheetOrder, resources, sheet);
+                //数据管理
+                dataValidation(sheetOrder, resources, sheet);
+            }
+        }
+    }
+
+    private static void bdAnchor(UniverStyleBorder bd, int rowKey, int colKey, UniverSheetRange range, XSSFDrawing drawing) {
+        if (ObjectUtil.isNotEmpty(bd)) {
+            if (ObjectUtil.isNotEmpty(bd.getTl_br()) && ObjectUtil.isNotEmpty(bd.getTl_br().getCl())) {
+                int startRow = rowKey;
+                int startCol = colKey;
+                int endRow = rowKey + 1;
+                int endCol = colKey + 1;
+                if (range != null) {
+                    endRow = range.getEndRow() + 1;
+                    endCol = range.getEndColumn() + 1;
+                }
+                XSSFClientAnchor anchor = new XSSFClientAnchor();
+                anchor.setRow1(startRow);
+                anchor.setCol1(startCol);
+                anchor.setRow2(endRow);
+                anchor.setCol2(endCol);
+                XSSFSimpleShape shape = drawing.createSimpleShape(anchor);
+                StyleTypeEnum bdStyle = StyleTypeEnum.getStyle(bd.getTl_br().getS());
+                if (ObjectUtil.isNotEmpty(bdStyle)) {
+                    shape.setShapeType(bdStyle.getBorderStyle().getCode());
+                }
+                String bdr = bd.getTl_br().getCl().getRgb();
+                if (ObjectUtil.isNotEmpty(bdr)) {
+                    XSSFColor color = color(bdr);
+                    if (color != null) {
+                        shape.setLineStyleColor(color.getRGB()[0], color.getRGB()[1], color.getRGB()[2]);
+                    }
+                }
+                shape.setShapeType(ShapeTypes.LINE);
+            }
+            if (ObjectUtil.isNotEmpty(bd.getTl_mr()) && ObjectUtil.isNotEmpty(bd.getTl_mr().getCl())) {
+                if (range != null) {
+                    int startRow = rowKey;
+                    int startCol = colKey;
+                    int endRow = (rowKey + range.getEndRow() + 1) / 2;
+                    int endCol = range.getEndColumn() + 1;
+                    XSSFClientAnchor anchor = new XSSFClientAnchor();
+                    anchor.setRow1(startRow);
+                    anchor.setCol1(startCol);
+                    anchor.setRow2(endRow);
+                    anchor.setCol2(endCol);
+                    XSSFSimpleShape shape = drawing.createSimpleShape(anchor);
+                    StyleTypeEnum bdStyle = StyleTypeEnum.getStyle(bd.getTl_mr().getS());
+                    if (ObjectUtil.isNotEmpty(bdStyle)) {
+                        shape.setShapeType(bdStyle.getBorderStyle().getCode());
+                    }
+                    String bdr = bd.getTl_mr().getCl().getRgb();
+                    if (ObjectUtil.isNotEmpty(bdr)) {
+                        XSSFColor color = color(bdr);
+                        if (color != null) {
+                            shape.setLineStyleColor(color.getRGB()[0], color.getRGB()[1], color.getRGB()[2]);
+                        }
+                    }
+                    shape.setShapeType(ShapeTypes.LINE);
+                }
+            }
+            if (ObjectUtil.isNotEmpty(bd.getTl_bc()) && ObjectUtil.isNotEmpty(bd.getTl_bc().getCl())) {
+                if (range != null) {
+                    int startRow = rowKey;
+                    int startCol = colKey;
+                    int endRow = range.getEndRow() + 1;
+                    int endCol = (colKey + range.getEndColumn() + 1) / 2;
+                    XSSFClientAnchor anchor = new XSSFClientAnchor();
+                    anchor.setRow1(startRow);
+                    anchor.setCol1(startCol);
+                    anchor.setRow2(endRow);
+                    anchor.setCol2(endCol);
+                    XSSFSimpleShape shape = drawing.createSimpleShape(anchor);
+                    StyleTypeEnum bdStyle = StyleTypeEnum.getStyle(bd.getTl_bc().getS());
+                    if (ObjectUtil.isNotEmpty(bdStyle)) {
+                        shape.setShapeType(bdStyle.getBorderStyle().getCode());
+                    }
+                    String bdr = bd.getTl_bc().getCl().getRgb();
+                    if (ObjectUtil.isNotEmpty(bdr)) {
+                        XSSFColor color = color(bdr);
+                        if (color != null) {
+                            shape.setLineStyleColor(color.getRGB()[0], color.getRGB()[1], color.getRGB()[2]);
+                        }
+                    }
+                    shape.setShapeType(ShapeTypes.LINE);
+                }
+            }
+            if (ObjectUtil.isNotEmpty(bd.getBl_tr()) && ObjectUtil.isNotEmpty(bd.getBl_tr().getCl())) {
+                int startRow = rowKey;
+                int startCol = colKey;
+                int endRow = rowKey + 1;
+                int endCol = colKey + 1;
+                if (range != null) {
+                    endRow = range.getEndRow() + 1;
+                    endCol = range.getEndColumn() + 1;
+                }
+                XSSFClientAnchor anchor = new XSSFClientAnchor();
+                anchor.setRow1(startRow);
+                anchor.setCol1(startCol);
+                anchor.setRow2(endRow);
+                anchor.setCol2(endCol);
+                XSSFSimpleShape shape = drawing.createSimpleShape(anchor);
+                StyleTypeEnum bdStyle = StyleTypeEnum.getStyle(bd.getBl_tr().getS());
+                if (ObjectUtil.isNotEmpty(bdStyle)) {
+                    shape.setShapeType(bdStyle.getBorderStyle().getCode());
+                }
+                String bdr = bd.getBl_tr().getCl().getRgb();
+                if (ObjectUtil.isNotEmpty(bdr)) {
+                    XSSFColor color = color(bdr);
+                    if (color != null) {
+                        shape.setLineStyleColor(color.getRGB()[0], color.getRGB()[1], color.getRGB()[2]);
+                    }
+                }
+                shape.setShapeType(ShapeTypes.LINE_INV);
+            }
+            if (ObjectUtil.isNotEmpty(bd.getBc_tr()) && ObjectUtil.isNotEmpty(bd.getBc_tr().getCl())) {
+                if (range != null) {
+                    int startRow = rowKey;
+                    int startCol = range.getStartColumn();
+                    int endRow = (rowKey + range.getEndRow() + 1) / 2;
+                    int endCol = range.getEndColumn() + 1;
+                    XSSFClientAnchor anchor = new XSSFClientAnchor();
+                    anchor.setRow1(startRow);
+                    anchor.setCol1(startCol);
+                    anchor.setRow2(endRow);
+                    anchor.setCol2(endCol);
+                    XSSFSimpleShape shape = drawing.createSimpleShape(anchor);
+                    StyleTypeEnum bdStyle = StyleTypeEnum.getStyle(bd.getBc_tr().getS());
+                    if (ObjectUtil.isNotEmpty(bdStyle)) {
+                        shape.setShapeType(bdStyle.getBorderStyle().getCode());
+                    }
+                    String bdr = bd.getBc_tr().getCl().getRgb();
+                    if (ObjectUtil.isNotEmpty(bdr)) {
+                        XSSFColor color = color(bdr);
+                        if (color != null) {
+                            shape.setLineStyleColor(color.getRGB()[0], color.getRGB()[1], color.getRGB()[2]);
+                        }
+                    }
+                    shape.setShapeType(ShapeTypes.LINE_INV);
+                }
+            }
+            if (ObjectUtil.isNotEmpty(bd.getMl_tr()) && ObjectUtil.isNotEmpty(bd.getMl_tr().getCl())) {
+                if (range != null) {
+                    int startRow = rowKey;
+                    int startCol = (colKey + range.getEndColumn() + 1) / 2;
+                    int endRow = range.getEndRow() + 1;
+                    int endCol = range.getEndColumn() + 1;
+                    XSSFClientAnchor anchor = new XSSFClientAnchor();
+                    anchor.setRow1(startRow);
+                    anchor.setCol1(startCol);
+                    anchor.setRow2(endRow);
+                    anchor.setCol2(endCol);
+                    XSSFSimpleShape shape = drawing.createSimpleShape(anchor);
+                    StyleTypeEnum bdStyle = StyleTypeEnum.getStyle(bd.getMl_tr().getS());
+                    if (ObjectUtil.isNotEmpty(bdStyle)) {
+                        shape.setShapeType(bdStyle.getBorderStyle().getCode());
+                    }
+                    String bdr = bd.getMl_tr().getCl().getRgb();
+                    if (ObjectUtil.isNotEmpty(bdr)) {
+                        XSSFColor color = color(bdr);
+                        if (color != null) {
+                            shape.setLineStyleColor(color.getRGB()[0], color.getRGB()[1], color.getRGB()[2]);
+                        }
+                    }
+                    shape.setShapeType(ShapeTypes.LINE_INV);
+                }
+            }
+        }
+    }
+
+    private static XSSFColor color(String rgbCole) {
+        byte[] rgb = null;
+        try {
+            Color color = new Color(Integer.parseInt(rgbCole.substring(1), 16));
+            rgb = new byte[]{(byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue()};
+        } catch (Exception e) {
+            try {
+                rgbCole = rgbCole.replaceAll("rgb\\(", "").replaceAll("\\)", "");
+                String[] split = rgbCole.split(",");
+                if (split.length >= 3) {
+                    int red = Integer.parseInt(split[0]);
+                    int green = Integer.parseInt(split[1]);
+                    int blue = Integer.parseInt(split[2]);
+                    rgb = new byte[]{(byte) red, (byte) green, (byte) blue};
+                }
+            } catch (Exception e1) {
+            }
+        }
+        XSSFColor xssfColor = rgb == null ? null : new XSSFColor(rgb, new DefaultIndexedColorMap());
+        return xssfColor;
+    }
+
+    private static void drawing(String sheetOrder, List<UniverResource> resources, List<UniverChartModel> chartList, XSSFDrawing drawing, XSSFWorkbook workbook) {
+        UniverResource univerResource = resources.stream().filter(t -> ResourceEnum.SHEET_DRAWING_PLUGIN.name().equals(t.getName())).findFirst().orElse(null);
+        Map<String, UniverResourceData> drawingMap = new HashMap<>();
+        if (ObjectUtil.isNotEmpty(univerResource) && ObjectUtil.isNotEmpty(univerResource.getData())) {
+            Map<String, Object> data = JsonUtil.stringToMap(univerResource.getData());
+            data.forEach((key, value) -> {
+                drawingMap.put(key, JsonUtil.getJsonToBean(value, UniverResourceData.class));
+            });
+        }
+        //导出图片
+        UniverResourceData resourceData = drawingMap.get(sheetOrder);
+        if (ObjectUtil.isNotEmpty(resourceData)) {
+            List<String> orderList = resourceData.getOrder();
+            Map<String, UniverDrawing> data = resourceData.getData();
+            for (String order : orderList) {
+                try {
+                    UniverDrawing univerDrawing = data.get(order);
+                    if (ObjectUtil.isNotEmpty(univerDrawing)) {
+                        String source = univerDrawing.getSource();
+                        String imageType = univerDrawing.getImageSourceType();
+                        byte[] bytes = null;
+                        if (Objects.equals(ImageEnum.BASE64.name(), imageType)) {
+                            String regex = "data:image/\\w+;base64,";
+                            String base64Img = source;
+                            Pattern pattern = Pattern.compile(regex);
+                            Matcher matcher = pattern.matcher(source);
+                            if (matcher.find()) {
+                                base64Img = source.replace(matcher.group(),"");
+                            }
+                            bytes = Base64.decode(base64Img);
+                        } else {
+                            if (source.startsWith(RequestType.HTTP)) {
+                                HttpRequest request = HttpRequest.of(source).method(Method.GET);
+                                bytes = request.execute().bodyBytes();
+                            } else {
+                                String[] split = source.split("=");
+                                String fileNameAll = DesUtil.aesDecode(split[split.length - 1]);
+                                String[] fileData = fileNameAll.split("#");
+                                String fileName = fileData.length > 1 ? fileData[1] : "";
+                                String type = fileData.length > 2 ? fileData[2] : "";
+                                String typePath = FilePathUtil.getFilePath(type.toLowerCase());
+                                bytes = FileUploadUtils.downloadFileByte(typePath, fileName, false);
+                            }
+                        }
+                        if (bytes != null && bytes.length > 0) {
+                            UniverTransform sheetTransform = univerDrawing.getSheetTransform();
+                            UniverOffset from = sheetTransform.getFrom();
+                            UniverOffset to = sheetTransform.getTo();
+                            //图片导出
+                            XSSFClientAnchor anchor = new XSSFClientAnchor();
+                            anchor.setRow1(from.getRow());
+                            anchor.setCol1(from.getColumn());
+
+                            anchor.setRow2(to.getRow());
+                            anchor.setCol2(to.getColumn());
+
+                            anchor.setAnchorType(ClientAnchor.AnchorType.DONT_MOVE_DO_RESIZE);
+                            int imageIndex = workbook.addPicture(bytes, Workbook.PICTURE_TYPE_PNG);
+                            drawing.createPicture(anchor, imageIndex);
+                        }
+                    }
+                } catch (Exception e) {
+                    log.error("图片导出失败:{}", e.getMessage());
+                }
+            }
+        }
+    }
+
+    private static void format(String sheetOrder, List<UniverResource> resources, XSSFSheet sheet) {
+        StylesTable styles = sheet.getWorkbook().getStylesSource();
+        UniverResource univerResource = resources.stream().filter(t -> ResourceEnum.SHEET_CONDITIONAL_FORMATTING_PLUGIN.name().equals(t.getName())).findFirst().orElse(null);
+        Map<String, List<UniverResourceData>> foramtMap = new HashMap<>();
+        if (ObjectUtil.isNotEmpty(univerResource) && ObjectUtil.isNotEmpty(univerResource.getData())) {
+            Map<String, Object> data = JsonUtil.stringToMap(univerResource.getData());
+            data.forEach((key, value) -> {
+                foramtMap.put(key, JsonUtil.getJsonToList(value, UniverResourceData.class));
+            });
+        }
+        List<UniverResourceData> data = foramtMap.get(sheetOrder) != null ? foramtMap.get(sheetOrder) : new ArrayList<>();
+        CTWorksheet ctWorksheet = sheet.getCTWorksheet();
+        List<CTConditionalFormatting> conditionalList = new ArrayList<>();
+        for (UniverResourceData resourceData : data) {
+            UniverRule rule = resourceData.getRule();
+            Boolean stopIfTrue = resourceData.getStopIfTrue();
+            List<UniverSheetRange> ranges = resourceData.getRanges();
+            if (ObjectUtil.isNotEmpty(rule)) {
+                List<CTCfRule> ruleList = new ArrayList<>();
+                List<UniverConfig> configList = new ArrayList<>();
+                Object ruleConfig = rule.getConfig();
+                if (ObjectUtil.isNotEmpty(ruleConfig)) {
+                    if (ruleConfig instanceof List) {
+                        configList.addAll(JsonUtil.getJsonToList(ruleConfig, UniverConfig.class));
+                    } else if (ruleConfig instanceof Map) {
+                        configList.add(JsonUtil.getJsonToBean(ruleConfig, UniverConfig.class));
+                    }
+                }
+                List<String> regions = new ArrayList<>();
+                for (UniverSheetRange range : ranges) {
+                    regions.add(new CellRangeAddress(range.getStartRow(), range.getEndRow(), range.getStartColumn(), range.getEndColumn()).formatAsString());
+                }
+                String type = rule.getType();
+                String subType = rule.getSubType();
+                Boolean showValue = rule.getIsShowValue();
+                String operator = rule.getOperator();
+                FormatTypeEnum formatTypeEnum = FormatTypeEnum.getFormat(type);
+                CTCfRule cfRule = CTCfRule.Factory.newInstance();
+                cfRule.setStopIfTrue(stopIfTrue);
+                STCfType.Enum typeEnum = STCfType.Enum.forString(type);
+                cfRule.setType(typeEnum);
+                switch (formatTypeEnum) {
+                    case colorScale:
+                        CTColorScale scale = cfRule.addNewColorScale();
+                        for (UniverConfig univerConfig : configList) {
+                            UniverValue univerValue = univerConfig.getValue();
+                            if (univerValue == null) {
+                                continue;
+                            }
+                            String valueType = univerValue.getType();
+                            String value = univerValue.getValue() != null ? univerValue.getValue().toString() : "";
+                            if (Objects.equals(SubTypeEnum.expression.getCode(), valueType)) {
+                                value = value.replace("=", "");
+                            }
+                            CTCfvo ctCfvo = scale.addNewCfvo();
+                            ctCfvo.setType(STCfvoType.Enum.forString(valueType));
+                            ctCfvo.setVal(value);
+                            XSSFColor color = color(univerConfig.getColor());
+                            if (color != null) {
+                                CTColor ctColor = scale.addNewColor();
+                                ctColor.setRgb(color.getRGB());
+                            }
+                        }
+                        ruleList.add(cfRule);
+                        break;
+                    case iconSet:
+                        CTIconSet icons = cfRule.addNewIconSet();
+                        icons.setShowValue(showValue);
+                        for (int i = configList.size() - 1; i >= 0; i--) {
+                            UniverConfig univerConfig = configList.get(i);
+                            UniverValue value = univerConfig.getValue();
+                            if (value == null) {
+                                continue;
+                            }
+                            String iconType = value.getType();
+                            String icon = univerConfig.getIconType();
+                            String valueOperator = univerConfig.getOperator();
+                            String iconValue = value.getValue() != null ? value.getValue().toString() : "";
+                            if (Objects.equals(SubTypeEnum.expression.getCode(), iconType)) {
+                                iconValue = iconValue.replace("=", "");
+                            }
+                            CTCfvo ctCfvo = icons.addNewCfvo();
+                            ctCfvo.setVal(iconValue);
+                            ctCfvo.setGte(Objects.equals(valueOperator, OperatorEnum.greaterThanOrEqual.name()));
+                            ctCfvo.setType(STCfvoType.Enum.forString(iconType));
+                            icons.setIconSet(STIconSetType.Enum.forString(icon));
+                        }
+                        boolean reverse = configList.size() > 0 && !Objects.equals(configList.get(0).getIconId(), "0");
+                        icons.setReverse(reverse);
+                        ruleList.add(cfRule);
+                        break;
+                    case dataBar:
+                        CTDataBar bar = cfRule.addNewDataBar();
+                        bar.setShowValue(showValue);
+                        for (UniverConfig config : configList) {
+                            UniverValue min = config.getMin();
+                            UniverValue max = config.getMax();
+                            if (min != null && max != null) {
+                                String minType = min.getType();
+                                String minValue = min.getValue() != null ? min.getValue().toString() : "";
+                                if (Objects.equals(SubTypeEnum.expression.getCode(), minType)) {
+                                    minValue = minValue.replace("=", "");
+                                }
+                                String maxType = max.getType();
+                                String maxValue = max.getValue() != null ? max.getValue().toString() : "";
+                                if (Objects.equals(SubTypeEnum.expression.getCode(), maxType)) {
+                                    maxValue = maxValue.replace("=", "");
+                                }
+                                List<String> dataBarType = ImmutableList.of(OperatorEnum.min.name(), OperatorEnum.max.name());
+                                for (int i = 0; i < dataBarType.size(); i++) {
+                                    String barType = i == 0 ? minType : maxType;
+                                    String barValue = i == 0 ? minValue : maxValue;
+                                    CTCfvo ctCfvo = bar.addNewCfvo();
+                                    ctCfvo.setType(STCfvoType.Enum.forString(barType));
+                                    ctCfvo.setVal(barValue);
+
+                                    XSSFColor positiveColor = color(config.getPositiveColor());
+                                    if (positiveColor != null) {
+                                        CTColor ctColor = bar.addNewColor();
+                                        ctColor.setRgb(positiveColor.getRGB());
+                                    }
+
+                                    XSSFColor nativeColor = color(config.getNativeColor());
+                                    if (nativeColor == null) {
+                                        CTColor ctColor = bar.addNewColor();
+                                        ctColor.setRgb(nativeColor.getRGB());
+                                    }
+                                }
+                            }
+                        }
+                        ruleList.add(cfRule);
+                        break;
+                    default:
+                        List<String> cell = ImmutableList.of(SubTypeEnum.cellIs.getCode(), SubTypeEnum.equal.getCode(), SubTypeEnum.notEqual.getCode());
+                        boolean isNumber = cell.contains(subType) || cell.contains(operator);
+                        //平均值
+                        boolean isAverage = Objects.equals(SubTypeEnum.aboveAverage.getCode(), subType);
+                        //TOP
+                        boolean isRank = Objects.equals(SubTypeEnum.top10.getCode(), subType);
+                        //公式
+                        boolean isFormula = Objects.equals(SubTypeEnum.expression.getCode(), subType);
+                        //日期
+                        boolean isTime = Objects.equals(SubTypeEnum.timePeriod.getCode(), subType);
+                        String ruleType = operator;
+                        if (isNumber) {
+                            ruleType = SubTypeEnum.cellIs.getType();
+                        } else if (isAverage) {
+                            ruleType = SubTypeEnum.aboveAverage.getType();
+                        } else if (isRank) {
+                            ruleType = SubTypeEnum.top10.getType();
+                        } else if (isFormula) {
+                            ruleType = SubTypeEnum.expression.getType();
+                        } else if (isTime) {
+                            ruleType = SubTypeEnum.timePeriod.getType();
+                        }
+                        if (StringUtil.isEmpty(ruleType)) {
+                            ruleType = subType;
+                        }
+                        Object value = rule.getValue();
+                        String data1 = null;
+                        String data2 = null;
+                        String text = null;
+                        Long rank = null;
+                        Boolean bottom = null;
+                        Boolean percent = null;
+                        if (value != null) {
+                            if (isNumber) {
+                                if (value instanceof List) {
+                                    List<Object> valueList = (List<Object>) value;
+                                    for (int i = 0; i < valueList.size(); i++) {
+                                        Object numberValu = valueList.get(i);
+                                        if (numberValu != null) {
+                                            if (i == 0) {
+                                                data1 = valueList.get(i).toString();
+                                            } else {
+                                                data2 = valueList.get(i).toString();
+                                            }
+                                        }
+                                    }
+                                } else {
+                                    data1 = value.toString();
+                                }
+                            } else if (isRank) {
+                                rank = Long.valueOf(value.toString());
+                                bottom = rule.getIsBottom();
+                                percent = rule.getIsPercent();
+                            } else if (isFormula) {
+                                data1 = value.toString().replace("=", "");
+                            } else {
+                                text = value.toString();
+                            }
+                        }
+                        cfRule.setType(STCfType.Enum.forString(ruleType));
+                        if (data1 != null) {
+                            cfRule.addFormula(data1);
+                        }
+                        if (data2 != null) {
+                            cfRule.addFormula(data2);
+                        }
+                        if (operator != null) {
+                            STConditionalFormattingOperator.Enum anOperator = STConditionalFormattingOperator.Enum.forString(operator);
+                            if (anOperator != null) {
+                                cfRule.setOperator(anOperator);
+                            }
+                            STTimePeriod.Enum timePeriod = STTimePeriod.Enum.forString(operator);
+                            if (timePeriod != null) {
+                                cfRule.setTimePeriod(timePeriod);
+                            }
+                        }
+                        if (text != null) {
+                            cfRule.setText(text);
+                        }
+                        if (rank != null) {
+                            cfRule.setRank(rank);
+                        }
+                        if (bottom != null) {
+                            cfRule.setBottom(bottom);
+                        }
+                        if (percent != null) {
+                            cfRule.setPercent(percent);
+                        }
+                        if (isAverage) {
+                            cfRule.setAboveAverage(Objects.equals(OperatorEnum.greaterThan.name(), operator));
+                        }
+                        UniverStyle style = rule.getStyle();
+                        if (style != null) {
+                            CTDxf ctDxf = CTDxf.Factory.newInstance();
+                            XSSFColor bgColor = color(style.getBg().getRgb() != null ? style.getBg().getRgb() : "");
+                            if (bgColor != null) {
+                                CTFill ctFill = CTFill.Factory.newInstance();
+                                CTPatternFill patternFill = CTPatternFill.Factory.newInstance();
+                                patternFill.setBgColor(bgColor.getCTColor());
+                                ctFill.setPatternFill(patternFill);
+                                ctDxf.setFill(ctFill);
+                            }
+
+                            CTFont ctFont = CTFont.Factory.newInstance();
+                            XSSFColor fontColor = color(style.getCl().getRgb() != null ? style.getCl().getRgb() : "");
+                            if (fontColor != null) {
+                                CTColor ctColor = fontColor.getCTColor();
+                                ctFont.setColorArray(new CTColor[]{ctColor});
+                            }
+                            CTUnderlineProperty underline = CTUnderlineProperty.Factory.newInstance();
+                            underline.setVal(style.getUl() != null && Objects.equals(style.getUl().getS(), 1) ? STUnderlineValues.SINGLE : STUnderlineValues.NONE);
+                            ctFont.setUArray(new CTUnderlineProperty[]{underline});
+
+                            CTBooleanProperty italic = CTBooleanProperty.Factory.newInstance();
+                            italic.setVal(Objects.equals(style.getIt(), 1));
+                            ctFont.setIArray(new CTBooleanProperty[]{italic});
+
+                            CTBooleanProperty bold = CTBooleanProperty.Factory.newInstance();
+                            bold.setVal(Objects.equals(style.getBl(), 1));
+                            ctFont.setBArray(new CTBooleanProperty[]{bold});
+
+                            UniverStyleTextDecoration st = style.getSt();
+                            CTBooleanProperty strike = CTBooleanProperty.Factory.newInstance();
+                            strike.setVal(st != null && Objects.equals(st.getS(), 1));
+                            ctFont.setStrikeArray(new CTBooleanProperty[]{strike});
+                            ctDxf.setFont(ctFont);
+                            int dxfId = styles.putDxf(ctDxf);
+                            cfRule.setDxfId(dxfId - 1);
+                        }
+                        ruleList.add(cfRule);
+                        break;
+                }
+                CTConditionalFormatting conditionalFormatting = ctWorksheet.addNewConditionalFormatting();
+                conditionalFormatting.setCfRuleArray(ruleList.toArray(new CTCfRule[ruleList.size()]));
+                conditionalFormatting.setSqref(regions);
+                conditionalList.add(conditionalFormatting);
+            }
+        }
+        ctWorksheet.setConditionalFormattingArray(conditionalList.toArray(new CTConditionalFormatting[conditionalList.size()]));
+    }
+
+    private static void dataValidation(String sheetOrder, List<UniverResource> resources, XSSFSheet sheet) {
+        UniverResource univerResource = resources.stream().filter(t -> ResourceEnum.SHEET_DATA_VALIDATION_PLUGIN.name().equals(t.getName())).findFirst().orElse(null);
+        Map<String, List<UniverResourceData>> dataValidationMap = new HashMap<>();
+        if (ObjectUtil.isNotEmpty(univerResource) && ObjectUtil.isNotEmpty(univerResource.getData())) {
+            Map<String, Object> data = JsonUtil.stringToMap(univerResource.getData());
+            data.forEach((key, value) -> {
+                dataValidationMap.put(key, JsonUtil.getJsonToList(value, UniverResourceData.class));
+            });
+        }
+        XSSFDataValidationHelper dataValidation = new XSSFDataValidationHelper(sheet);
+        List<UniverResourceData> data = dataValidationMap.get(sheetOrder) != null ? dataValidationMap.get(sheetOrder) : new ArrayList<>();
+        for (UniverResourceData resourceData : data) {
+            CellRangeAddressList addressList = new CellRangeAddressList();
+            for (UniverSheetRange range : resourceData.getRanges()) {
+                addressList.addCellRangeAddress(new CellRangeAddress(range.getStartRow(), range.getEndRow(), range.getStartColumn(), range.getEndColumn()));
+            }
+            String formula1 = resourceData.getFormula1() != null ? resourceData.getFormula1() : "";
+            String formula2 = resourceData.getFormula2() != null ? resourceData.getFormula2() : "";
+            ValidationType validationType = ValidationType.getValidationType(resourceData.getType());
+            String value1 = Objects.equals(validationType, ValidationType.checkbox) ? formula1 + "," + formula2 : formula1;
+            String value2 = formula2;
+            operatorTypeEnum operator = operatorTypeEnum.getOperator(resourceData.getOperator());
+            XSSFDataValidationConstraint constraint = new XSSFDataValidationConstraint(validationType.getValidationType(), operator.getOperator(), value1, value2);
+            constraint.setExplicitListValues(value1.split(","));
+            DataValidation validation = dataValidation.createValidation(constraint, addressList);
+            validation.setErrorStyle(resourceData.getErrorStyle() != null ? 0 : 1);
+            validation.setEmptyCellAllowed(resourceData.getAllowBlank() != null ? resourceData.getAllowBlank() : true);
+            if (resourceData.getError() != null) {
+                validation.createErrorBox(resourceData.getError(), "");
+            }
+            if (resourceData.getRenderMode() != null) {
+                validation.setSuppressDropDownArrow(!Objects.equals(resourceData.getRenderMode(), 0));
+            }
+            validation.setShowErrorBox(resourceData.getShowErrorMessage() != null ? resourceData.getShowErrorMessage() : false);
+            sheet.addValidationData(validation);
+        }
+    }
+
+    private static void filter(String sheetOrder, List<UniverResource> resources, XSSFSheet sheet) {
+        UniverResource univerResource = resources.stream().filter(t -> ResourceEnum.SHEET_FILTER_PLUGIN.name().equals(t.getName())).findFirst().orElse(null);
+        Map<String, UniverResourceData> filterMap = new HashMap<>();
+        if (ObjectUtil.isNotEmpty(univerResource) && ObjectUtil.isNotEmpty(univerResource.getData())) {
+            Map<String, Object> data = JsonUtil.stringToMap(univerResource.getData());
+            data.forEach((key, value) -> {
+                filterMap.put(key, JsonUtil.getJsonToBean(value, UniverResourceData.class));
+            });
+        }
+        UniverResourceData data = filterMap.get(sheetOrder) != null ? filterMap.get(sheetOrder) : new UniverResourceData();
+        UniverSheetRange ref = data.getRef();
+        if (ref != null) {
+            sheet.setAutoFilter(new CellRangeAddress(ref.getStartRow(), ref.getEndRow(), ref.getStartColumn(), ref.getEndColumn()));
+            List<CTFilterColumn> filterColumns = new ArrayList<>();
+            CTAutoFilter autoFilter = sheet.getCTWorksheet().getAutoFilter();
+            for (UniverFilters filters : data.getFilterColumns()) {
+                Long colId = filters.getColId();
+                UniverCustomFilters customFilters = filters.getCustomFilters();
+                //poi方法
+                CTFilterColumn column = autoFilter.addNewFilterColumn();
+                column.setColId(colId);
+                CTCustomFilters ctCustomFilters = column.addNewCustomFilters();
+                ctCustomFilters.setAnd(Objects.equals(customFilters.getAnd(), 1));
+                for (UniverCustomFilters customFilter : customFilters.getCustomFilters()) {
+                    CTCustomFilter ctCustomFilter = ctCustomFilters.addNewCustomFilter();
+                    String val = customFilter.getVal();
+                    if (val != null) {
+                        ctCustomFilter.setVal(val);
+                    }
+                    String operator = customFilter.getOperator();
+                    if (operator != null) {
+                        ctCustomFilter.setOperator(STFilterOperator.Enum.forString(operator));
+                    }
+                }
+                filterColumns.add(column);
+            }
+            //筛选隐藏
+            List<Integer> cachedFilteredOut = data.getCachedFilteredOut();
+            for (Integer rowIndex : cachedFilteredOut) {
+                XSSFRow row = sheet.getRow(rowIndex);
+                row.setZeroHeight(true);
+            }
+            autoFilter.setFilterColumnArray(filterColumns.toArray(new CTFilterColumn[filterColumns.size()]));
+        }
+    }
+
+}

+ 16 - 0
jnpf-datareport-univer-common/src/main/java/jnpf/util/excel/ExcelParser.java

@@ -0,0 +1,16 @@
+package jnpf.util.excel;
+
+import jnpf.univer.model.UniverWorkBook;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/9/30 下午3:10
+ */
+public abstract class ExcelParser {
+    public abstract UniverWorkBook formFile(InputStream inputStream) throws IOException;
+}

+ 567 - 0
jnpf-datareport-univer-common/src/main/java/jnpf/util/excel/UniverHSSFExcel.java

@@ -0,0 +1,567 @@
+package jnpf.util.excel;
+
+import cn.hutool.core.img.ImgUtil;
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.RandomUtil;
+import cn.hutool.json.JSONUtil;
+import com.google.common.collect.ImmutableList;
+import jnpf.enums.*;
+import jnpf.univer.data.resource.*;
+import jnpf.univer.model.UniverWorkBook;
+import jnpf.univer.resources.UniverResource;
+import jnpf.univer.resources.UniverResourceData;
+import jnpf.univer.sheet.*;
+import jnpf.univer.style.*;
+import org.apache.poi.hssf.model.HSSFFormulaParser;
+import org.apache.poi.hssf.model.InternalWorkbook;
+import org.apache.poi.hssf.record.NameRecord;
+import org.apache.poi.hssf.usermodel.*;
+import org.apache.poi.hssf.util.HSSFColor;
+import org.apache.poi.ss.formula.ptg.Ptg;
+import org.apache.poi.ss.usermodel.CellType;
+import org.apache.poi.ss.usermodel.FillPatternType;
+import org.apache.poi.ss.usermodel.Font;
+import org.apache.poi.ss.util.CellRangeAddress;
+import org.apache.poi.ss.util.CellRangeAddressList;
+import org.apache.poi.ss.util.PaneInformation;
+
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.*;
+import java.util.stream.Collectors;
+
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/6/20 下午4:30
+ */
+public class UniverHSSFExcel extends ExcelParser {
+
+    @Override
+    public UniverWorkBook formFile(InputStream inputStream) throws IOException {
+        HSSFWorkbook workbook = new HSSFWorkbook(inputStream);
+        UniverWorkBook univerWorkBook = new UniverWorkBook();
+        String unitId = RandomUtil.randomString(10);
+        univerWorkBook.setId(unitId);
+        univerWorkBook.setName("");
+        Map<UniverStyle, String> styleMap = new HashMap<>();
+        Map<String, UniverSheet> sheets = new HashMap<>();
+        List<String> sheetOrder = new ArrayList<>();
+        Map<String, UniverResourceData> drawingMap = new HashMap<>();
+        Map<String, List<UniverResourceData>> formattingMap = new HashMap<>();
+        Map<String, List<UniverResourceData>> dataValidationMap = new HashMap<>();
+        for (int i = 0; i < workbook.getNumberOfSheets(); i++) {
+            String sheetId = RandomUtil.randomString(10);
+            sheetOrder.add(sheetId);
+            HSSFSheet sheet = workbook.getSheetAt(i);
+            UniverSheet univerSheet = new UniverSheet();
+            univerSheet.setId(sheetId);
+            univerSheet.setName(sheet.getSheetName());
+            univerSheet.setHidden(!workbook.isSheetHidden(i) ? 0 : 1);
+            univerSheet.setTabColor("");
+
+            //冻结位置
+            UniverSheetFreeze sheetFreeze = new UniverSheetFreeze();
+            PaneInformation freeze = sheet.getPaneInformation();
+            if (freeze != null) {
+                int freezeColumn = freeze.getVerticalSplitLeftColumn();
+                int freezeRow = freeze.getHorizontalSplitTopRow();
+                if (freezeColumn > 0) {
+                    sheetFreeze.setStartColumn(freezeColumn);
+                    sheetFreeze.setXSplit(freezeColumn);
+                }
+                if (freezeRow > 0) {
+                    sheetFreeze.setStartRow(freezeRow);
+                    sheetFreeze.setYSplit(freezeRow);
+                }
+            }
+            univerSheet.setFreeze(sheetFreeze);
+
+            Map<Integer, UniverSheetRowData> rowData = new HashMap<>();
+            Map<Integer, UniverSheetColumnData> columnData = new HashMap<>();
+            Map<Integer, Map<Integer, UniverSheetCellData>> cellData = new HashMap<>();
+            for (int rowCount = 0; rowCount <= sheet.getLastRowNum(); rowCount++) {
+                HSSFRow row = sheet.getRow(rowCount);
+                Map<Integer, UniverSheetCellData> cells = new HashMap<>();
+                if (null != row) {
+                    for (int columnCount = 0; columnCount <= row.getLastCellNum(); columnCount++) {
+                        HSSFCell cell = row.getCell(columnCount);
+                        UniverSheetCellData univerSheetCellData = new UniverSheetCellData();
+                        if (null != cell) {
+                            //数据
+                            Object value = "";
+                            String formula = null;
+                            CellType cellType = cell.getCellType();
+                            Integer type = null;
+                            switch (cellType) {
+                                case STRING:
+                                    value = cell.getStringCellValue();
+                                    type = 1;
+                                    break;
+                                case BOOLEAN:
+                                    value = cell.getBooleanCellValue();
+                                    type = 3;
+                                    break;
+                                case NUMERIC:
+                                    value = cell.getNumericCellValue();
+                                    type = 2;
+                                    break;
+                                case FORMULA:
+                                    value = cell.getCellFormula();
+                                    formula = "=" + value;
+                                    type = 4;
+                                    break;
+                            }
+                            univerSheetCellData.setV(value);
+                            univerSheetCellData.setF(formula);
+                            univerSheetCellData.setT(type);
+                            //样式
+                            HSSFCellStyle cellStyle = cell.getCellStyle();
+                            UniverStyle style = getUniverStyle(cellStyle, workbook);
+                            String styleName = styleMap.get(style) != null ? styleMap.get(style) : RandomUtil.randomString(6);
+                            if (styleMap.get(style) == null) {
+                                styleMap.put(style, styleName);
+                            }
+                            univerSheetCellData.setS(styleName);
+                            cells.put(columnCount, univerSheetCellData);
+                            UniverSheetColumnData univerSheetColumnData = new UniverSheetColumnData();
+                            univerSheetColumnData.setHd(!sheet.isColumnHidden(columnCount) ? 0 : 1);
+                            List<Integer> colHeight = new ArrayList<>();
+                            colHeight.add(100);
+                            colHeight.add((int) sheet.getColumnWidthInPixels(columnCount));
+                            univerSheetColumnData.setW(Collections.max(colHeight));
+                            columnData.put(columnCount, univerSheetColumnData);
+                        }
+                    }
+                    cellData.put(rowCount, cells);
+                    UniverSheetRowData univerSheetRowData = new UniverSheetRowData();
+                    univerSheetRowData.setHd(!row.getZeroHeight() ? 0 : 1);
+                    List<Integer> rowHeight = new ArrayList<>();
+                    rowHeight.add(50);
+                    rowHeight.add((int) row.getHeightInPoints());
+                    univerSheetRowData.setH(Collections.max(rowHeight));
+                    univerSheetRowData.setIa(0);
+                    rowData.put(rowCount, univerSheetRowData);
+                }
+            }
+            univerSheet.setCellData(cellData);
+            univerSheet.setRowData(rowData);
+            univerSheet.setColumnData(columnData);
+
+            List<UniverSheetRange> mergeData = new ArrayList<>();
+            for (CellRangeAddress region : sheet.getMergedRegions()) {
+                UniverSheetRange univerSheetRange = new UniverSheetRange();
+                univerSheetRange.setStartRow(region.getFirstRow());
+                univerSheetRange.setStartColumn(region.getFirstColumn());
+                univerSheetRange.setEndRow(region.getLastRow());
+                univerSheetRange.setEndColumn(region.getLastColumn());
+                mergeData.add(univerSheetRange);
+            }
+            univerSheet.setMergeData(mergeData);
+
+            //图片
+            drawing(sheet, sheetId, unitId, drawingMap);
+            //条件
+            format(sheet, sheetId, unitId, formattingMap);
+            //数据管理
+            dataValidation(sheet, sheetId, unitId, dataValidationMap);
+
+            UniverSheetRowHeader univerSheetRowHeader = new UniverSheetRowHeader();
+            univerSheetRowHeader.setHidden(0);
+            univerSheetRowHeader.setWidth(46);
+            univerSheet.setRowHeader(univerSheetRowHeader);
+
+            UniverSheetColumnHeader univerSheetColumnHeader = new UniverSheetColumnHeader();
+            univerSheetColumnHeader.setHidden(0);
+            univerSheetColumnHeader.setHeight(20);
+            univerSheet.setColumnHeader(univerSheetColumnHeader);
+
+            univerSheet.setZoomRatio(1);
+            univerSheet.setScrollTop(0);
+            univerSheet.setScrollLeft(0);
+            univerSheet.setDefaultColumnWidth(88);
+            univerSheet.setDefaultRowHeight(24);
+            List<Integer> rowCount = new ArrayList<>();
+            rowCount.add(100);
+            rowCount.add(rowData.size());
+            univerSheet.setRowCount(Collections.max(rowCount));
+            List<Integer> columnCount = new ArrayList<>();
+            columnCount.add(30);
+            columnCount.add(columnData.size());
+            univerSheet.setColumnCount(Collections.max(columnCount));
+            univerSheet.setShowGridlines(sheet.isDisplayGridlines() ? 1 : 0);
+
+            univerSheet.setSelections(ImmutableList.of("A1"));
+            univerSheet.setRightToLeft(0);
+            sheets.put(sheetId, univerSheet);
+        }
+
+        Map<String, UniverStyle> styles = styleMap.entrySet().stream().collect(Collectors.toMap(t -> t.getValue(), t -> t.getKey()));
+        univerWorkBook.setStyles(styles);
+        univerWorkBook.setSheetOrder(sheetOrder);
+        univerWorkBook.setSheets(sheets);
+        Map<String, String> resourceMap = new HashMap<>();
+        resourceMap.put(ResourceEnum.SHEET_DRAWING_PLUGIN.name(), JSONUtil.toJsonStr(drawingMap));
+        resourceMap.put(ResourceEnum.SHEET_CONDITIONAL_FORMATTING_PLUGIN.name(), JSONUtil.toJsonStr(formattingMap));
+        resourceMap.put(ResourceEnum.SHEET_DATA_VALIDATION_PLUGIN.name(), JSONUtil.toJsonStr(dataValidationMap));
+        univerWorkBook.setResources(getUniverResources(resourceMap));
+        return univerWorkBook;
+    }
+
+    private UniverStyle getUniverStyle(HSSFCellStyle cellStyle, HSSFWorkbook workbook) {
+        UniverStyle univerStyle = new UniverStyle();
+        univerStyle.setHt(HorizontalEnum.getHorizontalCode(cellStyle.getAlignment()));
+        univerStyle.setVt(VerticalEnum.getVerticalCode(cellStyle.getVerticalAlignment()));
+
+        HSSFFont font = cellStyle.getFont(workbook);
+        if (null != font) {
+            univerStyle.setFf(font.getFontName());
+            univerStyle.setFs((int) font.getFontHeightInPoints());
+            univerStyle.setIt(font.getItalic() ? 1 : 0);
+            univerStyle.setBl(font.getBold() ? 1 : 0);
+            HSSFColor color = font.getHSSFColor(workbook);
+            if (null != color) {
+                UniverStyleColor cl = new UniverStyleColor();
+                cl.setRgb(rgb(color.getTriplet()));
+                univerStyle.setCl(cl);
+            }
+            if (Objects.equals(font.getUnderline(), Font.U_SINGLE)) {
+                UniverStyleTextDecoration ul = new UniverStyleTextDecoration();
+                ul.setS(1);
+                univerStyle.setUl(ul);
+            }
+            if (font.getStrikeout()) {
+                UniverStyleTextDecoration st = new UniverStyleTextDecoration();
+                st.setS(1);
+                univerStyle.setSt(st);
+            }
+        }
+        if (null != cellStyle.getDataFormatString()) {
+            UniverStylePattern pattern = new UniverStylePattern();
+            pattern.setPattern(cellStyle.getDataFormatString());
+            univerStyle.setN(pattern);
+        }
+        univerStyle.setBd(getUniverStyleBorder(cellStyle, workbook));
+
+        HSSFColor bgColor = cellStyle.getFillForegroundColorColor();
+        FillPatternType pattern = cellStyle.getFillPattern();
+        if (null != bgColor && Objects.equals(pattern, FillPatternType.SOLID_FOREGROUND)) {
+            UniverStyleColor background = new UniverStyleColor();
+            background.setRgb(rgb(bgColor.getTriplet()));
+            univerStyle.setBg(background);
+        }
+
+        UniverStyleTextRotation univerStyleTextRotation = new UniverStyleTextRotation();
+        univerStyleTextRotation.setA(cellStyle.getRotation());
+        univerStyle.setTr(univerStyleTextRotation);
+        return univerStyle;
+    }
+
+    private String rgb(short[] color) {
+        String rgb = null;
+        if (null != color && color.length == 3) {
+            rgb = String.format("#%02X%02X%02X", color[0], color[1], color[2]);
+        }
+        return rgb;
+    }
+
+    private String rgb(byte[] color) {
+        String rgb = null;
+        if (ObjectUtil.isNotEmpty(color)) {
+            rgb = String.format("#%02X%02X%02X", color[0], color[1], color[2]);
+        }
+        return rgb;
+    }
+
+    private UniverStyleBorder getUniverStyleBorder(HSSFCellStyle cellStyle, HSSFWorkbook workbook) {
+        UniverStyleBorder univerStyleBorder = new UniverStyleBorder();
+        int num = 0;
+        HSSFPalette palette = workbook.getCustomPalette();
+        HSSFColor leftBorder = palette.getColor(cellStyle.getLeftBorderColor());
+        if (null != leftBorder) {
+            UniverStyleBorderStyle left = new UniverStyleBorderStyle();
+            UniverStyleColor leftColor = new UniverStyleColor();
+            leftColor.setRgb(rgb(leftBorder.getTriplet()));
+            left.setCl(leftColor);
+            univerStyleBorder.setL(left);
+            num++;
+        }
+        HSSFColor topBorder = palette.getColor(cellStyle.getTopBorderColor());
+        if (null != topBorder) {
+            UniverStyleBorderStyle top = new UniverStyleBorderStyle();
+            UniverStyleColor topColor = new UniverStyleColor();
+            topColor.setRgb(rgb(topBorder.getTriplet()));
+            top.setCl(topColor);
+            univerStyleBorder.setT(top);
+            num++;
+        }
+        HSSFColor rightBorder = palette.getColor(cellStyle.getRightBorderColor());
+        if (null != rightBorder) {
+            UniverStyleBorderStyle right = new UniverStyleBorderStyle();
+            UniverStyleColor rightColor = new UniverStyleColor();
+            rightColor.setRgb(rgb(rightBorder.getTriplet()));
+            right.setCl(rightColor);
+            univerStyleBorder.setR(right);
+            num++;
+        }
+        HSSFColor bottomBorder = palette.getColor(cellStyle.getBottomBorderColor());
+        if (null != bottomBorder) {
+            UniverStyleBorderStyle bottom = new UniverStyleBorderStyle();
+            UniverStyleColor bottomColor = new UniverStyleColor();
+            bottomColor.setRgb(rgb(bottomBorder.getTriplet()));
+            bottom.setCl(bottomColor);
+            univerStyleBorder.setB(bottom);
+            num++;
+        }
+        return num > 0 ? univerStyleBorder : null;
+    }
+
+    private List<UniverResource> getUniverResources(Map<String, String> resourceMap) {
+        List<UniverResource> resourcesList = new ArrayList<>();
+        for (ResourceEnum resource : ResourceEnum.values()) {
+            UniverResource model = new UniverResource();
+            String name = resource.name();
+            model.setName(name);
+            model.setData(resourceMap.get(name) != null ? resourceMap.get(name) : "{}");
+            resourcesList.add(model);
+        }
+        return resourcesList;
+    }
+
+    private void drawing(HSSFSheet sheet, String sheetId, String unitId, Map<String, UniverResourceData> drawingMap) {
+        List<String> order = new ArrayList<>();
+        Map<String, UniverDrawing> data = new HashMap<>();
+        HSSFPatriarch drawing = sheet.getDrawingPatriarch();
+        if (drawing != null) {
+            List<HSSFShape> shapes = drawing.getChildren();
+            for (HSSFShape shape : shapes) {
+                if (shape instanceof HSSFPicture) {
+                    HSSFPicture picture = (HSSFPicture) shape;
+                    byte[] pictureData = picture.getPictureData().getData();
+                    if (pictureData.length > 0) {
+                        String drawingId = RandomUtil.randomString(10);
+                        order.add(drawingId);
+                        BufferedImage image = ImgUtil.toImage(pictureData);
+                        UniverTransform sheetTransform = new UniverTransform();
+                        HSSFClientAnchor anchor = picture.getClientAnchor();
+                        UniverOffset univerFrom = new UniverOffset();
+                        univerFrom.setRow(anchor.getRow1());
+                        univerFrom.setColumn((int) anchor.getCol1());
+                        sheetTransform.setFrom(univerFrom);
+                        UniverOffset univerTo = new UniverOffset();
+                        univerTo.setRow(anchor.getRow2());
+                        univerTo.setColumn((int) anchor.getCol2());
+                        sheetTransform.setTo(univerTo);
+                        UniverDrawing univerDrawing = new UniverDrawing();
+                        univerDrawing.setSheetTransform(sheetTransform);
+                        univerDrawing.setDrawingType(0);
+                        univerDrawing.setUnitId(unitId);
+                        univerDrawing.setSubUnitId(sheetId);
+                        univerDrawing.setDrawingId(drawingId);
+                        univerDrawing.setImageSourceType(ImageEnum.BASE64.name());
+                        univerDrawing.setSource("data:image/jpeg;base64," + ImgUtil.toBase64(image, "jpeg"));
+                        data.put(drawingId, univerDrawing);
+                    }
+                }
+            }
+        }
+        if (!order.isEmpty()) {
+            UniverResourceData resourceData = new UniverResourceData();
+            resourceData.setData(data);
+            resourceData.setOrder(order);
+            drawingMap.put(sheetId, resourceData);
+        }
+    }
+
+    private void format(HSSFSheet sheet, String sheetId, String unitId, Map<String, List<UniverResourceData>> formattingMap) {
+        //todo 提供色阶、数据条、色阶方法,其他方法获取的数据有问题
+        List<UniverResourceData> formatList = new ArrayList<>();
+        HSSFSheetConditionalFormatting formatting = sheet.getSheetConditionalFormatting();
+        if (null != formatting) {
+            for (int i = 0; i < formatting.getNumConditionalFormattings(); i++) {
+                HSSFConditionalFormatting format = formatting.getConditionalFormattingAt(i);
+                UniverResourceData resourceData = new UniverResourceData();
+                resourceData.setCfId(RandomUtil.randomString(10));
+                CellRangeAddress[] formattingRanges = format.getFormattingRanges();
+                List<UniverSheetRange> ranges = new ArrayList<>();
+                resourceData.setRanges(ranges);
+                for (CellRangeAddress rangeAddress : formattingRanges) {
+                    UniverSheetRange range = new UniverSheetRange();
+                    range.setStartRow(rangeAddress.getFirstRow());
+                    range.setStartColumn(rangeAddress.getFirstColumn());
+                    range.setEndRow(rangeAddress.getLastRow());
+                    range.setEndColumn(rangeAddress.getLastColumn());
+                    range.setUnitId(unitId);
+                    range.setSheetId(sheetId);
+                    ranges.add(range);
+                }
+                for (int num = 0; num < format.getNumberOfRules(); num++) {
+                    HSSFConditionalFormattingRule formatRule = format.getRule(num);
+                    HSSFIconMultiStateFormatting iconSet = formatRule.getMultiStateFormatting();
+                    if (iconSet != null) {
+                        boolean reverse = iconSet.isReversed();
+                        UniverRule rule = new UniverRule();
+                        List<UniverConfig> univerConfig = new ArrayList<>();
+                        rule.setType(FormatTypeEnum.iconSet.name());
+                        rule.setConfig(univerConfig);
+                        //显示数据条没有属性
+                        rule.setIsShowValue(false);
+                        String iconType = iconSet.getIconSet().name;
+                        HSSFConditionalFormattingThreshold[] cfvoList = iconSet.getThresholds();
+                        int iconId = 0;
+                        for (int k = cfvoList.length - 1; k >= 0; k--) {
+                            HSSFConditionalFormattingThreshold cfvo = cfvoList[k];
+                            UniverValue value = new UniverValue();
+                            String type = cfvo.getRangeType().name;
+                            String val = Objects.equals(SubTypeEnum.expression.getCode(), type) ? "=" + cfvo.getFormula().replaceAll("\"","") : cfvo.getValue() + "";
+                            value.setValue(val);
+                            value.setType(type);
+                            UniverConfig config = new UniverConfig();
+                            config.setOperator(OperatorEnum.greaterThan.name());
+                            config.setIconId((reverse ? k : iconId) + "");
+                            config.setIconType(iconType);
+                            config.setValue(value);
+                            univerConfig.add(config);
+                            iconId++;
+                        }
+                        resourceData.setRule(rule);
+                    }
+
+                    HSSFDataBarFormatting dataBar = formatRule.getDataBarFormatting();
+                    if (dataBar != null) {
+                        UniverRule rule = new UniverRule();
+                        UniverConfig config = new UniverConfig();
+                        rule.setConfig(config);
+                        rule.setType(FormatTypeEnum.dataBar.name());
+                        //显示数据条没有属性
+                        rule.setIsShowValue(false);
+                        HSSFConditionalFormattingThreshold minThreshold = dataBar.getMinThreshold();
+                        UniverValue min = new UniverValue();
+                        min.setType(minThreshold.getRangeType().name);
+                        min.setValue(Objects.equals(SubTypeEnum.expression.getCode(), min.getType()) ? "=" + minThreshold.getFormula().replaceAll("\"","") : minThreshold.getValue() + "");
+                        config.setMin(min);
+                        HSSFConditionalFormattingThreshold maxThreshold = dataBar.getMaxThreshold();
+                        UniverValue max = new UniverValue();
+                        max.setType(maxThreshold.getRangeType().name);
+                        max.setValue(Objects.equals(SubTypeEnum.expression.getCode(), max.getType()) ? "=" + maxThreshold.getFormula().replaceAll("\"","") : maxThreshold.getValue() + "");
+                        config.setMax(max);
+                        config.setIsGradient(true);
+                        byte[] rgb = dataBar.getColor().getRGB();
+                        config.setPositiveColor(rgb(rgb));
+                        config.setNativeColor(rgb(rgb));
+                        resourceData.setRule(rule);
+                    }
+
+                    HSSFColorScaleFormatting colorScale = formatRule.getColorScaleFormatting();
+                    if (colorScale != null) {
+                        UniverRule rule = new UniverRule();
+                        List<UniverConfig> univerConfig = new ArrayList<>();
+                        rule.setType(FormatTypeEnum.colorScale.name());
+                        rule.setConfig(univerConfig);
+                        Map<Integer, UniverValue> colorValue = new HashMap<>();
+                        HSSFConditionalFormattingThreshold[] cfvoList = colorScale.getThresholds();
+                        for (int k = 0; k < cfvoList.length; k++) {
+                            HSSFConditionalFormattingThreshold cfvo = cfvoList[k];
+                            UniverValue value = new UniverValue();
+                            String type = cfvo.getRangeType().name;
+                            String val = Objects.equals(SubTypeEnum.expression.getCode(), type) ? "=" + cfvo.getFormula().replaceAll("\"","") : cfvo.getValue() + "";
+                            value.setType(type);
+                            value.setValue(val);
+                            colorValue.put(k, value);
+                        }
+                        HSSFExtendedColor[] colorList = colorScale.getColors();
+                        Map<Integer, String> colorColor = new HashMap<>();
+                        for (int k = 0; k < colorList.length; k++) {
+                            HSSFExtendedColor ctColor = colorList[k];
+                            colorColor.put(k, rgb(ctColor.getRGB()));
+                        }
+                        for (Integer k : colorValue.keySet()) {
+                            UniverConfig config = new UniverConfig();
+                            config.setValue(colorValue.get(k));
+                            config.setColor(colorColor.get(k));
+                            config.setIndex(k);
+                            univerConfig.add(config);
+                        }
+                        resourceData.setRule(rule);
+                    }
+
+                    resourceData.setStopIfTrue(formatRule.getStopIfTrue());
+                    if (resourceData.getRule() == null) {
+                        continue;
+                    }
+                    formatList.add(resourceData);
+                }
+            }
+        }
+        formattingMap.put(sheetId, formatList);
+    }
+
+    private void filter(HSSFSheet sheet, String sheetId, String unitId, Map<String, UniverResourceData> filterMap) {
+        //todo 只有获取筛选的格子,没有提供筛选的内容
+        int sheetIndex = sheet.getWorkbook().getSheetIndex(sheet) + 1;
+        UniverResourceData data = new UniverResourceData();
+        InternalWorkbook workbook = sheet.getWorkbook().getWorkbook();
+        if (workbook != null) {
+            NameRecord name = workbook.getSpecificBuiltinRecord((byte) 13, sheetIndex);
+            if (name != null) {
+                Ptg[] nameDefinition = name.getNameDefinition();
+                String formulaString = HSSFFormulaParser.toFormulaString(sheet.getWorkbook(), nameDefinition);
+                CellRangeAddress addresses = CellRangeAddress.valueOf(formulaString);
+                UniverSheetRange ref = new UniverSheetRange();
+                ref.setStartRow(addresses.getFirstRow());
+                ref.setStartColumn(addresses.getFirstColumn());
+                ref.setEndRow(addresses.getLastRow());
+                ref.setEndColumn(addresses.getLastColumn());
+                data.setRef(ref);
+                List<UniverFilters> filterColumns = new ArrayList();
+                data.setFilterColumns(filterColumns);
+                List<Integer> cachedFilteredOut = new ArrayList<>();
+                data.setCachedFilteredOut(cachedFilteredOut);
+                filterMap.put(sheetId, data);
+            }
+        }
+    }
+
+    private static void dataValidation(HSSFSheet sheet, String sheetId, String unitId, Map<String, List<UniverResourceData>> dataValidationMap) {
+        List<UniverResourceData> dataValidationList = new ArrayList<>();
+        List<HSSFDataValidation> dataValidations = sheet.getDataValidations();
+        for (HSSFDataValidation dataValidation : dataValidations) {
+            UniverResourceData resourceData = new UniverResourceData();
+            List<UniverSheetRange> ranges = new ArrayList<>();
+            resourceData.setRanges(ranges);
+            resourceData.setUid(RandomUtil.randomString(10));
+            CellRangeAddressList addressList = dataValidation.getRegions();
+            for (CellRangeAddress address : addressList.getGenericChildren()) {
+                UniverSheetRange sheetRange = new UniverSheetRange();
+                sheetRange.setStartRow(address.getFirstRow());
+                sheetRange.setStartColumn(address.getFirstColumn());
+                sheetRange.setEndRow(address.getLastRow());
+                sheetRange.setEndColumn(address.getLastColumn());
+                sheetRange.setSheetId(sheetId);
+                sheetRange.setUnitId(unitId);
+                ranges.add(sheetRange);
+            }
+            DVConstraint constraint = (DVConstraint) dataValidation.getValidationConstraint();
+            ValidationType validationType = ValidationType.getType(constraint.getValidationType());
+            resourceData.setType(validationType.getType());
+            operatorTypeEnum operator = Objects.equals(validationType, ValidationType.none) ? null : operatorTypeEnum.getOperator(constraint.getOperator());
+            resourceData.setOperator(operator != null ? operator.getOperatorType() : null);
+            String value1 = constraint.getValue1() != null ? constraint.getValue1().toString() : constraint.getFormula1();
+            String value2 = constraint.getValue2() != null ? constraint.getValue2().toString() : constraint.getFormula2();
+            resourceData.setFormula1(value1 != null ? value1.replaceAll("\"", "") : value1);
+            resourceData.setFormula2(value2 != null ? value2.replaceAll("\"", "") : value2);
+            if (dataValidation.getShowErrorBox()) {
+                resourceData.setShowErrorMessage(true);
+                resourceData.setError(dataValidation.getErrorBoxTitle());
+                resourceData.setErrorStyle(Objects.equals(dataValidation.getErrorStyle(), 0) ? 1 : 2);
+            }
+            resourceData.setAllowBlank(dataValidation.getEmptyCellAllowed());
+            resourceData.setRenderMode(dataValidation.getSuppressDropDownArrow() ? null : 0);
+            dataValidationList.add(resourceData);
+        }
+        dataValidationMap.put(sheetId, dataValidationList);
+    }
+}

+ 692 - 0
jnpf-datareport-univer-common/src/main/java/jnpf/util/excel/UniverXSSFExcel.java

@@ -0,0 +1,692 @@
+package jnpf.util.excel;
+
+import cn.hutool.core.img.ImgUtil;
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.RandomUtil;
+import cn.hutool.json.JSONUtil;
+import com.google.common.collect.ImmutableList;
+import jnpf.enums.*;
+import jnpf.univer.data.resource.*;
+import jnpf.univer.model.UniverWorkBook;
+import jnpf.univer.resources.UniverResource;
+import jnpf.univer.resources.UniverResourceData;
+import jnpf.univer.sheet.*;
+import jnpf.univer.style.*;
+import jnpf.util.StringUtil;
+import org.apache.poi.ss.usermodel.CellType;
+import org.apache.poi.ss.usermodel.DataValidationConstraint;
+import org.apache.poi.ss.usermodel.FillPatternType;
+import org.apache.poi.ss.usermodel.Font;
+import org.apache.poi.ss.util.CellRangeAddress;
+import org.apache.poi.ss.util.CellRangeAddressList;
+import org.apache.poi.ss.util.PaneInformation;
+import org.apache.poi.xssf.model.StylesTable;
+import org.apache.poi.xssf.usermodel.*;
+import org.openxmlformats.schemas.spreadsheetml.x2006.main.*;
+
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.io.InputStream;
+import java.math.BigDecimal;
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/6/20 下午4:30
+ */
+public class UniverXSSFExcel extends ExcelParser {
+
+    @Override
+    public UniverWorkBook formFile(InputStream inputStream) throws IOException {
+        XSSFWorkbook workbook = new XSSFWorkbook(inputStream);
+        UniverWorkBook univerWorkBook = new UniverWorkBook();
+        String unitId = RandomUtil.randomString(10);
+        univerWorkBook.setId(unitId);
+        univerWorkBook.setName("");
+        Map<UniverStyle, String> styleMap = new HashMap<>();
+        Map<String, UniverSheet> sheets = new HashMap<>();
+        List<String> sheetOrder = new ArrayList<>();
+        Map<String, UniverResourceData> drawingMap = new HashMap<>();
+        Map<String, List<UniverResourceData>> formattingMap = new HashMap<>();
+        Map<String, List<UniverResourceData>> dataValidationMap = new HashMap<>();
+        for (int i = 0; i < workbook.getNumberOfSheets(); i++) {
+            String sheetId = RandomUtil.randomString(10);
+            sheetOrder.add(sheetId);
+            XSSFSheet sheet = workbook.getSheetAt(i);
+            UniverSheet univerSheet = new UniverSheet();
+            univerSheet.setId(sheetId);
+            univerSheet.setName(sheet.getSheetName());
+            univerSheet.setHidden(!workbook.isSheetHidden(i) ? 0 : 1);
+            univerSheet.setTabColor("");
+
+            //冻结位置
+            UniverSheetFreeze sheetFreeze = new UniverSheetFreeze();
+            PaneInformation freeze = sheet.getPaneInformation();
+            if (freeze != null) {
+                int freezeColumn = freeze.getVerticalSplitLeftColumn();
+                if (freezeColumn > 0) {
+                    sheetFreeze.setStartColumn(freezeColumn);
+                    sheetFreeze.setXSplit(freezeColumn);
+                }
+                int freezeRow = freeze.getHorizontalSplitTopRow();
+                if (freezeRow > 0) {
+                    sheetFreeze.setStartRow(freezeRow);
+                    sheetFreeze.setYSplit(freezeRow);
+                }
+            }
+            univerSheet.setFreeze(sheetFreeze);
+
+            Map<Integer, UniverSheetRowData> rowData = new HashMap<>();
+            Map<Integer, UniverSheetColumnData> columnData = new HashMap<>();
+            Map<Integer, Map<Integer, UniverSheetCellData>> cellData = new HashMap<>();
+            for (int rowCount = 0; rowCount <= sheet.getLastRowNum(); rowCount++) {
+                XSSFRow row = sheet.getRow(rowCount);
+                Map<Integer, UniverSheetCellData> cells = new HashMap<>();
+                if (null != row) {
+                    for (int columnCount = 0; columnCount <= row.getLastCellNum(); columnCount++) {
+                        XSSFCell cell = row.getCell(columnCount);
+                        UniverSheetCellData univerSheetCellData = new UniverSheetCellData();
+                        if (null != cell) {
+                            //数据
+                            Object value = "";
+                            String formula = null;
+                            CellType cellType = cell.getCellType();
+                            Integer type = null;
+                            switch (cellType) {
+                                case STRING:
+                                    value = cell.getStringCellValue();
+                                    type = 1;
+                                    break;
+                                case BOOLEAN:
+                                    value = cell.getBooleanCellValue();
+                                    type = 3;
+                                    break;
+                                case NUMERIC:
+                                    value = cell.getNumericCellValue();
+                                    type = 2;
+                                    break;
+                                case FORMULA:
+                                    value = cell.getCellFormula();
+                                    formula = "=" + value;
+                                    type = 4;
+                                    break;
+                            }
+                            univerSheetCellData.setV(value);
+                            univerSheetCellData.setF(formula);
+                            univerSheetCellData.setT(type);
+                            //样式
+                            XSSFCellStyle cellStyle = cell.getCellStyle();
+                            UniverStyle style = getUniverStyle(cellStyle);
+                            String styleName = styleMap.get(style) != null ? styleMap.get(style) : RandomUtil.randomString(6);
+                            if (styleMap.get(style) == null) {
+                                styleMap.put(style, styleName);
+                            }
+                            univerSheetCellData.setS(styleName);
+                            cells.put(columnCount, univerSheetCellData);
+                            UniverSheetColumnData univerSheetColumnData = new UniverSheetColumnData();
+                            univerSheetColumnData.setHd(!sheet.isColumnHidden(columnCount) ? 0 : 1);
+                            List<Integer> colHeight = new ArrayList<>();
+                            colHeight.add(100);
+                            colHeight.add((int) sheet.getColumnWidthInPixels(columnCount));
+                            univerSheetColumnData.setW(Collections.max(colHeight));
+                            columnData.put(columnCount, univerSheetColumnData);
+                        }
+                    }
+                    cellData.put(rowCount, cells);
+                    UniverSheetRowData univerSheetRowData = new UniverSheetRowData();
+                    univerSheetRowData.setHd(!row.getZeroHeight() ? 0 : 1);
+                    List<Integer> rowHeight = new ArrayList<>();
+                    rowHeight.add(50);
+                    rowHeight.add((int) row.getHeightInPoints());
+                    univerSheetRowData.setH(Collections.max(rowHeight));
+                    univerSheetRowData.setIa(0);
+                    rowData.put(rowCount, univerSheetRowData);
+                }
+            }
+            univerSheet.setCellData(cellData);
+            univerSheet.setRowData(rowData);
+            univerSheet.setColumnData(columnData);
+
+            List<UniverSheetRange> mergeData = new ArrayList<>();
+            for (CellRangeAddress region : sheet.getMergedRegions()) {
+                UniverSheetRange univerSheetRange = new UniverSheetRange();
+                univerSheetRange.setStartRow(region.getFirstRow());
+                univerSheetRange.setStartColumn(region.getFirstColumn());
+                univerSheetRange.setEndRow(region.getLastRow());
+                univerSheetRange.setEndColumn(region.getLastColumn());
+                mergeData.add(univerSheetRange);
+            }
+            univerSheet.setMergeData(mergeData);
+
+            //图片
+            drawing(sheet, sheetId, unitId, drawingMap);
+            //条件
+            format(sheet, sheetId, unitId, formattingMap);
+            //数据管理
+            dataValidation(sheet, sheetId, unitId, dataValidationMap);
+
+            UniverSheetRowHeader univerSheetRowHeader = new UniverSheetRowHeader();
+            univerSheetRowHeader.setHidden(0);
+            univerSheetRowHeader.setWidth(46);
+            univerSheet.setRowHeader(univerSheetRowHeader);
+
+            UniverSheetColumnHeader univerSheetColumnHeader = new UniverSheetColumnHeader();
+            univerSheetColumnHeader.setHidden(0);
+            univerSheetColumnHeader.setHeight(20);
+            univerSheet.setColumnHeader(univerSheetColumnHeader);
+
+            univerSheet.setZoomRatio(1);
+            univerSheet.setScrollTop(0);
+            univerSheet.setScrollLeft(0);
+            univerSheet.setDefaultColumnWidth(88);
+            univerSheet.setDefaultRowHeight(24);
+            List<Integer> rowCount = new ArrayList<>();
+            rowCount.add(100);
+            rowCount.add(rowData.size());
+            univerSheet.setRowCount(Collections.max(rowCount));
+            List<Integer> columnCount = new ArrayList<>();
+            columnCount.add(30);
+            columnCount.add(columnData.size());
+            univerSheet.setColumnCount(Collections.max(columnCount));
+            univerSheet.setShowGridlines(sheet.isDisplayGridlines() ? 1 : 0);
+
+            univerSheet.setSelections(ImmutableList.of("A1"));
+            univerSheet.setRightToLeft(0);
+            sheets.put(sheetId, univerSheet);
+        }
+
+        Map<String, UniverStyle> styles = styleMap.entrySet().stream().collect(Collectors.toMap(t -> t.getValue(), t -> t.getKey()));
+        univerWorkBook.setStyles(styles);
+        univerWorkBook.setSheetOrder(sheetOrder);
+        univerWorkBook.setSheets(sheets);
+        Map<String, String> resourceMap = new HashMap<>();
+        resourceMap.put(ResourceEnum.SHEET_DRAWING_PLUGIN.name(), JSONUtil.toJsonStr(drawingMap));
+        resourceMap.put(ResourceEnum.SHEET_CONDITIONAL_FORMATTING_PLUGIN.name(), JSONUtil.toJsonStr(formattingMap));
+        resourceMap.put(ResourceEnum.SHEET_DATA_VALIDATION_PLUGIN.name(), JSONUtil.toJsonStr(dataValidationMap));
+        univerWorkBook.setResources(getUniverResources(resourceMap));
+        return univerWorkBook;
+    }
+
+    private UniverStyle getUniverStyle(XSSFCellStyle cellStyle) {
+        UniverStyle univerStyle = new UniverStyle();
+        univerStyle.setHt(HorizontalEnum.getHorizontalCode(cellStyle.getAlignment()));
+        univerStyle.setVt(VerticalEnum.getVerticalCode(cellStyle.getVerticalAlignment()));
+
+        XSSFFont font = cellStyle.getFont();
+        if (null != font) {
+            univerStyle.setFf(font.getFontName());
+            univerStyle.setFs((int) font.getFontHeightInPoints());
+            univerStyle.setIt(font.getItalic() ? 1 : 0);
+            univerStyle.setBl(font.getBold() ? 1 : 0);
+            if (null != font.getXSSFColor()) {
+                UniverStyleColor cl = new UniverStyleColor();
+                cl.setRgb(rgb(font.getXSSFColor().getARGBHex()));
+                univerStyle.setCl(cl);
+            }
+            if (Objects.equals(font.getUnderline(), Font.U_SINGLE)) {
+                UniverStyleTextDecoration ul = new UniverStyleTextDecoration();
+                ul.setS(1);
+                univerStyle.setUl(ul);
+            }
+            if (font.getStrikeout()) {
+                UniverStyleTextDecoration st = new UniverStyleTextDecoration();
+                st.setS(1);
+                univerStyle.setSt(st);
+            }
+        }
+        if (null != cellStyle.getDataFormatString()) {
+            UniverStylePattern pattern = new UniverStylePattern();
+            pattern.setPattern(cellStyle.getDataFormatString());
+            univerStyle.setN(pattern);
+        }
+        univerStyle.setBd(getUniverStyleBorder(cellStyle));
+
+        XSSFColor bgColor = cellStyle.getFillForegroundColorColor();
+        FillPatternType pattern = cellStyle.getFillPattern();
+        if (null != bgColor && Objects.equals(pattern, FillPatternType.SOLID_FOREGROUND)) {
+            UniverStyleColor background = new UniverStyleColor();
+            background.setRgb(rgb(cellStyle.getFillForegroundColorColor().getARGBHex()));
+            univerStyle.setBg(background);
+        }
+
+        UniverStyleTextRotation univerStyleTextRotation = new UniverStyleTextRotation();
+        univerStyleTextRotation.setA(cellStyle.getRotation());
+        univerStyle.setTr(univerStyleTextRotation);
+        return univerStyle;
+    }
+
+    private String rgb(String color) {
+        String rgb = null;
+        if (StringUtil.isNotEmpty(color)) {
+            rgb = "#" + color.substring(2, 8);
+        }
+        return rgb;
+    }
+
+    private String rgb(byte[] color) {
+        String rgb = null;
+        if (ObjectUtil.isNotEmpty(color)) {
+            XSSFColor xssfColor = new XSSFColor(color);
+            rgb = rgb(xssfColor.getARGBHex());
+        }
+        return rgb;
+    }
+
+    private UniverStyleBorder getUniverStyleBorder(XSSFCellStyle cellStyle) {
+        UniverStyleBorder univerStyleBorder = new UniverStyleBorder();
+        int num = 0;
+        if (null != cellStyle.getLeftBorderXSSFColor()) {
+            UniverStyleBorderStyle left = new UniverStyleBorderStyle();
+            UniverStyleColor leftColor = new UniverStyleColor();
+            leftColor.setRgb(rgb(cellStyle.getLeftBorderXSSFColor().getARGBHex()));
+            left.setCl(leftColor);
+            univerStyleBorder.setL(left);
+            num++;
+        }
+        if (null != cellStyle.getTopBorderXSSFColor()) {
+            UniverStyleBorderStyle top = new UniverStyleBorderStyle();
+            UniverStyleColor topColor = new UniverStyleColor();
+            topColor.setRgb(rgb(cellStyle.getTopBorderXSSFColor().getARGBHex()));
+            top.setCl(topColor);
+            univerStyleBorder.setT(top);
+            num++;
+        }
+        if (null != cellStyle.getRightBorderXSSFColor()) {
+            UniverStyleBorderStyle right = new UniverStyleBorderStyle();
+            UniverStyleColor rightColor = new UniverStyleColor();
+            rightColor.setRgb(rgb(cellStyle.getRightBorderXSSFColor().getARGBHex()));
+            right.setCl(rightColor);
+            univerStyleBorder.setR(right);
+            num++;
+        }
+        if (null != cellStyle.getBottomBorderXSSFColor()) {
+            UniverStyleBorderStyle bottom = new UniverStyleBorderStyle();
+            UniverStyleColor bottomColor = new UniverStyleColor();
+            bottomColor.setRgb(rgb(cellStyle.getBottomBorderXSSFColor().getARGBHex()));
+            bottom.setCl(bottomColor);
+            univerStyleBorder.setB(bottom);
+            num++;
+        }
+        return num > 0 ? univerStyleBorder : null;
+    }
+
+    private List<UniverResource> getUniverResources(Map<String, String> resourceMap) {
+        List<UniverResource> resourcesList = new ArrayList<>();
+        for (ResourceEnum resource : ResourceEnum.values()) {
+            UniverResource model = new UniverResource();
+            String name = resource.name();
+            model.setName(name);
+            model.setData(resourceMap.get(name) != null ? resourceMap.get(name) : "{}");
+            resourcesList.add(model);
+        }
+        return resourcesList;
+    }
+
+    private void drawing(XSSFSheet sheet, String sheetId, String unitId, Map<String, UniverResourceData> drawingMap) {
+        List<String> order = new ArrayList<>();
+        Map<String, UniverDrawing> data = new HashMap<>();
+        XSSFDrawing drawing = sheet.getDrawingPatriarch();
+        if (drawing != null) {
+            List<XSSFShape> shapes = drawing.getShapes();
+            for (XSSFShape shape : shapes) {
+                if (shape instanceof XSSFPicture) {
+                    XSSFPicture picture = (XSSFPicture) shape;
+                    byte[] pictureData = picture.getPictureData().getData();
+                    if (pictureData.length > 0) {
+                        String drawingId = RandomUtil.randomString(10);
+                        order.add(drawingId);
+                        BufferedImage image = ImgUtil.toImage(pictureData);
+                        UniverTransform sheetTransform = new UniverTransform();
+                        XSSFClientAnchor anchor = picture.getClientAnchor();
+                        UniverOffset univerFrom = new UniverOffset();
+                        univerFrom.setRow(anchor.getRow1());
+                        univerFrom.setColumn((int) anchor.getCol1());
+                        sheetTransform.setFrom(univerFrom);
+                        UniverOffset univerTo = new UniverOffset();
+                        univerTo.setRow(anchor.getRow2());
+                        univerTo.setColumn((int) anchor.getCol2());
+                        sheetTransform.setTo(univerTo);
+                        UniverDrawing univerDrawing = new UniverDrawing();
+                        univerDrawing.setSheetTransform(sheetTransform);
+                        univerDrawing.setDrawingType(0);
+                        univerDrawing.setUnitId(unitId);
+                        univerDrawing.setSubUnitId(sheetId);
+                        univerDrawing.setDrawingId(drawingId);
+                        univerDrawing.setImageSourceType(ImageEnum.BASE64.name());
+                        univerDrawing.setSource("data:image/jpeg;base64," + ImgUtil.toBase64(image, "jpeg"));
+                        data.put(drawingId, univerDrawing);
+                    }
+                }
+            }
+        }
+        if (!order.isEmpty()) {
+            UniverResourceData resourceData = new UniverResourceData();
+            resourceData.setData(data);
+            resourceData.setOrder(order);
+            drawingMap.put(sheetId, resourceData);
+        }
+    }
+
+    private void format(XSSFSheet sheet, String sheetId, String unitId, Map<String, List<UniverResourceData>> formattingMap) {
+        StylesTable styles = sheet.getWorkbook().getStylesSource();
+        List<UniverResourceData> formatList = new ArrayList<>();
+        List<CTConditionalFormatting> conditionalFormatting = sheet.getCTWorksheet().getConditionalFormattingList();
+        for (CTConditionalFormatting conditional : conditionalFormatting) {
+            UniverResourceData resourceData = new UniverResourceData();
+            resourceData.setCfId(RandomUtil.randomString(10));
+            List<UniverSheetRange> ranges = new ArrayList<>();
+            resourceData.setRanges(ranges);
+            List<String> formattingRanges = conditional.getSqref();
+            for (String range : formattingRanges) {
+                UniverSheetRange sheetRange = new UniverSheetRange();
+                CellRangeAddress rangeAddress = CellRangeAddress.valueOf(range);
+                sheetRange.setStartRow(rangeAddress.getFirstRow());
+                sheetRange.setStartColumn(rangeAddress.getFirstColumn());
+                sheetRange.setEndRow(rangeAddress.getLastRow());
+                sheetRange.setEndColumn(rangeAddress.getLastColumn());
+                sheetRange.setUnitId(unitId);
+                sheetRange.setSheetId(sheetId);
+                ranges.add(sheetRange);
+            }
+            List<CTCfRule> cfRuleList = conditional.getCfRuleList();
+            for (CTCfRule cfRule : cfRuleList) {
+                CTIconSet iconSet = cfRule.getIconSet();
+                if (iconSet != null) {
+                    boolean reverse = iconSet.getReverse();
+                    UniverRule rule = new UniverRule();
+                    List<UniverConfig> univerConfig = new ArrayList<>();
+                    rule.setType(FormatTypeEnum.iconSet.name());
+                    rule.setConfig(univerConfig);
+                    rule.setIsShowValue(iconSet.getShowValue());
+                    String iconType = iconSet.getIconSet().toString();
+                    List<CTCfvo> cfvoList = iconSet.getCfvoList();
+                    int iconId = 0;
+                    for (int k = cfvoList.size() - 1; k >= 0; k--) {
+                        CTCfvo cfvo = cfvoList.get(k);
+                        UniverValue value = new UniverValue();
+                        String type = cfvo.getType().toString();
+                        String cfValue = cfvo.getVal() != null ? cfvo.getVal().toString() : "";
+                        String val = (Objects.equals(SubTypeEnum.expression.getType(), type) ? "=" : "") + cfValue.replaceAll("\"", "");
+                        value.setValue(val);
+                        value.setType(type);
+                        UniverConfig config = new UniverConfig();
+                        config.setOperator(cfvo.getGte() ? OperatorEnum.greaterThanOrEqual.name() : OperatorEnum.greaterThan.name());
+                        config.setIconId((reverse ? k : iconId) + "");
+                        config.setIconType(iconType);
+                        config.setValue(value);
+                        univerConfig.add(config);
+                        iconId++;
+                    }
+                    resourceData.setRule(rule);
+                }
+                CTDataBar dataBar = cfRule.getDataBar();
+                if (dataBar != null) {
+                    UniverRule rule = new UniverRule();
+                    UniverConfig config = new UniverConfig();
+                    rule.setConfig(config);
+                    rule.setType(FormatTypeEnum.dataBar.name());
+                    rule.setIsShowValue(dataBar.getShowValue());
+                    List<CTCfvo> cfvoList = dataBar.getCfvoList();
+                    UniverValue min = new UniverValue();
+                    min.setType(OperatorEnum.min.name());
+                    config.setMin(min);
+                    UniverValue max = new UniverValue();
+                    max.setType(OperatorEnum.max.name());
+                    config.setMax(max);
+                    for (int k = 0; k < cfvoList.size(); k++) {
+                        CTCfvo cfvo = cfvoList.get(k);
+                        String type = cfvo.getType().toString();
+                        String cfValue = cfvo.getVal() != null ? cfvo.getVal().toString() : "";
+                        String val = (Objects.equals(SubTypeEnum.expression.getType(), type) ? "=" : "") + cfValue.replaceAll("\"", "");
+                        if (k == 0) {
+                            min.setValue(val);
+                            min.setType(type);
+                        } else {
+                            max.setValue(val);
+                            max.setType(Objects.equals(type, OperatorEnum.min.name()) ? max.getType() : type);
+                        }
+                    }
+                    config.setIsGradient(false);
+                    CTColor color = dataBar.getColor();
+                    if (color != null) {
+                        String colorRgb = rgb(color.getRgb());
+                        config.setPositiveColor(colorRgb);
+                        config.setNativeColor(colorRgb);
+                    }
+                    resourceData.setRule(rule);
+                }
+                CTColorScale colorScale = cfRule.getColorScale();
+                if (colorScale != null) {
+                    UniverRule rule = new UniverRule();
+                    List<UniverConfig> univerConfig = new ArrayList<>();
+                    rule.setType(FormatTypeEnum.colorScale.name());
+                    rule.setConfig(univerConfig);
+                    Map<Integer, UniverValue> colorValue = new HashMap<>();
+                    List<CTCfvo> cfvoList = colorScale.getCfvoList();
+                    for (int k = 0; k < cfvoList.size(); k++) {
+                        CTCfvo cfvo = cfvoList.get(k);
+                        UniverValue value = new UniverValue();
+                        String type = cfvo.getType().toString();
+                        String cfValue = cfvo.getVal() != null ? cfvo.getVal().toString() : "";
+                        String val = (Objects.equals(SubTypeEnum.expression.getType(), type) ? "=" : "") + cfValue.replaceAll("\"", "");
+                        value.setType(type);
+                        value.setValue(val);
+                        colorValue.put(k, value);
+                    }
+                    List<CTColor> colorList = colorScale.getColorList();
+                    Map<Integer, String> colorColor = new HashMap<>();
+                    for (int k = 0; k < colorList.size(); k++) {
+                        CTColor color = colorList.get(k);
+                        String colorRgb = rgb(color.getRgb());
+                        colorColor.put(k, colorRgb);
+                    }
+                    for (Integer k : colorValue.keySet()) {
+                        UniverConfig config = new UniverConfig();
+                        config.setValue(colorValue.get(k));
+                        config.setColor(colorColor.get(k));
+                        config.setIndex(k);
+                        univerConfig.add(config);
+                    }
+                    resourceData.setRule(rule);
+                }
+                CTCfRule highlightCell = cfRule;
+                if (highlightCell != null) {
+                    String type = highlightCell.getType().toString();
+                    SubTypeEnum subTypeEnum = SubTypeEnum.getType(type);
+                    if (subTypeEnum != null) {
+                        UniverRule rule = new UniverRule();
+                        rule.setType(FormatTypeEnum.highlightCell.name());
+                        boolean isUnique = ImmutableList.of(SubTypeEnum.uniqueValues.getType(), SubTypeEnum.duplicateValues.getType()).contains(subTypeEnum.getType());
+                        boolean isNumber = Objects.equals(SubTypeEnum.cellIs.getType(), subTypeEnum.getType());
+                        boolean isAverage = Objects.equals(SubTypeEnum.aboveAverage.getType(), subTypeEnum.getType());
+                        boolean isRank = Objects.equals(SubTypeEnum.top10.getType(), subTypeEnum.getType());
+                        boolean isFormula = Objects.equals(SubTypeEnum.expression.getType(), subTypeEnum.getType());
+                        boolean isTime = Objects.equals(SubTypeEnum.timePeriod.getType(), subTypeEnum.getType());
+                        List<String> dataList = highlightCell.getFormulaList() != null ? highlightCell.getFormulaList() : new ArrayList<>();
+                        List<BigDecimal> numberDataList = new ArrayList<>();
+                        BigDecimal numberData = null;
+                        String textValue = "";
+                        for (String data : dataList) {
+                            try {
+                                BigDecimal bigDecimal = new BigDecimal(data);
+                                numberDataList.add(bigDecimal);
+                                numberData = bigDecimal;
+                            } catch (Exception e) {
+                                textValue = data;
+                            }
+                        }
+                        if (isNumber) {
+                            if (highlightCell.getOperator() != null) {
+                                rule.setOperator(highlightCell.getOperator().toString());
+                            }
+                            boolean isText = numberDataList.isEmpty();
+                            rule.setSubType(isText ? SubTypeEnum.text.getCode() : SubTypeEnum.cellIs.getCode());
+                            rule.setValue(isText ? textValue : numberDataList.size() > 1 ? numberDataList : numberData);
+                        } else if (isAverage) {
+                            rule.setSubType(subTypeEnum.getCode());
+                            rule.setOperator(highlightCell.getAboveAverage() ? OperatorEnum.greaterThan.name() : OperatorEnum.lessThan.name());
+                        } else if (isRank) {
+                            rule.setSubType(subTypeEnum.getCode());
+                            rule.setIsPercent(highlightCell.getPercent());
+                            rule.setIsBottom(highlightCell.getBottom());
+                            rule.setValue(highlightCell.getRank() + "");
+                        } else if (isFormula) {
+                            rule.setSubType(SubTypeEnum.expression.getCode());
+                            rule.setValue("=" + textValue.replaceAll("\"", ""));
+                        } else if (isTime) {
+                            rule.setSubType(subTypeEnum.getCode());
+                            rule.setOperator(highlightCell.getTimePeriod().toString());
+                        } else if (isUnique) {
+                            rule.setSubType(subTypeEnum.getType());
+                        } else {
+                            rule.setSubType(SubTypeEnum.text.getCode());
+                            rule.setOperator(highlightCell.getOperator() != null ? highlightCell.getOperator().toString() : subTypeEnum.getType());
+                            if (highlightCell.getText() != null) {
+                                rule.setValue(highlightCell.getText());
+                            }
+                        }
+                        UniverStyle style = new UniverStyle();
+                        CTDxf dxf = highlightCell.isSetDxfId() ? styles.getDxfAt((int) highlightCell.getDxfId()) : null;
+                        if (dxf != null) {
+                            CTFill ctFill = dxf.getFill();
+                            if (ctFill != null) {
+                                CTPatternFill patternFill = ctFill.getPatternFill();
+                                if (patternFill != null) {
+                                    XSSFColor baColor = XSSFColor.from(patternFill.getBgColor());
+                                    if (baColor != null) {
+                                        UniverStyleColor bg = new UniverStyleColor();
+                                        bg.setRgb(rgb(baColor.getARGBHex()));
+                                        style.setBg(bg);
+                                    }
+                                }
+                            }
+                            CTFont ctFont = dxf.getFont();
+                            if (ctFont != null) {
+                                XSSFColor fontColor = ctFont.sizeOfColorArray() > 0 ? XSSFColor.from(ctFont.getColorArray(0)) : null;
+                                if (fontColor != null) {
+                                    UniverStyleColor cl = new UniverStyleColor();
+                                    cl.setRgb(rgb(fontColor.getARGBHex()));
+                                    style.setCl(cl);
+                                }
+                                STUnderlineValues.Enum underlineType = ctFont.sizeOfUArray() == 1 ? ctFont.getUArray(0).getVal() : STUnderlineValues.NONE;
+                                if (Objects.equals(underlineType, STUnderlineValues.SINGLE)) {
+                                    UniverStyleTextDecoration ul = new UniverStyleTextDecoration();
+                                    ul.setS(1);
+                                    style.setUl(ul);
+                                }
+                                boolean strike = ctFont.sizeOfStrikeArray() > 0 && ctFont.getStrikeArray(0).getVal();
+                                if (strike) {
+                                    UniverStyleTextDecoration st = new UniverStyleTextDecoration();
+                                    st.setS(1);
+                                    style.setSt(st);
+                                }
+                                boolean isItalic = ctFont.sizeOfIArray() == 1 && ctFont.getIArray(0).getVal();
+                                boolean isBold = ctFont.sizeOfBArray() == 1 && ctFont.getBArray(0).getVal();
+                                style.setIt(isItalic ? 1 : 0);
+                                style.setBl(isBold ? 1 : 0);
+                            }
+                        }
+                        rule.setStyle(style);
+                        resourceData.setRule(rule);
+                    }
+                }
+                resourceData.setStopIfTrue(cfRule.getStopIfTrue());
+                if (resourceData.getRule() == null) {
+                    continue;
+                }
+                formatList.add(resourceData);
+            }
+        }
+        formattingMap.put(sheetId, formatList);
+    }
+
+    private static void dataValidation(XSSFSheet sheet, String sheetId, String unitId, Map<String, List<UniverResourceData>> dataValidationMap) {
+        List<UniverResourceData> dataValidationList = new ArrayList<>();
+        List<XSSFDataValidation> dataValidations = sheet.getDataValidations();
+        for (XSSFDataValidation dataValidation : dataValidations) {
+            UniverResourceData resourceData = new UniverResourceData();
+            List<UniverSheetRange> ranges = new ArrayList<>();
+            resourceData.setRanges(ranges);
+            resourceData.setUid(RandomUtil.randomString(10));
+            CellRangeAddressList addressList = dataValidation.getRegions();
+            for (CellRangeAddress address : addressList.getGenericChildren()) {
+                UniverSheetRange sheetRange = new UniverSheetRange();
+                sheetRange.setStartRow(address.getFirstRow());
+                sheetRange.setStartColumn(address.getFirstColumn());
+                sheetRange.setEndRow(address.getLastRow());
+                sheetRange.setEndColumn(address.getLastColumn());
+                sheetRange.setSheetId(sheetId);
+                sheetRange.setUnitId(unitId);
+                ranges.add(sheetRange);
+            }
+            DataValidationConstraint constraint = dataValidation.getValidationConstraint();
+            ValidationType validationType = ValidationType.getType(constraint.getValidationType());
+            resourceData.setType(validationType.getType());
+            operatorTypeEnum operator = Objects.equals(validationType, ValidationType.none) ? null : operatorTypeEnum.getOperator(constraint.getOperator());
+            resourceData.setOperator(operator != null ? operator.getOperatorType() : null);
+            String value1 = constraint.getFormula1();
+            String value2 = constraint.getFormula2();
+            resourceData.setFormula1(value1 != null ? value1.replaceAll("\"", "") : value1);
+            resourceData.setFormula2(value2 != null ? value2.replaceAll("\"", "") : value2);
+            if (dataValidation.getShowErrorBox()) {
+                resourceData.setShowErrorMessage(true);
+                resourceData.setError(dataValidation.getErrorBoxTitle());
+                resourceData.setErrorStyle(Objects.equals(dataValidation.getErrorStyle(), 0) ? 1 : 2);
+            }
+            resourceData.setAllowBlank(dataValidation.getEmptyCellAllowed());
+            resourceData.setRenderMode(dataValidation.getSuppressDropDownArrow() ? null : 0);
+            dataValidationList.add(resourceData);
+        }
+        dataValidationMap.put(sheetId, dataValidationList);
+    }
+
+    private void filter(XSSFSheet sheet, String sheetId, String unitId, Map<String, UniverResourceData> filterMap) {
+        CTAutoFilter autoFilter = sheet.getCTWorksheet().getAutoFilter();
+        UniverResourceData data = new UniverResourceData();
+        if (autoFilter != null && StringUtil.isNotEmpty(autoFilter.getRef())) {
+            CellRangeAddress addresses = CellRangeAddress.valueOf(autoFilter.getRef());
+            UniverSheetRange ref = new UniverSheetRange();
+            ref.setStartRow(addresses.getFirstRow());
+            ref.setStartColumn(addresses.getFirstColumn());
+            ref.setEndRow(addresses.getLastRow());
+            ref.setEndColumn(addresses.getLastColumn());
+            data.setRef(ref);
+            List<Integer> cachedFilteredOut = new ArrayList<>();
+            //隐藏行
+            for (int rowIndex = addresses.getFirstRow(); rowIndex <= addresses.getLastRow(); rowIndex++) {
+                XSSFRow row = sheet.getRow(rowIndex);
+                if (row != null && row.getZeroHeight()) {
+                    cachedFilteredOut.add(rowIndex);
+                }
+            }
+            //筛选条件
+            List<CTFilterColumn> filterColumnList = autoFilter.getFilterColumnList();
+            List<UniverFilters> filterColumns = new ArrayList<>();
+            for (CTFilterColumn filterColumn : filterColumnList) {
+                UniverFilters univerFilters = new UniverFilters();
+                univerFilters.setColId(filterColumn.getColId());
+                UniverCustomFilters customFilters = new UniverCustomFilters();
+                univerFilters.setCustomFilters(customFilters);
+                List<UniverCustomFilters> customFilterList = new ArrayList<>();
+                customFilters.setCustomFilters(customFilterList);
+                //poi方法
+                CTCustomFilters filters = filterColumn.getCustomFilters();
+                customFilters.setAnd(filters.getAnd() ? 1 : null);
+                List<CTCustomFilter> filterList = filters.getCustomFilterList();
+                for (CTCustomFilter filter : filterList) {
+                    UniverCustomFilters univerCustomFilters = new UniverCustomFilters();
+                    univerCustomFilters.setVal(filter.getVal());
+                    univerCustomFilters.setOperator(filter.getOperator() != null ? filter.getOperator().toString() : null);
+                    customFilterList.add(univerCustomFilters);
+                }
+                filterColumns.add(univerFilters);
+            }
+            data.setFilterColumns(filterColumns);
+            data.setCachedFilteredOut(cachedFilteredOut);
+            filterMap.put(sheetId, data);
+        }
+    }
+}

TEMPAT SAMPAH
jnpf-datareport-univer-common/target/classes/jnpf/consts/ApiConst.class


TEMPAT SAMPAH
jnpf-datareport-univer-common/target/classes/jnpf/exception/ResultException.class


TEMPAT SAMPAH
jnpf-datareport-univer-common/target/classes/jnpf/properties/ReportProperties.class


TEMPAT SAMPAH
jnpf-datareport-univer-common/target/classes/jnpf/util/ChartUtil$1.class


TEMPAT SAMPAH
jnpf-datareport-univer-common/target/classes/jnpf/util/ChartUtil.class


TEMPAT SAMPAH
jnpf-datareport-univer-common/target/classes/jnpf/util/ReportUtil$1.class


TEMPAT SAMPAH
jnpf-datareport-univer-common/target/classes/jnpf/util/ReportUtil$2.class


TEMPAT SAMPAH
jnpf-datareport-univer-common/target/classes/jnpf/util/ReportUtil.class


TEMPAT SAMPAH
jnpf-datareport-univer-common/target/classes/jnpf/util/UniverConvert$1.class


TEMPAT SAMPAH
jnpf-datareport-univer-common/target/classes/jnpf/util/UniverConvert.class


TEMPAT SAMPAH
jnpf-datareport-univer-common/target/classes/jnpf/util/UniverExcel$1.class


TEMPAT SAMPAH
jnpf-datareport-univer-common/target/classes/jnpf/util/UniverExcel.class


TEMPAT SAMPAH
jnpf-datareport-univer-common/target/classes/jnpf/util/excel/ExcelParser.class


TEMPAT SAMPAH
jnpf-datareport-univer-common/target/classes/jnpf/util/excel/UniverHSSFExcel$1.class


TEMPAT SAMPAH
jnpf-datareport-univer-common/target/classes/jnpf/util/excel/UniverHSSFExcel.class


TEMPAT SAMPAH
jnpf-datareport-univer-common/target/classes/jnpf/util/excel/UniverXSSFExcel$1.class


TEMPAT SAMPAH
jnpf-datareport-univer-common/target/classes/jnpf/util/excel/UniverXSSFExcel.class


TEMPAT SAMPAH
jnpf-datareport-univer-common/target/jnpf-datareport-univer-common-5.2.0-RELEASE.jar


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

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

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

@@ -0,0 +1,17 @@
+jnpf\util\ReportUtil.class
+jnpf\util\ChartUtil$1.class
+jnpf\util\UniverConvert.class
+jnpf\util\excel\UniverHSSFExcel.class
+jnpf\util\UniverExcel$1.class
+jnpf\util\excel\UniverXSSFExcel.class
+jnpf\util\excel\UniverHSSFExcel$1.class
+jnpf\util\ChartUtil.class
+jnpf\properties\ReportProperties.class
+jnpf\util\ReportUtil$1.class
+jnpf\util\UniverConvert$1.class
+jnpf\util\UniverExcel.class
+jnpf\exception\ResultException.class
+jnpf\util\ReportUtil$2.class
+jnpf\util\excel\ExcelParser.class
+jnpf\util\excel\UniverXSSFExcel$1.class
+jnpf\consts\ApiConst.class

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

@@ -0,0 +1,10 @@
+C:\Users\zhaojinyu\Desktop\USKY\jnpf5.2\jnpf-java-datareport-univer-core\jnpf-datareport-univer-common\src\main\java\jnpf\consts\ApiConst.java
+C:\Users\zhaojinyu\Desktop\USKY\jnpf5.2\jnpf-java-datareport-univer-core\jnpf-datareport-univer-common\src\main\java\jnpf\exception\ResultException.java
+C:\Users\zhaojinyu\Desktop\USKY\jnpf5.2\jnpf-java-datareport-univer-core\jnpf-datareport-univer-common\src\main\java\jnpf\properties\ReportProperties.java
+C:\Users\zhaojinyu\Desktop\USKY\jnpf5.2\jnpf-java-datareport-univer-core\jnpf-datareport-univer-common\src\main\java\jnpf\util\ChartUtil.java
+C:\Users\zhaojinyu\Desktop\USKY\jnpf5.2\jnpf-java-datareport-univer-core\jnpf-datareport-univer-common\src\main\java\jnpf\util\excel\ExcelParser.java
+C:\Users\zhaojinyu\Desktop\USKY\jnpf5.2\jnpf-java-datareport-univer-core\jnpf-datareport-univer-common\src\main\java\jnpf\util\excel\UniverHSSFExcel.java
+C:\Users\zhaojinyu\Desktop\USKY\jnpf5.2\jnpf-java-datareport-univer-core\jnpf-datareport-univer-common\src\main\java\jnpf\util\excel\UniverXSSFExcel.java
+C:\Users\zhaojinyu\Desktop\USKY\jnpf5.2\jnpf-java-datareport-univer-core\jnpf-datareport-univer-common\src\main\java\jnpf\util\ReportUtil.java
+C:\Users\zhaojinyu\Desktop\USKY\jnpf5.2\jnpf-java-datareport-univer-core\jnpf-datareport-univer-common\src\main\java\jnpf\util\UniverConvert.java
+C:\Users\zhaojinyu\Desktop\USKY\jnpf5.2\jnpf-java-datareport-univer-core\jnpf-datareport-univer-common\src\main\java\jnpf\util\UniverExcel.java

+ 177 - 0
jnpf-datareport-univer-model/pom.xml

@@ -0,0 +1,177 @@
+<?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-core</artifactId>
+        <version>5.2.0-RELEASE</version>
+    </parent>
+
+    <artifactId>jnpf-datareport-univer-model</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.jnpf</groupId>
+            <artifactId>jnpf-common-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.antlr</groupId>
+            <artifactId>antlr4-runtime</artifactId>
+            <version>4.5.3</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>package</phase>
+                                <goals>
+                                    <goal>copy-dependencies</goal>
+                                </goals>
+                                <configuration>
+                                    <includeGroupIds>com.jnpf,org.apache.poi</includeGroupIds>
+                                    <includeArtifactIds>jnpf-common-core,poi</includeArtifactIds>
+                                    <outputDirectory>${project.build.directory}/copylib</outputDirectory>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <!--安装加密打包插件-->
+                    <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>enhance-2.9.4</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>
+                    <!--复制allatori配置重写配置中的包路径-->
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-resources-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>copy-and-filter-allatori-config</id>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>copy-resources</goal>
+                                </goals>
+                                <configuration>
+                                    <outputDirectory>${project.build.directory}</outputDirectory>
+                                    <resources>
+                                        <resource>
+                                            <directory>${project.basedir}/../allatori</directory>
+                                            <includes>
+                                                <include>allatori.xml</include>
+                                            </includes>
+                                            <filtering>true</filtering>
+                                        </resource>
+                                    </resources>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <!--Jar混淆-->
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>run-allatori</id>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>exec</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                        <configuration>
+                            <executable>java</executable>
+                            <arguments>
+                                <argument>-Xms128m</argument>
+                                <argument>-Xmx512m</argument>
+                                <argument>-jar</argument>
+                                <!-- Copy allatori.jar to 'allatori' directory to use the commented line -->
+                                <argument>${project.basedir}/../allatori/allatori.jar</argument>
+                                <!-- <argument>${basedir}/allatori/allatori.jar</argument> -->
+                                <argument>${project.build.directory}/allatori.xml</argument>
+                            </arguments>
+                        </configuration>
+                    </plugin>
+                    <!--Jar加密-->
+                    <plugin>
+                        <groupId>com.idea-aedi</groupId>
+                        <artifactId>class-winter-maven-plugin</artifactId>
+                        <!-- 相关配置 -->
+                        <configuration>
+                            <!--需要处理的包名-->
+                            <includePrefix>jnpf</includePrefix>
+                            <!--直接覆盖原文件-->
+                            <finalName>${build.finalName}</finalName>
+                            <!--编译中依赖的第三方包路径-->
+                            <supportFile>${project.build.directory}/copylib</supportFile>
+                            <!--检查启动参数-->
+                            <jvmArgCheck>-XX:+DisableAttachMechanism</jvmArgCheck>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>class-winter</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
+</project>

+ 11 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/enums/CellDataEnum.java

@@ -0,0 +1,11 @@
+package jnpf.enums;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/9/10 下午4:28
+ */
+public enum CellDataEnum {
+    text, chart, dataSource, expression
+}

+ 22 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/enums/FormatTypeEnum.java

@@ -0,0 +1,22 @@
+package jnpf.enums;
+
+import java.util.Objects;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/11/26 下午12:06
+ */
+public enum FormatTypeEnum {
+    highlightCell, colorScale, iconSet, dataBar;
+
+    public static FormatTypeEnum getFormat(String name) {
+        for (FormatTypeEnum status : FormatTypeEnum.values()) {
+            if (Objects.equals(status.name(), name)) {
+                return status;
+            }
+        }
+        return FormatTypeEnum.highlightCell;
+    }
+}

+ 46 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/enums/HorizontalEnum.java

@@ -0,0 +1,46 @@
+package jnpf.enums;
+
+import lombok.Getter;
+import org.apache.poi.ss.usermodel.HorizontalAlignment;
+
+import java.util.Objects;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2025/1/6 下午6:00
+ */
+@Getter
+public enum HorizontalEnum {
+    GENERAL(0, HorizontalAlignment.GENERAL),
+    LEFT(1, HorizontalAlignment.LEFT),
+    CENTER(2, HorizontalAlignment.CENTER),
+    RIGHT(3, HorizontalAlignment.RIGHT);
+
+    private Integer code;
+    private HorizontalAlignment horizontal;
+
+    HorizontalEnum(Integer code, HorizontalAlignment horizontal) {
+        this.code = code;
+        this.horizontal = horizontal;
+    }
+
+    public static HorizontalAlignment getHorizontalValue(Integer code) {
+        for (HorizontalEnum status : HorizontalEnum.values()) {
+            if (Objects.equals(status.getCode(), code)) {
+                return status.getHorizontal();
+            }
+        }
+        return HorizontalAlignment.GENERAL;
+    }
+
+    public static Integer getHorizontalCode(HorizontalAlignment horizontal) {
+        for (HorizontalEnum status : HorizontalEnum.values()) {
+            if (Objects.equals(status.getHorizontal(), horizontal)) {
+                return status.getCode();
+            }
+        }
+        return null;
+    }
+}

+ 11 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/enums/ImageEnum.java

@@ -0,0 +1,11 @@
+package jnpf.enums;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/11/25 下午3:29
+ */
+public enum ImageEnum {
+    BASE64, URL
+}

+ 11 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/enums/OperatorEnum.java

@@ -0,0 +1,11 @@
+package jnpf.enums;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/12/4 下午4:40
+ */
+public enum OperatorEnum {
+    lessThan, greaterThan, greaterThanOrEqual, min, max, middle
+}

+ 57 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/enums/ResourceEnum.java

@@ -0,0 +1,57 @@
+
+package jnpf.enums;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/6/20 下午5:12
+ */
+public enum ResourceEnum {
+
+    /**
+     *  注释
+     */
+    SHEET_THREAD_COMMENT_PLUGIN,
+    /**
+     * 工作表权限
+     */
+    SHEET_WORKSHEET_PROTECTION_PLUGIN,
+    /**
+     * 工作表单元权限
+     */
+    SHEET_WORKSHEET_PROTECTION_POINT_PLUGIN,
+    /**
+     * 区域保护
+     */
+    SHEET_RANGE_PROTECTION_PLUGIN,
+    /**
+     * 图片
+     */
+    SHEET_DRAWING_PLUGIN,
+    /**
+     * 条件格式
+     */
+    SHEET_CONDITIONAL_FORMATTING_PLUGIN,
+    /**
+     * 超链接
+     */
+    SHEET_HYPER_LINK_PLUGIN,
+    /**
+     * 名称定义
+     */
+    SHEET_DEFINED_NAME_PLUGIN,
+    /**
+     * 数据验证
+     */
+    SHEET_DATA_VALIDATION_PLUGIN,
+    /**
+     * 过滤器
+     */
+    SHEET_FILTER_PLUGIN,
+    /**
+     * 授权服务
+     */
+    SHEET_AuthzIoMockService_PLUGIN
+
+}

+ 43 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/enums/StyleTypeEnum.java

@@ -0,0 +1,43 @@
+package jnpf.enums;
+
+import lombok.Getter;
+import org.apache.poi.ss.usermodel.BorderStyle;
+
+import java.util.Objects;
+
+@Getter
+public enum StyleTypeEnum {
+
+    NONE(0, BorderStyle.NONE),
+    THIN(1, BorderStyle.THIN),
+    HAIR(2, BorderStyle.HAIR),
+    DOTTED(3, BorderStyle.DOTTED),
+    DASHED(4, BorderStyle.DASHED),
+    DASH_DOT(5, BorderStyle.DASH_DOT),
+    DASH_DOT_DOT(6, BorderStyle.DASH_DOT_DOT),
+    DOUBLE(7, BorderStyle.DOUBLE),
+    MEDIUM(8, BorderStyle.MEDIUM),
+    MEDIUM_DASHED(9, BorderStyle.MEDIUM_DASHED),
+    MEDIUM_DASH_DOT(10, BorderStyle.MEDIUM_DASH_DOT),
+    MEDIUM_DASH_DOT_DOT(11, BorderStyle.MEDIUM_DASH_DOT_DOT),
+    SLANT_DASH_DOT(12, BorderStyle.SLANTED_DASH_DOT),
+    THICK(13, BorderStyle.THICK);
+
+    private Integer code;
+    private BorderStyle borderStyle;
+
+    StyleTypeEnum(Integer code, BorderStyle borderStyle) {
+        this.code = code;
+        this.borderStyle = borderStyle;
+    }
+
+    public static StyleTypeEnum getStyle(Integer code) {
+        for (StyleTypeEnum status : StyleTypeEnum.values()) {
+            if (Objects.equals(status.getCode(), code)) {
+                return status;
+            }
+        }
+        return null;
+    }
+
+}

+ 52 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/enums/SubTypeEnum.java

@@ -0,0 +1,52 @@
+package jnpf.enums;
+
+import lombok.Getter;
+
+import java.util.Objects;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/11/27 上午11:46
+ */
+@Getter
+public enum SubTypeEnum {
+
+    cellIs("number", "cellIs"),
+    equal("equal", "equal"),
+    notEqual("notEqual", "notEqual"),
+    top10("rank", "top10"),
+    uniqueValues("uniqueValues", "uniqueValues"),
+    duplicateValues("duplicateValues", "duplicateValues"),
+    containsText("containsText", "containsText"),
+    notContainsText("notContainsText", "notContainsText"),
+    beginsWith("beginsWith", "beginsWith"),
+    endsWith("endsWith", "endsWith"),
+    containsBlanks("containsBlanks", "containsBlanks"),
+    notContainsBlanks("notContainsBlanks", "notContainsBlanks"),
+    containsErrors("containsErrors", "containsErrors"),
+    notContainsErrors("notContainsErrors", "notContainsErrors"),
+    expression("formula", "expression"),
+    aboveAverage("average", "aboveAverage"),
+    timePeriod("timePeriod", "timePeriod"),
+    text("text", "text");
+
+
+    private String code;
+    private String type;
+
+    SubTypeEnum(String code, String type) {
+        this.code = code;
+        this.type = type;
+    }
+
+    public static SubTypeEnum getType(String type) {
+        for (SubTypeEnum status : SubTypeEnum.values()) {
+            if (Objects.equals(status.getType(), type)) {
+                return status;
+            }
+        }
+        return null;
+    }
+}

+ 45 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/enums/UniverDataEnum.java

@@ -0,0 +1,45 @@
+package jnpf.enums;
+
+import lombok.Getter;
+
+import java.util.Objects;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/11/21 下午3:15
+ */
+@Getter
+public enum UniverDataEnum {
+
+    //汇总方式
+    none(0, "无"),
+    select(1, "列表"),
+    group(2, "分组"),
+    summary(3, "汇总"),
+
+    //填充方向
+    cellDirection(4, "portrait"),
+    cellDefault(5, "default"),
+    cellNone(6, "none"),
+    cellCustom(7, "custom"),
+    cellRoot(8, "root");
+
+    private Integer code;
+    private String name;
+
+    UniverDataEnum(Integer code, String name) {
+        this.code = code;
+        this.name = name;
+    }
+
+    public static UniverDataEnum getData(String name) {
+        for (UniverDataEnum status : UniverDataEnum.values()) {
+            if (Objects.equals(status.getName(), name)) {
+                return status;
+            }
+        }
+        return null;
+    }
+}

+ 52 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/enums/ValidationType.java

@@ -0,0 +1,52 @@
+package jnpf.enums;
+
+import lombok.Getter;
+
+import java.util.Objects;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/12/11 上午9:41
+ */
+@Getter
+public enum ValidationType {
+
+    none("any", 0),
+    whole("whole", 1),
+    decimal("decimal", 2),
+    list("list", 3),
+    checkbox("checkbox", 3),
+    listMultiple("listMultiple", 3),
+    date("date", 4),
+    textLength("textLength", 6),
+    custom("custom", 7);
+
+    private String type;
+    private Integer validationType;
+
+    ValidationType(String type, Integer validationType) {
+        this.type = type;
+        this.validationType = validationType;
+    }
+
+    public static ValidationType getValidationType(String type) {
+        for (ValidationType status : ValidationType.values()) {
+            if (Objects.equals(status.getType(), type)) {
+                return status;
+            }
+        }
+        return ValidationType.none;
+    }
+
+    public static ValidationType getType(Integer validationType) {
+        for (ValidationType status : ValidationType.values()) {
+            if (Objects.equals(status.getValidationType(), validationType)) {
+                return status;
+            }
+        }
+        return ValidationType.none;
+    }
+
+}

+ 46 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/enums/VerticalEnum.java

@@ -0,0 +1,46 @@
+package jnpf.enums;
+
+import lombok.Getter;
+import org.apache.poi.ss.usermodel.VerticalAlignment;
+
+import java.util.Objects;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2025/1/6 下午5:54
+ */
+@Getter
+public enum VerticalEnum {
+    TOP(1, VerticalAlignment.TOP),
+    CENTER(2, VerticalAlignment.CENTER),
+    BOTTOM(3, VerticalAlignment.BOTTOM);
+
+    private Integer code;
+    private VerticalAlignment vertical;
+
+    VerticalEnum(Integer code, VerticalAlignment vertical) {
+        this.code = code;
+        this.vertical = vertical;
+    }
+
+    public static VerticalAlignment getVerticalValue(Integer code) {
+        for (VerticalEnum status : VerticalEnum.values()) {
+            if (Objects.equals(status.getCode(), code)) {
+                return status.getVertical();
+            }
+        }
+        return null;
+    }
+
+    public static Integer getVerticalCode(VerticalAlignment vertical) {
+        for (VerticalEnum status : VerticalEnum.values()) {
+            if (Objects.equals(status.getVertical(), vertical)) {
+                return status.getCode();
+            }
+        }
+        return null;
+    }
+
+}

+ 51 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/enums/operatorTypeEnum.java

@@ -0,0 +1,51 @@
+package jnpf.enums;
+
+import lombok.Getter;
+
+import java.util.Objects;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/12/11 下午3:15
+ */
+@Getter
+public enum operatorTypeEnum {
+
+    none("none", -1),
+    between("between", 0),
+    notBetween("notBetween", 1),
+    equal("equal", 2),
+    NOT_EQUAL("notEqual", 3),
+    greaterThan("greaterThan", 4),
+    lessThan("lessThan", 5),
+    greaterThanOrEqual("greaterThanOrEqual", 6),
+    lessThanOrEqual("lessThanOrEqual", 7);
+
+    private String operatorType;
+    private Integer operator;
+
+    operatorTypeEnum(String operatorType, Integer operator) {
+        this.operatorType = operatorType;
+        this.operator = operator;
+    }
+
+    public static operatorTypeEnum getOperator(String operatorType) {
+        for (operatorTypeEnum status : operatorTypeEnum.values()) {
+            if (Objects.equals(status.getOperatorType(), operatorType)) {
+                return status;
+            }
+        }
+        return operatorTypeEnum.none;
+    }
+
+    public static operatorTypeEnum getOperator(Integer operator) {
+        for (operatorTypeEnum status : operatorTypeEnum.values()) {
+            if (Objects.equals(status.getOperator(), operator)) {
+                return status;
+            }
+        }
+        return null;
+    }
+}

+ 20 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/model/DataQuery.java

@@ -0,0 +1,20 @@
+package jnpf.model;
+
+import lombok.Data;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/11/26 上午11:31
+ */
+@Data
+public class DataQuery {
+    private String sheet;
+    private String sheetName;
+    private List<Object> queryList = new ArrayList<>();
+    private List<DataSortModel> sortList = new ArrayList<>();
+}

+ 16 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/model/DataSortModel.java

@@ -0,0 +1,16 @@
+package jnpf.model;
+
+import lombok.Data;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/12/6 下午2:12
+ */
+@Data
+public class DataSortModel {
+    private String id;
+    private String vModel;
+    private String type;
+}

+ 25 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/chart/UniverChartField.java

@@ -0,0 +1,25 @@
+package jnpf.univer.chart;
+
+import lombok.Data;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/9/10 下午1:29
+ */
+@Data
+public class UniverChartField {
+    //维度
+    private List<String> seriesNameField = new ArrayList<>();
+    //系列
+    private List<String> classifyNameField = new ArrayList<>();
+    //值
+    private List<List<String>> seriesDataField = new ArrayList<>();
+    //最大值
+    private List<String> maxField = new ArrayList<>();
+
+}

+ 18 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/chart/UniverChartModel.java

@@ -0,0 +1,18 @@
+package jnpf.univer.chart;
+
+import lombok.Data;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/9/10 下午1:26
+ */
+@Data
+public class UniverChartModel {
+    private String unitId;
+    private String subUnitId;
+    private String drawingId;
+    private UniverChartField field = new UniverChartField();
+    private String source;
+}

+ 20 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/data/cell/UniverCell.java

@@ -0,0 +1,20 @@
+package jnpf.univer.data.cell;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/8/1 下午8:54
+ */
+@Data
+public class UniverCell implements Serializable {
+    private String sheet;
+    private Integer row;
+    private Integer col;
+    private String drawingId;
+    private String domId;
+}

+ 46 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/data/cell/UniverDataConfig.java

@@ -0,0 +1,46 @@
+package jnpf.univer.data.cell;
+
+import jnpf.enums.CellDataEnum;
+import jnpf.enums.UniverDataEnum;
+import jnpf.ureport.definition.value.AggregateType;
+import lombok.Data;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+public class UniverDataConfig {
+    //dataSource
+    private Integer col;
+    private Integer row;
+    private String sheet;
+    private String type = CellDataEnum.text.name();
+    private UniverDataConfig custom;
+    private String field;
+    //0.无 1.列表 2. 分组 3.汇总
+    private Integer polymerizationType = 1;
+    //汇总方式
+    private String summaryType = AggregateType.sum.name();
+    private String fillDirection = UniverDataEnum.cellDirection.getName();
+    private String leftParentCellType = UniverDataEnum.cellNone.getName();
+    private String leftParentCellCustomRowName;
+    private String leftParentCellCustomColName;
+    private String topParentCellType = UniverDataEnum.cellNone.getName();
+    private String topParentCellCustomRowName;
+    private String topParentCellCustomColName;
+
+
+    //echarts
+    private String drawingId;
+    private String unitId;
+    private String subUnitId;
+    private UniverDataConfig option;
+    private String classifyNameField;
+    private String seriesNameField;
+    private String seriesDataField;
+    private String maxField;
+
+}

+ 19 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/data/custom/UniverCustom.java

@@ -0,0 +1,19 @@
+package jnpf.univer.data.custom;
+
+import jnpf.univer.data.cell.UniverDataConfig;
+import lombok.Data;
+
+import java.util.*;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/11/25 下午2:49
+ */
+@Data
+public class UniverCustom {
+    private List<UniverDataConfig> cells = new ArrayList<>();
+    private Map<String, UniverDataConfig> floatEcharts = new HashMap<>();
+    private Map<String, UniverDataConfig> floatImages = new HashMap<>();
+}

+ 27 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/data/resource/UniverConfig.java

@@ -0,0 +1,27 @@
+package jnpf.univer.data.resource;
+
+import lombok.Data;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/11/21 上午11:06
+ */
+@Data
+public class UniverConfig {
+    private String operator;
+    private UniverValue value;
+    private String iconType;
+    private String iconId;
+    private Integer index;
+    private String color;
+
+    private UniverValue min;
+    private UniverValue max;
+    private Boolean isGradient;
+    private String positiveColor;
+    private String nativeColor;
+
+
+}

+ 19 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/data/resource/UniverCustomFilters.java

@@ -0,0 +1,19 @@
+package jnpf.univer.data.resource;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/10/18 下午1:58
+ */
+@Data
+public class UniverCustomFilters {
+    private List<UniverCustomFilters> customFilters;
+    private String val;
+    private String operator;
+    private Integer and;
+}

+ 24 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/data/resource/UniverDrawing.java

@@ -0,0 +1,24 @@
+package jnpf.univer.data.resource;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ *
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+public class UniverDrawing implements Serializable {
+    private String unitId;
+    private String subUnitId;
+    private String drawingId;
+    private Integer drawingType;
+    private String imageSourceType;
+    private String source;
+    private UniverTransform sheetTransform;
+    private UniverTransform transform;
+}

+ 15 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/data/resource/UniverFilters.java

@@ -0,0 +1,15 @@
+package jnpf.univer.data.resource;
+
+import lombok.Data;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/10/18 下午1:58
+ */
+@Data
+public class UniverFilters {
+    private UniverCustomFilters customFilters;
+    private Long colId;
+}

+ 17 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/data/resource/UniverNum.java

@@ -0,0 +1,17 @@
+package jnpf.univer.data.resource;
+
+import lombok.Data;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/24 下午1:31
+ */
+@Data
+public class UniverNum {
+    private String i;
+    private Integer row;
+    private Integer col;
+    private String sheet;
+}

+ 17 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/data/resource/UniverOffset.java

@@ -0,0 +1,17 @@
+package jnpf.univer.data.resource;
+
+import lombok.Data;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/9/10 下午6:12
+ */
+@Data
+public class UniverOffset {
+    private Integer column;
+    private Integer columnOffset;
+    private Integer row;
+    private Integer  rowOffset;
+}

+ 20 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/data/resource/UniverRef.java

@@ -0,0 +1,20 @@
+package jnpf.univer.data.resource;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/22 上午11:41
+ */
+@Data
+public class UniverRef implements Serializable {
+    private Integer count;
+    private String i;
+    private String pattern;
+    private String type;
+
+}

+ 23 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/data/resource/UniverRule.java

@@ -0,0 +1,23 @@
+package jnpf.univer.data.resource;
+
+import jnpf.univer.style.UniverStyle;
+import lombok.Data;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/22 上午11:33
+ */
+@Data
+public class UniverRule {
+    private String type;
+    private String subType;
+    private String operator;
+    private UniverStyle style;
+    private Object value;
+    private Boolean isShowValue;
+    private Object config;
+    private Boolean isPercent;
+    private Boolean isBottom;
+}

+ 27 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/data/resource/UniverTransform.java

@@ -0,0 +1,27 @@
+package jnpf.univer.data.resource;
+
+import lombok.Data;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/9/10 下午6:09
+ */
+@Data
+public class UniverTransform {
+    private Boolean flipY;
+    private Boolean flipX;
+
+    private Integer angle;
+    private Integer skewX;
+    private Integer skewY;
+
+    private UniverOffset from;
+    private UniverOffset to;
+
+    private Integer left;
+    private Integer top;
+    private Integer width;
+    private Integer height;
+}

+ 15 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/data/resource/UniverValue.java

@@ -0,0 +1,15 @@
+package jnpf.univer.data.resource;
+
+import lombok.Data;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/11/21 上午11:09
+ */
+@Data
+public class UniverValue {
+    private Object value;
+    private String type;
+}

+ 30 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/model/UniverPreview.java

@@ -0,0 +1,30 @@
+package jnpf.univer.model;
+
+import lombok.Data;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/7/4 下午4:12
+ */
+@Data
+public class UniverPreview {
+
+    private String cells;
+
+    private String snapshot;
+
+    private String queryList;
+
+    private String chartData;
+
+    private String fullName;
+
+    private String versionId;
+
+    private Integer allowExport;
+
+    private Integer allowPrint;
+
+}

+ 37 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/model/UniverWorkBook.java

@@ -0,0 +1,37 @@
+package jnpf.univer.model;
+
+import jnpf.univer.resources.UniverResource;
+import jnpf.univer.sheet.UniverSheet;
+import jnpf.univer.style.UniverStyle;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.*;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+public class UniverWorkBook implements Serializable {
+    private String id;
+    private Integer rev;
+    private String name;
+    /**
+     * Univer版本
+     */
+    private String appVersion = "0.4.1";
+    /**
+     * Univer语言
+     */
+    private String locale = "zhCN";
+    /**
+     * 样式列表
+     */
+    private Map<String, UniverStyle> styles = new HashMap<>();
+    private List<String> sheetOrder = new ArrayList<>();
+    private Map<String, UniverSheet> sheets = new HashMap<>();
+    private List<UniverResource> resources = new ArrayList<>();
+}

+ 24 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/properties/UniverBody.java

@@ -0,0 +1,24 @@
+package jnpf.univer.properties;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/11/5 下午3:58
+ */
+@Data
+public class UniverBody {
+    private String dataStream;
+    private List<UniverBodyConfig> textRuns;
+    private List<UniverBodyConfig> tables;
+    private List<UniverBodyConfig> sectionBreaks;
+    private List<UniverBodyConfig> paragraphs;
+    private List<UniverBodyConfig> customDecorations;
+    private List<UniverBodyConfig> customBlocks;
+    private List<UniverBodyConfig> customRanges;
+    private UniverBodyConfig settings;
+}

+ 60 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/properties/UniverBodyConfig.java

@@ -0,0 +1,60 @@
+
+package jnpf.univer.properties;
+
+import jnpf.univer.style.UniverStyle;
+import lombok.Data;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/11/5 下午4:08
+ */
+@Data
+public class UniverBodyConfig {
+    private Integer startIndex;
+    private UniverBodyConfig paragraphStyle;
+    private Integer horizontalAlign;
+    private Integer rangeType;
+    private String rangeId;
+    private String url;
+    private UniverBodyConfig properties;
+
+    private Integer ed;
+    private String sId;
+    private String id;
+    private Integer st;
+    private UniverStyle ts;
+
+    private Integer endIndex;
+    private String tableId;
+
+    private Integer charSpace;
+    private Integer paddingEnd;
+    private Integer width;
+
+    private String defaultFooterId;
+    private String defaultHeaderId;
+    private String evenPageFooterId;
+    private String evenPageHeaderId;
+    private String firstPageFooterId;
+    private String firstPageHeaderId;
+
+
+    private Integer linePitch;
+    private Integer marginBottom;
+    private Integer marginFooter;
+    private Integer marginHeader;
+    private Integer marginLeft;
+    private Integer marginRight;
+    private Integer marginTop;
+    private Integer pageNumberStart;
+    private Integer useFirstPageHeaderFooter;
+
+    private Integer zoomRatio;
+
+    private String blockId;
+    private Integer blockType;
+    private Integer type;
+    private Boolean wholeEntity;
+}

+ 43 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/properties/UniverDocumentStyle.java

@@ -0,0 +1,43 @@
+package jnpf.univer.properties;
+
+import jnpf.univer.style.UniverStyle;
+import lombok.Data;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/11/5 下午3:55
+ */
+@Data
+public class UniverDocumentStyle {
+
+    private Integer autoHyphenation;
+    private Integer characterSpacingControl;
+    private Integer consecutiveHyphenLimit;
+    private String defaultFooterId;
+    private String defaultHeaderId;
+    private Integer defaultTabStop;
+    private Integer doNotHyphenateCaps;
+    private Integer documentFlavor;
+    private Integer evenAndOddHeaders;
+    private String evenPageFooterId;
+    private String evenPageHeaderId;
+    private String firstPageFooterId;
+    private String firstPageHeaderId;
+    private Integer hyphenationZone;
+    private Integer marginBottom;
+    private Integer marginFooter;
+    private Integer marginHeader;
+    private Integer marginLeft;
+    private Integer marginRight;
+    private Integer marginTop;
+    private Integer pageNumberStart;
+    private Integer pageOrient;
+    private UniverDocumentStyleConfig pageSize;
+    private Integer paragraphLineGapDefault;
+    private UniverDocumentStyleConfig renderConfig;
+    private Boolean spaceWidthEastAsian;
+    private UniverStyle textStyle;
+    private Boolean useFirstPageHeaderFooter;
+}

+ 21 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/properties/UniverDocumentStyleConfig.java

@@ -0,0 +1,21 @@
+package jnpf.univer.properties;
+
+import lombok.Data;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/11/5 下午3:55
+ */
+@Data
+public class UniverDocumentStyleConfig {
+    private Integer width;
+    private Integer height;
+    private Integer background;
+    private Integer horizontalAlign;
+    private Integer verticalAlign;
+    private Integer centerAngle;
+    private Integer vertexAngle;
+    private Integer wrapStrategy;
+}

+ 32 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/properties/UniverProperties.java

@@ -0,0 +1,32 @@
+package jnpf.univer.properties;
+
+import lombok.Data;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/11/5 下午5:54
+ */
+@Data
+public class UniverProperties {
+    private UniverBody body;
+    private Boolean disabled;
+    private UniverDocumentStyle documentStyle;
+    private Map<String,Object> drawings;
+    private List<String> drawingsOrder;
+    private Map<String,Object> footers;
+    private List<String> headerFooterDrawingsOrder;
+    private Map<String,Object> headers;
+    private String id;
+    private Map<String,Object> lists;
+    private String locale;
+    private Map<String,Object> resources;
+    private Integer rev;
+    private UniverBodyConfig settings;
+    private Map<String,Object> tableSource;
+    private String title;
+}

+ 16 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/resources/UniverResource.java

@@ -0,0 +1,16 @@
+package jnpf.univer.resources;
+
+import lombok.Data;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+public class UniverResource{
+    private String id;
+    private String name;
+    private String data;
+}

+ 67 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/resources/UniverResourceData.java

@@ -0,0 +1,67 @@
+package jnpf.univer.resources;
+
+import jnpf.univer.data.resource.*;
+import jnpf.univer.sheet.UniverSheetRange;
+import lombok.Data;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/22 下午2:10
+ */
+@Data
+public class UniverResourceData {
+    //SHEET_DATA_VALIDATION
+    private String uid;
+    private String operator;
+    private String formula1;
+    private String formula2;
+    private String error;
+    private Integer renderMode;
+    private Boolean allowBlank;
+    private Integer errorStyle;
+    private Boolean showErrorMessage;
+
+    //SHEET_NUMFMT_PLUGIN
+    private Map<String, Map<Integer, Map<Integer, UniverNum>>> model;
+    private List<UniverRef> refModel;
+    private List<UniverNum> numModel;
+
+    //SHEET_CONDITIONAL_FORMATTING_PLUGIN
+    private String cfId;
+    private UniverRule rule;
+    private Boolean stopIfTrue;
+
+    //SHEET_CONDITIONAL_FORMATTING_PLUGIN、SHEET_DATA_VALIDATION、SHEET_RANGE_PROTECTION
+    private List<UniverSheetRange> ranges;
+
+    //SHEET_NUMFMT_PLUGIN、SHEET_DATA_VALIDATION
+    private String type;
+
+    //SHEET_DEFINED_NAME_PLUGIN
+    private String id;
+    private String name;
+    private String formulaOrRefString;
+    private String comment;
+    private String localSheetId;
+
+    //SHEET_RANGE_PROTECTION
+    private String permissionId;
+    private String unitType;
+    private String unitId;
+    private String subUnitId;
+
+    //SHEET_DRAWING_PLUGIN
+    private List<String> order;
+    private Map<String, UniverDrawing> data;
+
+    //SHEET_FILTER_PLUGIN
+    private UniverSheetRange ref;
+    private List<UniverFilters> filterColumns;
+    private List<Integer> cachedFilteredOut;
+
+}

+ 38 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/sheet/UniverSheet.java

@@ -0,0 +1,38 @@
+package jnpf.univer.sheet;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+public class UniverSheet implements Serializable {
+    private String id;
+    private String name;
+    private String tabColor;
+    private Integer hidden;
+    private UniverSheetFreeze freeze;
+    private Integer rowCount;
+    private Integer columnCount;
+    private Integer zoomRatio;
+    private Integer scrollTop;
+    private Integer scrollLeft;
+    private Integer defaultColumnWidth;
+    private Integer defaultRowHeight;
+    private List<UniverSheetRange> mergeData;
+    private Map<Integer, Map<Integer, UniverSheetCellData>> cellData;
+    private Map<Integer, UniverSheetRowData> rowData;
+    private Map<Integer, UniverSheetColumnData> columnData;
+    private UniverSheetRowHeader rowHeader;
+    private UniverSheetColumnHeader columnHeader;
+    private Integer showGridlines;
+    private List<String> selections;
+    private Integer rightToLeft;
+}

+ 17 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/sheet/UniverSheetCell.java

@@ -0,0 +1,17 @@
+package jnpf.univer.sheet;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+public class UniverSheetCell implements Serializable {
+    private Integer row;
+    private Integer column;
+}

+ 50 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/sheet/UniverSheetCellData.java

@@ -0,0 +1,50 @@
+package jnpf.univer.sheet;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+public class UniverSheetCellData implements Serializable {
+    /**
+     * The unique key, a random string, is used for the plug-in to associate the cell. When the cell information changes,
+     * the plug-in does not need to change the data, reducing the pressure on the back-end interface id?: string.
+     */
+    private Object p;
+
+    /**
+     * style id
+     * UniverStyle | String
+     */
+    private Object s;
+
+    /**
+     * Origin value
+     * String | Integer | Boolean
+     */
+    private Object v;
+
+    // Usually the type is automatically determined based on the data, or the user directly specifies
+    // 1 string, 2 number, 3 boolean, 4 force string, green icon, set null for cell clear all
+    private Integer t;
+
+    /**
+     * Raw formula string. For example `=SUM(A1:B4)`.
+     */
+    private String f;
+
+    /**
+     * Id of the formula.
+     */
+    private String si;
+
+    private Object fontRenderExtension;
+
+    private Object iconSet;
+}

+ 23 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/sheet/UniverSheetColumnData.java

@@ -0,0 +1,23 @@
+package jnpf.univer.sheet;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+public class UniverSheetColumnData implements Serializable {
+    /**
+     * width
+     */
+    private Integer w;
+    /**
+     * hidden
+     */
+    private Integer hd;
+}

+ 17 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/sheet/UniverSheetColumnHeader.java

@@ -0,0 +1,17 @@
+package jnpf.univer.sheet;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+public class UniverSheetColumnHeader implements Serializable {
+    private Integer height;
+    private Integer hidden;
+}

+ 19 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/sheet/UniverSheetFreeze.java

@@ -0,0 +1,19 @@
+package jnpf.univer.sheet;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+public class UniverSheetFreeze implements Serializable {
+    private Integer xSplit = 0;
+    private Integer ySplit = 0;
+    private Integer startRow = -1;
+    private Integer startColumn = -1;
+}

+ 47 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/sheet/UniverSheetRange.java

@@ -0,0 +1,47 @@
+package jnpf.univer.sheet;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+public class UniverSheetRange implements Serializable {
+    /**
+     * The start row (inclusive) of the range
+     * startRow
+     */
+    private Integer startRow;
+
+    /**
+     * The end row (exclusive) of the range
+     * endRow
+     */
+    private Integer endRow;
+    /**
+     * The start column (inclusive) of the range
+     * startColumn
+     */
+    private Integer startColumn;
+
+    /**
+     * The end column (exclusive) of the range
+     * endColumn
+     */
+    private Integer endColumn;
+
+    private Integer rangeType;
+
+    private Integer startAbsoluteRefType;
+
+    private Integer endAbsoluteRefType;
+
+    private String unitId;
+
+    private String sheetId;
+}

+ 31 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/sheet/UniverSheetRowData.java

@@ -0,0 +1,31 @@
+package jnpf.univer.sheet;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+public class UniverSheetRowData implements Serializable {
+    /**
+     * height in pixel
+     */
+    private Integer h;
+    /**
+     * is current row self-adaptive to its content, use `ah` to set row height when true, else use `h`.
+     */
+    private Integer ia; // pre name `isAutoHeight`
+    /**
+     * auto height
+     */
+    private Integer ah;
+    /**
+     * hidden
+     */
+    private Integer hd;
+}

+ 17 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/sheet/UniverSheetRowHeader.java

@@ -0,0 +1,17 @@
+package jnpf.univer.sheet;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+public class UniverSheetRowHeader implements Serializable {
+    private Integer width;
+    private Integer hidden;
+}

+ 98 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/style/UniverStyle.java

@@ -0,0 +1,98 @@
+package jnpf.univer.style;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+public class UniverStyle implements Serializable {
+    /**
+     * fontFamily
+     */
+    private String ff;
+    /**
+     * fontSize
+     * <p>
+     * pt
+     */
+    private Integer fs;
+    /**
+     * italic
+     * 0: false
+     * 1: true
+     */
+    private Integer it;
+    /**
+     * bold
+     * 0: false
+     * 1: true
+     */
+    private Integer bl;
+
+    /**
+     * underline
+     */
+    private UniverStyleTextDecoration ul;
+    /**
+     * strikethrough
+     */
+    private UniverStyleTextDecoration st;
+    /**
+     * overline
+     */
+    private UniverStyleTextDecoration ol;
+
+    /**
+     * background
+     */
+    private UniverStyleColor bg;
+
+    /**
+     * border
+     */
+    private UniverStyleBorder bd;
+
+    /**
+     * foreground
+     */
+    private UniverStyleColor cl;
+
+    /**
+     * (1.正常 2.Subscript 下标 3.Superscript上标 )
+     */
+    private Integer va;
+    /**
+     * textRotation
+     */
+    private UniverStyleTextRotation tr;
+    /**
+     * textDirection
+     */
+    private Integer td;
+    /**
+     * horizontalAlignment
+     */
+    private Integer ht;
+    /**
+     * verticalAlignment
+     */
+    private Integer vt;
+    /**
+     * wrapStrategy
+     */
+    private Integer tb;
+    /**
+     * padding
+     */
+    private UniverStylePadding pd;
+    /**
+     * dataFormat
+     */
+    private UniverStylePattern n;
+}

+ 35 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/style/UniverStyleBorder.java

@@ -0,0 +1,35 @@
+package jnpf.univer.style;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * Style properties of top, bottom, left and right border
+ * TLBR = 'tlbr', //START_TOP_LEFT_END_BOTTOM_RIGHT
+ * TLBC = 'tlbc', // START_TOP_LEFT_END_BOTTOM_CENTER
+ * TLMR = 'tlmr', // START_TOP_LEFT_END_MIDDLE_RIGHT
+ * BLTR = 'bltr', // START_BOTTOM_LEFT_END_TOP_RIGHT
+ * MLTR = 'mltr', // START_MIDDLE_LEFT_END_TOP_RIGHT
+ * BCTR = 'bctr', // START_BOTTOM_CENTER_END_TOP_RIGHT
+ *
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+public class UniverStyleBorder implements Serializable {
+    private UniverStyleBorderStyle t;
+    private UniverStyleBorderStyle r;
+    private UniverStyleBorderStyle b;
+    private UniverStyleBorderStyle l;
+
+    private UniverStyleBorderStyle tl_br;
+    private UniverStyleBorderStyle tl_bc;
+    private UniverStyleBorderStyle tl_mr;
+
+    private UniverStyleBorderStyle bl_tr;
+    private UniverStyleBorderStyle ml_tr;
+    private UniverStyleBorderStyle bc_tr;
+}

+ 17 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/style/UniverStyleBorderStyle.java

@@ -0,0 +1,17 @@
+package jnpf.univer.style;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+public class UniverStyleBorderStyle implements Serializable {
+    private Integer s;
+    private UniverStyleColor cl;
+}

+ 17 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/style/UniverStyleColor.java

@@ -0,0 +1,17 @@
+package jnpf.univer.style;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+public class UniverStyleColor implements Serializable {
+    private String rgb;
+    private Object th;
+}

+ 19 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/style/UniverStylePadding.java

@@ -0,0 +1,19 @@
+package jnpf.univer.style;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+public class UniverStylePadding implements Serializable {
+    private Integer t;
+    private Integer r;
+    private Integer b;
+    private Integer l;
+}

+ 14 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/style/UniverStylePattern.java

@@ -0,0 +1,14 @@
+package jnpf.univer.style;
+
+import lombok.Data;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/9/6 上午9:00
+ */
+@Data
+public class UniverStylePattern {
+    private String pattern;
+}

+ 23 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/style/UniverStyleTextDecoration.java

@@ -0,0 +1,23 @@
+package jnpf.univer.style;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+public class UniverStyleTextDecoration implements Serializable {
+    // show
+    private Integer s;
+    // color is follow the font color. the default value is TRUE, it's also TRUE if it is undefined. the cl has no effect when `c` is TRUE.
+    private Integer c;
+    // color
+    private UniverStyleColor cl;
+    // lineType
+    private Object t;
+}

+ 25 - 0
jnpf-datareport-univer-model/src/main/java/jnpf/univer/style/UniverStyleTextRotation.java

@@ -0,0 +1,25 @@
+package jnpf.univer.style;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author :JNPF开发平台组
+ * @version: V3.1.0
+ * @copyright 引迈信息技术有限公司
+ * @date :2024/5/11 下午4:35
+ */
+@Data
+public class UniverStyleTextRotation implements Serializable {
+    /**
+     * angle
+     */
+    private int a;
+    /**
+     * vertical
+     * true : 1
+     * false : 0
+     */
+    private int v;
+}

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini