基于SpringBoot的医院管理系统
目录
前言
一、技术栈
二、系统功能介绍
病床信息管理
药房信息管理
个人中心管理
药房信息
病床类别
科室信息管理
三、核心代码
1、登录模块
2、文件上传模块
3、代码封装
前言
随着信息互联网信息的飞速发展,医院也在创建着属于自己的管理系统。本文介绍了医院管理系统的开发全过程。通过分析企业对于医院管理系统的需求,创建了一个计算机管理医院管理系统的方案。文章介绍了医院管理系统的系统分析部分,包括可行性分析等,系统设计部分主要介绍了系统功能设计和数据库设计。
本医院管理系统管理员功能,个人中心,医生管理,护士管理,病床类别管理,药品类别管理,科室信息管理,内部论坛管理,系统管理。医生功能,个人中心,病床管理,药房管理,病人信息管理,药方信息管理。护士功能修改个人中心,查看病床管理,查看药房管理,查看病人信息管理,查看药方信息管理。因而具有一定的实用性。
本站是一个B/S模式系统,采用Spring Boot框架作为开发技术,MYSQL数据库设计开发,充分保证系统的稳定性。系统具有界面清晰、操作简单,功能齐全的特点,使得医院管理系统管理工作系统化、规范化。
一、技术栈
末尾获取源码
SpringBoot+Vue+JS+ jQuery+Ajax...
二、系统功能介绍
病床信息管理
医院管理系统的医生可以管理病床信息,可以对病床信息添加修改删除操作。

药房信息管理
医生可以对药房信息进行添加,修改,删除操作。
个人中心管理
护士可以对个人中心里面的属于自己的信息进行修改操作。

药房信息
护士登录后,可以查看药房信息,可以在药房信息界面进行查询操作。
病床类别
管理员可以对病床类别进行添加,修改查询以及删除操作。

