SSM+mysql new crown epidemic risk area management system-computer graduation project source code 54362

Summary

With the advent of the Internet trend, all walks of life are considering using the Internet to promote themselves. The best way is to establish their own Internet system and maintain and manage it. In practical applications, the work rules and development steps of the software are applied, and Java technology is used to build a new crown epidemic risk area management system.

This design mainly implements a new crown epidemic risk area management system that combines the advantages of humanization, high efficiency, convenience, etc. to realize functions: home page, website management (carousel chart, announcement message) personnel management (administrators, ordinary users, prefecture-level Municipal administrator) content management (epidemic information, information classification) module management (administrative distinction, risk area, epidemic information) and other functional modules. The system communicates with the server through the browser to realize data interaction and changes. Just use a computer and move your fingers to operate the system and realize data communication management. The design process of the entire system fully considers issues such as data security, stability and reliability, and the operation process is simple. This system improves work efficiency and reduces errors and omissions in data storage through scientific management methods and convenient services.

The new crown epidemic risk area management system is developed using the Java language SSM framework and 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 the front-end HTML+CSS technology is used to complete the development of the system. .

Keywords:SSM; MySQL; COVID-19; Java

Regional risk management system for COVID-19 epidemic

Abstract

With the advent of the Internet trend, all walks of life are considering using the Internet to promote themselves. The best way is to establish their own Internet system, and maintain and manage it. In practical application, the working rules and development steps of the application software use Java technology to build a risk area management system for COVID-19.

This design mainly realizes the COVID-19 epidemic risk area management system that integrates the advantages of humanization, efficiency and convenience. It realizes the following functions: home page, website management (broadcast map, announcement message), personnel management (administrator, ordinary user, prefecture level city manager), content management (epidemic information, information classification), module management (administrative differentiation, risk area, epidemic information) and other functional modules. The system communicates with the server through the browser to realize data interaction and change. You can operate the system by moving your fingers through a computer to realize data communication management. The design process of the whole system fully considers the safety, stability and reliability of data, and the operation process is simple. The system improves work efficiency and reduces errors and omissions in data storage through scientific management and convenient services.

The risk area management system of COVID-19 epidemic is developed using the java language ssm framework, and is compiled 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 the system development is completed with the foreground HTML+CSS technology.

Keywords: SSM; MySQL; COVID-19 Java

Table of contents

Summary

Abstract

  

1 Read

1.1 Choice dependent

1.2Research content

1.3ssm frame arrangement 2

2 COVID-19 Risk Area Management SystemRequirements Analysis

2.1 Possibility analysis

2.2 Functional requirements analysis

2.2.1Number increase addition process

2.2.2number positionProcessRepair

2.2.3number positionFlow processRemoval

2.3Functional demand analysis

2.4Ineffectiveness analysis

3 COVID-19 Risk Area Management SystemOverall Design

3.1 System function module design

3.2systemE-R图设计

3.3 ​​Database Design

4 COVID-19 Risk Area Management SystemDetailed Design and Implementation

4.1Implementation of some functional modules in the front desk of the system

4.1.1 Previous stage interface

4.1.2 User registration interface

4.1.3 User login interface

4.1.4 Search risk area interface

4.1.5 Epidemic information interface

4.1.6 Epidemic information details interface

4.1.7 Personal account interface

4.2Implementation of some functional modules of the system background

4.2.1 Login interface

4.2.2Personnel management interface

4.2.3 Website management interface

4.2.4 Epidemic information management interface

4.2.5 Windy area management interface 30

5system examination

5.1Purpose of exam

5.2 System testing example

5.3 System test result

in conclusion

  

references

1 Read

1.1 Selected

With the rapid development of society, the impact of computers is comprehensive and profound. With the continuous improvement of people's living standards, people's requirements for community access management during the epidemic are also increasing in daily life. The number of people who need the new crown epidemic risk area management system is constantly increasing, making the development of the new crown epidemic risk area management system necessary. And urgent matters. The new crown epidemic risk area management system mainly uses computers to increase user choices through the information management required by the new crown epidemic risk area management system. It also facilitates timely query and modification of user information and timely understanding of user information. The new crown epidemic risk area management system brings more convenience to users. The system cooperates with the database management system software to meet the needs of users.

1.2 Research content

The development and implementation of COVID-19 Risk Area Management System requires the following work content:

(1) First, determine the topic, determine the system to be built, and conduct a preliminary systematic confirmation of the background of the system and some of the problems currently faced.

(2) After the system is confirmed, the technology used in system development is confirmed based on the system development needs. The development of this new crown epidemic risk area management system uses JAVA technology, the database is built and developed for the platform, and the technology used is confirmed for technical analysis. , whether the technology used can complete the implementation of the new crown epidemic risk area management system.

(3) Determine the technology used in the system, confirm online the user roles divided by the system, and determine the functional modules to be designed based on the user role division. The design of the new crown epidemic risk area management system is mainly divided into administrators and users. The roles and functional modules used are also different, but the content implemented by the system's database is interactive. Users can conduct course information at any time according to their own needs. System staff can process and process online information according to their own duties. Through the operation, the administrator obtains the detailed data information of all users and handles it as soon as possible according to the needs.

