yxh
昨天 fce96ef468291fb9a0e6a4d34ab371315e9485d4
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/room/RoomMapper.java
@@ -9,7 +9,6 @@
import org.apache.ibatis.annotations.*;
import cn.lihu.jh.module.ecg.controller.admin.room.vo.RoomPageReqVO;
import cn.lihu.jh.module.ecg.dal.dataobject.room.RoomStatisticsDO;
import cn.lihu.jh.module.ecg.enums.BedStatusEnum;
/**
@@ -36,9 +35,6 @@
            " where deleted = 0 " +
            "</script>")
    Integer resetRoom(@Param("newStatus") Integer newStatus);
    @Select({ "SELECT room_id, room_name, count(1) as bed_num FROM lihu.clinic_room group by room_id;" })
    List<RoomStatisticsDO> roomStatistic();
    @Select("<script> " +
            "SELECT * FROM lihu.clinic_room " +
@@ -96,6 +92,17 @@
            "</script>")
    Integer setBedDoctorStatus(@Param("roomId")Long roomId, @Param("bedNo")String bedNo, @Param("docId")Long docId, @Param("newStatus") BedStatusEnum newStatus, @Param("curStatusList") List<BedStatusEnum> curStatusList);
    /**
     * 【需求3】设置工位的「停止候诊」开关(持久化,供 bedReload 后恢复)。
     *
     * @param stopReady 0=正常接收候诊患者;1=停止新增候诊患者
     * @return 受影响行数
     */
    @Update("update lihu.clinic_room set stop_ready = #{stopReady}, update_time = NOW() "
          + "where room_id = #{roomId} and bed_no = #{bedNo} and deleted = 0")
    Integer setBedStopReady(@Param("roomId")Long roomId, @Param("bedNo")String bedNo,
                            @Param("stopReady")Integer stopReady);
    @Update("<script> " +
            "update lihu.clinic_room set status=#{newStatus.status}, doc_id=#{docId}, doc_name=#{docName} " +
            "where room_id=#{roomId} and bed_no=#{bedNo} and isNull(doc_id)" +
@@ -108,7 +115,7 @@
    @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=#{docId} " +
            "where room_id=#{roomId} and bed_no=#{bedNo} " +
            "and status in ( " +
            " <foreach collection='curStatusList' separator=',' item='curStatus'>" +
            "  #{curStatus.status} " +