为什么选择Vue+Spring Boot开发人才公寓管理系统能让你的毕设评分翻倍?

38 阅读5分钟

一、个人简介

  • 💖💖作者:计算机编程果茶熊
  • 💙💙个人简介:曾长期从事计算机专业培训教学,担任过编程老师,同时本人也热爱上课教学,擅长Java、微信小程序、Python、Golang、安卓Android等多个IT方向。会做一些项目定制化开发、代码讲解、答辩教学、文档编写、也懂一些降重方面的技巧。平常喜欢分享一些自己开发中遇到的问题的解决办法,也喜欢交流技术,大家有技术代码这一块的问题可以问我!
  • 💛💛想说的话:感谢大家的关注与支持!
  • 💜💜
  • 网站实战项目
  • 安卓/小程序实战项目
  • 💕💕文末获取源码联系计算机编程果茶熊

二、系统介绍

  • 开发语言:Java+Python
  • 数据库:MySQL
  • 系统架构:B/S
  • 后端框架:SpringBoot(Spring+SpringMVC+Mybatis)+Django
  • 前端:Vue+HTML+CSS+JavaScript+jQuery
  • 人才公寓管理系统是一款基于B/S架构的综合性管理平台,采用Java/Python双语言支持,分别基于Spring Boot(Spring+SpringMVC+Mybatis)和Django框架开发,前端使用Vue+ElementUI+HTML技术栈,后端数据存储采用MySQL数据库。系统功能全面覆盖公寓管理各个环节,包括用户管理、前台管理、房间类型与信息管理、房间预约与取消管理、入住与退房信息管理、设施类型与信息管理、设施租赁与取消管理、设施领取与归还管理、房间与设施报修管理以及系统管理和用户资料等16大核心功能模块。该系统实现了人才公寓全生命周期的数字化管理,从房间预约到入住、从设施租赁到归还、从日常维护到报修处理,形成了一套完整闭环的管理流程,大幅提升了公寓管理效率,优化了资源配置,为入住人员提供便捷的服务体验,同时为管理者提供直观的数据分析和决策支持,是现代化人才公寓不可或缺的智能管理工具。

三、人才公寓管理系统-视频解说

为什么选择Vue+Spring Boot开发人才公寓管理系统能让你的毕设评分翻倍?

四、人才公寓管理系统-功能展示

在这里插入图片描述 在这里插入图片描述 在这里插入图片描述 在这里插入图片描述 在这里插入图片描述 在这里插入图片描述 在这里插入图片描述

在这里插入图片描述 在这里插入图片描述

五、人才公寓管理系统-代码展示


// 核心功能1: 房间预约管理
@Service
public class RoomReservationServiceImpl implements RoomReservationService {
    
    @Autowired
    private RoomReservationMapper reservationMapper;
    
    @Autowired
    private RoomInfoMapper roomInfoMapper;
    
    @Autowired
    private UserMapper userMapper;
    
    @Override
    @Transactional
    public ResponseResult createReservation(RoomReservationDTO reservationDTO) {
        // 验证用户是否存在
        User user = userMapper.selectById(reservationDTO.getUserId());
        if (user == null) {
            return ResponseResult.error("用户不存在");
        }
        
        // 验证房间是否存在且可预约
        RoomInfo roomInfo = roomInfoMapper.selectById(reservationDTO.getRoomId());
        if (roomInfo == null) {
            return ResponseResult.error("房间不存在");
        }
        
        if (!"AVAILABLE".equals(roomInfo.getStatus())) {
            return ResponseResult.error("房间当前不可预约");
        }
        
        // 检查预约日期是否合法
        Date startDate = reservationDTO.getStartDate();
        Date endDate = reservationDTO.getEndDate();
        if (startDate.after(endDate)) {
            return ResponseResult.error("预约开始日期不能晚于结束日期");
        }
        
        // 检查该时间段是否已有预约
        List<RoomReservation> existingReservations = reservationMapper.findOverlappingReservations(
                reservationDTO.getRoomId(), startDate, endDate);
        if (!existingReservations.isEmpty()) {
            return ResponseResult.error("该时间段房间已被预约");
        }
        
        // 创建预约记录
        RoomReservation reservation = new RoomReservation();
        BeanUtils.copyProperties(reservationDTO, reservation);
        reservation.setReservationNo(generateReservationNo());
        reservation.setStatus("PENDING");
        reservation.setCreateTime(new Date());
        
        // 保存预约记录
        reservationMapper.insert(reservation);
        
        // 更新房间状态为已预约
        roomInfo.setStatus("RESERVED");
        roomInfoMapper.updateById(roomInfo);
        
        return ResponseResult.success("预约成功", reservation);
    }
    
