| | |
| | | @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 (" + |
| | |
| | | @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 = " + |