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/service/queue/QueueServiceImpl.java |   64 +++++++++++++++++++++++++------
 1 files changed, 51 insertions(+), 13 deletions(-)

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 4926a0b..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,13 +6,16 @@
 
 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;
 import cn.lihu.jh.module.ecg.dal.mysql.devrent.DevRentMapper;
 import cn.lihu.jh.module.ecg.enums.DevRentStateEnum;
 import cn.lihu.jh.module.system.api.oauth2.OAuth2TokenApi;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.ObjectUtils;
 import org.apache.cxf.common.util.CollectionUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -84,6 +87,24 @@
         // 鏇存柊
         QueueDO updateObj = BeanUtils.toBean(updateReqVO, QueueDO.class);
         queueMapper.updateById(updateObj);
+    }
+
+    public void updateStop(long roomId,String bedNo) {
+        // 鏍¢獙瀛樺湪
+       if(ObjectUtils.isNotEmpty(roomId)) {
+           QueueDO updateObj=new QueueDO();
+           updateObj.setStatus(40);
+           UpdateWrapper<QueueDO> wrapper=new UpdateWrapper<>();
+           wrapper.eq("room_id",roomId).eq("bed_no",bedNo).eq("status","30");
+           queueMapper.update(updateObj,wrapper);
+
+           QueueDO updateObj1=new QueueDO();
+           updateObj1.setRoomId(0l);
+           updateObj1.setBedNo(" ");
+           UpdateWrapper<QueueDO> wrapper1=new UpdateWrapper<>();
+           wrapper1.eq("room_id",roomId).eq("bed_no",bedNo).eq("status","20");
+           queueMapper.update(updateObj1,wrapper1);
+       }
     }
 
     @Override
@@ -298,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;
     }
 
@@ -404,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