Java+SSM+Jsp+Mysql project college student health management system

Get the source code at the end of the article 

Development language: Java

Development tools: IDEA/Eclipse

Database: MYSQL5.7

Application service:Tomcat7/Tomcat8

Use frame: ssm

JDK version: jdk1.8

With the development of the times, the number of college students is expected to increase daily, but there are also many psychological problems. College students have received a lot of attention because of the social problems caused by various psychology, so how to better cultivate the correct psychology of college students. Health problem is an important problem faced by many universities nowadays.

This college student health management system is a system to better manage the psychology of college students. The system is divided into three user roles: administrator, doctor and student. It mainly realizes user login, student information management, doctor information management, daily life and rest. Management, exercise record management, disease record management, physical examination report management, online message, health information, password modification and other login functions, these functions can basically meet the needs of college students' mental health management

Key words: college students; psychological resume; JSP; MySQL

Overall system design

The main functions to be completed in the overall system design are conceptual and logical structure design. Conceptual structure design is the process of abstracting user requirements obtained from demand analysis into conceptual models, which is the key to the entire database design.

System function module analysis 

This system is mainly divided into several functional modules such as user login, student information management, doctor information management, daily life and rest management, exercise record management, disease record management, physical examination report management, online message, health information, password modification and other login functions. 

User login 

Students, doctors and administrators in this system can log in to the system through their own account numbers and passwords to achieve their different functions.

User Management

Manage and maintain user information; mainly include operations such as adding, modifying, deleting, and querying students and doctors.

Addition and deletion of information 

Major updates to this feature include:

( 1 ) Addition, modification and deletion of daily life information;

( 2 ) addition, modification and deletion of exercise record schedule information;

( 3 ) Addition, modification and deletion of work and rest information of disease records;

( 4 ) addition, modification and deletion of work and rest information in the medical examination report;

( 5 ) Addition, modification and deletion of health information.

( 6 ) Add, modify and delete message information.

Browsing and querying information 

This module mainly includes:

( 1 ) Browsing and inquiring about daily work and rest information;

( 2 ) Browsing and querying exercise record schedule information;

( 3 ) Browsing and inquiring about work and rest information of disease records;

( 4 ) Browsing and querying the work and rest information of the medical examination report;

( 5 ) Browsing and querying health information.

( 6 ) Browsing and replying to message information.

Overall system design 

The system sets up three logins, including administrators, doctors and students. Among them, administrators can manage the basic information of students and doctors, students can manage their own life and rest information, exercise record information, disease record information, physical examination report information, view personal health information and online messages and other functions; doctor users can view students' information The content of daily life, exercise records, disease records, and can manage students' mental health information and reply to messages. As shown 

Introduction to JSP Technology 

This college student health management system is developed using JSP technology. JSP is one of many JAVA language development modes. JAVA language is a very powerful language. It can develop desktop programs, WEB programs and Android programs. Among them JSP is a kind of WEB development. JSP technology inherits many advantages of JAVA language. First of all, it is an object-oriented language, which allows it to encapsulate a large number of objects, which greatly improves the coupling of programs. In addition, it has a large number of low-level functions and methods to help programmers improve development efficiency. At the same time, it provides a variety of database connection methods for developers to choose from, including PDO connection methods and ADODB connection methods. In addition, it also has many development frameworks and modes. To let users choose, its flexible and diverse development methods are undoubtedly the preferred language for developing websites

user interface design

login interface 

By entering http://localhost:8080/health/ in the browser address , the system will automatically jump to the login page. On the login page, the user can log in to the system by entering the correct username and password and selecting their own role, provided that You must enter the correct user name and password. If you enter the wrong user name and password, you will not be able to log in to the system. The login interface of the college student health management system is shown in the figure.

@RequestMapping("/adminlogin")

      public String adminlogin(Admin admin, HttpServletRequest request, HttpSession session) {

              String username =request.getParameter("username");

              String pwd =request.getParameter("pwd");

              

              String role =request.getParameter("role");

              

              System.out.println(username);

              System.out.println(pwd);

              System.out.println(role);

                    String urlString="";        



              if(role.equals("1"))

             {    

                     Admin admin2=adminService.adminlogin(username, pwd);

                     if (admin2!=null)

                     {

                            request.setAttribute("msg", "登录成功!");

                           session.setAttribute("username", username);

                           session.setAttribute("pwd", pwd);

                           session.setAttribute("role", "管理员");

                           return "admin/main";

                    }

                     request.setAttribute("isFlag", "1");

                     request.setAttribute("msg", "用户名或密码错误!");

                            

              }

            

              

                if(role.equals("2"))

              

              {

                     Yisheng  js=yishengService.userlogin(username, pwd);

                     System.out.print(username);

                     System.out.print(pwd);

                     if (js!=null) {

                            request.setAttribute("msg", "登录成功!");

                                  session.setAttribute("username", username);

                                  session.setAttribute("pwd", pwd);

                                  session.setAttribute("xm", js.getXingming());

                                  session.setAttribute("uid", js.getId());

                                  session.setAttribute("role", "医生");

                                  return "admin/main2";

                    }

              }

                     if(role.equals("3"))

                     {

                            Stu  stu=stuService.userlogin(username, pwd);

                            System.out.print(username);

                            System.out.print(pwd);

                            if (stu!=null) {

                                   request.setAttribute("msg", "登录成功!");

                                         session.setAttribute("username", username);

                                         session.setAttribute("pwd", pwd);

                                         session.setAttribute("xm", stu.getXingming());

                                         session.setAttribute("bj", stu.getBanji());

                                         session.setAttribute("uid", stu.getId());

                                         session.setAttribute("role", "学生");

                                         return "admin/main3";

                           }

                     }

 Student Information Management 

In the college student health management system, the administrator must be able to manage the student information in the system. When designing the page, we used Bootstrap to lay out the page. The overall color of the system takes the eye-catching green as the main background, and input it in the student management interface. After the basic information of the student, click the save button to successfully add the student information to the system. The student information addition interface is as shown in the figure.

@RequestMapping("/stuAdd")

      public String stuAdd(Stu stu, HttpServletRequest request) {

                    stuService.add(stu);

                    return "redirect:stuList";

     }

When the administrator adds the student information, he also needs to be able to manage the student's information, mainly including the modification and deletion of the student's information. Modify, delete the student information when the student information is no longer needed, in addition, the administrator can also perform a fuzzy query based on the student's student number and name to query more specific student information. student information

@RequestMapping("/stuList")

      public String stuList(HttpServletRequest request) {

             request.setAttribute("flag", 2);

             int page=1;

             if(request.getParameter("page")==null)

             {

                    page=1;

             }

             else

             {

             page=Integer.parseInt(request.getParameter("page"));

             }

             request.setAttribute("page", page);

             request.setAttribute("stuList", stuService.getList(page, rows));

             request.setAttribute("pageHtml", PageUtil.getPageHtml(request,stuService.getTotal(), page, rows));



             return "/admin/stu_list";

 Doctor Information Management

The administrator can manage the doctor's information. In the doctor's information management interface, we have beautified the page through the bootstrap framework. In this book, we have designed several Input controls to store the basic information of the teacher. When the administrator enters the teacher's basic information After the basic information, click the save button to successfully save the doctor information to the teacher table of the database. The doctor information adding page is as shown in the figure.

daily life information management 

sports information management 

 

Disease Information Management 

mental health management 

 

Guess you like

Origin blog.csdn.net/m0_49113107/article/details/123668837