Table of contents
1.3 Characteristics of system development technology
1. 4 Paper structure and chapter arrangement
2Personnel Management System Analysis
2.2 System business process analysis
3 Overall design of personnel management system
3.1 System architecture design
3.2 System function module design
3.2.1 Overall functional module design
3.2.2 Department management module design
3.2. 3 Design of employee management module
3.3.1 Database conceptual structure design
3.3.2 Database logical structure design
3.4 Summary of this chapter 19
4 Design and implementation of key modules of personnel management system 2 0
4. 4 Department Management Module
4. 5 Position Management Module 26
4. 6 Employee Management Module
4. 7 Announcement Management Module
The rapid development of scientific and technological progress has caused tremendous changes in people's daily lives. The rapid development of electronic information technology has made the application level of electronic information technology in various fields popular and applied. The arrival of the information age has become an unstoppable fashion trend, and the history of human development is entering a new era. In actual application, the work rules and development steps of the application software are used to build the personnel management system using Java technology.
This design mainly implements a personnel management system that combines the advantages of humanization, high efficiency, and convenience, and completes functional modules such as user management, department management, position management, employee management, and announcement management. The system communicates with the server through the browser to realize data interaction and changes. This system improves work efficiency and reduces errors and omissions in data storage through scientific management methods and convenient services. The personnel management system uses Java language and is developed using ssm technology based on the MVVM model. It is written using the MyEclipse 2017 CI 10 compiler. In terms of data, Microsoft's MySQL relational database is mainly used as the data storage medium, and is completed with HTML+CSS technology. System development.
Keywords : ssm technology; MYSQL; personnel management system
Abstract
The rapid development of science and technology has caused tremendous changes in people's daily lives. The rapid development of electronic information technology has made the application level of electronic information technology in various fields popular and applied. The arrival of the information age has become an irresistible fashion trend, and the history of human development is entering a new era. In practical applications, Java technology is used to build a personnel management system based on the working rules and development steps of the application software.
This design mainly implements a personnel management system that integrates the advantages of humanization, efficiency, and convenience, and completes functional modules such as user management, department management, position management, employee management, and announcement management. The system communicates with the server through a browser to achieve data interaction and change. This system improves work efficiency and reduces errors and omissions in data storage through scientific management methods and convenient services. The personnel management system is developed using Java language and SSM technology based on MVVM mode, using the MyEclipse 2017 CI 10 compiler. The data aspect mainly uses Microsoft's MySQL relational database as the data storage medium, and cooperates with HTML+CSS technology to complete the system development.
Keywords:SSM technology; MYSQL; Personnel Management System
1 Introduction
1.1Research background _
Personnel management system, which simply refers to the collection of advanced human resource management concepts, human resource management practices, and experience in building human resources information systems from successful companies, uses information technology to achieve highly integrated management of corporate human resource information, and is used by Chinese companies human resources management solutions. The core value lies in liberating human resources workers from the tedious daily chores, allowing them to devote more energy to the enterprise's human resources function management and management decision-making, so as to maintain the company's continuous and efficient operations. Centrally record, monitor and analyze all workforce skills and qualifications to provide decision analysis. Improve the overall scientific and technological content and management efficiency of the enterprise, and accelerate the informatization construction of the enterprise.
The history of the personnel management system can be traced back to the 1960s. Since computer applications were not yet popular at that time, the personnel management system could only complete simple salary accounting work and did not involve personnel information management other than salary calculation. However, with the rapid development of computer technology and the popularization of computers in enterprise management, it is imperative to use computers to realize enterprise personnel management. For large and medium-sized enterprises, the use of computers to support the enterprise in completing daily labor and personnel management tasks efficiently is a necessary condition to adapt to the requirements of modern enterprise systems and promote enterprise labor and personnel management to become scientific and standardized; it has advantages that computer management cannot match. Fast, easy to find, high reliability, large storage capacity, good confidentiality, long life, low cost, etc. These advantages can greatly improve the efficiency of personnel management, and are also important conditions for the scientific and formal management of enterprises and their integration with the world. Different enterprises have different personnel management systems, which determines the design of different personnel management systems according to the needs of different enterprises, so as to better serve the enterprise and bring higher economic benefits to the enterprise.
1.2 Research status
At present, my country's economy is developing at a rapid pace. Some enterprises have risen rapidly in the rapidly developing economy, and the number of employees in the enterprises has also increased greatly. The rapid increase in the number of employees has put forward higher requirements for personnel management, and also requires personnel management to be more efficient and scientific. The efficient and convenient personnel management system enables decision-makers to better grasp the basic information of employees and provides a more efficient platform for personnel recruitment and management. Our country's personnel management work has a certain history. However, because the concepts and technologies of personnel management are relatively backward compared to developed countries abroad, although the domestically developed personnel management system can meet the basic needs of personnel management, there is still a lack of necessary analysis and decision-making. Shortcomings. Although foreign personnel management systems have certain advantages over domestic personnel management systems and can provide decision-making guidance for the personnel management of modern enterprises and conduct personnel analysis based on the management concepts of modern enterprises, they still have certain limitations. - certain shortcomings. These shortcomings are mainly reflected in the fact that foreign personnel management systems have a small scope of application, cannot be promoted on a large scale, and do not have strong flexibility.
At present, the development technology of domestic personnel management information systems has become relatively mature. This is because personnel management has a wide application field and is involved in all walks of life. The business is clear and the needs are clear. There is no need for too many complex processes in the design and implementation of the project, but if it is a personnel management system with complete functions and practical usability, careful analysis and design are required.
Our country's management information system was initially introduced from developed countries such as the United States. Mature enterprise management systems such as EPR also originated in the United States. Enterprise personnel management systems belong to the category of management information systems. Our country's start in this area lags behind that of Western developed countries. . Although Chinese companies have successively developed many excellent management information systems, overall, their quality still has a lot of room for improvement compared with developed countries.
1.3 Characteristics of system development technology
(1) The backend of the web background management in the personnel management system no longer uses the ancient jsp+javabean+servlet technology, but uses the current mainstream ssm framework, which reduces java configuration code and simplifies programming code. The current ssm framework also One of the frameworks chosen by many companies.
(2) The front-end of the web background management in the personnel management system uses a JavaScript framework, which can beautify the page design in conjunction with ajax[8] and jquery[9].
(3) The popular vue framework combines jQuery technology, extends some plug-ins on the basis of jQuery, and better realizes front-end design by defining plug-ins by yourself.
(4) The database in the personnel management system uses mysql5.7, which has high execution efficiency.
1.4 Paper structure and chapter arrangement
The paper will be organized hierarchically. In addition to the abstract, acknowledgments, and literature references, the main text will also analyze the website requirements, describe the general design and implemented functions, and finally list some debugging records. The main structure of the paper is as follows:
Chapter 1: Introduction. The first chapter mainly introduces the background of the subject research, the current status of system development and the research status and main work of this article.
Chapter 2: System requirements analysis. Chapter 2 mainly conducts demand analysis from the aspects of users and functions of the system.
Chapter 3: System Design. Chapter 3 mainly carries out functional design of the system framework, system function modules and database.
Chapter 4: System implementation. Chapter 4 mainly introduces the system framework construction and the implementation of the system interface.
Chapter 5: System Testing. Chapter 5 mainly tests some interfaces of the system and tests the main functions.
2 Analysis of Personnel Management System
System analysis is a prerequisite for developing a project. Through system analysis, the basic needs of the main users of the system can be well understood, and this is also the reason for the development of the project. Then, a feasibility analysis is performed on the system development, which usually includes technical feasibility, economic feasibility, etc. The feasibility analysis is also an analysis from the overall perspective of the project. Then the specific requirements of the project are analyzed. The analysis method is generally implemented through the user's use case diagram. The following is a detailed introduction.
2.1 Feasibility analysis
(1) Technical feasibility analysis
The personnel management system uses the MySQL database for storage and development tools such as IDEA and Tomcat for development, which can bring a lot of convenience to our writing work. The system is developed using the SSM framework, which makes the system more scalable and maintainable, reduces Java configuration code, and simplifies programming code. Currently, the SSM framework is also one of the frameworks chosen by many enterprises.
(2) Economic feasibility analysis
The development software used in developing the personnel management system, such as IDEA development tools, Tomcat8.0 server, MySQL5.7 database, Photoshop image processing software, etc., are all open source and free. These environments have been systematically studied in school. You can operate it independently without any additional cost, and the system development tools can be downloaded directly from the Internet, so it is economically feasible.
(3) Operation feasibility analysis
When designing this project, I referred to many successful cases of similar systems, systematically analyzed their operation interfaces and functions, and combined many cases together to highlight people-oriented and simplified operations, so people with basic computer knowledge can Operate this project. Therefore, there is no problem with operational feasibility.
2.2 System business process analysis
The workflow under administrator authority is mainly as follows: the administrator provides a login button through the system interface and clicks it to transfer to the administrator login interface, and fills in the corresponding administrator account and administrator password on the interface to enter the system under administrator authority. The background system has set up corresponding operation functions on the left navigation bar of the system.
The workflow under user permissions is mainly as follows: the user authenticates and registers through the registration function provided by the system, then performs personal identity verification on the login interface, enters the user's personal backend interface, and performs corresponding operations.
The business process of the personnel management system is shown in the figure below.
Figure 3-3 System business flow chart
2.3 System function analysis
The design and implementation of the personnel management system is to make it easier for enterprise users to manage some information related to employees . Users can save a lot of time and energy when searching and managing, and effectively reduce unnecessary search time. The system is functionally divided into two parts: the ordinary user terminal and the administrator terminal .
Normal client:
(1) Registration and login: When the user wants to query and manage the functions implemented in the system , he or she must log in to the system. If there is no account, go to the login interface ;
(2) Personal information: After logging in, users can modify their personal information and the password for their account login;
(3) Department management: Click the "Department Management" menu to view all added department management in the system. It supports querying department management by department name or department manager. If you want to know the detailed information of a certain department, click The following "Details" will enter the details interface;
(4) Employee management: Click the "Employee Management" menu to view all employee management added in the system. It supports querying employee management by department name or employee gender. If you want to know the detailed information of a certain employee, click The following "Details" will enter the details interface;
(5) Announcement Management: Click the "Announcement Management" menu to view all the announcement management added in the system. It supports querying the announcement management through the announcement title. If you want to know the details of a certain announcement, click " Details" will enter the details interface;
Administrator side:
(1) Personal information: After logging in, managers can modify their personal information and the password for their account login;
(2) User management: Administrators can manage and control all user roles in the system, including administrators and ordinary users. If you need to add a new user, click the "Add" button on the page and enter the above information according to the prompts. User information can be viewed in the corresponding user interface after clicking "Submit". You can click the "Delete" button behind the user to directly delete a user.
(3) Department management: Click the "Department Management" button to view all department management in the system. It supports querying department management by department name. If you want to add a new department management, click the "Add" button and enter according to the prompts. For department management, after clicking "Submit", the newly added department management will be displayed on the department management interface. You can click on a training to view the details of department management, or you can directly click "Delete" to delete department management;
(4) Position management: Click the "Position Management" button to view all position management in the system. It supports querying position management by position name or department. If you want to add new position management, click the "Add" button and then Enter the position management according to the prompts. After clicking "Submit", the newly added position management will be displayed on the position management interface. You can click on a training to view the details of the position management, or you can directly click "Delete" to delete the position management;
(5) Employee management: Click the "Employee Management" button to view all employee management in the system. It supports querying employee management by department name, employee gender or mobile phone number. If you want to add new employee management, click "Add" " button and then enter employee management according to the prompts. After clicking "Submit", the newly added employee management will be displayed on the employee management interface. You can click on a training to view the details of employee management, or you can directly click "Delete" to delete employee management. ;
(6) Announcement management: Click the "Announcement Management" menu to view all added announcement management in the system. It supports querying announcement management through announcement titles or announcement tags. If you want to add a new announcement, click "Add" button, enter the announcement management according to the prompts, click the "Submit" button, the new announcement management will be displayed in the system, and the added announcement management can also be deleted;
2.3.2 Non-functional analysis
The non-functional requirements of the personnel management system include the security, reliability, performance, scalability, etc. of the personnel management system. The details can be expressed in the following 3-1 table:
Table 3-1 Personnel management system non-functional requirements table
safety |
Mainly refers to the installation of the personnel management system database, the use of the database and the setting of passwords must comply with standards. |
reliability |
Reliability means that the personnel management system can install and operate according to the user's instructions. After testing, the reliability is over 90%. |
performance |
Performance is a necessary condition for the personnel management system to occupy the market, so it is best to have good performance. |
Scalability |
For example, the database reserves multiple attributes, such as the use of interfaces, to ensure the non-functional requirements of the system. |
Ease of use |
Users only need to follow the page display content of the personnel management system and operate. |
maintainability |
The maintainability of personnel management system development is very important. After testing, there is no problem with maintainability. |
2.4 System use case analysis
Through the analysis of 2.3 functions, the use case diagram of this personnel management system is obtained:
An example of a common user role is shown in Figure 2-3.
Figure 2-3 Use case diagram of ordinary user roles in the personnel management system
Administrators on the web background management maintain all data information in the entire personnel management system. An example of the administrator role is shown in Figure 2-4.
figure 2-4 Personnel management system administrator role use case diagram
This chapter mainly determines the functions to be realized by the entire personnel management system through feasibility analysis, process analysis, functional requirements analysis, and system use case analysis of the personnel management system. It also provides standards for code implementation and testing of personnel management systems.
3 Overall design of personnel management system
The main contents discussed in this chapter include the functional module design and database system design of the personnel management system.
3.1 System architecture design
This personnel management system is divided into three layers in terms of architecture: presentation layer (UI), business logic layer (BLL) and data layer (DL).
Figure 3-1 Personnel management system architecture design diagram
Presentation layer (UI): Also known as the UI layer, it mainly completes the UI interaction function of the personnel management system. A good UI can improve the user experience and enhance the user's comfort when using the personnel management system. The interface design of the UI must also adapt to different versions of personnel management systems and different size resolutions to achieve good compatibility. The UI interaction function requirements are reasonable, and users must obtain consistent interaction results when performing interactive operations. This requires the presentation layer to be well connected with the business logic layer.
Business logic layer (BLL): mainly completes the data processing function of this personnel management system. The data transmitted by the user from the presentation layer is processed by the business logic layer and delivered to the data layer. The data read by the system from the data layer is processed by the business logic layer and delivered to the presentation layer.
Data layer (DL): Since the data of this personnel management system is placed in the mysql database on the server side, the part that belongs to the service layer can be directly integrated into the business logic layer. Therefore, there is only the database in the data layer, which mainly completes my personnel management. Management system's data storage and management functions.
3.2 System function module design
3.2.1 Overall functional module design
In the previous chapter, the functional requirements and non-functional requirements of the system were mainly analyzed, and the use cases in this personnel management system were analyzed based on the requirements. Then the next step is to start designing the architecture, main functions and database of this personnel management system. The personnel management system is derived based on the demand analysis in the previous chapter, and its overall design module diagram is shown in Figure 3-2.
Figure 3-2 Function module diagram of personnel management system
3.2.2 User module design
(1) The backend manager can add, delete, modify and check registered users. The user module structure diagram is as follows:
Figure 3-3 User module structure diagram
(2) Specific business logic of each structure
a. Query user information: The most basic query function is designed to query user information based on user ID. This function is mainly reflected in the administrator's user information query and the user's own information query.
b. Modify user information: Users can modify their basic information according to the situation, including name modification, password modification, avatar modification and other operations.
c. Add users: Users can obtain accounts by registering
d. Delete user information: Administrators do not have the right to delete information. At most, they can add users to the blacklist and prohibit users from logging in.
3.2.3 Department management module design
(1) The personnel management system needs to store a lot of department information. Its module functional structure. The specific structure diagram is as follows:
Figure 3-4 Department module structure diagram
(2) Specific business logic of each structure
a. Add department information: Administrators can add department information.
b. Modify department information: Administrators can modify department information.
c. Delete department information: Administrators can delete department information.
3.2.5 Design of employee management module
(1) The personnel management system needs to store a lot of employee information . Its module functional structure. The specific structure diagram is as follows:
Figure 3-5 Structure diagram of employee management module
(2) Specific business logic of each structure
a. Add employee information: Administrators can add employee information.
b. Modify employee information: Administrators can modify employee information.
c. Delete employee information: Administrators can delete employee information.
Database design generally includes three major processes: demand analysis, conceptual model design, and database table creation. The demand analysis has been explained in the previous chapter, and the conceptual model design has two parts: conceptual model and logical structure design.
3.3.1 Database conceptual structure design
The following is the ER entity relationship diagram of the main database tables in the entire personnel management system.
Figure 3-6 Overall ER relationship diagram of the personnel management system
3.3.2 Database logical structure design
From the previous ER diagram, you can see that the project requires the creation of many data tables. The following is the relational model of the main database tables in the project:
Table announcement_management (announcement management)
serial number |
name |
type of data |
length |
Decimal places |
Allow null values |
primary key |
default value |
illustrate |
1 |
announcement_management_id |
int |
10 |
0 |
N |
Y |
Announcement management ID |
|
2 |
announcement_title |
varchar |
64 |
0 |
Y |
N |
Announcement title |
|
3 |
announcement_label |
varchar |
64 |
0 |
Y |
N |
Announcement tag |
|
4 |
announcement_content |
text |
65535 |
0 |
Y |
N |
Announcement content |
|
5 |
publisher |
varchar |
64 |
0 |
Y |
N |
Posted by |
|
6 |
release_time |
date |
10 |
0 |
Y |
N |
release time |
|
7 |
recommend |
int |
10 |
0 |
N |
N |
0 |
Intelligent Recommendation |
8 |
create_time |
datetime |
19 |
0 |
N |
N |
CURRENT_TIMESTAMP |
creation time |
9 |
update_time |
timestamp |
19 |
0 |
N |
N |
CURRENT_TIMESTAMP |
Update time |
Table auth (user rights management)
serial number |
name |
type of data |
length |
Decimal places |
Allow null values |
primary key |
default value |
illustrate |
1 |
auth_id |
int |
10 |
0 |
N |
Y |
Authorization ID: |
|
2 |
user_group |
varchar |
64 |
0 |
Y |
N |
user group: |
|
3 |
mod_name |
varchar |
64 |
0 |
Y |
N |
Module name: |
|
4 |
table_name |
varchar |
64 |
0 |
Y |
N |
Table Name: |
|
5 |
page_title |
varchar |
255 |
0 |
Y |
N |
page title: |
|
6 |
path |
varchar |
255 |
0 |
Y |
N |
Routing path: |
|
7 |
position |
varchar |
32 |
0 |
Y |
N |
Location: |
|
8 |
mode |
varchar |
32 |
0 |
N |
N |
_blank |
Jump method: |
9 |
add |
tinyint |
3 |
0 |
N |
N |
1 |
Is it possible to add: |
10 |
of the |
tinyint |
3 |
0 |
N |
N |
1 |
Can it be deleted: |
11 |
set |
tinyint |
3 |
0 |
N |
N |
1 |
Whether it can be modified: |
12 |
get |
tinyint |
3 |
0 |
N |
N |
1 |
Is it possible to view: |
13 |
field_add |
text |
65535 |
0 |
Y |
N |
Add fields: |
|
14 |
field_set |
text |
65535 |
0 |
Y |
N |
Modify fields: |
|
15 |
field_get |
text |
65535 |
0 |
Y |
N |
Query fields: |
|
16 |
table_nav_name |
varchar |
500 |
0 |
Y |
N |
Cross-table navigation name: |
|
17 |
table_nav |
varchar |
500 |
0 |
Y |
N |
Cross-table navigation: |
|
18 |
option |
text |
65535 |
0 |
Y |
N |
Configuration: |
|
19 |
create_time |
timestamp |
19 |
0 |
N |
N |
CURRENT_TIMESTAMP |
Creation time: |
20 |
update_time |
timestamp |
19 |
0 |
N |
N |
CURRENT_TIMESTAMP |
Update time: |
Table department_management (department management)
serial number |
name |
type of data |
length |
Decimal places |
Allow null values |
primary key |
default value |
illustrate |
1 |
department_management_id |
int |
10 |
0 |
N |
Y |
Department management ID |
|
2 |
department_name |
varchar |
64 |
0 |
Y |
N |
Department name |
|
3 |
division_manager |
varchar |
64 |
0 |
Y |
N |
Department manager |
|
4 |
time_of_establishment |
date |
10 |
0 |
Y |
N |
Established |
|
5 |
department_personnel |
text |
65535 |
0 |
Y |
N |
Department personnel |
|
6 |
department_profile |
text |
65535 |
0 |
Y |
N |
G |
|
7 |
recommend |
int |
10 |
0 |
N |
N |
0 |
Intelligent Recommendation |
8 |
create_time |
datetime |
19 |
0 |
N |
N |
CURRENT_TIMESTAMP |
creation time |
9 |
update_time |
timestamp |
19 |
0 |
N |
N |
CURRENT_TIMESTAMP |
Update time |
Table employee_management (employee management)
serial number |
name |
type of data |
length |
Decimal places |
Allow null values |
primary key |
default value |
illustrate |
1 |
employee_management_id |
int |
10 |
0 |
N |
Y |
Employee management ID |
|
2 |
department_name |
varchar |
64 |
0 |
Y |
N |
Department name |
|
3 |
position_name |
varchar |
64 |
0 |
Y |
N |
Job Title |
|
4 |
employee_name |
varchar |
64 |
0 |
Y |
N |
employee's name |
|
5 |
employee_gender |
varchar |
64 |
0 |
Y |
N |
Employee gender |
|
6 |
phone_number |
varchar |
64 |
0 |
Y |
N |
phone number |
|
7 |
id_number |
varchar |
64 |
0 |
Y |
N |
ID number |
|
8 |
date_of_entry |
date |
10 |
0 |
Y |
N |
Entry Time |
|
9 |
employee_status |
varchar |
64 |
0 |
Y |
N |
Employee status |
|
10 |
recommend |
int |
10 |
0 |
N |
N |
0 |
Intelligent Recommendation |
11 |
create_time |
datetime |
19 |
0 |
N |
N |
CURRENT_TIMESTAMP |
creation time |
12 |
update_time |
timestamp |
19 |
0 |
N |
N |
CURRENT_TIMESTAMP |
Update time |
Table hits (user clicks)
serial number |
name |
type of data |
length |
Decimal places |
Allow null values |
primary key |
default value |
illustrate |
1 |
hits_id |
int |
10 |
0 |
N |
Y |
Like ID: |
|
2 |
user_id |
int |
10 |
0 |
N |
N |
0 |
Liked by: |
3 |
create_time |
timestamp |
19 |
0 |
N |
N |
CURRENT_TIMESTAMP |
Creation time: |
4 |
update_time |
timestamp |
19 |
0 |
N |
N |
CURRENT_TIMESTAMP |
Update time: |
5 |
source_table |
varchar |
255 |
0 |
Y |
N |
Source table: |
|
6 |
source_field |
varchar |
255 |
0 |
Y |
N |
Source field: |
|
7 |
source_id |
int |
10 |
0 |
N |
N |
0 |
Source ID: |
Table ordinary_users (ordinary users)
serial number |
name |
type of data |
length |
Decimal places |
Allow null values |
primary key |
default value |
illustrate |
1 |
ordinary_users_id |
int |
10 |
0 |
N |
Y |
Common user ID |
|
2 |
user_name |
varchar |
64 |
0 |
Y |
N |
username |
|
3 |
user_gender |
varchar |
64 |
0 |
Y |
N |
User gender |
|
4 |
user_age |
varchar |
64 |
0 |
Y |
N |
User age |
|
5 |
examine_state |
varchar |
16 |
0 |
N |
N |
passed |
Approval Status |
6 |
recommend |
int |
10 |
0 |
N |
N |
0 |
Intelligent Recommendation |
7 |
user_id |
int |
10 |
0 |
N |
N |
0 |
User ID |
8 |
create_time |
datetime |
19 |
0 |
N |
N |
CURRENT_TIMESTAMP |
creation time |
9 |
update_time |
timestamp |
19 |
0 |
N |
N |
CURRENT_TIMESTAMP |
Update time |
Table position_management (position management)
serial number |
name |
type of data |
length |
Decimal places |
Allow null values |
primary key |
default value |
illustrate |
1 |
position_management_id |
int |
10 |
0 |
N |
Y |
Position Management ID |
|
2 |
position_name |
varchar |
64 |
0 |
Y |
N |
Job Title |
|
3 |
department |
varchar |
64 |
0 |
Y |
N |
Department |
|
4 |
job_responsibilities |
text |
65535 |
0 |
Y |
N |
Job Responsibilities |
|
5 |
recommend |
int |
10 |
0 |
N |
N |
0 |
Intelligent Recommendation |
6 |
create_time |
datetime |
19 |
0 |
N |
N |
CURRENT_TIMESTAMP |
creation time |
7 |
update_time |
timestamp |
19 |
0 |
N |
N |
CURRENT_TIMESTAMP |
Update time |
Table upload (file upload)
serial number |
name |
type of data |
length |
Decimal places |
Allow null values |
primary key |
default value |
illustrate |
1 |
upload_id |
int |
10 |
0 |
N |
Y |
Upload ID |
|
2 |
name |
varchar |
64 |
0 |
Y |
N |
file name |
|
3 |
path |
varchar |
255 |
0 |
Y |
N |
access path |
|
4 |
file |
varchar |
255 |
0 |
Y |
N |
file path |
|
5 |
display |
varchar |
255 |
0 |
Y |
N |
display order |
|
6 |
father_id |
int |
10 |
0 |
Y |
N |
0 |
Parent ID |
7 |
dir |
varchar |
255 |
0 |
Y |
N |
folder |
|
8 |
type |
varchar |
32 |
0 |
Y |
N |
file type |
Table user (user account: used to save user login information)
serial number |
name |
type of data |
length |
Decimal places |
Allow null values |
primary key |
default value |
illustrate |
1 |
user_id |
mediumint |
8 |
0 |
N |
Y |
User ID: [0,8388607] User obtains other user-related data |
|
2 |
state |
smallint |
5 |
0 |
N |
N |
1 |
Account status: [0,10](1 available | 2 abnormal | 3 frozen | 4 logged out) |
3 |
user_group |
varchar |
32 |
0 |
Y |
N |
User group: [0,32767] determines user identity and permissions |
|
4 |
login_time |
timestamp |
19 |
0 |
N |
N |
CURRENT_TIMESTAMP |
Last Login Time: |
5 |
phone |
varchar |
11 |
0 |
Y |
N |
Mobile phone number: [0,11] User’s mobile phone number, used to retrieve password or log in |
|
6 |
phone_state |
smallint |
5 |
0 |
N |
N |
0 |
Mobile phone certification: [0,1] (0 not certified | 1 under review | 2 certified) |
7 |
username |
varchar |
16 |
0 |
N |
N |
Username: [0,16] The account name used by the user to log in |
|
8 |
nickname |
varchar |
16 |
0 |
Y |
N |
昵称:[0,16] |
|
9 |
password |
varchar |
64 |
0 |
N |
N |
密码:[0,32]用户登录所需的密码,由6-16位数字或英文组成 |
|
10 |
|
varchar |
64 |
0 |
Y |
N |
邮箱:[0,64]用户的邮箱,用于找回密码时或登录时 |
|
11 |
email_state |
smallint |
5 |
0 |
N |
N |
0 |
邮箱认证:[0,1](0未认证|1审核中|2已认证) |
12 |
avatar |
varchar |
255 |
0 |
Y |
N |
头像地址:[0,255] |
|
13 |
create_time |
timestamp |
19 |
0 |
N |
N |
CURRENT_TIMESTAMP |
创建时间: |
表user_group (用户组:用于用户前端身份和鉴权)
编号 |
名称 |
数据类型 |
长度 |
小数位 |
允许空值 |
主键 |
默认值 |
说明 |
1 |
group_id |
mediumint |
8 |
0 |
N |
Y |
用户组ID:[0,8388607] |
|
2 |
display |
smallint |
5 |
0 |
N |
N |
100 |
显示顺序:[0,1000] |
3 |
name |
varchar |
16 |
0 |
N |
N |
名称:[0,16] |
|
4 |
description |
varchar |
255 |
0 |
Y |
N |
描述:[0,255]描述该用户组的特点或权限范围 |
|
5 |
source_table |
varchar |
255 |
0 |
Y |
N |
来源表: |
|
6 |
source_field |
varchar |
255 |
0 |
Y |
N |
来源字段: |
|
7 |
source_id |
int |
10 |
0 |
N |
N |
0 |
来源ID: |
8 |
register |
smallint |
5 |
0 |
Y |
N |
0 |
注册位置: |
9 |
create_time |
timestamp |
19 |
0 |
N |
N |
CURRENT_TIMESTAMP |
创建时间: |
10 |
update_time |
timestamp |
19 |
0 |
N |
N |
CURRENT_TIMESTAMP |
更新时间: |
3.4本章小结
整个人事管理系统的需求分析主要对系统总体架构以及功能模块的设计,通过建立E-R模型和数据库逻辑系统设计完成了数据库系统设计。
4.1登录模块
将首页的左边的功能设计为用户登录的位置,所以在进行登录的地方就会显示首页。在登录后就是大众较为熟悉的位置,也就是让用户进行账号以及密码输入的样式。
当用户输入完信息并点击登录按钮时,Struts就会将用户输入的信息传递进表单并装入相应的对象之中,然后再转到相应位置进行校验。若用户名和密码框都是空的,那么系统就会不可将账号密码均设置为空值。
系统的底层设置要求账号密码不可以都是空值,将这些信息传递给相关的类中的对象方法并调用相关的信息,对于用户输入的数据进行检验。若检验结果正确会自动转到系统首页欢迎页面,如果不正确系统就会返回用户登录界面。
用户登录流程图如下所示。
图4.1用户登录流程
系统登录界面如下图所示。
图4.1 登录界面图
/**
* 登录
* @param data
* @param httpServletRequest
* @return
*/
@PostMapping("login")
public Map<String, Object> login(@RequestBody Map<String, String> data, HttpServletRequest httpServletRequest) {
log.info("[执行登录接口]");
String username = data.get("username");
String email = data.get("email");
String phone = data.get("phone");
String password = data.get("password");
List resultList = null;
Map<String, String> map = new HashMap<>();
if(username != null && "".equals(username) == false){
map.put("username", username);
resultList = service.select(map, new HashMap<>()).getResultList();
}
else if(email != null && "".equals(email) == false){
map.put("email", email);
resultList = service.select(map, new HashMap<>()).getResultList();
}
else if(phone != null && "".equals(phone) == false){
map.put("phone", phone);
resultList = service.select(map, new HashMap<>()).getResultList();
}else{
return error(30000, "账号或密码不能为空");
}
if (resultList == null || password == null) {
return error(30000, "账号或密码不能为空");
}
//判断是否有这个用户
if (resultList.size()<=0){
return error(30000,"用户不存在");
}
User byUsername = (User) resultList.get(0);
Map<String, String> groupMap = new HashMap<>();
groupMap.put("name",byUsername.getUserGroup());
List groupList = userGroupService.select(groupMap, new HashMap<>()).getResultList();
if (groupList.size()<1){
return error(30000,"用户组不存在");
}
UserGroup userGroup = (UserGroup) groupList.get(0);
//查询用户审核状态
if (!StringUtils.isEmpty(userGroup.getSourceTable())){
String sql = "select examine_state from "+ userGroup.getSourceTable() +" WHERE user_id = " + byUsername.getUserId();
String res = String.valueOf(service.runCountSql(sql).getSingleResult());
if (res==null){
return error(30000,"用户不存在");
}
if (!res.equals("已通过")){
return error(30000,"该用户审核未通过");
}
}
//查询用户状态
if (byUsername.getState()!=1){
return error(30000,"用户非可用状态,不能登录");
}
String md5password = service.encryption(password);
if (byUsername.getPassword().equals(md5password)) {
// 存储Token到数据库
AccessToken accessToken = new AccessToken();
accessToken.setToken(UUID.randomUUID().toString().replaceAll("-", ""));
accessToken.setUser_id(byUsername.getUserId());
tokenService.save(accessToken);
// 返回用户信息
JSONObject user = JSONObject.parseObject(JSONObject.toJSONString(byUsername));
user.put("token", accessToken.getToken());
JSONObject ret = new JSONObject();
ret.put("obj",user);
return success(ret);
} else {
return error(30000, "账号或密码不正确");
}
}
4.2注册模块
人事管理系统的注册登录操作,用户都是从同一个注册登录页面进行注册登录,若是还未有系统账号,则进行注册操作;若是已注册账号,则用户在操作时,输入账号、密码,再选择相应的角色,如“管理员”、“用户”等。
用户注册流程图如下所示。
图4.2用户注册流程
用户注册界面如下图所示。
图4.2 注册界面图
/**
* 注册
* @return
*/
@PostMapping("register")
public Map<String, Object> signUp(HttpServletRequest request) throws IOException {
// 查询用户
Map<String, String> query = new HashMap<>();
Map<String,Object> map = service.readBody(request.getReader());
query.put("username",String.valueOf(map.get("username")));
List list = service.selectBaseList(service.select(query, new HashMap<>()));
if (list.size()>0){
return error(30000, "用户已存在");
}
map.put("password",service.encryption(String.valueOf(map.get("password"))));
service.insert(map);
return success(1);
}
public Map<String,Object> readBody(BufferedReader reader){
BufferedReader br = null;
StringBuilder sb = new StringBuilder("");
try{
br = reader;
String str;
while ((str = br.readLine()) != null){
sb.append(str);
}
br.close();
String json = sb.toString();
return JSONObject.parseObject(json, Map.class);
}catch (IOException e){
e.printStackTrace();
}finally{
if (null != br){
try{
br.close();
}catch (IOException e){
e.printStackTrace();
}
}
}
return null;
}
public void insert(Map<String,Object> body){
E entity = JSON.parseObject(JSON.toJSONString(body),eClass);
baseMapper.insert(entity);
log.info("[{}] - 插入操作:{}",entity);
}
4.3用户管理模块
用户信息管理与账号管理相比更侧重对个人信息的管理,如年龄,电话,性别等,管理员可以对此部分信息进行增删改查,相应的会改变数据库存储的数据。
用户管理界面如下图所示。
图4.3 用户管理界面图
用户管理界面关键代码如下所示。
@PostMapping("/add")
@Transactional
public Map<String, Object> add(HttpServletRequest request) throws IOException {
service.insert(service.readBody(request.getReader()));
return success(1);
}
@Transactional
public Map<String, Object> addMap(Map<String,Object> map){
service.insert(map);
return success(1);
}
public Map<String,Object> readBody(BufferedReader reader){
BufferedReader br = null;
StringBuilder sb = new StringBuilder("");
try{
br = reader;
String str;
while ((str = br.readLine()) != null){
sb.append(str);
}
br.close();
String json = sb.toString();
return JSONObject.parseObject(json, Map.class);
}catch (IOException e){
e.printStackTrace();
}finally{
if (null != br){
try{
br.close();
}catch (IOException e){
e.printStackTrace();
}
}
}
return null;
}
public void insert(Map<String,Object> body){
StringBuffer sql = new StringBuffer("INSERT INTO ");
sql.append("`").append(table).append("`").append(" (");
for (Map.Entry<String,Object> entry:body.entrySet()){
sql.append("`"+humpToLine(entry.getKey())+"`").append(",");
}
sql.deleteCharAt(sql.length()-1);
sql.append(") VALUES (");
for (Map.Entry<String,Object> entry:body.entrySet()){
Object value = entry.getValue();
if (value instanceof String){
sql.append("'").append(entry.getValue()).append("'").append(",");
}else {
sql.append(entry.getValue()).append(",");
}
}
sql.deleteCharAt(sql.length() - 1);
sql.append(")");
log.info("[{}] - 插入操作:{}",table,sql);
Query query = runCountSql(sql.toString());
query.executeUpdate();
}
4.4部门管理模块
管理员执行部门管理,并可以操作相关内容,例如添加,查看,编辑和删除。通过单击“添加部门”,可以通过部门添加界面添加详细信息并添加部门注释。单击查看字段级别链接以查看有关所选字段级别的信息。然后单击“提交”跳转重返到添加页面。添加成功后的信息会载入到部门查询列表中,管理员可进行编辑以及修改。
部门管理流程如下图所示。
图4.4 部门管理流程
部门添加界面如下图所示。
图4.4 部门管理界面图
4.5职位管理模块
管理员执行职位管理,并可以操作相关内容,例如添加,查看,编辑和删除。通过单击“添加职位”,可以通过职位添加界面添加详细信息并添加职位注释。单击查看字段级别链接以查看有关所选字段级别的信息。然后单击“提交”跳转重返到添加页面。添加成功后的信息会载入到职位查询列表中,管理员可进行编辑以及修改。
职位管理流程如下图所示。
图4.5职位管理流程
职位管理界面如下图所示。
图4.5 职位管理界面图
职位管理关键代码如下所示。
@RequestMapping(value = "/del")
@Transactional
public Map<String, Object> del(HttpServletRequest request) {
service.delete(service.readQuery(request), service.readConfig(request));
return success(1);
}
@Transactional
public void delete(Map<String,String> query,Map<String,String> config){
StringBuffer sql = new StringBuffer("DELETE FROM ").append("`").append(table).append("`").append(" ");
sql.append(toWhereSql(query, "0".equals(config.get(FindConfig.GROUP_BY))));
log.info("[{}] - 删除操作:{}",table,sql);
Query query1 = runCountSql(sql.toString());
query1.executeUpdate();
}
4.6员工管理模块
管理员执行员工管理,并可以操作相关内容,例如添加,查看,编辑和删除。通过单击“添加员工”,可以通过员工添加界面添加详细信息并添加员工注释。单击查看字段级别链接以查看有关所选字段级别的信息。然后单击“提交”跳转重返到添加页面。添加成功后的信息会载入到员工查询列表中,管理员可进行编辑以及修改。
员工管理流程如下图所示。
图4.6 员工管理流程
员工添加界面如下图所示。
图4.6 员工管理界面图
4.7公告管理模块
在主页左侧菜单栏中点击“公告管理”按钮,再从二级目录中点击“新增公告”按钮,进入到新增公告界面。在此处公告可以添加公告的名称、公告标签、公告内容。
在主页左侧菜单栏中点击“公告管理”按钮,再从二级目录中点击“查询公告”按钮,进入到查询公告界面。在此处公告可以查询当前所有公告记录。
公告管理界面如下图所示。
图4.7 公告管理界面图
公告添加添加界面如下图所示。
图4.8 公告添加界面图
5系统测试
系统开发到了最后一个阶段那就是系统测试,系统测试对软件的开发其实是非常有必要的。因为没什么系统一经开发出来就可能会尽善尽美,再厉害的系统开发工程师也会在系统开发的时候出现纰漏,系统测试能够较好的改正一些bug,为后期系统的维护性提供很好的支持。通过系统测试,开发人员也可以建立自己对系统的信心,为后期的系统版本的跟新提供支持。
系统测试包括:用户登录功能测试、员工信息展示功能测试、员工信息添加、员工信息搜索、密码修改功能测试,如表5-1、5-2、5-3、5-4、5-5所示:
表5-1 用户登录功能测试表
用例名称 |
用户登录系统 |
目的 |
测试用户通过正确的用户名和密码可否登录功能 |
前提 |
未登录的情况下 |
测试流程 |
1) 进入登录页面 2) 输入正确的用户名和密码 |
预期结果 |
用户名和密码正确的时候,跳转到登录成功界面,反之则显示错误信息,提示重新输入 |
实际结果 |
实际结果与预期结果一致 |
员工查看功能测试:
表5-2 员工信息查看功能测试表
用例名称 |
员工信息查看 |
目的 |
测试员工信息查看功能 |
前提 |
用户登录 |
测试流程 |
点击员工信息列表 |
预期结果 |
可以查看到所有员工信息 |
实际结果 |
实际结果与预期结果一致 |
管理员添加员工界面测试:
表5-3 管理员添加员工信息界面测试表
用例名称 |
员工信息发布测试用例 |
目的 |
测试员工信息发布功能 |
前提 |
用户正常登录情况下 |
测试流程 |
1)点击员工信息管理就,然后点击添加后并填写信息。 2)点击进行提交。 |
预期结果 |
提交以后,页面首页会显示新的员工信息 |
实际结果 |
实际结果与预期结果一致 |
员工搜索功能测试:
表5-4员工信息搜索功能测试表
用例名称 |
员工信息搜索测试 |
目的 |
测试员工信息搜索功能 |
前提 |
无 |
测试流程 |
1)在搜索框填入搜索关键字。 2)点击搜索按钮。 |
预期结果 |
页面显示包含有搜索关键字的员工 |
实际结果 |
实际结果与预期结果一致 |
密码修改功能测试:
表5-5 密码修改功能测试表
用例名称 |
密码修改测试用例 |
目的 |
测试管理员密码修改功能 |
前提 |
管理员用户正常登录情况下 |
测试流程 |
1)管理员密码修改并完成填写。 2)点击进行提交。 |
预期结果 |
使用新的密码可以登录 |
实际结果 |
实际结果与预期结果一致 |
通过编写人事管理系统的测试用例,已经检测完毕用户登录模块、员工信息查看模块、员工信息添加模块、员工信息搜索模块、密码修改功能测试,通过这5大模块为人事管理系统的后期推广运营提供了强力的技术支撑。
至此,人事管理系统已经结束,在开发前做了许多的准备,在本系统的设计和开发过程中阅览和学习了许多文献资料,从中我也收获了很多宝贵的方法和设计思路,对系统的开发也起到了很重要的作用,系统的开发技术选用的都是自己比较熟悉的,比如Web、ssm技术、MYSQL,这些技术都是在以前的学习中学到了,其中许多的设计思路和方法都是在以前不断地学习中摸索出来的经验,其实对于我们来说工作量还是比较大的,但是正是由于之前的积累与准备,才能顺利的完成这个项目,由此看来,积累经验跟做好准备是十分重要的事情。
当然在该系统的设计与实现的过程中也离不开老师以及同学们的帮助,正是因为他们的指导与帮助,我才能够成功的在预期内完成了这个系统。同时在这个过程当中我也收获了很多东西,此系统也有需要改进的地方,但是由于专业知识的浅薄,并不能做到十分完美,希望以后有机会可以让其真正的投入到使用之中。
[1]谢霜.基于Java技术的网络管理体系结构的应用[J].网络安全技术与应用,2022(10):14-15.
[2]杨玉莲.基于SSM框架的智能煤质化验室综合管理系统[J].煤矿现代化,2022,31(05):100-104+109.DOI:10.13606/j.cnki.37-1205/td.2022.05.005.
[3]唐小玲.基于SSM框架的资质管理系统开发解析[J].科学技术创新,2022(26):80-83.
[4]黎玮,修宇,卫强,朱雪松,张根,赵世光.基于SSM框架的条形绿茶加工装备信息管理系统设计[J].中国茶叶加工,2022(03):52-58.DOI:10.15905/j.cnki.33-1157/ts.2022.03.008.
[5]仓业金.基于Java的软件保护技术研究[J].电脑知识与技术,2022,18(23):29-30+52.DOI:10.14004/j.cnki.ckt.2022.1597.
[6]杨迎.Java技术在嵌入式系统中的作用探讨[J].无线互联科技,2022,19(14):96-98.
[7], 教育人事 厅直系统干部人事管理. 陶宏 主编,湖北教育年鉴,长江出版传媒湖北教育出版社,2021,55,年鉴.DOI:10.39650/y.cnki.yhbjy.2022.000209.
[8]李璞,李冬睿,李卫国.现代密码学在人事管理系统中的应用研究——以河南科技大学人事系统为例[J].科学技术创新,2022(17):65-68.
[9]邵骏威,金波,陈甄非,陈继,何建峰,朱萌,于琨,林建华. 多平台酒店人事管理系统及方法[P]. 上海市:CN114519564A,2022-05-20.
[10]胡金梅,胡金萍.基于Web的公司人事管理系统设计[J].无线互联科技,2022,19(06):59-60.
[11]周荷平.智慧校园背景下高校人事管理系统的设计[J].无线互联科技,2022,19(01):62-63.
[12]牛兴霞,张萌.基于大数据理念的高校人事管理系统设计[J].工业技术与职业教育,2021,19(03):121-124.DOI:10.16825/j.cnki.cn13-1400/tb.2021.03.033.
[13]付昕乐,黄慧敏,贾军辉,陈凯.基于Web的人事管理系统设计与实现[J].测绘,2021,44(04):188-192.
[14]孔红晓.“互联网+”背景下高校人事管理路向研究[J].丽水学院学报,2021,43(04):119-124.
[15]崔璐.构建高校人事信息管理系统的思考与实践[J].今日财富,2021(13):213-214.
[16]林超. 云南省老年病医院人事管理系统的研究与分析[D].云南大学,2021.DOI:10.27456/d.cnki.gyndu.2021.000695.
[17]Muhammad Irvan Sutroyudo,Emil Robert Kaburuan. Planning of People Management System in One of the Telecommunication Companies in Indonesia using[J]. International Journal of Engineering and Advanced Technology (IJEAT),2019,9(2).
[18]Bobyleva Mariia Vadimovna. The role of intracorporate communications in the personnel management system of the organization[J]. Interactive science,2019(4 (38)).
[19]魏长宝, 电脑公司人事管理系统的设计与实现. 河南省,黄淮学院,2018-08-30.
[20]GB/T 14946.1-2009, 全国干部、人事管理信息系统指标体系与数据结构 第1部分:指标体系分类与代码[S].
致 谢
逝者如斯夫,不舍昼夜。转眼间,大用户用户活便已经接近尾声,人面对着离别与结束,总是充满着不舍与茫然,我亦如此,仍记得那年秋天,我迫不及待的提前一天到了学校,面对学校巍峨的大门,我心里充满了期待:这里,就是我新生活的起点吗?那天,阳光明媚,学校的欢迎仪式很热烈,我面对着一个个对着我微笑的同学,仿佛一缕缕阳光透过胸口照进了我心里,同时,在那天我认识可爱的室友,我们携手共同度过了这难忘的两年。如今,我望着这篇论文的致谢,不禁又要问自己:现在,我们就要说再见了吗?
感慨莫名,不知所言。遥想当初刚来学校的时候,心里总是想着工科学校会过于板正,会缺乏一些柔情,当时心里甚至有一点点排斥,但是随着我对学校的慢慢认识与了解,我才认识到了她的美丽,她的柔情,并且慢慢的喜欢上了这个校园,但是时间太快了,快到我还没有好好体会她的美丽便要离开了,但是她带给我的回忆,永远不会离开我,也许真正离开那天我的眼里会满含泪水,我不是因为难过,我只是想将她的样子映在我的泪水里,刻在我的心里。最后,感谢我的老师们,是你们教授了我们知识与做人的道理;感谢我的室友们,是你们陪伴了我如此之久;感谢每位关心与支持我的人。
少年,追风赶月莫停留,平荒尽处是春山。
请关注点赞+私信博主,免费领取项目源码