(4) After the functional modules of the system are confirmed, the program and interface are designed. After the design is completed, tests are conducted to determine whether the program is perfect. For system testing, different users are required to edit and submit different content, and use different The testing method finds out the loopholes in the program and solves the loopholes in the program online. If there are no problems with the test system, the system can be uploaded for formal operation.

1.3 Introduction to ssm framework

The SSM (Spring+SpringMVC+MyBatis) framework set is integrated by the two open source frameworks Spring and MyBatis (SpringMVC is part of Spring). It is often used as a framework for web projects with relatively simple data sources.

1.8.1 Spring
Spring is like a big factory that assembles beans in the entire project. In the configuration file, you can specify the use of specific parameters to call the constructor method of the entity class to instantiate it. object. It can also be called the glue in the project.
The core idea of ​​Spring is IoC (Inversion of Control), which means that programmers no longer need to explicitly `new` an object, but let the Spring framework do it all for you.
1.8.2 SpringMVC
SpringMVC intercepts user requests in the project. Its core Servlet, DispatcherServlet, assumes the responsibility of intermediary or front desk, passing user requests through HandlerMapping To match the Controller, the Controller is the operation performed specifically corresponding to the request. SpringMVC is equivalent to struts in the SSH framework.
1.8.3 mybatis
Mybatis is an encapsulation of jdbc, which makes the underlying operations of the database transparent. The operations of mybatis are centered around a sqlSessionFactory instance. Mybatis is associated to the Mapper file of each entity class through the configuration file. The Mapper file is configured with the SQL statement mapping required for each class to the database. Every time you interact with the database, get a sqlSession through sqlSessionFactory, and then execute the sql command.

The page sends a request to the controller, the controller calls the business layer processing logic, the logic layer sends a request to the persistence layer, the persistence layer interacts with the database, and then returns the result to the business layer, the business layer sends the processing logic to the controller, and the controller then Call the view to display the data.

2 Analysis of demand for COVID-19 risk area management system

When we develop a new project, we must first consider whether the project can be developed and whether it is worth developing. Therefore, in the development of this new crown epidemic risk area management system, we must first consider whether the project can be developed and whether it is worth developing. The first step is to analyze the system requirements.

2.1 Feasibility analysis

(1) Economic feasibility:

When developing the new crown epidemic risk area management system, the main considerations are the input and output parts of the system. In terms of input, you only need to configure a computer with ecplice+mysql for development. The cost is very small. In terms of output, it is currently passed The number of users of online tutoring is increasing day by day. Online tutoring has become popular and popular, and the number of users is on the rise. When the number of users becomes huge, various economic benefits will arise. So there is no problem with economic feasibility.

(2) Operational feasibility:

The designed COVID-19 risk area management system has an easy-to-understand interface, and all kinds of information you want to know can be clearly seen through the navigation bar. The functional modules are clearly divided, and there are no requirements for users in terms of operation and no training is required. , and the system is very simple to operate and can manage any information conveniently. Therefore, there is no problem in operational feasibility.

(3) Technical feasibility:

In terms of technology, the current mainstream SSM framework is used, and the compiler ecplice+mysql is used to run the overall program. There will be no problems in future technical updates and maintenance, so there is no problem in terms of technical feasibility.

2.2 System process analysis

The business process uses some specific symbols and lines to demonstrate the user's process when using the system. When performing system analysis, the business process can help developers better understand the business, discover errors, and improve the system.

2.2.1 Data addition process

After the user successfully logs in to the system can add data. The number of added data is specific and generated by the system. The user cannot arbitrarily Fill in, except for the number, other added information is filled in by the user. The filled-in information is verified by the system. If the verification is legal, it will show that the data has been added successfully. Otherwise, the addition has not been successful. Figure2 -1 shows the process when adding data.

Figure 2-1 Data addition flow chart

2.2.2 Data modification process

The process of data modification is similar to the process of data addition described above, as shown in Figure 2-2.

Figure 2-2 Data modification flow chart

2.2.3 Data deletion process

If there is some useless data in the system, the relevant managers still a>These data can be deleted. Figure2-3 is the flow chart for data deletion.

Figure 2-3 Data deletion flow chart

2.3 Functional requirements analysis

The new crown epidemic risk area management system is divided into three parts: ordinary user module, prefecture-level city manager and administrator module.

Ordinary user module:

(1) User registration and login: Visitors can enter the system at any time and browse the information in the system. However, if they want to implement operations such as risk areas and epidemic information, they must have an account in this system. If they do not have an account, they can register later. Perform related operations, and users can also control personal information and operation information through the "Personal Account" button.

(2) View the homepage information of the COVID-19 Risk Area Management System: The homepage information of the COVID-19 Risk Area Management System includes the homepage, announcement messages, epidemic information, personal accounts, personal collections, risk areas, epidemic information, and personal center.

(3) Announcement messages: Users can check the announcement information released by the background administrator. When they find the announcement information they want to know, they can enter and view the detailed introduction.

(4) Epidemic information: Users can view epidemic information. When they find the epidemic information they want to know, they can enter and view the detailed introduction to comment, like, and collect.

