From cd9b85533a35ae804fde9b1ee7af51ebb1630aeb Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期四, 29 八月 2024 17:32:07 +0800
Subject: [PATCH] 问诊重置功能

---
 jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/queue/queueMapper.java |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/queue/queueMapper.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/queue/queueMapper.java
index 8c8df04..66e2f65 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/queue/queueMapper.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/queue/queueMapper.java
@@ -6,11 +6,8 @@
 import cn.lihu.jh.module.ecg.dal.dataobject.queue.QueueDO;
 import cn.lihu.jh.module.ecg.dal.dataobject.queue.BedQueueStatisticDO;
 import cn.lihu.jh.module.ecg.dal.dataobject.queue.QueueStatisticDO;
-import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.*;
 import cn.lihu.jh.module.ecg.controller.admin.queue.vo.*;
-import org.apache.ibatis.annotations.Param;
-import org.apache.ibatis.annotations.Select;
-import org.apache.ibatis.annotations.Update;
 
 import java.util.List;
 
@@ -91,17 +88,20 @@
     @Update("update lihu.queue set status = #{newStatus}, seq_num = #{seqNum}, passed = 1 " +
             " where id = " +
             "  (select a.id from \n" +
-            "    (select id from lihu.queue where status = #{curStatus} and room_id = #{roomId} and room_name = #{roomName} and bed_no = #{bedNo} order by seq_num limit 1) a)")
-    Integer procPassedReturnPatient(@Param("roomId")Long roomId, @Param("roomName")String roomName, @Param("bedNo")String bedNo,
-                           @Param("seqNum")Integer seqNum, @Param("curStatus")Byte curStatus, @Param("newStatus")Byte newStatus);
+            "    (select id from lihu.queue where room_id = #{roomId} and bed_no = #{bedNo} and status = #{curStatus} order by seq_num limit 1) a)")
+    Integer queuePassedReturnPatient(@Param("roomId")Long roomId, @Param("roomName")String roomName, @Param("bedNo")String bedNo,
+                                     @Param("seqNum")Integer seqNum, @Param("curStatus")Byte curStatus, @Param("newStatus")Byte newStatus);
 
     @Update("update lihu.queue set status = #{newStatus} " +
-            " where pat_id = #{patId} and status = #{curStatus} and room_id = #{roomId} and bed_no = #{bedNo}")
-    Integer passedPatientReturn(@Param("roomId")Long roomId, @Param("bedNo")String bedNo, @Param("patId")String patId,
+            " where room_id = #{roomId} and bed_no = #{bedNo} and status = #{curStatus} and pat_id = #{patId} ")
+    Integer recallPassedPatient(@Param("roomId")Long roomId, @Param("bedNo")String bedNo, @Param("patId")String patId,
                                 @Param("curStatus")Byte curStatus, @Param("newStatus")Byte newStatus);
 
     @Update("update lihu.queue set jump_flag = #{jumped} " +
-            " where pat_id = #{patId} and status = #{curStatus}")
+            " where status = #{curStatus} and pat_id = #{patId}")
     Integer queueJump(@Param("patId")String patId, @Param("curStatus")Byte curStatus, @Param("jumped")Byte jumped );
+
+    @Delete("delete from lihu.queue where TO_DAYS(book_date) != TO_DAYS(NOW())")
+    Integer clearQueue();
 }
 

--
Gitblit v1.9.3