检验报告改A5
This commit is contained in:
@@ -41,6 +41,7 @@ public class MS439Controller {
|
|||||||
// 获取检验报告PDF
|
// 获取检验报告PDF
|
||||||
String path = ms439PrintService.getJYPDFPath(params);
|
String path = ms439PrintService.getJYPDFPath(params);
|
||||||
MS439Request ms439Request = new MS439Request();
|
MS439Request ms439Request = new MS439Request();
|
||||||
|
ms439Request.setPagesource(params.getString("pagesource"));
|
||||||
ms439Request.setFileDir(path);
|
ms439Request.setFileDir(path);
|
||||||
LexMarkResultDTO<?> result = ms439PrintService.printImage(ms439Request);
|
LexMarkResultDTO<?> result = ms439PrintService.printImage(ms439Request);
|
||||||
return Result.ok(result);
|
return Result.ok(result);
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ public class MS439PrintServiceImpl implements MS439PrintService {
|
|||||||
// 2. 准备模板数据
|
// 2. 准备模板数据
|
||||||
Map<String, Object> data = prepareReportData(params);
|
Map<String, Object> data = prepareReportData(params);
|
||||||
// 3. 渲染Thymeleaf模板
|
// 3. 渲染Thymeleaf模板
|
||||||
String htmlContent = TemplateUtil.renderThymeleafTemplate(data, "reportJY");
|
String htmlContent = TemplateUtil.renderThymeleafTemplate(data, StrUtil.equals("A5", params.getString("pagesource")) ? "reportJYA5" : "reportJY");
|
||||||
// 4. 生成PDF文件
|
// 4. 生成PDF文件
|
||||||
TemplateUtil.createPdfFromHtml(htmlContent, pdfPath);
|
TemplateUtil.createPdfFromHtml(htmlContent, pdfPath);
|
||||||
|
|
||||||
@@ -256,7 +256,6 @@ public class MS439PrintServiceImpl implements MS439PrintService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 报告数据准备(根据实际业务实现)
|
// 报告数据准备(根据实际业务实现)
|
||||||
public static Map<String, Object> prepareReportData(JSONObject params) {
|
public static Map<String, Object> prepareReportData(JSONObject params) {
|
||||||
Map<String, Object> data = new HashMap<>();
|
Map<String, Object> data = new HashMap<>();
|
||||||
|
|||||||
@@ -5,10 +5,10 @@
|
|||||||
<title>检验报告单</title>
|
<title>检验报告单</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div style="font-size: 12px;">
|
<div style="font-size: 14px;">
|
||||||
<!-- 医院标题 -->
|
<!-- 医院标题 -->
|
||||||
<div style="text-align: center;">
|
<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>检验单
|
澜沧拉祜族自治县中医医院<span th:text="${baseInfo.lspcmName}"></span>检验单
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
<div style="height: 5px;"></div>
|
<div style="height: 5px;"></div>
|
||||||
|
|
||||||
<!-- 患者基本信息区域 - 使用表格布局以确保兼容 -->
|
<!-- 患者基本信息区域 - 使用表格布局以确保兼容 -->
|
||||||
<table style="width: 100%;font-size: 12px;">
|
<table style="width: 100%;">
|
||||||
<!-- 第1行:2个字段 -->
|
<!-- 第1行:2个字段 -->
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width: 33%;font-weight: bold;">
|
<td style="width: 33%;font-weight: bold;">
|
||||||
@@ -98,7 +98,7 @@
|
|||||||
<div style="height: 10px;"></div>
|
<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;">
|
<thead style="text-align: center;">
|
||||||
<tr style="background-color: #f0f0f0;height:30px;">
|
<tr style="background-color: #f0f0f0;height:30px;">
|
||||||
<th style="padding: 8px 5px; width: 25%;">项目名称</th>
|
<th style="padding: 8px 5px; width: 25%;">项目名称</th>
|
||||||
|
|||||||
Reference in New Issue
Block a user