检验报告改A5

This commit is contained in:
2025-11-13 18:04:21 +08:00
parent 32142d948d
commit 014e8cb260
3 changed files with 6 additions and 6 deletions

View File

@@ -41,6 +41,7 @@ public class MS439Controller {
// 获取检验报告PDF
String path = ms439PrintService.getJYPDFPath(params);
MS439Request ms439Request = new MS439Request();
ms439Request.setPagesource(params.getString("pagesource"));
ms439Request.setFileDir(path);
LexMarkResultDTO<?> result = ms439PrintService.printImage(ms439Request);
return Result.ok(result);

View File

@@ -224,7 +224,7 @@ public class MS439PrintServiceImpl implements MS439PrintService {
// 2. 准备模板数据
Map<String, Object> data = prepareReportData(params);
// 3. 渲染Thymeleaf模板
String htmlContent = TemplateUtil.renderThymeleafTemplate(data, "reportJY");
String htmlContent = TemplateUtil.renderThymeleafTemplate(data, StrUtil.equals("A5", params.getString("pagesource")) ? "reportJYA5" : "reportJY");
// 4. 生成PDF文件
TemplateUtil.createPdfFromHtml(htmlContent, pdfPath);
@@ -256,7 +256,6 @@ public class MS439PrintServiceImpl implements MS439PrintService {
}
// 报告数据准备(根据实际业务实现)
public static Map<String, Object> prepareReportData(JSONObject params) {
Map<String, Object> data = new HashMap<>();

View File

@@ -5,10 +5,10 @@
<title>检验报告单</title>
</head>
<body>
<div style="font-size: 12px;">
<div style="font-size: 14px;">
<!-- 医院标题 -->
<div style="text-align: center;">
<div style="font-size: 14px; font-weight: bold;">
<div style="font-size: 24px; font-weight: bold;">
澜沧拉祜族自治县中医医院<span th:text="${baseInfo.lspcmName}"></span>检验单
</div>
</div>
@@ -19,7 +19,7 @@
<div style="height: 5px;"></div>
<!-- 患者基本信息区域 - 使用表格布局以确保兼容 -->
<table style="width: 100%;font-size: 12px;">
<table style="width: 100%;">
<!-- 第1行2个字段 -->
<tr>
<td style="width: 33%;font-weight: bold;">
@@ -98,7 +98,7 @@
<div style="height: 10px;"></div>
<!-- 检测结果表格 -->
<table style="border-collapse:collapse;width: 100%;border:1px solid gray;font-size: 12px;">
<table style="border-collapse:collapse;width: 100%;border:1px solid gray;">
<thead style="text-align: center;">
<tr style="background-color: #f0f0f0;height:30px;">
<th style="padding: 8px 5px; width: 25%;">项目名称</th>