| | |
| | | import cn.lihu.jh.framework.mybatis.core.query.LambdaQueryWrapperX; |
| | | import cn.lihu.jh.framework.mybatis.core.mapper.BaseMapperX; |
| | | import cn.lihu.jh.module.ecg.dal.dataobject.queue.QueueDO; |
| | | import cn.lihu.jh.module.ecg.dal.dataobject.queue.QueueStatisticDO; |
| | | import cn.lihu.jh.module.ecg.dal.dataobject.room.RoomStatisticsDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import cn.lihu.jh.module.ecg.controller.admin.queue.vo.*; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 排队 Mapper |
| | |
| | | .eqIfPresent(QueueDO::getStatus, reqVO.getStatus()) |
| | | .eqIfPresent(QueueDO::getPassed, reqVO.getPassed()) |
| | | .eqIfPresent(QueueDO::getExpired, reqVO.getExpired()) |
| | | .eqIfPresent(QueueDO::getRoomNum, reqVO.getRoomNum()) |
| | | .eqIfPresent(QueueDO::getBedNum, reqVO.getBedNum()) |
| | | .eqIfPresent(QueueDO::getRoomId, reqVO.getRoomId()) |
| | | .eqIfPresent(QueueDO::getBedNo, reqVO.getBedNo()) |
| | | .betweenIfPresent(QueueDO::getCreateTime, reqVO.getCreateTime()) |
| | | .orderByDesc(QueueDO::getId)); |
| | | } |
| | | |
| | | @Select("SELECT max(seq_num) FROM lihu.queue") |
| | | Integer getMaxSeqNum(); |
| | | |
| | | @Select("<script>" + |
| | | "SELECT room_id, bed_no, count(1) as total_in_status FROM lihu.queue where status in (" + |
| | | " <foreach collection='statusList' separator=',' item='status'>" + |
| | | " #{status} " + |
| | | " </foreach> )" + |
| | | " group by room_id, bed_no; " |
| | | +"</script>") |
| | | List<QueueStatisticDO> queueStatistic(@Param("statusList")List<Byte> statusList); |
| | | } |