From 20d1b6b5d9955faeed1689d656e1f6bab0097d1e Mon Sep 17 00:00:00 2001 From: eight <641137800@qq.com> Date: 星期四, 10 十月 2024 15:08:30 +0800 Subject: [PATCH] 根据检查类型 安排医生工位 step 1 --- jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/queue/queueMapper.java | 13 +++++++------ 1 files changed, 7 insertions(+), 6 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 9b4188b..3daeeed 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 @@ -39,6 +39,9 @@ @Select("SELECT max(seq_num) FROM lihu.queue") Integer getMaxSeqNum(); + @Select("SELECT * FROM lihu.queue where pat_id = #{patId}") + QueueDO getQueueByPatId(@Param("patId")String patId); + @Select("<script>" + "SELECT * FROM lihu.queue " + "where room_id = #{roomId} and status in (" + @@ -100,12 +103,9 @@ " <foreach collection='statusList' separator=',' item='status'>" + " #{status} " + " </foreach> )" + - " order by seq_num" + + " order by status desc, seq_num" + "</script>") List<QueueDO> getDoctorQueueByStatus(@Param("roomId")Long roomId, @Param("bedNo")String bedNo, @Param("statusList")List<Byte> statusList); - - @Update( "update lihu.queue set called = 1 where pat_id = #{patId}" ) - Integer markCalled(@Param("patId")String patId); @Update("update lihu.queue set status = #{newStatus} where seq_num = \n" + "(select a.min_seq_num from \n" + @@ -115,9 +115,10 @@ @Update("update lihu.queue set status = #{newStatus}, room_id = #{roomId}, room_name = #{roomName}, \n" + " bed_no = #{bedNo}, seq_num = #{seqNum} where id = \n" + " (select a.id from \n" + - " (select id from lihu.queue where status = #{curStatus} order by jump_flag desc, book_timeslot, create_time limit 1) a)") + " (select id from lihu.queue where status = #{curStatus} and book_check_type= #{checkType} order by jump_flag desc, book_timeslot, create_time limit 1) a)") Integer preemptPatient(@Param("roomId")Long roomId, @Param("roomName")String roomName, @Param("bedNo")String bedNo, - @Param("seqNum")Integer seqNum, @Param("curStatus")Byte curStatus, @Param("newStatus")Byte newStatus); + @Param("seqNum")Integer seqNum, @Param("curStatus")Byte curStatus, @Param("newStatus")Byte newStatus, + @Param("checkType")Integer checkType); @Update("update lihu.queue set status = #{newStatus}, seq_num = #{seqNum}, passed = 1 " + " where id = " + -- Gitblit v1.9.3