    // 生成预约编号
    private String generateReservationNo() {
        return "RSV" + System.currentTimeMillis() + RandomUtil.randomNumbers(4);
    }
}

// 核心功能2: 入住信息管理
@Service
public class CheckInServiceImpl implements CheckInService {

    @Autowired
    private CheckInMapper checkInMapper;
    
    @Autowired
    private RoomReservationMapper reservationMapper;
    
    @Autowired
    private RoomInfoMapper roomInfoMapper;
    
    @Autowired
    private UserMapper userMapper;
    
    @Override
    @Transactional
    public ResponseResult processCheckIn(CheckInDTO checkInDTO) {
        // 验证预约信息
        RoomReservation reservation = null;
        if (checkInDTO.getReservationId() != null) {
            reservation = reservationMapper.selectById(checkInDTO.getReservationId());
            if (reservation == null) {
                return ResponseResult.error("预约信息不存在");
            }
            
            if (!"PENDING".equals(reservation.getStatus()) && !"CONFIRMED".equals(reservation.getStatus())) {
                return ResponseResult.error("预约状态不允许办理入住");
            }
        }
        
        // 验证房间状态
        RoomInfo roomInfo = roomInfoMapper.selectById(checkInDTO.getRoomId());
        if (roomInfo == null) {
            return ResponseResult.error("房间不存在");
        }
        
        if ("OCCUPIED".equals(roomInfo.getStatus()) && !checkInDTO.getRoomId().equals(reservation.getRoomId())) {
            return ResponseResult.error("房间已被占用");
        }
        
        // 验证用户信息
        User user = userMapper.selectById(checkInDTO.getUserId());
        if (user == null) {
            return ResponseResult.error("用户不存在");
        }
        
        // 创建入住记录
        CheckIn checkIn = new CheckIn();
        BeanUtils.copyProperties(checkInDTO, checkIn);
        
        // 设置入住编号
        checkIn.setCheckInNo(generateCheckInNo());
        checkIn.setStatus("ACTIVE");
        checkIn.setCheckInTime(new Date());
        
        // 计算预计退房时间
        if (checkIn.getExpectedCheckOutTime() == null && reservation != null) {
            checkIn.setExpectedCheckOutTime(reservation.getEndDate());
        }
        
        // 保存入住信息
        checkInMapper.insert(checkIn);
        
        // 更新房间状态
        roomInfo.setStatus("OCCUPIED");
        roomInfoMapper.updateById(roomInfo);
        
        // 更新预约状态
        if (reservation != null) {
            reservation.setStatus("CHECKED_IN");
            reservationMapper.updateById(reservation);
        }
        
        // 记录入住日志
        logCheckInActivity(checkIn, user, roomInfo);
        
        return ResponseResult.success("入住办理成功", checkIn);
    }
    
    private String generateCheckInNo() {
        return "CHK" + System.currentTimeMillis() + RandomUtil.randomNumbers(4);
    }
}

// 核心功能3: 设施报修管理
@Service
public class FacilityRepairServiceImpl implements FacilityRepairService {

    @Autowired
    private FacilityRepairMapper repairMapper;
    
    @Autowired
    private FacilityInfoMapper facilityInfoMapper;
    
    @Autowired
    private UserMapper userMapper;
    
    @Autowired
    private NotificationService notificationService;
    
