From a87c0376bd72a04bb4def026b03b82dd01b7e169 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期二, 15 九月 2026 23:39:52 +0800
Subject: [PATCH] 修改了叫号检查页面患者信息内容
---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/freemark/TemplateCreateController.java | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/freemark/TemplateCreateController.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/freemark/TemplateCreateController.java
index 7f635ea..69b6d14 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/freemark/TemplateCreateController.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/freemark/TemplateCreateController.java
@@ -41,6 +41,8 @@
public TemplateCreateController() {
configuration = new Configuration();
configuration.setDefaultEncoding("utf-8");
+ // 浣跨敤classpath鍔犺浇妯℃澘锛岃�屼笉鏄枃浠剁郴缁�
+ configuration.setClassForTemplateLoading(this.getClass(), "/template");
}
@@ -54,8 +56,6 @@
AppointmentDO appointment = appointmentService.getAppointment(id);
getData(dataMap, appointment);
- String filePath = getClass().getResource("/template/").getPath();
- configuration.setDirectoryForTemplateLoading(new File(filePath));
// 纭繚妯℃澘鏄疻ord XML鏍煎紡
Template t = configuration.getTemplate("鐭ユ儏鍚屾剰杩愬姩璇曢獙.ftl");
@@ -96,7 +96,7 @@
}
@Operation(summary = "椋熺蹇冭剰鐢电敓鐞嗙煡鎯呭悓鎰忎功")
- @GetMapping(value = "/downloadEsophagus/{id}")
+ @GetMapping(value = "/downloadesophagus/{id}")
public Map<String, Object> downloadEsophagusInfo(@PathVariable("id") Long id) {
log.info("椋熺蹇冭剰鐢电敓鐞嗙煡鎯呭悓鎰忎功锛歿}", id);
@@ -105,8 +105,6 @@
AppointmentDO appointment = appointmentService.getAppointment(id);
getData(dataMap, appointment);
- String filePath = getClass().getResource("/template/").getPath();
- configuration.setDirectoryForTemplateLoading(new File(filePath));
// 纭繚妯℃澘鏄疻ord XML鏍煎紡
Template t = configuration.getTemplate("椋熺蹇冭剰鐢电敓鐞嗙煡鎯呭悓鎰忎功.ftl");
@@ -153,7 +151,18 @@
dataMap.put("age", appointment.getPatBirthday() == null ? "" : calculateAge(appointment.getPatBirthday()));
dataMap.put("inhospno", StringUtils.isEmpty(appointment.getHospitalNo()) ? "" : appointment.getHospitalNo());
dataMap.put("idNo", StringUtils.isEmpty(appointment.getPatId()) ? "" : appointment.getPatId());
- dataMap.put("badNo", StringUtils.isEmpty(appointment.getPatBedNo()) ? "" : appointment.getPatBedNo());
+ String ward = StringUtils.isEmpty(appointment.getPatWardDesc()) ? "" : appointment.getPatWardDesc();
+ String bed = StringUtils.isEmpty(appointment.getPatBedNo()) ? "" : appointment.getPatBedNo();
+
+ // 濡傛灉涓や釜閮芥湁鍊硷紝涓棿鍔犵┖鏍硷紱濡傛灉鍙湁涓�涓湁鍊硷紝灏变笉鍔犵┖鏍�
+ String badNo = "";
+ if (!ward.isEmpty() && !bed.isEmpty()) {
+ badNo = ward + " " + bed;
+ } else {
+ badNo = ward + bed;
+ }
+ dataMap.put("badNo", badNo);
+
dataMap.put("birthday", appointment.getPatBirthday() == null ? "" : appointment.getPatBirthday());
dataMap.put("doctor", StringUtils.isEmpty(appointment.getDoctor()) ? "" : appointment.getDoctor());
dataMap.put("deptName", StringUtils.isEmpty(appointment.getPatDeptDesc()) ? "" : appointment.getPatDeptDesc());
--
Gitblit v1.9.3