(5) Risk area: Users can view the risk area and support querying the risk area by searching for keywords. When they find the risk area they want to know about, they can enter to view a detailed introduction.

(6) Personal account: Click "Personal Account" at the front desk to manage and control personal information + password modification + your own collected information.

Figure 2-1 is a use case display of ordinary user roles.

Figure 2-1 New Crown Epidemic Risk Area Management System System User Role Use Case Diagram

Administrator management module:

(1) Website management: The administrator can add, delete, modify and check the carousel images and announcement messages displayed at the front desk of the system to facilitate users' viewing.

(2) Personnel management: Administrators can manage and control all user roles in the system, including administrators, ordinary users, and prefecture-level city managers. If you need to add a new user, click " Click the "Add" button to enter the user information as prompted. After clicking "Submit", you can view it on the corresponding user interface. You can click the "Delete" button behind the user to directly delete a user.

(3) Content management: Administrators can control the epidemic information and information classification displayed at the front desk of the COVID-19 Risk Area Management System.

(4) Module management: Under the "Module Management" menu, all information operated by ordinary users and prefecture-level city managers in the system can be managed to manage administrative divisions, risk areas, and epidemic information.

(5) Personal management: The administrator can click the "Personal Management" menu to set personal information and login passwords.

Figure 2-2 is a use case demonstration of the administrator role.

Figure 2-2 New Crown Epidemic Risk Area Management System Administrator Role Use Case Diagram

2.4 Non-functional analysis

The non-functional requirements of the COVID-19 risk area management system include the security, reliability, performance, scalability, etc. of the COVID-19 risk area management system. The details can be expressed in the following 3-1 table:

Table3-1New Crown Epidemic Risk Regional Management SystemNon-functional requirements list

safety

Mainly refers to the installation of the new crown epidemic risk area management system database, the use of the database and the setting of passwords must comply with regulations.

reliability

Reliability refers to the ability of the COVID-19 Risk Area Management System to operate according to user instructions. After testing, the reliability is over 90%.

performance

Performance is a necessary condition for the COVID-19 risk area 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 new crown epidemic risk area management system.

maintainability

The maintainability of the development of the COVID-19 risk area management system is very important. After testing, there is no problem with the maintainability.

3 Overall design of COVID-19 risk area management system

3.1 System function module design

The overall functional module of the COVID-19 risk area management system includes two modules: administrator + system user. The overall design module diagram is shown in Figure 3-1.

Figure 3-1 Functional module diagram of the new crown epidemic risk area management system

3.2System E-R design

The following is the overall E-R entity relationship diagram of the main database tables in the entire new crown epidemic risk area management system.

Figure 3-2 COVID-19 Risk Area Management System Overall E-R Relationship Diagram

3.3 Database design

From the E-R relationship diagram of the COVID-19 Risk Regional Management System in the previous section, it can be concluded that a total of many data tables need to be created. Here I mainly list several major database table structure designs.

Table administrative_division (administrative division)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

default value

illustrate

1

administrative_division_id

int

10

0

N

AND

Administrative division ID

2

prefecture_level

varchar

64

0

AND

N

Prefecture-level administrative regions

3

recommend

int

10

0

N

N

0

Intelligent Recommendation

4

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

creation time

5

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Update time

Table article (article: article for content management system)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

default value

illustrate

1

article_id

mediumint

8

0

N

AND

Article id: [0,8388607]

2

title

varchar

125

0

N

AND

Title: [0,125] is used in the title tag of articles and html

3

type

varchar

64

0

N

N

0

Article classification: [0,1000] is used to search for articles of the specified type

4

hits

int

10

0

N

N

0

Number of clicks: [0,1000000000] Number of people who visited this article

5

praise_len

int

10

0

N

N

0

Number of likes

6

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Creation time:

7

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Update time:

8

source

varchar

255

0

AND

N

Source: [0,255] Source of article

9

url

varchar

255

0

AND

N

Source address: [0,255] used to jump to the website where the article was published

10

tag

varchar

255

0

AND

N

Tag: [0,255] is used to mark the relevant content of the article. Multiple tags are separated by spaces.

11

content

longtext

2147483647

0

AND

N

Text: the main content of the article

12

img

varchar

255

0

AND

N

cover picture

13

description

text

65535

0

AND

N

Article description

Table article_type (article classification)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

default value

illustrate

1

type_id

smallint

5

0

N

AND

Category ID: [0,10000]

2

display

smallint

5

0

N

N

100

Display order: [0,1000] determines the order in which categories are displayed.

3

name

varchar

16

0

N

N

Category name: [2,16]

4

father_id

smallint

5

0

N

N

0

Parent category ID: [0,32767]

5

description

varchar

255

0

AND

N

Description: [0,255] describes the role of this classification

6

icon

text

65535

0

AND

N

Category icon:

7

url

varchar

255

0

AND

N

External link address: [0,255] If this category jumps to other websites, set it on the URL

8

create_time

timestamp

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

AND

Authorization ID:

2

user_group

varchar

64

0

AND

N

user group:

3

mod_name

varchar

64

0

AND

N

Module name:

4

table_name

varchar

64

0

Y

N

表名:

5

