eight
2024-08-15 8c2f79b721a05fbf73c50a78b267ea3868c632d2
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/room/RoomMapper.java
@@ -8,7 +8,9 @@
import cn.lihu.jh.module.ecg.controller.admin.room.vo.RoomPageReqVO;
import cn.lihu.jh.module.ecg.dal.dataobject.room.RoomDO;
import cn.lihu.jh.module.ecg.dal.dataobject.room.RoomStatisticsDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
/**
 * 诊室和诊疗床 Mapper
@@ -20,10 +22,16 @@
    default PageResult<RoomDO> selectPage(RoomPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<RoomDO>()
                .eqIfPresent(RoomDO::getRoomNo, reqVO.getRoomNo())
                .eqIfPresent(RoomDO::getRoomId, reqVO.getRoomId())
                .eqIfPresent(RoomDO::getBedNo, reqVO.getBedNo())
                .betweenIfPresent(RoomDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(RoomDO::getId));
    }
    @Select({ "SELECT room_id, room_name, count(1) as bed_num FROM lihu.clinic_room group by room_id;" })
    List<RoomStatisticsDO> roomStatistic();
    @Select({ "SELECT id, room_id, room_name, bed_no, onstage FROM lihu.clinic_room where onstage=true;" })
    List<RoomDO> simpleRoomList();
}