From 7bc725bea3fa8e02e952635dcbb1a493e4a74a13 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期六, 12 十月 2024 11:41:41 +0800
Subject: [PATCH] update

---
 jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceImpl.java |   39 +++++++++++++++++++++++++++++++++------
 1 files changed, 33 insertions(+), 6 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 7e18a19..1fcbd19 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
@@ -7,7 +7,6 @@
 import cn.lihu.jh.module.ecg.controller.admin.room.vo.MonitorInfoVO;
 import cn.lihu.jh.module.ecg.dal.dataobject.devrent.DevRentDO;
 import cn.lihu.jh.module.ecg.dal.mysql.call.CallMapper;
-import cn.lihu.jh.module.ecg.dal.mysql.checktype.CheckTypeMapper;
 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;
@@ -27,7 +26,7 @@
 import cn.lihu.jh.module.ecg.dal.dataobject.queue.QueueDO;
 import cn.lihu.jh.framework.common.pojo.PageResult;
 import cn.lihu.jh.framework.common.util.object.BeanUtils;
-import cn.lihu.jh.module.ecg.dal.mysql.queue.queueMapper;
+import cn.lihu.jh.module.ecg.dal.mysql.queue.QueueMapper;
 import static cn.lihu.jh.module.ecg.enums.ErrorCodeConstants.*;
 import static cn.lihu.jh.framework.common.exception.util.ServiceExceptionUtil.exception;
 import static cn.lihu.jh.framework.common.pojo.CommonResult.error;
@@ -50,7 +49,7 @@
     private OAuth2TokenApi oAuth2TokenApi;
 
     @Resource
-    private queueMapper queueMapper;
+    private QueueMapper queueMapper;
 
     @Resource
     private RoomMapper roomMapper;
@@ -304,10 +303,32 @@
         devRent.setState( DevRentStateEnum.FREE.getState() );
         devRentMapper.insert(devRent);
 
-        startHurryUpOneCheckType(Integer.valueOf(queue.getBookCheckType()));
+        startHurryUpOneCheckType( queue.getBookCheckType() );
     }
 
+    // 甯歌妫�鏌� 鍙彿
+    @Override
     public void finishNextPatient(Long roomId, String bedNo) {
+        // 浠� DB 鎶� 灏辫瘖涓殑浜� 璁剧疆涓哄氨璇婂畬鎴�
+        Integer ret =  queueMapper.updateQueueStatus(roomId, bedNo,
+                QueueStatusEnum.ONSTAGE.getStatus(), QueueStatusEnum.FINISH.getStatus());
+
+        startNextPatient(roomId, bedNo);
+    }
+
+    // 棰嗙敤 鍙彿
+    @Override
+    public void finishReceiveNextPatient(Long roomId, String bedNo) {
+        // 浠� DB 鎶� 灏辫瘖涓殑浜� 璁剧疆涓哄氨璇婂畬鎴�
+        Integer ret =  queueMapper.updateQueueStatus(roomId, bedNo,
+                QueueStatusEnum.ONSTAGE.getStatus(), QueueStatusEnum.RECEIVED.getStatus());
+
+        startNextPatient(roomId, bedNo);
+    }
+
+    // 瑁呮満 鍙彿
+    @Override
+    public void finishInstallNextPatient(Long roomId, String bedNo) {
         // 浠� DB 鎶� 灏辫瘖涓殑浜� 璁剧疆涓哄氨璇婂畬鎴�
         Integer ret =  queueMapper.updateQueueStatus(roomId, bedNo,
                 QueueStatusEnum.ONSTAGE.getStatus(), QueueStatusEnum.FINISH.getStatus());
@@ -323,8 +344,14 @@
         startNextPatient(roomId, bedNo);
     }
 
-    public List<QueueDO> getDoctorQueueByStatus(Long roomId, String bedNo, List<Byte> statusList) {
-        List<QueueDO> queueDOList = queueMapper.getDoctorQueueByStatus(roomId, bedNo, statusList);
+    public List<QueueDO> getBedQueueByStatus(Long roomId, String bedNo, List<Byte> statusList) {
+        List<QueueDO> queueDOList = queueMapper.getBedQueueByStatus(roomId, bedNo, statusList);
+        return queueDOList;
+    }
+
+    @Override
+    public List<QueueDO> getRoomQueueByStatus(Long roomId, List<Byte> statusList) {
+        List<QueueDO> queueDOList = queueMapper.getRoomQueueByStatus(roomId, statusList);
         return queueDOList;
     }
 

--
Gitblit v1.9.3