Today, we introduce a hospital physical examination reservation system based on SSM framework, which has complete functions.
Project requirements:
Functional requirements:
The system is divided into three roles: system administrator, doctor and physical examination personnel.
The system administrator mainly has the following functions:
Physical examination personnel management: addition, deletion, modification and query, fuzzy query
Doctor personnel management: addition, deletion, modification and query, fuzzy query
Appointment approval: after the physical examination personnel make an appointment, they can approve or fail
Role management: add, delete, modify, query, and assign permissions to different roles
Personal information: view and modify your personal information
Password modification: modify your own system password
Statistical analysis: the proportion of men and women with various diseases in the system
Doctors have the following functions:
Physical examination personnel management: add, delete, modify, query and fuzzy query physical examination personnel
Management of physical examination items: add, delete, modify and check physical examination items
Package management: add, delete, modify and check the physical examination package
Physical examination management: feed back the physical examination situation to the physical examination personnel
Personal information: view and modify your personal information
Password modification: modify your own system password
Statistical analysis: the proportion of men and women with various diseases in the system
Physical examination personnel have the following functions:
Personal physical examination appointment: appointment for physical examination
Personal information: view and modify your personal information
Password modification: modify your own system password
Statistical analysis: the proportion of men and women with various diseases in the system
- Project technology
- Background: SSM(Spring+Spring MVC+ Mybits)
- Front desk: mainly layui and jsp+jquery+ajax
Demo video
Hospital physical examination reservation system based on SSM
Login logic code
/** * User login controller */ @Controller @RequestMapping("login") public class LoginController { @Autowired private UserService userService; // // @Autowired // private LogInfoService logInfoService; /** * @return Method of jumping to login page */ @RequestMapping("toLogin") public String toLogin(){ return "system/main/login"; } /** * .Login method * @param userVo * @param model * @return */ @RequestMapping("login") public String login(HttpServletRequest request, Model model){ String role = request.getParameter("role"); String userName = request.getParameter("userName"); String password = request.getParameter("password"); // String code = WebUtils.getHttpSession().getAttribute("code").toString(); // if(userVo.getCode().equals(code)){ if (SysConstant.USER_TYPE_ADMIN.equals(role)) {//administrators Admin a = new Admin(); a.setAid(userName); a.setApassword(password); Admin admin = userService.adminLogin(a); if(null != admin){ //Put into session UserVO uv = new UserVO(); uv.setLoginname(admin.getAid()); uv.setPwd(admin.getApassword()); uv.setRealname(admin.getAname()); uv.setType(SysConstant.USER_TYPE_ADMIN); WebUtils.getHttpSession().setAttribute("user",uv); WebUtils.getHttpSession().setAttribute("userInfoPage","adminInfo.html"); WebUtils.getHttpSession().setAttribute("rolename","administrators"); return "system/main/index"; }else { model.addAttribute("error", SysConstant.USER_LOGIN_ERROR_MSG); return "system/main/login"; } }else if (SysConstant.USER_TYPE_DOCTOR.equals(role)) {//doctor Doctor d = new Doctor(); d.setDid(userName); d.setDpassword(password); Doctor doctor = userService.doctorLogin(d); if(null != doctor){ //Put into session UserVO uv = new UserVO(); uv.setLoginname(doctor.getDid()); uv.setPwd(doctor.getDpassword()); uv.setRealname(doctor.getDname()); uv.setType(SysConstant.USER_TYPE_DOCTOR); WebUtils.getHttpSession().setAttribute("user", uv); WebUtils.getHttpSession().setAttribute("userInfoPage","doctorInfo.html"); WebUtils.getHttpSession().setAttribute("rolename","doctor"); return "system/main/index"; }else { model.addAttribute("error", SysConstant.USER_LOGIN_ERROR_MSG); return "system/main/login"; } }else if (SysConstant.USER_TYPE_USER.equals(role)) {//Physical examination personnel User u = new User(); u.setUid(userName); u.setUpassword(password); User user = userService.userLogin(u); if(null != user){ //Put into session UserVO uv = new UserVO(); uv.setLoginname(user.getUid()); uv.setPwd(user.getUpassword()); uv.setRealname(user.getUname()); uv.setType(SysConstant.USER_TYPE_USER); WebUtils.getHttpSession().setAttribute("user",uv); WebUtils.getHttpSession().setAttribute("userInfoPage","userInfo.html"); WebUtils.getHttpSession().setAttribute("rolename","Physical examination personnel"); return "system/main/index"; }else { model.addAttribute("error", SysConstant.USER_LOGIN_ERROR_MSG); return "system/main/login"; } }else { model.addAttribute("error", SysConstant.USER_LOGIN_ERROR_MSG); return "system/main/login"; } } @RequestMapping("getCode") public void getCode(HttpServletResponse response, HttpSession session) throws IOException { //Defines the length and width of the graphic verification code LineCaptcha lineCaptcha = CaptchaUtil.createLineCaptcha(116,36,4,5); session.setAttribute("code",lineCaptcha.getCode()); ServletOutputStream outputStream = response.getOutputStream(); ImageIO.write(lineCaptcha.getImage(),"JPEG",outputStream); } @RequestMapping("toregister") public String toregister() { return "system/main/register"; } }