【JAVA项目】基于JAVA的医院管理系统

一、项目介绍

本系统前端框架采用了比较流行的渐进式JavaScript框架Vue.js。使用Vue-Router实现动态路由,Ajax实现前后端通信,Element-plus组件库使页面快速成型。后端部分:采用SpringBoot作为开发框架,同时集成MyBatis、Redis、阿里云oss对象存储等相关技术。

医院管理系统,可前后端分离

运行环境:idea

技术栈:springboot,vue,mybatis,redis,elementplus

jwt令牌技术,不登录无法访问内容页面,换浏览器也不可以

二、系统功能

管理员可以进行挂号管理,住院管理,药品管理,医生管理,科室管理,管理员管理,还可以对个人信息进行修改,密码的修改

三、系统实现

登陆界面

四、实现代码

复制代码
package com.example.demo.Controller;

import com.example.demo.Service.CategoryService;

import com.example.demo.entity.Pojo.Category;
import com.example.demo.entity.Pojo.Flower;
import com.example.demo.entity.Result.PageBean;
import com.example.demo.entity.Result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/category")
public class CategoryController {
    @Autowired
    private CategoryService categoryService;

    //获取列表
    @GetMapping
    public Result<List<Category>> getMessage(){
        List<Category> cs= categoryService.list();
        return Result.success(cs);
    }

    //新增
    @PostMapping
    public Result add(@RequestBody Category category){
        categoryService.add(category);
        return Result.success();
    }

    //获取详情
    @GetMapping("/detail")
    public Result<Category> detail(Integer id){
        Category c= categoryService.findById(id);
        return Result.success(c);
    }

    //更新商品分类
    @PutMapping
    public Result update(@RequestBody Category category){
        categoryService.update(category);
        return  Result.success();
    }

    // 删除
    @DeleteMapping
    public Result delete(Integer id){
        categoryService.delete(id);
        return Result.success();
    }

    //分页查询
    @GetMapping("/page")
    public Result<PageBean<Category>> page(Integer pageNum, Integer pageSize, String agriculturalName){
        PageBean<Category> pageBean= categoryService.page(pageNum, pageSize, agriculturalName);
        return Result.success(pageBean);
    }

    //根据分类查询
    @GetMapping("/flower")
    public Result<PageBean<Flower>> listByCategory(Integer pageNum, Integer pageSize, String categoryName){
        PageBean<Flower> pageBean= categoryService.getByCategoryId(pageNum, pageSize, categoryName);
        return Result.success(pageBean);
    }
}

联系方式绿泡泡公主号👇

相关推荐
杨凯凡3 分钟前
Spring Boot 的 @Transactional 为什么会失效?从代理、自调用到异常回滚的排查实战
java·spring boot·spring·事务·后端开发
熊猫钓鱼>_>14 分钟前
三方库 NDK 原生模块跨平台适配与调试【鸿蒙心迹】
开发语言·华为·ai编程·harmonyos·鸿蒙·openharmony·鸿蒙心迹
曼岛_18 分钟前
[图解密码学]第5章 对称加密基础
java·数据库·密码学
HANDY0920020 分钟前
从“不照人”到“剂量达标”:扇叶遮挡式UV-C空气消毒的工程边界与可验证评估框架
开发语言·人工智能·嵌入式硬件·智能家居
1024奇点9 小时前
【仓颉语言入门 · 第二篇 第 22 课】
开发语言·ide·开源
Warren2Lynch10 小时前
C4 模型详解:利用 Visual Paradigm 可视化软件架构的综合指南
开发语言·uml
天河归来10 小时前
第三方接口不稳定,如何让核心任务继续完成
java·大数据
Knight_AL11 小时前
Java 文件下载时文件名中的 `#` 被转换成 `%23`?一次 URL 编码与解码问题排查
java·开发语言
FRing0311 小时前
vue2干货总结2(v-bind、v-for、v-model、指令修饰符、v-bind操作class和style)
开发语言·前端·vue.js·vue2
by2099912 小时前
C++ 智能指针的所有权与使用
开发语言·c++·经验分享