    @Override
    @Transactional
    public ResponseResult submitRepairRequest(FacilityRepairDTO repairDTO) {
        // 验证设施信息
        FacilityInfo facility = facilityInfoMapper.selectById(repairDTO.getFacilityId());
        if (facility == null) {
            return ResponseResult.error("设施不存在");
        }
        
        // 验证报修人信息
        User reporter = userMapper.selectById(repairDTO.getReporterId());
        if (reporter == null) {
            return ResponseResult.error("报修人信息不存在");
        }
        
        // 检查是否重复报修
        List<FacilityRepair> existingRepairs = repairMapper.findActiveRepairsByFacilityId(
                repairDTO.getFacilityId());
        if (!existingRepairs.isEmpty()) {
            for (FacilityRepair repair : existingRepairs) {
                if ("PENDING".equals(repair.getStatus()) || "PROCESSING".equals(repair.getStatus())) {
                    return ResponseResult.error("该设施已有待处理的报修单");
                }
            }
        }
        
        // 创建报修单
        FacilityRepair repair = new FacilityRepair();
        BeanUtils.copyProperties(repairDTO, repair);
        
        // 设置报修单编号和初始状态
        repair.setRepairNo(generateRepairNo());
        repair.setStatus("PENDING");
        repair.setReportTime(new Date());
        repair.setPriority(calculatePriority(repairDTO.getDescription()));
        
        // 保存报修信息
        repairMapper.insert(repair);
        
        // 更新设施状态
        facility.setStatus("UNDER_REPAIR");
        facilityInfoMapper.updateById(facility);
        
        // 分配维修人员
        assignRepairStaff(repair);
        
        // 发送通知给相关人员
        sendRepairNotifications(repair, facility, reporter);
        
        // 记录报修日志
        logRepairActivity(repair, reporter, facility);
        
        return ResponseResult.success("报修申请提交成功", repair);
    }
    
    @Override
    @Transactional
    public ResponseResult updateRepairStatus(Long repairId, String status, String remarks) {
        // 获取报修单信息
        FacilityRepair repair = repairMapper.selectById(repairId);
        if (repair == null) {
            return ResponseResult.error("报修单不存在");
        }
        
        // 验证状态变更是否合法
        if (!isValidStatusTransition(repair.getStatus(), status)) {
            return ResponseResult.error("状态变更不合法");
        }
        
        // 更新报修单状态
        repair.setStatus(status);
        repair.setUpdateTime(new Date());
        repair.setRemarks(remarks);
        
        // 如果是完成状态,设置完成时间
        if ("COMPLETED".equals(status)) {
            repair.setCompletionTime(new Date());
        }
        
        // 保存更新
        repairMapper.updateById(repair);
        
        // 如果报修完成,更新设施状态
        if ("COMPLETED".equals(status)) {
            FacilityInfo facility = facilityInfoMapper.selectById(repair.getFacilityId());
            facility.setStatus("AVAILABLE");
            facilityInfoMapper.updateById(facility);
            
            // 通知报修人
            User reporter = userMapper.selectById(repair.getReporterId());
            notificationService.sendNotification(
                reporter.getId(),
                "报修完成通知",
                "您报修的设施 " + facility.getName() + " 已修复完成"
            );
        }
        
        return ResponseResult.success("报修状态更新成功", repair);
    }
    
    private String generateRepairNo() {
        return "RPR" + System.currentTimeMillis() + RandomUtil.randomNumbers(4);
    }
    
    private String calculatePriority(String description) {
        // 根据描述内容判断优先级
        if (description.contains("漏水") || description.contains("火灾") || 
            description.contains("电路") || description.contains("紧急")) {
            return "HIGH";
        } else if (description.contains("不能用") || description.contains("损坏")) {
            return "MEDIUM";
        } else {
            return "LOW";
        }
    }
}

六、人才公寓管理系统-文档展示

在这里插入图片描述

七、END

致谢

💕💕文末获取源码联系计算机编程果茶熊