| | |
| | | " </foreach> )" + |
| | | " and TO_DAYS(book_date) = TO_DAYS(NOW()) " + |
| | | "</script>") |
| | | List<QueueDO> getCurPatGivenCheckItems(@Param("patId")String patId, @Param("checkTypeList")Integer[] arrCheckType); |
| | | List<QueueDO> getCurPatGivenCheckTypes(@Param("patId")String patId, @Param("arrCheckType")Integer[] arrCheckType); |
| | | |
| | | @Select("<script>" + |
| | | "SELECT * FROM lihu.queue " + |
| | | "where pat_id = #{patId} and book_check_type in (" + |
| | | " <foreach collection='arrCheckType' separator=',' item='checkType'>" + |
| | | " #{checkType} " + |
| | | " </foreach> ) " + |
| | | " and status = #{status} " + |
| | | " and TO_DAYS(book_date) = TO_DAYS(NOW()) " + |
| | | "</script>") |
| | | List<QueueDO> getCurPatGivenCheckTypesAndStatus(@Param("patId")String patId, @Param("arrCheckType")Integer[] arrCheckType, @Param("status")Integer status); |
| | | |
| | | @Select("<script>" + |
| | | "SELECT * FROM lihu.queue " + |
| | |
| | | "</script>") |
| | | List<QueueDO> getBedQueueByStatus(@Param("roomId")Long roomId, @Param("bedNo")String bedNo, @Param("statusList")List<Integer> statusList); |
| | | |
| | | @Update("update lihu.queue set status = #{newStatus} where seq_num = \n" + |
| | | @Select("SELECT * from lihu.queue where room_id = #{roomId} and bed_no = #{bedNo} and status = #{curStatus} order by seq_num limit 1") |
| | | QueueDO getFirstItemByBedAndStatus(@Param("roomId")Long roomId, @Param("bedNo")String bedNo, @Param("curStatus")Integer curStatus); |
| | | |
| | | @Update("update lihu.queue set status = #{newStatus} where status = #{curStatus} and 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 updateBedQueueStatus(@Param("roomId")Long roomId, @Param("bedNo")String bedNo, @Param("curStatus")Integer curStatus, @Param("newStatus")Integer newStatus); |