| | |
| | | +"</script>") |
| | | List<QueueStatisticDO> queueStatistic(@Param("statusList")List<Byte> statusList); |
| | | |
| | | @Select("<script>" + |
| | | "SELECT * FROM lihu.queue where status in (" + |
| | | " <foreach collection='statusList' separator=',' item='status'>" + |
| | | " #{status} " + |
| | | " </foreach> )" + |
| | | " order by book_timeslot, create_time " + |
| | | "</script>") |
| | | List<QueueDO> getOrderedQueue(@Param("statusList")List<Byte> statusList); |
| | | |
| | | //@Update("update lihu.queue set status = #{newStatus} where pat_id = #{patId} ans status = #{curStatus} ") |
| | | |
| | | @Update("update lihu.queue set status = #{newStatus} where seq_num = \n" + |
| | |
| | | " <foreach collection='statusList' separator=',' item='status'>" + |
| | | " #{status} " + |
| | | " </foreach> )" + |
| | | " order by status desc" + |
| | | " order by seq_num" + |
| | | "</script>") |
| | | List<QueueDO> getDoctorQueueByStatus(@Param("roomId")Long roomId, @Param("bedNo")String bedNo, @Param("statusList")List<Byte> statusList); |
| | | |
| | | @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 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); |
| | | |
| | | } |