| | |
| | | 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; |
| | | |
| | |
| | | " group by room_id, bed_no; " |
| | | +"</script>") |
| | | List<QueueStatisticDO> queueStatistic(@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" + |
| | | "(select a.min_seq_num from \n" + |
| | | " (select min(seq_num) as min_seq_num from lihu.queue where room_id = #{roomId} and bed_no = #{bedNo} and status = #{curStatus}) a )") |
| | | Integer updateQueueStatus(@Param("roomId")Long roomId, @Param("bedNo")String bedNo, @Param("curStatus")Byte curStatus, @Param("newStatus")Byte newStatus); |
| | | |
| | | @Select("select * from lihu.queue where status = #{status} order by book_timeslot, create_time limit 1") |
| | | QueueDO getFirstInQueueByStatus(Byte status); |
| | | |
| | | @Select("<script>" + |
| | | "SELECT * FROM lihu.queue " + |
| | | "where room_id = #{roomId} and bed_no = #{bedNo} and status in (" + |
| | | " <foreach collection='statusList' separator=',' item='status'>" + |
| | | " #{status} " + |
| | | " </foreach> )" + |
| | | " order by status desc" + |
| | | "</script>") |
| | | List<QueueDO> getDoctorQueueByStatus(@Param("roomId")Long roomId, @Param("bedNo")String bedNo, @Param("statusList")List<Byte> statusList); |
| | | } |