当前位置:   article > 正文

Java项目:医院挂号管理系统(java+SpringBoot+Vue+ElementUI+Layui+Mysql)_springboot医院管理系统设计与实现

springboot医院管理系统设计与实现

 源码获取:俺的博客首页 "资源" 里下载!

项目介绍

基于SpringBoot Vue的医院信管系统

角色:管理员、用户、医生

管理员:首页、个人中心、用户管理、医生管理、科室管理、医生信息管理、挂号信息管理、取消挂号管理、问诊记录管理、病房管理、药房管理、管理员管理等

用户:首页、医生信息、医院情况、个人中心、后台管理、在线容服、预约挂号等

医生:个人中心首页、挂号信息管理、取消挂号管理、问诊记录管理等


环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;
4.数据库:MySql 5.7/8.0版本均可;
5.是否Maven项目:是;


技术栈

后端:SpringBoot+Mybaits

前端:layui+Vue+ELementUI


使用说明

项目运行:
1. 使用Navicat或者其它工具,在mysql中创建对应sql文件名称的数据库,并导入项目的sql文件;
2. 使用IDEA/Eclipse/MyEclipse导入项目,导入成功后请执行maven clean;maven install命令,然后运行;
3. 将项目中application.yml配置文件中的数据库配置改为自己的配置;
4. 运行项目,控制台提示运行成功后再去运行前端项目;
5. 管理员用户名密码:admin/admin
普通用户名密码:user/123456

文档介绍(功能需求分析、系统设计规则与运行环境、系统流程分析、操作流程、添加信息流程、删除信息流程、系统设计、系统设计主要功能、数据库设计、数据库设计规范、ER图、数据表、系统实现、系统功能模块、管理员功能模块、医生功能模块、系统测试、功能测试、可用性测试、维护测试、性能测试、测试结果分析):

 医院管理系统首页详情介绍:

 医院概况详情介绍:

 医生信息详情介绍:

个人中心详情介绍: 

后台管理登录详情介绍: 

 医院后台管理系统:首页、个人中心、用户管理、医生管理、科室管理、医生信息管理、医生信息、挂号信息管理、取消挂号管理、问诊记录管理、病房管理、药房管理、管理员管理、系统管理

挂号信息详情介绍: 

