把文书模板语法配置、自定义列表标签配置、自定义字符串列表元素拼接分割符提取成docker镜像的环境变量

This commit is contained in:
2025-07-31 15:06:08 +08:00
parent 97ed5d9ed7
commit fa06be4a48
14 changed files with 283 additions and 102 deletions

View File

@@ -10,7 +10,9 @@ import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Component
@@ -35,6 +37,11 @@ public class DocumentConverter {
Map<String, Object> params = new HashMap<>();
params.put("callerName", "张三");
List<String> departmentList = new ArrayList<>();
departmentList.add("处置部门1");
departmentList.add("处置部门2");
params.put("departmentList", departmentList);
// 生成word并转为pdf
byte[] generatedWord = documentService.generateWord(Files.readAllBytes(sourceFile.toPath()), params);
byte[] wordedToPdf = documentService.wordToPdf(generatedWord, true);