科室信息管理
管理员登录后可以对科室信息进行添加,修改,查询以及删除操作。
三、核心代码
1、登录模块
package com.controller;import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.Map;import javax.servlet.http.HttpServletRequest;import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.TokenEntity;
import com.entity.UserEntity;
import com.service.TokenService;
import com.service.UserService;
import com.utils.CommonUtil;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.ValidatorUtils;/*** 登录相关*/
@RequestMapping("users")
@RestController
public class UserController{@Autowiredprivate UserService userService;@Autowiredprivate TokenService tokenService;/*** 登录*/@IgnoreAuth@PostMapping(value = "/login")public R login(String username, String password, String captcha, HttpServletRequest request) {UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));if(user==null || !user.getPassword().equals(password)) {return R.error("账号或密码不正确");}String token = tokenService.generateToken(user.getId(),username, "users", user.getRole());return R.ok().put("token", token);}/*** 注册*/@IgnoreAuth@PostMapping(value = "/register")public R register(@RequestBody UserEntity user){
// ValidatorUtils.validateEntity(user);if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {return R.error("用户已存在");}userService.insert(user);return R.ok();}/*** 退出*/@GetMapping(value = "logout")public R logout(HttpServletRequest request) {request.getSession().invalidate();return R.ok("退出成功");}/*** 密码重置*/@IgnoreAuth@RequestMapping(value = "/resetPass")public R resetPass(String username, HttpServletRequest request){UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));if(user==null) {return R.error("账号不存在");}user.setPassword("123456");userService.update(user,null);return R.ok("密码已重置为:123456");}/*** 列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,UserEntity user){EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();PageUtils page = userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/list")public R list( UserEntity user){EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();ew.allEq(MPUtil.allEQMapPre( user, "user")); return R.ok().put("data", userService.selectListView(ew));}/*** 信息*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") String id){UserEntity user = userService.selectById(id);return R.ok().put("data", user);}/*** 获取用户的session用户信息*/@RequestMapping("/session")public R getCurrUser(HttpServletRequest request){Long id = (Long)request.getSession().getAttribute("userId");UserEntity user = userService.selectById(id);return R.ok().put("data", user);}/*** 保存*/@PostMapping("/save")public R save(@RequestBody UserEntity user){
// ValidatorUtils.validateEntity(user);if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {return R.error("用户已存在");}userService.insert(user);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody UserEntity user){
// ValidatorUtils.validateEntity(user);userService.updateById(user);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){userService.deleteBatchIds(Arrays.asList(ids));return R.ok();}
}
2、文件上传模块
package com.controller;import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.UUID;import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.util.ResourceUtils;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.ConfigEntity;
import com.entity.EIException;
import com.service.ConfigService;
import com.utils.R;/*** 上传文件映射表*/
@RestController
@RequestMapping("file")
@SuppressWarnings({"unchecked","rawtypes"})
public class FileController{@Autowiredprivate ConfigService configService;/*** 上传文件*/@RequestMapping("/upload")public R upload(@RequestParam("file") MultipartFile file,String type) throws Exception {if (file.isEmpty()) {throw new EIException("上传文件不能为空");}String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);File path = new File(ResourceUtils.getURL("classpath:static").getPath());if(!path.exists()) {path = new File("");}File upload = new File(path.getAbsolutePath(),"/upload/");if(!upload.exists()) {upload.mkdirs();}String fileName = new Date().getTime()+"."+fileExt;File dest = new File(upload.getAbsolutePath()+"/"+fileName);file.transferTo(dest);FileUtils.copyFile(dest, new File("C:\\Users\\Desktop\\jiadian\\springbootl7own\\src\\main\\resources\\static\\upload"+"/"+fileName));if(StringUtils.isNotBlank(type) && type.equals("1")) {ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));if(configEntity==null) {configEntity = new ConfigEntity();configEntity.setName("faceFile");configEntity.setValue(fileName);} else {configEntity.setValue(fileName);}configService.insertOrUpdate(configEntity);}return R.ok().put("file", fileName);}/*** 下载文件*/@IgnoreAuth@RequestMapping("/download")public ResponseEntity<byte[]> download(@RequestParam String fileName) {try {File path = new File(ResourceUtils.getURL("classpath:static").getPath());if(!path.exists()) {path = new File("");}File upload = new File(path.getAbsolutePath(),"/upload/");if(!upload.exists()) {upload.mkdirs();}File file = new File(upload.getAbsolutePath()+"/"+fileName);if(file.exists()){/*if(!fileService.canRead(file, SessionManager.getSessionUser())){getResponse().sendError(403);}*/HttpHeaders headers = new HttpHeaders();headers.setContentType(MediaType.APPLICATION_OCTET_STREAM); headers.setContentDispositionFormData("attachment", fileName); return new ResponseEntity<byte[]>(FileUtils.readFileToByteArray(file),headers, HttpStatus.CREATED);}} catch (IOException e) {e.printStackTrace();}return new ResponseEntity<byte[]>(HttpStatus.INTERNAL_SERVER_ERROR);}}
3、代码封装
package com.utils;import java.util.HashMap;
import java.util.Map;/*** 返回数据*/
public class R extends HashMap<String, Object> {private static final long serialVersionUID = 1L;public R() {put("code", 0);}public static R error() {return error(500, "未知异常,请联系管理员");}public static R error(String msg) {return error(500, msg);}public static R error(int code, String msg) {R r = new R();r.put("code", code);r.put("msg", msg);return r;}public static R ok(String msg) {R r = new R();r.put("msg", msg);return r;}public static R ok(Map<String, Object> map) {R r = new R();r.putAll(map);return r;}public static R ok() {return new R();}public R put(String key, Object value) {super.put(key, value);return this;}
}
相关文章:
基于SpringBoot的医院管理系统
目录 前言 一、技术栈 二、系统功能介绍 病床信息管理 药房信息管理 个人中心管理 药房信息 病床类别 科室信息管理 三、核心代码 1、登录模块 2、文件上传模块 3、代码封装 前言 随着信息互联网信息的飞速发展,医院也在创建着属于自己的管理系统。本文介…...
java图片转pdf ,pdf 导出
pom引入jar <dependency><groupId>org.apache.pdfbox</groupId><artifactId>pdfbox</artifactId><version>2.0.0-RC2</version></dependency> 转pdf方法 /*** 使用pdfbox将jpg转成pdf** throws IOException IOException*/pu…...
掌握Go的运行时:从编译到执行
目录 一、Go运行编译简介Go语言的目标和设计哲学运行时环境编译过程小结 二、执行环境操作系统与硬件层系统调用(Syscalls)虚拟内存 Go运行时(Runtime)Goroutine调度器内存管理和垃圾收集网络I/O代码示例:Go运行时调度…...
打造香港最安全便捷的银行,众安银行发布首份技术白皮书
作者:林海宾&李龙 作为香港金融科技的代表,香港虚拟银行通过科技驱动,为客户提供了安全、便捷、普惠的金融服务。在八间持牌的虚拟银行中,众安银行目前在用户数量、存款、资产和收入规模上均处于领先水平。最快120秒线上开户…...
Spring实现简单的Bean容器
1.BeanDefinition,用于定义 Bean 实例化信息,现在的实现是以一个 Object 存放对象 public class BeanDefinition {/*** bean对象*/private Object bean;/*** 存放 (定义)Bean 对象*/public BeanDefinition(Object bean) {this.bea…...
Python15题day13
③continue的好处 break是跳出循环体,continue是跳过continue语句后面的代码块,循环并不停止 题目要求: 使用input函数接受用户的输入,如果用户输入的数值小于等于10,则判断是奇数还是偶数如果数值大于10,则输出“输入…...
聊聊并发编程——多线程之AQS
目录 队列同步器(AQS) 独占锁示例 AQS之同步队列结构 解析AQS实现 队列同步器(AQS) 队列同步器AbstractQueuedSynchronizer(以下简称同步器),是用来构建锁或者其他同步组 件的基础框架&…...
DE0开发板交通灯十字路口红绿灯VHDL
名称:基于DE0开发板的交通灯十字路口红绿灯 软件:Quartus 语言:VHDL 要求: 设计一个十字路口交通信号灯的控制电路。分为两种情况,正常状态和报警状态。 1.正常状态:要求红、绿灯按一定的规律亮和灭&a…...
华为云云耀云服务器L实例评测使用 | 通过程序实现直播流自动分段录制
华为云云耀云服务器L实例评测使用 | 通过程序实现直播流自动分段录制 1. 准备工作2. 环境搭建3. 心得总结 1. 准备工作 随着云计算时代的进一步深入,越来越多的中小企业企业与开发者需要一款简单易用、高能高效的云计算基础设施产品来支撑自身业务运营和创新开发。基…...
前端教程-webpack
官网 webpack webpack基础 视频教程 尚硅谷Webpack5入门到原理(面试开发一条龙)...
white-space几种属性的用法(处理空格)
white-space:normal 文首的空格忽略,文本内部的换行符自动转成了空格。 white-space:nowrap 不换行,即使超出容器宽度 white-space:pre 与原文本一致,空格和换行符保留 white-space:pre-…...
Linux的历史
Linux的历史 前言: 关于Linux,你可能只是听说过它是一款操作系统,也许你还知道它是开源的,但在日常生活中,你更熟悉的是Windows。 那么我们为什么要了解、学习Linux,看完这一篇,你也许可以从…...
软考高级系统架构设计师系列论文真题八:论企业集成平台的技术与应用
软考高级系统架构设计师系列论文真题八:论企业集成平台的技术与应用 一、论企业集成平台的技术与应用二、找准核心论点三、理论素材准备四、精品范文赏析1.摘要2.正文3.总结软考高级系统架构设计师系列论文之:百篇软考高级架构设计师论文范文软考高级系统架构设计师系列之:论…...
[H5动画制作系列] 路径引导动画 Demo
代码参考1: <!DOCTYPE html> <html lang="en"><head><meta charset="UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0" /><title>路径引导动画 Demo1</tit…...
[React] Context上下文的使用
文章目录 1.Context的介绍2.为什么需要Context3.Context的使用 1.Context的介绍 Context旨在为React复杂嵌套的各个组件提供一个生命周期内的统一属性访问对象,从而避免我们出现当出现复杂嵌套结构的组件需要一层层通过属性传递值得问题。 Context是为了提供一个组…...
高云FPGA系列教程(9):cmd-parser串口命令解析器移植
文章目录 @[toc]cmd-parser库简介cmd-parser库源码获取GW1NSR-4C移植cmd-parser实际测试cmd-parse命令解析器优化本文是高云FPGA系列教程的第9篇文章。 上一篇文章介绍片上ARM Cortex-M3硬核处理器串口外设的使用,演示轮询方式和中断方式接收串口数据,并进行回环测试。 本文…...
PHP8的静态变量和方法-PHP8知识详解
我们在上一课程讲到了public、private、protected这3个关键字,今天我们来讲解static关键字,明天再讲解final关键字。 如果不想通过创建对象来调用变量或方法,则可以将该变量或方法创建为静态变量或方法,也就是在变量或方法的前面…...
用AI写文章被百家号封禁
我是卢松松,点点上面的头像,欢迎关注我哦! 千万不要用AI创作,尤其是原文照搬!不要用ai,不要用,不要用!重要的事情说三遍。 近日ID名为“爸爸在家赚钱”用AI写了4-5篇文章投稿在百家号,随后百度就把他帐号…...
JVM--Java类加载器笔记
Java类加载器 代码经过编译变成了字节码打包成 Jar 文件。让 JVM 去加载需要的字节码,变成持久代/元数据区上的 Class 对象,接着执行程序逻辑。 类声明周期和加载过程 步骤:加载->链接(校验->准备->解析)-…...
【在Ubuntu部署Docker项目】— PROJECT#1
一、说明 让我们深入了解 Docker。用docker构建web服务器。我们正在计划开发JavaScript API,建立MySQL数据库,并创建一个 PHP 网站使用 API 服务。Php Node.js Mysql — DockerSeries — Episode#1 二、系统架构概述 我们要构建的容器,是三…...
PUBG罗技鼠标宏终极配置指南:5分钟快速上手完美压枪
PUBG罗技鼠标宏终极配置指南:5分钟快速上手完美压枪 【免费下载链接】logitech-pubg PUBG no recoil script for Logitech gaming mouse / 绝地求生 罗技 鼠标宏 项目地址: https://gitcode.com/gh_mirrors/lo/logitech-pubg 还在为《绝地求生》中难以控制的…...
重复内容误标率高达37%?NotebookLM检测逻辑漏洞全曝光,立即修复这6个隐藏开关
更多请点击: https://intelliparadigm.com 第一章:重复内容误标率高达37%?NotebookLM检测逻辑漏洞全曝光,立即修复这6个隐藏开关 NotebookLM 的“重复内容检测”功能并非基于端到端语义比对,而是依赖于分块哈希&#…...
NotebookLM思维导图生成已进入「语义拓扑时代」:2024Q2最新Benchmark显示其节点关联准确率超越MindNode Pro 41.6%
更多请点击: https://intelliparadigm.com 第一章:NotebookLM思维导图生成已进入「语义拓扑时代」 传统基于关键词共现或规则模板的思维导图生成方式,正被 NotebookLM 的语义理解能力彻底重构。其底层 LLM 模型不再仅识别显式术语关系&#…...
C语言状态模式实战:从设计思想到嵌入式状态机实现
1. 项目概述:从“状态”到“模式”的思维跃迁在嵌入式开发、游戏逻辑、网络协议解析乃至日常的业务流程控制中,我们常常会面对一个核心挑战:如何优雅地管理一个对象随着内部条件改变而表现出的不同行为?比如,一个自动售…...
基于LangChain构建AI智能体:从核心架构到生产部署实战
1. 项目概述与核心价值最近在GitHub上看到一个名为“GenAI_Agents”的项目,作者是NirDiamant。这个项目名本身就很有意思,它直指当前AI领域最火热、也最具想象力的方向之一:智能体(Agents)。简单来说,这个项…...
Kimsuky 组织基于 PebbleDash 与 AppleSeed 的攻击战术演进与技术分析
摘要 Kimsuky(亦称 APT43、Ruby Sleet 等)是活跃逾十年的朝鲜语系高级持续性威胁(APT)组织,长期针对韩国及全球多国政府、国防、医疗等关键领域实施定向攻击。本文基于卡巴斯基 GReAT 团队 2026 年 5 月公开的最新攻击…...
LLM函数调用工程化:从基础概念到智能体框架设计实战
1. 项目概述:从“函数调用”到智能体交互的范式演进最近在GitHub上看到一个名为“SKY-lv/function-calling”的项目,这个标题乍一看平平无奇,甚至有些过于直白。但作为一名长期混迹在AI应用开发一线的工程师,我立刻嗅到了一丝不寻…...
别再只会用os.listdir了!Python遍历文件夹的3种高效方法(附性能对比)
别再只会用os.listdir了!Python遍历文件夹的3种高效方法(附性能对比) 当你的Python项目需要处理成千上万的文件时,传统的os.listdir()方法可能会成为性能瓶颈。我曾经在一个图像处理项目中,因为使用了不当的遍历方法&a…...
如何高效使用Umi-OCR:免费离线文字识别工具实用指南
如何高效使用Umi-OCR:免费离线文字识别工具实用指南 【免费下载链接】Umi-OCR OCR software, free and offline. 开源、免费的离线OCR软件。支持截屏/批量导入图片,PDF文档识别,排除水印/页眉页脚,扫描/生成二维码。内置多国语言库…...
GCC __builtin函数避坑指南:让你的跨平台C代码在ARM和x86上都跑得稳
GCC __builtin函数跨平台避坑实战:ARM与x86兼容性深度解析 在嵌入式开发与高性能计算领域,GCC编译器的__builtin函数集一直是开发者提升性能的利器。但当代码需要同时运行在ARM架构的嵌入式设备和x86架构的服务器上时,这些看似美妙的"魔…...