医生管理控制层:

  1. @Controller
  2. @RequestMapping("/")
  3. public class DoctorController {
  4. @Autowired
  5. private IDoctorService doctorService;
  6. private IDepartmentService departmentService;
  7. public IDoctorService getDoctorService() {
  8. return doctorService;
  9. }
  10. public void setDoctorService(IDoctorService doctorService) {
  11. this.doctorService = doctorService;
  12. }
  13. public void setDepartmentService(IDepartmentService departmentService) {
  14. this.departmentService = departmentService;
  15. }
  16. public IDepartmentService getDepartmentService() {
  17. return departmentService;
  18. }
  19. @RequestMapping(value = "Djson", produces = "application/json")
  20. public @ResponseBody List<DoctorInfo> getJson() {
  21. List<DoctorInfo> list = doctorService.selectAll(1,4);
  22. System.out.println("DoctorController" + list);
  23. return list;
  24. }
  25. @RequestMapping(value = "getAllDoctor")
  26. public String selectAll(@RequestParam("pageNum") int pageNum,@RequestParam("pageSize") int pageSize,Model model) {
  27. List<DoctorInfo> alldoctor = doctorService.selectAll(pageNum,pageSize);
  28. PageInfo<DoctorInfo> list = new PageInfo<DoctorInfo>(alldoctor);
  29. model.addAttribute("PageInfo",list);
  30. System.out.println("分页显示"+list);
  31. return "allDoctor";
  32. }
  33. @RequestMapping(value="getById")
  34. public String getById(String dNumber,Model model){
  35. List<Doctor> doctors = doctorService.getById(dNumber);
  36. model.addAttribute("doctor", doctors);
  37. System.out.println("doctor的信息"+doctors);
  38. return "updateDoctor";
  39. }
  40. @RequestMapping(value="getByDoctor")
  41. public String getByDoctor(String dNumber,Model model){
  42. List<Doctor> doctors = doctorService.getById(dNumber);
  43. model.addAttribute("doctor", doctors);
  44. System.out.println("doctor的信息"+doctors);
  45. return "getByDoctorInfo";
  46. }
  47. //, method = RequestMethod.POST
  48. @RequestMapping(value = "Ddelete")
  49. public String delete( String dNumber) {
  50. doctorService.deleteById(dNumber);
  51. return "redirect:/getAllDoctor?pageNum=1&pageSize=2";
  52. }
  53. //, method = RequestMethod.POST
  54. @RequestMapping(value = "addDoctor",method = RequestMethod.POST)
  55. public String register(@RequestParam("image") MultipartFile image,
  56. HttpServletRequest request,
  57. @RequestParam("dNumber") String dNumber,
  58. @RequestParam("name") String name,
  59. @RequestParam("dPwd") String dPwd,
  60. @RequestParam("cNumber") String cNumber,
  61. @RequestParam("dInfo") String dInfo,
  62. @RequestParam("dResume") String dResume,
  63. @RequestParam("dTel") String dTel,
  64. @RequestParam("dEmail") String dEmail,
  65. Model model) {
  66. // 获取项目的根路径,将上传图片的路径与我们的资源路径在一起,才能显示
  67. HttpSession session = request.getSession();
  68. String path = session.getServletContext().getRealPath("/");
  69. System.out.println("getRealPath('/'):" + path);
  70. int end = path.indexOf("t", 19);
  71. // String prePath = path.substring(0, end);
  72. // String realPath = "d:\\temp";
  73. String prePath = System.getProperty("user.dir");
  74. String realPath = prePath+"\\WebContent\\images";
  75. System.out.println("当前的项目的路劲"+realPath);
  76. String picName = new Date().getTime() + ".jpg";
  77. if (!image.isEmpty()) {
  78. try {
  79. FileUtils.copyInputStreamToFile(image.getInputStream(),
  80. new File(realPath, picName));
  81. } catch (IOException e) {
  82. // TODO Auto-generated catch block
  83. e.printStackTrace();
  84. }
  85. }
  86. Doctor doctor = new Doctor(dNumber, name, dPwd, cNumber, dInfo,
  87. dResume, dTel, dEmail, "\\" + picName);
  88. System.out.println(doctor);
  89. int a = doctorService.insert(doctor);
  90. System.out.println("" + a);
  91. if (a == 1) {
  92. return "redirect:/getAllDoctor?pageNum=1&pageSize=2";
  93. }
  94. return "404";
  95. }
  96. @RequestMapping(value = "updateDoctor",method = RequestMethod.POST)
  97. public String update(@RequestParam("dNumber") String dNumber,
  98. @RequestParam("name") String name,
  99. @RequestParam("cNumber") String cNumber,
  100. @RequestParam("dInfo") String dInfo,
  101. @RequestParam("dResume") String dResume,
  102. @RequestParam("dTel") String dTel,
  103. @RequestParam("dEmail") String dEmail) {
  104. Doctor doctor = new Doctor(dNumber, name, cNumber, dInfo, dResume, dTel, dEmail);
  105. System.out.println("修改的医生信息:"+doctor);
  106. doctorService.update(doctor);
  107. return "redirect:/getAllDoctor?pageNum=1&pageSize=3";
  108. }
  109. @RequestMapping(value = "findDoctor")
  110. public String findDoctor(@RequestParam("pageNum") int pageNum,@RequestParam("pageSize") int pageSize,Model model, String info, String chose) {
  111. // chose=1,按照科室搜索
  112. // 2姓名搜索
  113. System.out.println(info + chose);
  114. if (chose.equals("1")) {
  115. List<DoctorInfo> dInfos = doctorService.findId(info,pageNum,pageSize);
  116. PageInfo<DoctorInfo> list = new PageInfo<DoctorInfo>(dInfos);
  117. model.addAttribute("PageInfo",list);
  118. return "allDoctor";
  119. }
  120. if (chose.equals("2")) {
  121. List<DoctorInfo> dInfos = doctorService.findName(info,pageNum,pageSize);
  122. PageInfo<DoctorInfo> list = new PageInfo<DoctorInfo>(dInfos);
  123. model.addAttribute("PageInfo",list);
  124. return "allDoctor";
  125. }
  126. if(chose.equals("3")){
  127. List<DoctorInfo> dInfos = doctorService.findDepartName(info,pageNum,pageSize);
  128. PageInfo<DoctorInfo> list = new PageInfo<DoctorInfo>(dInfos);
  129. model.addAttribute("PageInfo",list);
  130. return "allDoctor";
  131. }
  132. return "404";
  133. }
  134. @RequestMapping(value = "getD")
  135. public String getDe(@RequestParam("doctorname") String dNumber,Model model){
  136. System.out.println(dNumber);
  137. List<DepartmentInfo> departmentInfos = doctorService.getD(dNumber);
  138. System.out.println("获取"+departmentInfos);
  139. model.addAttribute("department", departmentInfos);
  140. return "total";
  141. }
  142. @RequestMapping(value="addSch")
  143. public String addSch(@RequestParam("dNumber") String dNumber,@RequestParam("cNumber") String cNumber,
  144. @RequestParam("total") int total,@RequestParam("price") String price,@RequestParam("sTime") String sTime,
  145. @RequestParam("eTime") String eTime){
  146. String sNumber = dNumber;
  147. Sch sch = new Sch(sNumber, dNumber, cNumber, total, price, sTime, eTime);
  148. doctorService.insertSch(sch);
  149. return "redirect:/getS?sNumber="+sNumber;
  150. }
  151. @RequestMapping(value="getS")
  152. public String getSInfo(@RequestParam("sNumber") String sNumber,Model model){
  153. List<Sch> list = doctorService.getSInfo(sNumber);
  154. System.out.println(list);
  155. model.addAttribute("sch", list);
  156. return "success";
  157. }
  158. @RequestMapping("getOrederByDoctor")
  159. public String getOrederByDoctor(@RequestParam("pageNum") int pageNum,@RequestParam("pageSize") int pageSize,@RequestParam("sNumber") String sNumber,Model model){
  160. List<OrderInfo> orderinfo = doctorService.getOrderByDoctor(sNumber, pageNum, pageSize);
  161. PageInfo<OrderInfo> list = new PageInfo<OrderInfo>(orderinfo);
  162. model.addAttribute("PageInfo",list);
  163. return "orderByDoctor";
  164. }
  165. }

 部门管理控制层:

  1. @Controller
  2. @RequestMapping("/")
  3. public class DepartmentController {
  4. @Autowired
  5. private IDepartmentService departmentService;
  6. public IDepartmentService getDepartmentService() {
  7. return departmentService;
  8. }
  9. public void setDepartmentService(IDepartmentService departmentService) {
  10. this.departmentService = departmentService;
  11. }
  12. @RequestMapping(value = "getDepart")
  13. public String getAll(@RequestParam("pageNum") int pageNum,@RequestParam("pageSize") int pageSize,Model model) {
  14. List<Department> departments = departmentService.getAll(pageNum,pageSize);
  15. PageInfo<Department> list = new PageInfo<Department>(departments);
  16. model.addAttribute("PageInfo",list);
  17. return "adv";
  18. }
  19. @RequestMapping(value = "getName")
  20. public String getName(Model model) {
  21. List<Department> departments = departmentService.getAll();
  22. model.addAttribute("department", departments);
  23. System.out.println("Controller" + departments);
  24. return "info";
  25. }
  26. //获取所有科室
  27. // @RequestMapping(value = "getName1")
  28. // public String getName1(String dNumber,RedirectAttributes attr,Model model) {
  29. // List<Department> departments = departmentService.getAll();
  30. model.addAttribute("department", departments);
  31. // attr.addFlashAttribute("department", departments);
  32. // System.out.println("Controller" + departments);
  33. // System.out.println("dNumber"+dNumber);
  34. // return "redirect:/getById?dNumber="+dNumber;
  35. // }
  36. @RequestMapping(value = "delByid")
  37. public String delById(String cNumber) {
  38. System.out.println(cNumber);
  39. departmentService.delById(cNumber);
  40. return "redirect:/getDepart?pageNum=1&pageSize=2";
  41. }
  42. @RequestMapping(value = "find")
  43. public String findName(@RequestParam("pageNum") int pageNum,@RequestParam("pageSize") int pageSize,Model model, String info, String chose) {
  44. // chose=1,按照科室搜索
  45. // 2姓名搜索
  46. System.out.println(info + chose);
  47. if (chose.equals("1")) {
  48. List<Department> departments = departmentService.findId(info,pageNum,pageSize);
  49. PageInfo<Department> list = new PageInfo<Department>(departments);
  50. model.addAttribute("PageInfo",list);
  51. return "adv";
  52. }
  53. if (chose.equals("2")) {
  54. List<Department> department = departmentService.findName(info,pageNum,pageSize);
  55. PageInfo<Department> list = new PageInfo<Department>(department);
  56. model.addAttribute("PageInfo",list);
  57. return "adv";
  58. }
  59. return "404";
  60. }
  61. @RequestMapping("updateByid")
  62. public String updateByid(Model model, String cNumber) {
  63. List<Department> department = departmentService.findId(cNumber);
  64. model.addAttribute("department", department);
  65. return "updateDepartment";
  66. }
  67. @RequestMapping("update")
  68. public String update(@RequestParam("cNumber") String cNumber,
  69. @RequestParam("dName") String dName,
  70. @RequestParam("dDec") String dDec) {
  71. Department department = new Department(cNumber, dName, dDec);
  72. departmentService.update(department);
  73. return "redirect:/getDepart?pageNum=1&pageSize=2";
  74. }
  75. }

 用户管理控制层:

  1. @Controller
  2. @RequestMapping("/")
  3. public class UserController {
  4. @Autowired
  5. private IUserService userService;
  6. @Autowired
  7. private IDoctorService doctorService;
  8. // private IRegisterService registerService;
  9. // public IRegisterService getRegisterService() {
  10. // return registerService;
  11. // }
  12. //
  13. // @Resource
  14. // public void setRegisterService(IRegisterService registerService) {
  15. // this.registerService = registerService;
  16. // }
  17. public IUserService getUserService() {
  18. return userService;
  19. }
  20. @Resource
  21. public void setUserService(IUserService userService) {
  22. this.userService = userService;
  23. }
  24. @RequestMapping(value = "findAllUser", method = RequestMethod.GET)
  25. public String home(Model model) {
  26. List<User> users = userService.selectAll();
  27. model.addAttribute("users", users);
  28. System.out.println("Controller" + users);
  29. return "home";
  30. }
  31. @RequestMapping(value = "json1", produces = "application/json")
  32. public @ResponseBody
  33. List<User> getJson() {
  34. List<User> list = userService.selectAll();
  35. System.out.println(list);
  36. return list;
  37. }
  38. @RequestMapping(value="delete" ,method=RequestMethod.POST)
  39. public String delete(@RequestParam("id") int id){
  40. userService.deleteById(id);
  41. System.out.println(id);
  42. return "success";
  43. }
  44. @RequestMapping(value = "register", method = RequestMethod.POST)
  45. public String register(@RequestParam("name") String name,
  46. @RequestParam("pwd") String pwd,
  47. @RequestParam("tel") String tel,
  48. @RequestParam("info") String info, Model model) {
  49. User user = new User(name, pwd, tel, info);
  50. System.out.println(info);
  51. int a = userService.register(user);
  52. System.out.println(""+a);
  53. if(a==1){
  54. return "success";
  55. }
  56. return "register";
  57. }
  58. @RequestMapping(value = "login.action", method = RequestMethod.POST)
  59. public String login(@RequestParam("username") String username,
  60. @RequestParam("pwd") String pwd, Model model,HttpSession session) {
  61. List<User> list = userService.checkLogin(username,pwd);
  62. try {
  63. list.get(0);
  64. model.addAttribute("name", username);
  65. model.addAttribute("pwd", pwd);
  66. session.setAttribute("user", list);
  67. return "uindex";
  68. } catch (Exception e) {
  69. return "second";
  70. }
  71. }
  72. @RequestMapping(value = "updateUser", method = RequestMethod.POST)
  73. public void updateUser(@RequestParam("username") String username,
  74. @RequestParam("password") String pwd,
  75. @RequestParam("tel") String tel,
  76. @RequestParam("info") String info,
  77. @RequestParam("id") Integer id,
  78. Model model,HttpSession session,HttpServletResponse response,HttpServletRequest request) {
  79. User user = new User(username, pwd, id, tel, info);
  80. try {
  81. userService.updateUser(user);
  82. List<User> list = userService.checkLogin(user.getUname(),user.getPwd());
  83. model.addAttribute("name", username);
  84. model.addAttribute("pwd", pwd);
  85. session.setAttribute("user", list);
  86. response.sendRedirect(request.getContextPath() + "/changeruser.jsp");
  87. } catch (Exception e) {
  88. try {
  89. response.sendRedirect(request.getContextPath() + "/second.jsp");
  90. } catch (IOException e1) {
  91. // TODO Auto-generated catch block
  92. e1.printStackTrace();
  93. }
  94. }
  95. }
  96. }

 管理员管理控制层:

  1. @Controller
  2. @RequestMapping("/")
  3. public class AdministorController {
  4. @Autowired
  5. private IAdministorService administorService;
  6. private IDoctorService doctorService;
  7. public IAdministorService getAdministorService() {
  8. return administorService;
  9. }
  10. @Resource
  11. public void setAdministorService(IAdministorService administorService) {
  12. this.administorService = administorService;
  13. }
  14. @Resource
  15. public void setDoctorService(IDoctorService doctorService) {
  16. this.doctorService = doctorService;
  17. }
  18. public IDoctorService getDoctorService() {
  19. return doctorService;
  20. }
  21. //method = RequestMethod.POST)
  22. @RequestMapping(value = "index")
  23. public String login(@RequestParam("name") String name,
  24. @RequestParam("pwd") String pwd,@RequestParam("status") String status, Model model) {
  25. System.out.println(name+pwd);
  26. if(status.equals("1")){
  27. boolean result = administorService.checkLogin(name, pwd);
  28. if (result) {
  29. model.addAttribute("name", name);
  30. model.addAttribute("pwd", pwd);
  31. return "index";
  32. }
  33. }
  34. if(status.equals("2")){
  35. boolean result = doctorService.checklogin(name, pwd);
  36. if (result) {
  37. model.addAttribute("name", name);
  38. model.addAttribute("pwd", pwd);
  39. return "dindex";
  40. }
  41. }
  42. return "login";
  43. }
  44. @RequestMapping(value="addDepart", method = RequestMethod.POST)
  45. public String adDepart(@RequestParam(value="cNumber") String cNumber,@RequestParam(value="dName") String dName,@RequestParam(value="dDec") String dDec){
  46. Department department = new Department(cNumber,dName,dDec);
  47. System.out.println(department);
  48. int result = administorService.addDepart(department);
  49. System.out.println(result);
  50. return "redirect:/getDepart?pageNum=1&pageSize=2";
  51. }
  52. /*@RequestMapping(value="addDoctor", method = RequestMethod.POST)
  53. public String adDoctor(@RequestParam(value="cNumber") String cNumber,@RequestParam(value="dName") String dName,@RequestParam(value="dDec") String dDec){
  54. Department department = new Department(cNumber,dName,dDec);
  55. System.out.println(department);
  56. int result = administorService.addDepart(department);
  57. System.out.println(result);
  58. // if(result==1){
  59. return "redirect:/getDepart";
  60. // }
  61. // return "404";
  62. }*/
  63. @RequestMapping(value="updatePwd")
  64. public String updatePwd(@RequestParam(value="Pwd") String Pwd,@RequestParam(value="aNumber") String aNumber,@RequestParam(value="Name") String name){
  65. Administor administor = new Administor(aNumber, name, Pwd);
  66. administorService.updatePwd(administor);
  67. return "login";
  68. }
  69. /**
  70. *
  71. */
  72. @RequestMapping("getAllOreder")
  73. public String getAllOrder(@RequestParam("pageNum") int pageNum,@RequestParam("pageSize") int pageSize,Model model){
  74. List<OrderInfo> orderinfo = administorService.getAll(pageNum,pageSize);
  75. PageInfo<OrderInfo> list = new PageInfo<OrderInfo>(orderinfo);
  76. model.addAttribute("PageInfo",list);
  77. return "allOreder";
  78. }
  79. @RequestMapping("getCount")
  80. public String getCount(@RequestParam("pageNum") int pageNum,@RequestParam("pageSize") int pageSize,Model model){
  81. List<Count> count = administorService.getCount(pageNum,pageSize);
  82. PageInfo<Count> list = new PageInfo<Count>(count);
  83. model.addAttribute("PageInfo",list);
  84. return "count";
  85. }
  86. @RequestMapping("getFeedBack")
  87. public String getFeedback(@RequestParam("pageNum") int pageNum,@RequestParam("pageSize") int pageSize,Model model){
  88. List<Feedback> feddback = administorService.getFeedBack(pageNum,pageSize);
  89. PageInfo<Feedback> list = new PageInfo<Feedback>(feddback);
  90. model.addAttribute("PageInfo",list);
  91. return "feedback";
  92. }
  93. @RequestMapping("addNew")
  94. public String addNew(@RequestParam(value="title") String title,@RequestParam(value="content") String content,@RequestParam("time") String time){
  95. New news = new New( title, content, time);
  96. administorService.addNew(news);
  97. return "redirect:/getAllNew?pageNum=1&pageSize=3";
  98. }
  99. @RequestMapping("getAllNew")
  100. public String getAllNew(@RequestParam("pageNum") int pageNum,@RequestParam("pageSize") int pageSize,Model model){
  101. List<New> news = administorService.getAllNew(pageNum,pageSize);
  102. PageInfo<New> list = new PageInfo<New>(news);
  103. model.addAttribute("PageInfo",list);
  104. return "welcome";
  105. }
  106. }

源码获取:俺的博客首页 "资源" 里下载!

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小小林熬夜学编程/article/detail/137777
推荐阅读
相关标签
  

闽ICP备14008679号