【Java】宠物医院药品管理系统 SpringBoot+Vue框架 计算机毕业设计项目 Idea+Navicat+MySQL安装 附源码+文档+讲解

47 阅读3分钟

一、个人简介

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

二、系统介绍

  • 开发语言:Java
  • 后端框架:Spring Boot(Spring+SpringMVC+Mybatis)
  • 前端:Vue
  • 数据库:MySQL
  • 系统架构:B/S
  • 开发工具:IDEA

宠物医院药品管理系统是一个基于Java Spring Boot框架开发的综合性医疗管理平台,采用B/S架构设计,前端使用Vue框架构建用户界面,后端整合Spring、SpringMVC和MyBatis技术栈,数据存储采用MySQL数据库。该系统专门针对宠物医疗机构的业务需求而设计,涵盖了从用户注册、宠物信息录入、医生管理到药品流通的完整业务流程。系统通过宠物医生管理模块实现医疗资源的合理配置,通过宠物品种管理和宠物信息管理模块建立完善的患者档案体系,通过药品分类管理和药品信息管理模块确保药物使用的安全性和规范性。同时,系统还提供预约医生、医生诊断、药品提交与取消、用药反馈等核心功能,形成了从诊前预约到诊后反馈的闭环管理体系,有效提升了宠物医院的运营效率和服务质量。

三、视频解说

宠物医院药品管理系统

四、部分功能展示

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

五、部分代码展示


import org.apache.spark.sql.SparkSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
@Service
public class CoreBusinessService {
    @Autowired
    private PetMapper petMapper;
    @Autowired
    private MedicineMapper medicineMapper;
    @Autowired
    private AppointmentMapper appointmentMapper;
    private SparkSession spark = SparkSession.builder().appName("PetHospitalDataAnalysis").master("local[*]").getOrCreate();
    public Result managePetMedicineDispensing(MedicineDispenseRequest request) {
        Pet pet = petMapper.selectById(request.getPetId());
        if (pet == null) {
            return Result.error("宠物信息不存在");
        }
        Medicine medicine = medicineMapper.selectById(request.getMedicineId());
        if (medicine == null) {
            return Result.error("药品信息不存在");
        }
        if (medicine.getStock() < request.getQuantity()) {
            return Result.error("药品库存不足");
        }
        MedicineRecord record = new MedicineRecord();
        record.setPetId(request.getPetId());
        record.setMedicineId(request.getMedicineId());
        record.setQuantity(request.getQuantity());
        record.setDoctorId(request.getDoctorId());
        record.setCreateTime(new Date());
        record.setStatus("DISPENSED");
        medicineRecordMapper.insert(record);
        medicine.setStock(medicine.getStock() - request.getQuantity());
        medicineMapper.updateById(medicine);
        MedicineUsageLog log = new MedicineUsageLog();
        log.setPetId(request.getPetId());
        log.setMedicineId(request.getMedicineId());
        log.setUsageAmount(request.getQuantity());
        log.setUsageDate(new Date());
        log.setOperatorId(request.getDoctorId());
        medicineUsageLogMapper.insert(log);
        return Result.success("药品配发成功");
    }
    public Result processAppointmentBooking(AppointmentRequest request) {
        Doctor doctor = doctorMapper.selectById(request.getDoctorId());
        if (doctor == null) {
            return Result.error("医生信息不存在");
        }
        if (!doctor.getStatus().equals("AVAILABLE")) {
            return Result.error("医生当前不可预约");
        }
        List<Appointment> existingAppointments = appointmentMapper.selectByDoctorAndDate(
            request.getDoctorId(), request.getAppointmentDate());
        if (existingAppointments.size() >= doctor.getMaxAppointments()) {
            return Result.error("该时段预约已满");
        }
        Pet pet = petMapper.selectById(request.getPetId());
        if (pet == null) {
            return Result.error("宠物信息不存在");
        }
        Appointment appointment = new Appointment();
        appointment.setPetId(request.getPetId());
        appointment.setDoctorId(request.getDoctorId());
        appointment.setAppointmentDate(request.getAppointmentDate());
        appointment.setSymptoms(request.getSymptoms());
        appointment.setStatus("SCHEDULED");
        appointment.setCreateTime(new Date());
        appointmentMapper.insert(appointment);
        AppointmentNotification notification = new AppointmentNotification();
        notification.setAppointmentId(appointment.getId());
        notification.setUserId(request.getUserId());
        notification.setMessage("预约成功,请按时就诊");
        notification.setSendTime(new Date());
        notificationMapper.insert(notification);
        return Result.success("预约成功");
    }
    public Result handleMedicineFeedback(FeedbackRequest request) {
        MedicineRecord record = medicineRecordMapper.selectById(request.getRecordId());
        if (record == null) {
            return Result.error("用药记录不存在");
        }
        Feedback feedback = new Feedback();
        feedback.setRecordId(request.getRecordId());
        feedback.setPetId(record.getPetId());
        feedback.setMedicineId(record.getMedicineId());
        feedback.setEffectRating(request.getEffectRating());
        feedback.setSideEffects(request.getSideEffects());
        feedback.setFeedbackContent(request.getFeedbackContent());
        feedback.setSubmitTime(new Date());
        feedback.setStatus("PENDING");
        feedbackMapper.insert(feedback);
        if (request.getEffectRating() <= 2 || request.getSideEffects() != null) {
            FeedbackAlert alert = new FeedbackAlert();
            alert.setFeedbackId(feedback.getId());
            alert.setAlertType("ADVERSE_REACTION");
            alert.setAlertMessage("发现不良反应或效果不佳");
            alert.setCreateTime(new Date());
            alertMapper.insert(alert);
        }
        Medicine medicine = medicineMapper.selectById(record.getMedicineId());
        double avgRating = feedbackMapper.selectAvgRatingByMedicine(record.getMedicineId());
        medicine.setEffectRating(avgRating);
        medicineMapper.updateById(medicine);
        FeedbackProcessTask task = new FeedbackProcessTask();
        task.setFeedbackId(feedback.getId());
        task.setAssignedDoctorId(record.getDoctorId());
        task.setTaskStatus("PENDING");
        task.setCreateTime(new Date());
        taskMapper.insert(task);
        return Result.success("反馈提交成功");
    }
}

六、部分文档展示

在这里插入图片描述

七、END

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