page_title

varchar

255

0

Y

N

页面标题:

6

path

varchar

255

0

Y

N

路由路径:

7

position

varchar

32

0

Y

N

位置:

8

mode

varchar

32

0

N

N

_blank

跳转方式:

9

add

tinyint

3

0

N

N

1

是否可增加:

10

del

tinyint

3

0

N

N

1

是否可删除:

11

set

tinyint

3

0

N

N

1

是否可修改:

12

get

tinyint

3

0

N

N

1

是否可查看:

13

field_add

text

65535

0

Y

N

添加字段:

14

field_set

text

65535

0

Y

N

修改字段:

15

field_get

text

65535

0

Y

N

查询字段:

16

table_nav_name

varchar

500

0

Y

N

跨表导航名称:

17

table_nav

varchar

500

0

Y

N

跨表导航:

18

option

text

65535

0

Y

N

配置:

19

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

创建时间:

20

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间:

表collect (收藏)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

collect_id

int

10

0

N

Y

收藏ID:

2

user_id

int

10

0

N

N

0

收藏人ID:

3

source_table

varchar

255

0

Y

N

来源表:

4

source_field

varchar

255

0

Y

N

来源字段:

5

source_id

int

10

0

N

N

0

来源ID:

6

title

varchar

255

0

Y

N

标题:

7

img

varchar

255

0

Y

N

封面:

8

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

创建时间:

9

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间:

表comment (评论)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

comment_id

int

10

0

N

Y

评论ID:

2

user_id

int

10

0

N

N

0

评论人ID:

3

reply_to_id

int

10

0

N

N

0

回复评论ID:空为0

4

content

longtext

2147483647

0

Y

N

内容:

5

nickname

varchar

255

0

Y

N

昵称:

6

avatar

varchar

255

0

Y

N

头像地址:[0,255]

7

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

创建时间:

8

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间:

9

source_table

varchar

255

0

Y

N

来源表:

10

source_field

varchar

255

0

Y

N

来源字段:

11

source_id

int

10

0

N

N

0

来源ID:

表epidemic_information (疫情信息)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

epidemic_information_id

int

10

0

N

Y

疫情信息ID

2

information_no

varchar

64

0

Y

N

信息编号

3

prefecture_level

varchar

64

0

Y

N

地级行政区

4

release_date

date

10

0

Y

N

发布日期

5

cumulative_diagnosis

int

10

0

Y

N

0

累计确诊

6

cumulative_cure

int

10

0

Y

N

0

累计治愈

7

cumulative_death

int

10

0

Y

N

0

累计死亡

8

mortality

varchar

64

0

Y

N

死亡率

9

existing_diagnosis

int

10

0

Y

N

0

现存确诊

10

new_diagnosis

int

10

0

Y

N

0

新增确诊

11

existing_suspicion

int

10

0

Y

N

0

现存疑似

12

new_symptom_free

int

10

0

Y

N

0

新增无症

13

new_cure

int

10

0

Y

N

0

新增治愈

14

new_death

int

10

0

Y

N

0

新增死亡

15

new_suspected

int

10

0

Y

N

0

新增疑似

16

publishing_users

int

10

0

Y

N

0

发布用户

17

management

varchar

64

0

Y

N

管理人员

18

recommend

int

10

0

N

N

0

智能推荐

19

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

创建时间

20

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间

表hits (用户点击)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

hits_id

int

10

0

N

Y

点赞ID:

2

user_id

int

10

0

N

N

0

点赞人:

3

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

创建时间:

4

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间:

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:

表notice (公告)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

notice_id

mediumint

8

0

N

Y

公告id:

2

title

varchar

125

0

N

N

标题:

3

content

longtext

2147483647

0

Y

N

正文:

4

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

创建时间:

5

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间:

表ordinary_users (普通用户)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

ordinary_users_id

int

10

0

N

Y

普通用户ID

2

user_name

varchar

64

0

Y

N

用户姓名

3

user_gender

varchar

64

0

Y

N

用户性别

4

examine_state

varchar

16

0

N

N

已通过

审核状态

5

recommend

int

10

0

N

N

0

智能推荐

6

user_id

int

10

0

N

N

0

用户ID

7

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

创建时间

8

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间

表praise (点赞)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

praise_id

int

10

0

N

Y

点赞ID:

2

user_id

int

10

0

N

N

0

点赞人:

3

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

创建时间:

4

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间:

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

status

bit

1

0

N

N

1

点赞状态:1为点赞,0已取消

表prefecture_level_city_managers (地级市管理者)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

prefecture_level_city_managers_id

int

10

0

N

Y

地级市管理者ID

2

management

varchar

64

0

Y

N

管理人员

3

prefecture_level

varchar

64

0

Y

N

地级行政区

4

examine_state

varchar

16

0

N

N

已通过

审核状态

5

recommend

int

10

0

N

N

0

智能推荐

6

user_id

int

10

0

N

N

0

用户ID

7

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

创建时间

8

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间

表risk_area (风险区域)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

risk_area_id

int

10

0

N

Y

风险区域ID

2

prefecture_level

varchar

64

0

Y

N

地级行政区

3

information_cover

varchar

255

0

