当前位置:   article > 正文

java基于SSH的医院挂号管理系统、挂号管理系统,附源码+数据库+PPT+文档,适合课程设计、毕业设计_基于java的医院挂号管理系统

基于java的医院挂号管理系统

1、项目介绍

java基于SSH的医院挂号管理系统、挂号管理系统,医院挂号系统主要用于实现医院的挂号,分为前台和后台管理。

前台基本功能包括:用户注册、用户登录、医院查询、挂号、取消挂号、修改个人信息、退出等。

后台基本功能包括:系统管理员登录、医院管理、科室管理、公告管理、退出系统等。

2、技术框架

编程语言:Java

系统架构:B/S

前端框架:Spring+Struts+Hibernate(SSH)

前端框架:JSP+html+js+CSS

数据库:MySQL

Maven项目:否

运行环境:JDK7+MySQL5.6+Idea+Tomcat8.5

3、演示视频

B站演示视频:

java基于SSH的医院挂号管理系统、挂号管理系统,附源码+数据库+PPT+文档,适合课程设计、毕业设计

java基于SSH的医院挂号管理系统、挂号管理系统,附源码+数据库+PPT+文档,适合课程设计、毕业设计_哔哩哔哩_bilibili

4、项目截图

4.1、首页

4.2、医生信息

4.3、医生查询

4.4、公告信息

4.5、用户注册

4.6、挂号

4.7、我的挂号信息

4.8、后台首页

4.9、医院信息管理

4.10、科室信息管理

4.11、医生信息管理

4.12、会员信息管理

4.13、系统公告管理

5、文档截图

