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 | 13 ++++++
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/queue/QueueDO.java | 17 ++++++++
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceImpl.java | 44 +++++++++++++++------
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/room/RoomMapper.java | 2
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/vo/QueueRespVO.java | 16 ++++++++
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/appointment/AppointmentMapper.java | 2
6 files changed, 78 insertions(+), 16 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 cf15cfb..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
@@ -151,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());
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/vo/QueueRespVO.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/vo/QueueRespVO.java
index 3e17185..57ce465 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/vo/QueueRespVO.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/vo/QueueRespVO.java
@@ -7,6 +7,7 @@
import java.time.LocalDate;
import java.time.LocalDateTime;
+import java.util.Date;
import java.util.Map;
import com.alibaba.excel.annotation.*;
@@ -103,4 +104,19 @@
@TableField(exist = false)
private String tolerance;
+ /**
+ * 浠ヤ笅瀛楁鏉ヨ嚜棰勭害鍗曪紙appointment锛夛紝鐢� QueueServiceImpl#fillAppointmentInfo 濉厖
+ */
+ @Schema(description = "鎮h�呯敓鏃�")
+ private LocalDate patBirthday;
+
+ @Schema(description = "鐧昏鏃堕棿")
+ private Date registerDate;
+
+ @Schema(description = "寮�鍗曞尰甯�")
+ private String doctor;
+
+ @Schema(description = "寮�鍗曟棩鏈燂紙寮�鍗曟椂闂达級")
+ private Date doctorTime;
+
}
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/queue/QueueDO.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/queue/QueueDO.java
index a85cfbf..3d13aa9 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/queue/QueueDO.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/queue/QueueDO.java
@@ -7,6 +7,7 @@
import cn.lihu.jh.framework.mybatis.core.dataobject.BaseDO;
import java.time.LocalDate;
+import java.util.Date;
import java.util.List;
import java.util.Map;
@@ -118,5 +119,21 @@
@TableField(exist = false)
private String tolerance;
+
+ /**
+ * 浠ヤ笅瀛楁鏉ヨ嚜棰勭害鍗曪紙appointment锛夛紝queue 琛ㄤ腑涓嶅瓨鍦紝
+ * 鐢� QueueServiceImpl#fillAppointmentInfo 鍦ㄦ煡璇㈠悗鎸� applyNo 鍥炴煡濉厖銆�
+ */
+ @TableField(exist = false)
+ private LocalDate patBirthday;
+
+ @TableField(exist = false)
+ private Date registerDate;
+
+ @TableField(exist = false)
+ private String doctor;
+
+ @TableField(exist = false)
+ private Date doctorTime;
}
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/appointment/AppointmentMapper.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/appointment/AppointmentMapper.java
index 10ef71c..8bd4466 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/appointment/AppointmentMapper.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/appointment/AppointmentMapper.java
@@ -39,7 +39,7 @@
@Select("select * from lihu.appointment where pat_id = #{patId} and to_days(book_date) = to_days(Now())")
List<AppointmentDO> getCurrentPatId(String patId);
- @Select("select * from lihu.appointment where (apply_no = #{code} or episode_id= #{code} or hospital_no =#{code} or pat_identity_id=#{code}) and book_date >= CURDATE() and book_date <= DATE_ADD(CURDATE(), INTERVAL 3 DAY)")
+ @Select("select * from lihu.appointment where (apply_no = #{code} or episode_id= #{code} or hospital_no =#{code} or pat_identity_id=#{code}) and book_date >= DATE_ADD(CURDATE(), INTERVAL -5 DAY) AND book_date <= DATE_ADD(CURDATE(), INTERVAL 15 DAY)")
List<AppointmentDO> getCurrentCode(String code);
@Select("select * from lihu.appointment where pat_id = #{patId} and book_check_type = #{checkType} and to_days(book_date) = to_days(Now()) limit 1")
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/room/RoomMapper.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/room/RoomMapper.java
index 91a56e2..ae94fac 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/room/RoomMapper.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/room/RoomMapper.java
@@ -104,7 +104,7 @@
@Update("<script> " +
"update lihu.clinic_room set status=#{newStatus.status}, doc_id=null, doc_name=null " +
- "where room_id=#{roomId} and bed_no=#{bedNo} and doc_id=#{docId} " +
+ "where room_id=#{roomId} and bed_no=#{bedNo} " +
"and status in ( " +
" <foreach collection='curStatusList' separator=',' item='curStatus'>" +
" #{curStatus.status} " +
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceImpl.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceImpl.java
index a7042f0..3c99e02 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceImpl.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceImpl.java
@@ -6,6 +6,7 @@
import cn.lihu.jh.module.ecg.Utils;
import cn.lihu.jh.module.ecg.controller.admin.room.vo.MonitorInfoVO;
+import cn.lihu.jh.module.ecg.dal.dataobject.appointment.AppointmentDO;
import cn.lihu.jh.module.ecg.dal.dataobject.checktype.CheckTypeDO;
import cn.lihu.jh.module.ecg.dal.dataobject.devrent.DevRentDO;
import cn.lihu.jh.module.ecg.dal.mysql.appointment.AppointmentMapper;
@@ -318,9 +319,7 @@
@Override
public PageResult<QueueDO> getqueuePage(QueuePageReqVO pageReqVO) {
PageResult<QueueDO> queueDOPageResult = queueMapper.selectPage(pageReqVO);
- queueDOPageResult.getList().forEach(queueDO -> {
- queueDO.setTolerance(appointmentMapper.getByApplyNo(queueDO.getApplyNo()).getTolerance());
- });
+ fillAppointmentInfo(queueDOPageResult.getList());
return queueDOPageResult;
}
@@ -424,23 +423,42 @@
public List<QueueDO> getBedQueueByStatus(Long roomId, String bedNo, List<Integer> statusList) {
List<QueueDO> queueDOList = queueMapper.getBedQueueByStatus(roomId, bedNo, statusList);
- if (!CollectionUtils.isEmpty(queueDOList)) {
- queueDOList.forEach(queueDO -> {
- queueDO.setTolerance(appointmentMapper.getByApplyNo(queueDO.getApplyNo()).getTolerance());
- });
- }
+ fillAppointmentInfo(queueDOList);
return queueDOList;
+ }
+
+ /**
+ * 浠庨绾﹀崟琛ラ綈 queue 琛ㄤ笂娌℃湁鐨勬偅鑰呬俊鎭��
+ *
+ * queue 琛ㄤ笉瀛樿繖浜涘瓧娈碉紝浣嗗尰鐢熺鍒楄〃鎺ュ彛闇�瑕佸睍绀猴紝鎵�浠ユ煡璇㈠悗鎸� applyNo 鍥炴煡棰勭害鍗曞~鍏咃細
+ * 澶氳�愯嵂銆佹�у埆銆佸嚭鐢熸棩鏈熴�佺櫥璁版椂闂淬�佸紑鍗曞尰甯堛�佸紑鍗曟棩鏈熴��
+ */
+ private void fillAppointmentInfo(List<QueueDO> queueDOList) {
+ if (CollectionUtils.isEmpty(queueDOList)) {
+ return;
+ }
+ queueDOList.forEach(queueDO -> {
+ if (null == queueDO.getApplyNo() || queueDO.getApplyNo().isEmpty()) {
+ return;
+ }
+ AppointmentDO appointment = appointmentMapper.getByApplyNo(queueDO.getApplyNo());
+ if (null == appointment) {
+ return;
+ }
+ queueDO.setTolerance(appointment.getTolerance());
+ queueDO.setPatGender(appointment.getPatGender());
+ queueDO.setPatBirthday(appointment.getPatBirthday());
+ queueDO.setRegisterDate(appointment.getRegisterDate());
+ queueDO.setDoctor(appointment.getDoctor());
+ queueDO.setDoctorTime(appointment.getDoctorTime());
+ });
}
@Override
public List<QueueDO> getRoomQueueByStatus(Long roomId, List<Integer> statusList) {
List<QueueDO> queueDOList = queueMapper.getRoomQueueByStatus(roomId, statusList);
- if (!CollectionUtils.isEmpty(queueDOList)) {
- queueDOList.forEach(queueDO -> {
- queueDO.setTolerance(appointmentMapper.getByApplyNo(queueDO.getApplyNo()).getTolerance());
- });
- }
+ fillAppointmentInfo(queueDOList);
return queueDOList;
}
--
Gitblit v1.9.3