Y

N

信息封面

4

epidemic_degree

varchar

64

0

Y

N

疫情程度

5

existing_diagnosis

int

10

0

Y

N

0

现存确诊

6

new_diagnosis

int

10

0

Y

N

0

新增确诊

7

data_date

date

10

0

Y

N

数据日期

8

regions_involved

text

65535

0

Y

N

涉及地区

9

relevant_information

longtext

2147483647

0

Y

N

相关情况

10

publishing_users

int

10

0

Y

N

0

发布用户

11

management

varchar

64

0

Y

N

管理人员

12

hits

int

10

0

N

N

0

点击数

13

recommend

int

10

0

N

N

0

智能推荐

14

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

创建时间

15

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间

表slides (轮播图)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

slides_id

int

10

0

N

Y

轮播图ID:

2

title

varchar

64

0

Y

N

标题:

3

content

varchar

255

0

Y

N

内容:

4

url

varchar

255

0

Y

N

链接:

5

img

varchar

255

0

Y

N

轮播图:

6

hits

int

10

0

N

N

0

点击量:

7

create_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

创建时间:

8

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

更新时间:

表upload (文件上传)

编号

名称

数据类型

长度

小数位

允许空值

主键

默认值

说明

1

upload_id

int

10

0

N

Y

上传ID

2

name

varchar

64

0

Y

N

文件名

3

path

varchar

255

0

Y

N

访问路径

4

file

varchar

255

0

Y

N

文件路径

5

display

varchar

255

0

Y

N

显示顺序

6

father_id

int

10

0

Y

N

0

父级ID

7

dir

varchar

255

0

Y

N

文件夹

8

type

varchar

32

0

Y

N

文件类型

4 新冠疫情风险区域管理系统详细设计与实现

新冠疫情风险区域管理系统的详细设计与实现主要是根据前面的新冠疫情风险区域管理系统的需求分析和新冠疫情风险区域管理系统 的总体设计来设计页面并实现业务逻辑,开发工具采用ecplice,数据库在MYSQL中存储,运用了当下比较主流的SSM框架。

4.1系统前台部分功能模块的实现

4.1.1 前台首页界面

当进入新冠疫情风险区域管理系统的时候,系统以上中下的布局进行展示,首先映入眼帘的是系统的导航栏,下面是轮播图,再往下是疫情资讯信息,其主界面展示如下图4-1所示。

图4-1 前台首页界面图

4.1.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.1.3 用户登录界面

新冠疫情风险区域管理系统 中的前台上注册后的用户是可以通过自己的账户名和密码进行登录的,当会员输入完整的自己的账户名和密码信息并点击“登录”按钮后,将会首先验证输入的有没有空数据,再次验证输入的账户名+密码和数据库中当前保存的用户信息是否一致,只有在一致后将会登录成功并自动跳转到新冠疫情风险区域管理系统 的首页中;否则将会提示相应错误信息,用户登录界面如下图4-3所示。

图4-3用户登录界面图