6、代码示例

  1. package com.action;
  2. import java.util.Date;
  3. import java.util.List;
  4. import java.util.Map;
  5. import javax.servlet.http.HttpServletRequest;
  6. import javax.servlet.http.HttpSession;
  7. import org.apache.struts2.ServletActionContext;
  8. import com.dao.TGuahaoDAO;
  9. import com.dao.TZhuanjiaDAO;
  10. import com.model.TGuahao;
  11. import com.model.TUser;
  12. import com.model.TZhuanjia;
  13. import com.opensymphony.xwork2.ActionSupport;
  14. public class guahaoAction extends ActionSupport
  15. {
  16. private Integer id;
  17. private Integer zhuanjiaId;
  18. private Integer userId;
  19. private String riqi;
  20. private String jibing;
  21. private String xingming;
  22. private String lianxi;
  23. private String message;
  24. private String path;
  25. private TGuahaoDAO guahaoDAO;
  26. private TZhuanjiaDAO zhuanjiaDAO;
  27. public String guahaoAdd()
  28. {
  29. HttpServletRequest request=ServletActionContext.getRequest();
  30. HttpSession session=request.getSession();
  31. TUser user=(TUser)session.getAttribute("user");
  32. TGuahao guahao=new TGuahao();
  33. guahao.setZhuanjiaId(zhuanjiaId);
  34. guahao.setUserId(user.getUserId());
  35. guahao.setRiqi(riqi);
  36. guahao.setJibing(jibing);
  37. guahao.setXingming(xingming);
  38. guahao.setLianxi(lianxi);
  39. guahaoDAO.save(guahao);
  40. this.setMessage("成功挂号");
  41. this.setPath("index.action");
  42. return "succeed";
  43. }
  44. public String guahaoDel()
  45. {
  46. HttpServletRequest request=ServletActionContext.getRequest();
  47. TGuahao guahao=guahaoDAO.findById(id);
  48. guahaoDAO.delete(guahao);
  49. request.setAttribute("msg", "成功取消挂号");
  50. return "msg";
  51. }
  52. public String guahaoMana_user()
  53. {
  54. HttpServletRequest request=ServletActionContext.getRequest();
  55. HttpSession session=request.getSession();
  56. TUser user=(TUser)session.getAttribute("user");
  57. String sql="from TGuahao where userId="+user.getUserId();
  58. List guahaoList =guahaoDAO.getHibernateTemplate().find(sql);
  59. for(int i=0;i<guahaoList.size();i++)
  60. {
  61. TGuahao guahao=(TGuahao)guahaoList.get(i);
  62. guahao.setZhuanjia(zhuanjiaDAO.findById(guahao.getZhuanjiaId()));
  63. }
  64. request.setAttribute("guahaoList", guahaoList);
  65. return ActionSupport.SUCCESS;
  66. }
  67. public String guahaoMana_zhuanjia()
  68. {
  69. HttpServletRequest request=ServletActionContext.getRequest();
  70. HttpSession session=request.getSession();
  71. TZhuanjia zhuanjia=(TZhuanjia)session.getAttribute("zhuanjia");
  72. String sql="from TGuahao where zhuanjiaId="+zhuanjia.getId();
  73. List guahaoList =guahaoDAO.getHibernateTemplate().find(sql);
  74. for(int i=0;i<guahaoList.size();i++)
  75. {
  76. TGuahao guahao=(TGuahao)guahaoList.get(i);
  77. guahao.setZhuanjia(zhuanjiaDAO.findById(guahao.getZhuanjiaId()));
  78. }
  79. request.setAttribute("guahaoList", guahaoList);
  80. return ActionSupport.SUCCESS;
  81. }
  82. public TGuahaoDAO getGuahaoDAO()
  83. {
  84. return guahaoDAO;
  85. }
  86. public void setGuahaoDAO(TGuahaoDAO guahaoDAO)
  87. {
  88. this.guahaoDAO = guahaoDAO;
  89. }
  90. public TZhuanjiaDAO getZhuanjiaDAO()
  91. {
  92. return zhuanjiaDAO;
  93. }
  94. public String getMessage()
  95. {
  96. return message;
  97. }
  98. public void setMessage(String message)
  99. {
  100. this.message = message;
  101. }
  102. public String getPath()
  103. {
  104. return path;
  105. }
  106. public void setPath(String path)
  107. {
  108. this.path = path;
  109. }
  110. public void setZhuanjiaDAO(TZhuanjiaDAO zhuanjiaDAO)
  111. {
  112. this.zhuanjiaDAO = zhuanjiaDAO;
  113. }
  114. public Integer getId()
  115. {
  116. return id;
  117. }
  118. public void setId(Integer id)
  119. {
  120. this.id = id;
  121. }
  122. public String getJibing()
  123. {
  124. return jibing;
  125. }
  126. public void setJibing(String jibing)
  127. {
  128. this.jibing = jibing;
  129. }
  130. public String getLianxi()
  131. {
  132. return lianxi;
  133. }
  134. public void setLianxi(String lianxi)
  135. {
  136. this.lianxi = lianxi;
  137. }
  138. public String getRiqi()
  139. {
  140. return riqi;
  141. }
  142. public void setRiqi(String riqi)
  143. {
  144. this.riqi = riqi;
  145. }
  146. public Integer getUserId()
  147. {
  148. return userId;
  149. }
  150. public void setUserId(Integer userId)
  151. {
  152. this.userId = userId;
  153. }
  154. public String getXingming()
  155. {
  156. return xingming;
  157. }
  158. public void setXingming(String xingming)
  159. {
  160. this.xingming = xingming;
  161. }
  162. public Integer getZhuanjiaId()
  163. {
  164. return zhuanjiaId;
  165. }
  166. public void setZhuanjiaId(Integer zhuanjiaId)
  167. {
  168. this.zhuanjiaId = zhuanjiaId;
  169. }
  170. }
  1. package com.action;
  2. import java.util.List;
  3. import java.util.Map;
  4. import org.apache.struts2.ServletActionContext;
  5. import com.dao.TUserDAO;
  6. import com.model.TUser;
  7. import com.opensymphony.xwork2.ActionContext;
  8. import com.opensymphony.xwork2.ActionSupport;
  9. public class UserAction extends ActionSupport
  10. {
  11. private int userId;
  12. private String userName;
  13. private String userPw;
  14. private String userRealname;
  15. private String userAddress;
  16. private String userTel;
  17. private String userEmail;
  18. private String userDel;
  19. private String message;
  20. private String path;
  21. private TUserDAO userDAO;
  22. public String userReg()
  23. {
  24. TUser user=new TUser();
  25. user.setUserName(userName);
  26. user.setUserPw(userPw);
  27. user.setUserAddress(userAddress);
  28. user.setUserTel(userTel);
  29. user.setUserRealname(userRealname);
  30. user.setUserEmail(userEmail);
  31. user.setUserDel("no");
  32. userDAO.save(user);
  33. this.setMessage("注册成功,请登录");
  34. this.setPath("qiantai/default.jsp");
  35. return "succeed";
  36. }
  37. public String userLogin()
  38. {
  39. String sql="from TUser where userName=? and userPw=? and userDel='no'";
  40. Object[] con={userName,userPw};
  41. List userList=userDAO.getHibernateTemplate().find(sql,con);
  42. System.out.println(userList.size()+"%%");
  43. if(userList.size()==0)
  44. {
  45. this.setMessage("用户名或密码错误");
  46. this.setPath("qiantai/default.jsp");
  47. }
  48. else
  49. {
  50. Map session= ServletActionContext.getContext().getSession();
  51. TUser user=(TUser)userList.get(0);
  52. session.put("user", user);
  53. session.put("userType", 2);
  54. this.setMessage("成功登录");
  55. this.setPath("qiantai/default.jsp");
  56. }
  57. return "succeed";
  58. }
  59. public String userLogout()
  60. {
  61. Map session= ServletActionContext.getContext().getSession();
  62. session.put("user", null);
  63. session.put("userType", null);
  64. this.setMessage("安全退出系统");
  65. this.setPath("qiantai/default.jsp");
  66. return "succeed";
  67. }
  68. public String userEdit()
  69. {
  70. TUser user=userDAO.findById(userId);
  71. user.setUserName(userName);
  72. user.setUserPw(userPw);
  73. user.setUserAddress(userAddress);
  74. user.setUserTel(userTel);
  75. user.setUserRealname(userRealname);
  76. user.setUserEmail(userEmail);
  77. user.setUserDel("no");
  78. userDAO.attachDirty(user);
  79. Map request=(Map)ServletActionContext.getContext().get("request");
  80. request.put("msg", "修改成功,重新登陆后生效");
  81. return "msg";
  82. }
  83. public String userMana()
  84. {
  85. String sql="from TUser where userDel='no'";
  86. List userList=userDAO.getHibernateTemplate().find(sql);
  87. Map request=(Map)ServletActionContext.getContext().get("request");
  88. request.put("userList", userList);
  89. return ActionSupport.SUCCESS;
  90. }
  91. public String userDel()
  92. {
  93. TUser user=userDAO.findById(userId);
  94. user.setUserDel("yes");
  95. userDAO.attachDirty(user);
  96. this.setMessage("删除成功");
  97. this.setPath("userMana.action");
  98. return "succeed";
  99. }
  100. public int getUserId()
  101. {
  102. return userId;
  103. }
  104. public void setUserId(int userId)
  105. {
  106. this.userId = userId;
  107. }
  108. public String getUserName()
  109. {
  110. return userName;
  111. }
  112. public void setUserName(String userName)
  113. {
  114. this.userName = userName;
  115. }
  116. public String getUserPw()
  117. {
  118. return userPw;
  119. }
  120. public void setUserPw(String userPw)
  121. {
  122. this.userPw = userPw;
  123. }
  124. public String getUserRealname()
  125. {
  126. return userRealname;
  127. }
  128. public void setUserRealname(String userRealname)
  129. {
  130. this.userRealname = userRealname;
  131. }
  132. public String getUserAddress()
  133. {
  134. return userAddress;
  135. }
  136. public void setUserAddress(String userAddress)
  137. {
  138. this.userAddress = userAddress;
  139. }
  140. public String getUserTel()
  141. {
  142. return userTel;
  143. }
  144. public void setUserTel(String userTel)
  145. {
  146. this.userTel = userTel;
  147. }
  148. public String getUserEmail()
  149. {
  150. return userEmail;
  151. }
  152. public void setUserEmail(String userEmail)
  153. {
  154. this.userEmail = userEmail;
  155. }
  156. public String getUserDel()
  157. {
  158. return userDel;
  159. }
  160. public void setUserDel(String userDel)
  161. {
  162. this.userDel = userDel;
  163. }
  164. public String getMessage()
  165. {
  166. return message;
  167. }
  168. public void setMessage(String message)
  169. {
  170. this.message = message;
  171. }
  172. public String getPath()
  173. {
  174. return path;
  175. }
  176. public void setPath(String path)
  177. {
  178. this.path = path;
  179. }
  180. public TUserDAO getUserDAO()
  181. {
  182. return userDAO;
  183. }
  184. public void setUserDAO(TUserDAO userDAO)
  185. {
  186. this.userDAO = userDAO;
  187. }
  188. }

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

闽ICP备14008679号