| | |
| | | .orderByDesc(RoomDO::getId)); |
| | | } |
| | | |
| | | @Select("select * from lihu.clinic_room where ip = #{ip}") |
| | | List<RoomDO> queueByIp(@Param("ip") String ip); |
| | | |
| | | @Update("<script> " + |
| | | "update lihu.clinic_room set status=#{newStatus}, doc_id=null, doc_name=null " + |
| | | " where 1 = 1 " + |
| | |
| | | @Select("SELECT * FROM lihu.clinic_room where room_id=#{roomId} and bed_no=#{bedNo} and doc_id=#{docId}") |
| | | RoomDO getRoom(@Param("roomId")Long roomId, @Param("bedNo")String bedNo, @Param("docId")Long docId); |
| | | |
| | | @Select("SELECT * FROM lihu.clinic_room where doc_id=#{docId} limit 1") |
| | | RoomDO getRoomByDocId(@Param("docId")Long docId); |
| | | |
| | | @Update("<script> " + |
| | | "update lihu.clinic_room set status=#{newStatus.status}, doc_id=null, doc_name=null " + |
| | | " where room_id=#{roomId} and bed_no=#{bedNo} and doc_id = null " + |
| | | "update lihu.clinic_room set status=#{newStatus.status} " + |
| | | " where room_id=#{roomId} and bed_no=#{bedNo} and isNull(doc_id) " + |
| | | " and status in ( " + |
| | | " <foreach collection='curStatusList' separator=',' item='curStatus'>" + |
| | | " #{curStatus.status} " + |
| | |
| | | |
| | | @Update("<script> " + |
| | | "update lihu.clinic_room set status=#{newStatus.status}, doc_id=null, doc_name=null " + |
| | | " where room_id=#{roomId} and bed_no=#{bedNo} and doc_id != null " + |
| | | " where room_id=#{roomId} and bed_no=#{bedNo} and isNull(doc_id) " + |
| | | " and status in ( " + |
| | | " <foreach collection='curStatusList' separator=',' item='curStatus'>" + |
| | | " #{curStatus.status} " + |
| | |
| | | |
| | | @Update("<script> " + |
| | | "update lihu.clinic_room set status=#{newStatus.status}, doc_id=#{docId}, doc_name=#{docName} " + |
| | | "where room_id=#{roomId} and bed_no=#{bedNo} " + |
| | | "where room_id=#{roomId} and bed_no=#{bedNo} and isNull(doc_id)" + |
| | | "and status in ( " + |
| | | " <foreach collection='curStatusList' separator=',' item='curStatus'>" + |
| | | " #{curStatus.status} " + |