登录关键代码如下所示。

 /**

     * 登录

     * @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;

        QueryWrapper wrapper = new QueryWrapper<User>();

        Map<String, String> map = new HashMap<>();

        if(username != null && "".equals(username) == false){

            map.put("username", username);

            resultList = service.selectBaseList(service.select(map, new HashMap<>()));

        }

        else if(email != null && "".equals(email) == false){

            map.put("email", email);

            resultList = service.selectBaseList(service.select(map, new HashMap<>()));

        }

        else if(phone != null && "".equals(phone) == false){

            map.put("phone", phone);

            resultList = service.selectBaseList(service.select(map, new HashMap<>()));

        }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.selectBaseList(userGroupService.select(groupMap, new HashMap<>()));

        if (groupList.size()<1){

            return error(30000,"用户组不存在");

        }

        UserGroup userGroup = (UserGroup) groupList.get(0);

        //查询用户审核状态

        if (!StringUtils.isEmpty(userGroup.getSourceTable())){

            String res = service.selectExamineState(userGroup.getSourceTable(),byUsername.getUserId());

            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, "账号或密码不正确");

        }

}

    public String select(Map<String,String> query,Map<String,String> config){

        StringBuffer sql = new StringBuffer("select ");

        sql.append(config.get(FindConfig.FIELD) == null || "".equals(config.get(FindConfig.FIELD)) ? "*" : config.get(FindConfig.FIELD)).append(" ");

        sql.append("from ").append("`").append(table).append("`").append(toWhereSql(query, "0".equals(config.get(FindConfig.LIKE))));

        if (config.get(FindConfig.GROUP_BY) != null && !"".equals(config.get(FindConfig.GROUP_BY))){

            sql.append("group by ").append(config.get(FindConfig.GROUP_BY)).append(" ");

        }

        if (config.get(FindConfig.ORDER_BY) != null && !"".equals(config.get(FindConfig.ORDER_BY))){

            sql.append("order by ").append(config.get(FindConfig.ORDER_BY)).append(" ");

        }

        if (config.get(FindConfig.PAGE) != null && !"".equals(config.get(FindConfig.PAGE))){

            int page = config.get(FindConfig.PAGE) != null && !"".equals(config.get(FindConfig.PAGE)) ? Integer.parseInt(config.get(FindConfig.PAGE)) : 1;

            int limit = config.get(FindConfig.SIZE) != null && !"".equals(config.get(FindConfig.SIZE)) ? Integer.parseInt(config.get(FindConfig.SIZE)) : 10;

            sql.append(" limit ").append( (page-1)*limit ).append(" , ").append(limit);

        }

        log.info("[{}] - 查询操作,sql: {}",table,sql);

        return sql.toString();

}

    public List selectBaseList(String select) {

        List<Map<String,Object>> mapList = baseMapper.selectBaseList(select);

        List<E> list = new ArrayList<>();

        for (Map<String,Object> map:mapList) {

            list.add(JSON.parseObject(JSON.toJSONString(map),eClass));

        }

        return list;

}

所有的用户都可以通过网页进入到新冠疫情风险区域管理系统 中对信息进行查看,但是要实现点赞、收藏、评论的话,就不是所有人都能操作的,必须成为新冠疫情风险区域管理系统的用户,注册登录的流程图如下图4-4所示。

图4-4注册登录流程图

4.1.4搜索风险区域界面

在新冠疫情风险区域管理系统首页上的搜索框中输入自己想要快速检索的风险区域的关键词并点击“搜索”按钮后将会输入的关键词进行和数据库中保存的风险区域进行模糊匹配,并将检索到最匹配的风险区域显示出来。搜索风险区域界面如下图4-5所示。

图4-5搜索风险区域界面图

4.1.5疫情资讯界面

当访客点击新冠疫情风险区域管理系统中导航栏上的“疫情资讯”后将会进入到该“疫情资讯”列表的界面,然后选择想要看的疫情资讯信息,点击进入到详细界面,在详细界面可以收藏+点赞+评论等操作,疫情资讯界面如下图4-6所示。

图4-6疫情资讯界面图

4.1.6疫情信息详情界面

当访客点击了任意疫情信息后将会进入该款疫情信息的详情界面,可以了解到该疫情信息的信息编号、地级行政区、发布日期、累计确诊、累计治愈、累计死亡、死亡率、现存确诊、新增确诊、现存疑似、管理人员等,疫情信息详情展示页面如图4-7所示。

图4-7 疫情信息详情界面图

4.1.7个人账户界面

当用户点击导航栏上面“个人账户”这个按钮,会出现子菜单,点击“个人账户”可以对个人的资料以及登录系统的密码进行设置,个人账户界面如下图4-8所示。

图4-8个人账户界面图

4.2系统后台部分功能模块的实现

4.2.1登录界面

管理员在登录界面输入账号+密码,点击“登录”按钮,系统在用户数据库表中会对管理员,系统用户的账号进行匹配,账号+密码正确的话,就会登录到系统中各个用户的主管理界面,否则提示对应的信息,返回到登录的界面,如果管理人员忘记密码的话,点击“忘记密码”根据提示可以找回密码,然后再进行登录其主界面展示如下图4-9所示。

图4-9登录界面图

4.2.2人员管理界面

新冠疫情风险区域管理系统中的管理员在“人员管理”这一菜单是中可以对注册的普通用户、地级市管理者以及管理员人员进行管控。界面如下图4-10所示。

图4-10人员管理界面图

人员管理关键代码如下所示。

public List selectBaseList(String select) {

        List<Map<String,Object>> mapList = baseMapper.selectBaseList(select);

        List<E> list = new ArrayList<>();

        for (Map<String,Object> map:mapList) {

            list.add(JSON.parseObject(JSON.toJSONString(map),eClass));

        }

        return list;

}

4.2.3网站管理界面

网站管理模块是对公告消息和轮播图的设置,只有管理员权限才能进行更新维护。界面如下图4-11所示。

图4-11网站管理界面图

4.2.4疫情资讯管理界面

点击“疫情资讯”按钮会显示自己添加的疫情资讯,如果想要添加新的疫情资讯,点击“添加”按钮根据提示输入疫情资讯,点击“提交”后在疫情资讯管理界面就可以显示了,如果信息有错可以对疫情资讯进行更新维护,也可以直接删除某一疫情资讯,还可以管理评论信息,界面如下图4-12所示。

图4-12疫情资讯管理界面图

4.2.5风险区域管理界面

点击“风险区域”这个按钮可以查看到自己提交的所有的风险区域,支持通过疫情程度或者数据日期进行查询风险区域,如果想要添加新的风险区域,点击“添加”按钮然后根据提示输入风险区域,点击“提交”后,在风险区域管理界面就会显示新增的风险区域信息,可以点击某一日志查看健康信息的详情,也可以直接点击“删除”进行删除风险区域。界面如下图4-13所示。

图4-13风险区域管理界面图

风险区域关键代码如下所示。

 @RequestMapping("/get_obj")

    public Map<String, Object> obj(HttpServletRequest request) {

        List resultList = service.selectBaseList(service.select(service.readQuery(request), service.readConfig(request)));

        if (resultList.size() > 0) {

            JSONObject jsonObject = new JSONObject();

            jsonObject.put("obj",resultList.get(0));

            return success(jsonObject);

        } else {

            return success(null);

        }

}

5系统测试

5.1测试目的

在系统的前台、后台、数据库设计完成以后,新冠疫情风险区域管理系统 才算是完成了一半,系统的最后一个阶段就是对系统的功能、性能进行测试,测试对一个系统来说是非常重要的,有的时候开发完一个系统,如果测试不合格的话,这个系统是没有办法进行投入使用的,所有我们要用测试对系统的功能、性能等方面进行检验,把不完善的功能尽量完善,把出现的bug及时解决掉,然后给用户呈现出一个完美的系统。

5.2 系统测试用例

在对新冠疫情风险区域管理系统的测试的时候,我主要是对用户登录功能测试、疫情信息添加功能、查询风险区域、请假功能测试这六个方面进行展示的,如表5-1、5-2、5-3、5-4、所示:

用户登录功能测试:

表5.1 用户登录功能测试表

测试名称

测试功能

操作过程

预期结果

测试结果

用户登录模块测试

用户登录成功的情况

点击前登录界面输入账号和密码分别输入admin和admin后点击“登录”按钮。

登录成功并调整到用户界面

正确

疫情信息添加功能测试:

表5.2 疫情信息添加功能测试表

测试名称

测试功能

操作过程

预期结果

测试结果

疫情信息添加模块测试

疫情信息添加成功的情况

在疫情信息的页面中将点击添加,输入疫情相关信息,输入正确的信息后然后点击“提交”按钮。

提示添加成功

正确

疫情信息添加模块测试

疫情信息添加失败的情况

在疫情信息页面中不填写的信息编号,其他信息正常输入“提交”按钮。

提示“添加失败,信息不能为空”

正确

查询风险区域功能模块测试:

表5.3 查询风险区域功能测试表

测试名称

测试功能

操作过程

预期结果

测试结果

查询风险区域功能测试

查询成功的情况

在风险区域界面输入数据日期或者疫情程度进行查询

查询成功

正确

行政区划添加功能测试:

表5.4 行政区划添加功能测试表

测试名称

测试功能

操作过程

预期结果

测试结果

行政区划添加模块测试

行政区划添加成功的情况

在行政区划的页面中将点击添加,输入行政区划相关信息,输入正确的信息后然后点击“提交”按钮。

提示添加成功

正确

行政区划添加模块测试

行政区划添加失败的情况

在行政区划页面中不填写的地级行政区,其他信息正常输入“提交”按钮。

提示“添加失败,信息不能为空”

正确

5.3 系统测试结果

通过编写新冠疫情风险区域管理系统的测试用例,已经检测完毕用户的登录模块、疫情信息添加模块、查询风险区域模块、行政区划添加模块的功能测试,在对以上功能得测试过程中,发现了系统中的很多漏送并进行了完善,经过多人在线进行测试,系统完全可以正常运行,当然在后期的维护中系统将不断完善。

结论

本文描述了新冠疫情风险区域管理系统 设计与实现的原理和开发过程,该系统是通过Spring+SpringMVC+MyBatis框架来搭建后台,中间件使用的是Tomcat服务器,数据库管理平台采用开源的Mysql数据库,前台使用的是JQuery框架,同时使用Validate校验框架,这样就可以减少前端代码的输入量,而且基于JQuery框架的Validat框架使用简单,是流行的前端使用框架,前端使用的主要是Java页面展示技术。

在开发这个新冠疫情风险区域管理系统之前做了许多的准备,比如到学校进行调研,了解现在大学生对新冠疫情风险区域管理系统所要实现的功能,同时在新冠疫情风险区域管理系统的设计和开发过程中去行政区划馆以及网上查阅和学习了许多相关的文献资料,与此同时从开发这个新冠疫情风险区域管理系统的过程当中我也收获了许许多多宝贵的实践方法以及设计的思路,对系统的开发也起到了很重要的作用,新冠疫情风险区域管理系统 的开发技术选用的都是自己比较熟悉的,比如Web、SSM、MYSQL等,这些技术都在平时的课程当中学到,而且平时都能够熟练运用,在开发新冠疫情风险区域管理系统 的过程当中许多的设计思路和方法都是在以前不断地学习中摸索出来的经验,开发新冠疫情风险区域管理系统 对于我来说工作量还是比较大的,毕竟是一个完整的系统,正是由于之前的积累与准备,才能顺利的完成这个项目,由此看来,积累经验跟做好准备是十分重要的事情。

当然在开发该新冠疫情风险区域管理系统的过程当中也是离不开导师以及同学们的帮助的,在遇到自己搞不定的问题的时候,我首先会和同学们探讨,找出解决方法,实在解决不了的时候,我会请教我的导师,在开发新冠疫情风险区域管理系统的过程中正是因为他们的指导与帮助,我才能够成功的在预期内完成了这个系统。同时新冠疫情风险区域管理系统 还有很多需要改进的地方,但是由于专业知识的浅薄,开发的系统并不是十全十美,希望以后有机会可以对其进行完善,让其真正的投入到使用之中。

 

到此,整个新冠疫情风险区域管理系统 就算完成了,虽然过程十分艰难,但是等到都完成的时候,我感觉无比的自豪,虽然设计的系统还存在许多的纰漏,但是我已经拼劲全力,给自己的大学四年画上了一个圆满的句号。

在这里我首先要感谢的就是大学四年来所有教导我的老师,是他们教会了我许多的专业知识以及做人的道理,从一进校门对对开发系统一窍不通到现在能自主开发一个管理系统,里面包含了前台框架、后台框架、业务流程、数据结构、操作系统等各种知识,只有把他们统一运用好,才能够完成整个系统,这都是老师的功劳;其次我要感谢我的指导老师,在开发这个系统的时候,我遇到了无数的问题,经常通过线上、线下的方式去请教导师,每次去请教导师,他从来没有不耐烦,都是细心的引导,告诉我怎么样实现这个功能,怎么样才能使得系统更加完善,然后通过自己查询相关资料解决问题,提高了自己自主解决问题的能力,授人以鱼不如授人以渔,指导老师的这种工作态度受益终生,我也会向老师不断靠拢,向他学习,在此我只想说一句:“老师,谢谢您,您辛苦了”!最后我还要感谢我的室友、同学,在一起学习这四年,他们不但学习上给了我很多建议,在生活上更加给了我帮助,正是有他们的帮助,我的大学生涯才如此完美。

最后,希望自己在未来的道路上能够越走越远,不辜负在大学的学习以及老师们的细致的教导,追风赶月莫停留,平荒尽处是春山。

参考文献

[1]伍德鹏,李佩学.基于SSM框架的高职院校教学办公用品管理信息系统设计研究[J].轻工科技,2023,39(01):99-101.

[2]赵怡, 突发公共卫生事件应急处置 绵阳市新冠肺炎疫情监控与管理系统投入使用. 余正道 主编,绵阳年鉴,方志出版社,2021,439,年鉴.DOI:10.39050/y.cnki.ydwns.2022.001821.

[3]赵瑞,黄思怡,韩朝桂,陈秋婷,邹明珠.新冠疫情下社区人员管理系统的设计与实现[J].现代信息科技,2022,6(24):14-17+22.DOI:10.19850/j.cnki.2096-4706.2022.24.004.

[4]张晗.新冠疫情对关务行业的影响及数字化管理启示[J].中国物流与采购,2022(24):46-47.DOI:10.16079/j.cnki.issn1671-6663.2022.24.052.

[5]常婉纶,谈姝辰,屈小娥,田召.基于SSM框架的二级学院教科研信息共享系统的设计与实现[J].电脑知识与技术,2022,18(34):39-41.DOI:10.14004/j.cnki.ckt.2022.2208.

[6]沈志元,张文健.基于Java技术的医院管理系统的设计与实现[J].电脑知识与技术,2022,18(32):38-40+54.DOI:10.14004/j.cnki.ckt.2022.1994.

[7]杨一帆.服务于MySQL数据库的在线监测系统设计[J].自动化技术与应用,2022,41(10):179-182.DOI:10.20033/j.1003-7241.(2022)10-0179-04.

[8]林佳一.混合式教学在高职MySQL数据库课程的实践研究[J].电脑知识与技术,2022,18(26):133-135.DOI:10.14004/j.cnki.ckt.2022.1737.

[9]崔海. 新冠疫情防控跨区域联动协调管理系统[P]. 江苏省:CN114496286A,2022-05-13.

[10]李节.基于区块链技术的疫情管理系统[J].软件导刊,2022,21(04):57-61.

[11]王志伟.新冠疫情防控集中隔离管理系统的应用与实践[J].通信管理与技术,2022(02):27-31.

[12]He Xinbin,Bai Yongbin,Yue Lisen,Wang Haixiao,Liu Yi. Design and Implementation of Information System Based on Java Technology Platform[J]. Journal of Physics: Conference Series,2021,2033(1).

[13]赵一鸣,李祺,苏莎莎,韩耀廷,李图雅,郭烨红,杨浒昀,张茹.新冠肺炎疫情下项目管理系统的设计与实践[J].内蒙古科技与经济,2021(10):89-91.

[14]贺楠楠. 《国外新冠肺炎疫情防控方案》翻译实践报告[D].西南科技大学,2021.DOI:10.27415/d.cnki.gxngc.2021.000905.

[15]Qu Xiaona. Application of Java Technology in Dynamic Web Database Technology[J]. Journal of Physics: Conference Series,2021,1744(4).

[16]Witsarut Sriratana,Vittaya Khagwian,Sutham Satthamsakul. Analysis of Electric Current by Using MySQL Database on Web Server for Machine Performance Evaluation: A Case Study of Air Conditioning System[J]. 제어로봇시스템학회 국제학술대회 논문집,2020.

[17]吴赛男,张鸿辉,洪良,崔学森,巫文迪. 韧性规划要求下公共卫生应急管理系统设计[C]//.共享与韧性:数字技术支撑空间治理:2020年中国城市规划信息化年会论文集.,2020:166-172.DOI:10.26914/c.cnkihy.2020.042984.

免费领取项目源码,请关注❥点赞收藏并私信博主,谢谢~

Guess you like

Origin blog.csdn.net/vx2_Biye_Design/article/details/133605780