ClinicRoomDictDao.java 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. package thyyxxk.webserver.dao.his.dictionary;
  2. import org.apache.ibatis.annotations.*;
  3. import thyyxxk.webserver.entity.dictionary.CodeName;
  4. import thyyxxk.webserver.entity.outpatient.triage.MzfzZdDeptRoom;
  5. import java.util.List;
  6. @Mapper
  7. public interface ClinicRoomDictDao {
  8. @Select("select " +
  9. "a.dept_code,deptName=b.name,a.room_code,a.room_name, " +
  10. "statusFlag=isnull(a.status_flag,0),a.room_no " +
  11. "from mzfz_zd_dept_room a,zd_unit_code b " +
  12. "where a.dept_code=b.code order by dept_code,room_no")
  13. List<MzfzZdDeptRoom> getAllRooms();
  14. @Select("select code,name from zd_unit_code where mz_flag='1' and ghjz_flag='1' order by code")
  15. List<CodeName> getDeptList();
  16. @Update("update mzfz_zd_dept_room set dept_code=#{deptCode}, " +
  17. "room_name=#{roomName},room_no=#{roomNo},status_flag=#{statusFlag} " +
  18. "where room_code=#{roomCode}")
  19. void updateRoomInfo(MzfzZdDeptRoom room);
  20. @Select("select isnull(max(room_code),0)+1 from mzfz_zd_dept_room")
  21. String getMaxRoomCode();
  22. @Insert("insert into mzfz_zd_dept_room (dept_code,room_code,room_name,room_no,status_flag) " +
  23. "values (#{deptCode},#{roomCode},#{roomName},#{roomNo},#{statusFlag})")
  24. void insertRoomInfo(MzfzZdDeptRoom room);
  25. }