| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- package org.example.mapper;
- import org.apache.ibatis.annotations.Mapper;
- import org.apache.ibatis.annotations.Param;
- import org.example.entity.Bed;
- import java.util.List;
- /**
- * 床位Mapper接口
- */
- @Mapper
- public interface BedMapper {
-
- /**
- * 查询床位列表
- */
- List<Bed> findList(@Param("code") String code,
- @Param("belongDept") String belongDept,
- @Param("belongWard") String belongWard,
- @Param("belongRoom") String belongRoom);
-
- /**
- * 根据ID查询床位
- */
- Bed findById(@Param("id") Long id);
-
- /**
- * 根据床位代码和所属病区查询(用于校验同病区下代码重复)
- */
- Bed findByCodeAndWard(@Param("code") String code, @Param("belongWard") String belongWard);
-
- /**
- * 新增床位
- */
- int insert(Bed bed);
-
- /**
- * 更新床位
- */
- int update(Bed bed);
-
- /**
- * 更新床位代码
- */
- int updateCode(@Param("id") Long id, @Param("code") String code);
-
- /**
- * 删除床位
- */
- int deleteById(@Param("id") Long id);
-
- /**
- * 获取所有不重复的所属科室
- */
- List<String> findAllBelongDept();
-
- /**
- * 根据科室获取病区列表
- */
- List<String> findWardsByDept(@Param("belongDept") String belongDept);
-
- /**
- * 根据病区获取病房列表
- */
- List<String> findRoomsByWard(@Param("belongWard") String belongWard);
- }
|