(with source code) Design and implementation of SSM+mysql+ oa office management system based on SSM technologyComputer completion 100934

 oa office management system

Summary

The degree to which an enterprise realizes office automation is the standard to measure its realization of modern management. Office automation (OA: OFFICE AUTOMATION) is the use of Internet technology, based on the concept of workflow, so that the internal personnel of the enterprise can share information conveniently and quickly, and work together efficiently.

The main functional modules of the oa office management system include department management, employee management, attendance management, leave management, reimbursement management, expenditure management, salary management, etc., adopting an object-oriented development model for software development and hardware erection, which can be very good It meets the needs of actual use, perfects the corresponding software construction and program coding work, adopts MySQL as the main storage unit of background data, uses ssm framework, Java technology, and Ajax technology for business system coding and development, and realizes this full functionality of the system. This report first analyzes the background, function and significance of the research, laying the foundation for the rationality of the research work. Analyze the requirements and technical problems of the oa office management system, prove the necessity and technical feasibility of the system, and then give a basic introduction to the technical software and design ideas that need to be used in the design system, and finally realize the oa office management System and deployment runs use it.

Keywords: office management; ssm framework; work management

SSM office management system

Abstract

The degree of an enterprise's realization of office automation is the standard to measure its realization of modern management. Office automation (OA) is the use of Internet technology, based on the concept of workflow, so that internal personnel of the enterprise can easily and quickly share information and work together efficiently.

The main functional modules of the office management system include department management, employee management, attendance management, leave management, reimbursement management, expenditure management, salary management, etc. the object-oriented development mode is adopted for software development and hardware erection, which can well meet the actual needs, improve the corresponding software erection and program coding, take MySQL as the main storage unit of background data, adopt SSM framework Java technology and Ajax technology encode and develop the business system, and realize all the functions of the system. This report first analyzes the background, function and significance of the research, which lays a foundation for the rationality of the research work. This paper analyzes the various requirements and technical problems of the office management system, proves the necessity and technical feasibility of the system, then makes a basic introduction to the technical software and design ideas needed to design the system, and finally realizes the operation and use of the office management system and departments.

Key words: Office management; SSM framework; Work management

Table of contents

Chapter 1 Introduction

1.1  Research Background

1.2 Research content 

1.3  The structure of the thesis

Chapter 2 Introduction of Development Tools and Related Technologies

2.1  HTTP protocol

2.2  Java language and JDK development environment

2.3 SSM framework

2.4 Mysql database

Chapter 3 System Analysis

3.1  Feasibility analysis

3.1.1  Economic feasibility

3.1.2  Technical Feasibility

3.1.3  Operation Feasibility

3.2  Performance Analysis  

3.3  System operation process

3.3.1 User login process 9

3.3.2 Information adding process 10

3.3.3 Information deletion process 10

Chapter 4 System Design

4.1 System architecture design

4.2 Development Process Design

4.3 Database Design 1 2

4.3.1 Entity ER Diagram

4.3.2 Data Table 1 3

Chapter 5 System Implementation 1 7

5.1 Realization of database access layer 1 7

5.2 Realization of registration module 2 0

5. 3 Realization of user login module 2 3

5. 4 Realization of user data modification module 2 4

5.5 Realization of departmental information module 2 8

5. 6 Realization of user management module 3 1

5.7 Attendance information management module 3 3

5.8 Realization of file information management module 3  4

5.8 Realization of expenditure information management module 3  4

Chapter 6 System Testing 3 5

6.1   Test purpose 3 5

6.2  Test scheme design 3 5

6.2.1 Testing strategy 3 5

6.2.2 Test Analysis 3 5

6. 3 Test results 3 6

Chapter 7 Summary and Outlook 3 7

References 3 8

Thanks 4 0

  1. introduction
    1. Research Background

OA office management system, which utilizes advanced computer network technology, makes various office business activities of people gradually completed with the assistance of various equipment, various human and machine information systems, so as to make full use of information, thereby improving work efficiency and work quality . Information automation was proposed in our country in the late 1970s and early 1980s, and has a history of nearly 20 years. The development speed of information automation technology is constantly improving, and there are more and more new products for office automation. There are more and more new office software in office automation. The convenience brought to office workers is beyond doubt. The current office software has not only reduced The workload of employees, and more importantly, liberate employees from tedious routine work, focus on the most important things, improve the work efficiency of the overall employees, improve the efficiency of the enterprise, and enhance the strength of the enterprise. With the collaboration of this software, the organizational structure of the enterprise is simplified, the information exchange between various departments is more convenient, fast, and accurate, and the strategic decisions of the enterprise can be followed up better and faster. In these senses, in today's increasingly fierce market competition, office automation is no longer a means or a tool, but has become the lifeblood that determines the survival and development of enterprises.

Office automation is a new type of office mode in the information society, which combines modern office and computer network functions. With the development of information technology, office automation plays an increasingly important role in the management and operation of administrative enterprises and institutions. Through the network, employees within the organization can work together across time and place. The switching network application implemented by the office automation system makes the transmission of information faster and more convenient, thereby greatly expanding the management means and realizing the high efficiency of operation.

    1. research content

The development and implementation of oa office management system, the required work content:

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

(2) After the system confirmation is completed, confirm the technology used for system development in combination with the requirements of system development. The development of the oa office management system uses the SSM framework, and the database is used for platform construction and development. The technology used is confirmed for technical analysis. Whether the technology can complete the realization of the system.

(3) Determine the technology used by the system, confirm the user roles divided by the system online, and determine the functional modules to be designed according to the division of user roles. The design of the oa office management system is mainly divided into administrator and user roles, and The functional modules used are also different, but the content realized by the database of the system is interactive, and users can view course information according to their needs at any time, and system staff can process and operate online information according to their own assigned content, manage The staff can obtain the detailed data information of all users, and deal with it as soon as possible according to the needs.

(4) Design the program and interface after the functional modules of the system are confirmed. The test method finds out the loopholes in the program, and solves the loopholes in the program online. If there is no problem in the test system, the system can be uploaded for formal operation.

    1. Thesis structure

Based on the information and data obtained from market research, combined with domestic and foreign frontier research, and using relevant system development and design methods, the oa office management system is finally designed.

There are seven chapters in this paper, as follows.

The first chapter summarizes the purpose and significance of the research on oa office management system; summarizes the domestic and foreign research situation and the future research trend concisely, and finally gives the composition structure of the thesis

The second chapter gives a brief overview of the development techniques and tools used in this paper.

The third chapter briefly analyzes the needs and feasibility of each business process of the system.

Chapter 4 designs the oa office management system.

The fifth chapter realizes the oa office management system, and posts screenshots of related pages, and describes the operation method of realizing specific functions in language.

Chapter 6 tests some main functional modules of the oa office management system by means of test cases, and finally draws the test results.

Chapter 7 summarizes the full text and makes an outlook on future research.

  1. Introduction to development tools and related technologies
    1. HTTP protocol

The Hypertext Transfer Protocol (HTTP) is a collaborative and distributed communication protocol that presupposes the exchange of information on the World Wide Web. HTTP is an international standard indicator of IEIF. In the formulation and implementation of relevant standards, W3C actively participates in it and plays an irreplaceable role. It can transfer documents between the server and the browser with the help of hypertext markup language. HTML is the markup language for structuring documents, and these documents will include links to relevant information. Users only need to click one of the links to access multimedia objects and images, and at the same time obtain the additional information of the link item.

    1. Java language and JDK development environment 

Java is a programming language launched by the American sun company. It can be applied on multiple platforms and has good compatibility. Furthermore, it is widely used in data centers, personal PCs and technological supercomputers by virtue of its own advantages. Currently the largest developer professional community.

JDK is a brand new product launched by the American sun company for java developers. If there is no JDK, the installed java program will not be able to run.

    1. SSM framework

The SSM (Spring+SpringMVC+MyBatis) framework set is composed of two open source frameworks, Spring and MyBatis (SpringMVC is part of Spring). Often used as a framework for web projects with simpler data sources.

1.1 Spring

Spring is like a large factory for assembling beans in the entire project. In the configuration file, you can specify specific parameters to call the constructor of the entity class to instantiate the object. It can also be called the glue in the project.

The core idea of ​​Spring is IoC (Inversion of Control), that is, programmers are no longer required to explicitly `new` an object, but let the Spring framework do it for you.

1.2 SpringMVC

SpringMVC intercepts user requests in the project. Its core Servlet, DispatcherServlet, assumes the role of intermediary or front desk, and matches user requests with the Controller through HandlerMapping. The Controller is the specific operation performed by the corresponding request. SpringMVC is equivalent to struts in the SSH framework.

1.3 apartment

mybatis is an encapsulation of jdbc, which makes the underlying operation of the database transparent. The operations of mybatis revolve around a sqlSessionFactory instance. Mybatis is associated to the Mapper file of each entity class through the configuration file. The Mapper file configures the SQL statement mapping required by 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 to process the logic, the logic layer sends the request to the persistence layer, the persistence layer interacts with the database, and 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.

    1. Mysql database

Databases are an integral part of the system development process. In terms of WEB applications, MySQL AB has developed a MySQL relational database management system with great advantages. MySQL can store data in different tables, which is very flexible, and can also improve the speed of the system in practical applications. Database access is most commonly used in the standard SQL language, and MySQL is used in the SQL language, so it is highly compatible. Database operations are essential, including functions such as adding, deleting, modifying, and querying database tables. Nowadays, databases can be divided into relational databases and non-relational databases. Mysql is a relational database. Mysql database is a small relational database. It has its own characteristics: small size, fast speed, low cost, etc. Mysql The database is by far the most popular open source database.

In WEB application technology, Mysql database supports different operating system platforms. Although the installation and configuration under different platforms are different, the difference is not very big. There are two installation methods of Mysql under Windows platform, binary version and installation-free Version. After installing the Mysql database, you need to start the service process, and the corresponding client can connect to the database, and the client can log in to the database through a command line or a graphical interface tool.

  1. system analysis
    1. Feasibility Analysis

The feasibility analysis of this system will be carried out from the perspectives of economy, technology and operation.

      1. economic feasibility

The entire system has rigorous steps from design to development and testing. All work tasks are completed by myself without external technical support, which saves all service costs and labor costs. In terms of hardware, a second-hand mobile phone is used to save costs. The workstation is used as the project deployment server and database server, and the cost is less than 10,000 yuan. The actual network deployment is also completed by myself without other labor costs involved. The entire development process is based on the principle of low cost and low consumption.

      1. technical feasibility

The purpose of the technical feasibility analysis is to confirm whether the system can be implemented using existing technologies, and to evaluate the development efficiency and completion. Technical feasibility refers to whether the development of computer software and hardware can meet the requirements of development under the current technical conditions. Because the development of the system is based on the SSM language, the software and hardware conditions required for the development of the system can be met on an ordinary computer. Because it takes up relatively little memory, there is theoretically no problem in developing and designing software with the Mysql database because it takes up too little memory. The above techniques can effectively guarantee the successful and efficient development of the system.

      1. operational feasibility

The user interface of the oa office management system is simple and easy to operate. Common interface windows are used to log in to the interface, and access operations are performed through computers. Users can access operations as long as they have used computers at ordinary times. The development of this system is developed by SSM technology. Humanization and perfection are the more prominent features of B/S structure development, which makes user operation more concise and convenient than others. Easy to operate, easy to manage, and good interactivity are fully reflected in the operation of this system.

3.2 Performance Analysis

For performance analysis, compared with the traditional management method, the traditional management method uses manual statistics and management of data information with paper and pen, and this method is more troublesome for storing and finding certain data information. With the advent of computer networks, this traditional method is difficult to adapt to the development of the current society. It not only reduces people's work efficiency, but also requires a lot of manpower and material resources, which is relatively high in terms of time and cost. In order to reduce the cost and increase the work efficiency of users, develop a set of oa office management system based on computer and network technology.

The development and design of the oa office management system is an independent system, and the popular database is used for data storage and development, mainly to realize the user roles and corresponding functional modules of the oa office management system, so that the management of the oa office management system will not exist Management differences and low efficiency are just the opposite of traditional management information. The realization of oa office management system can save resources, and also improve the processing speed of business, with fast speed, high efficiency and powerful functions.

3.3 System operation process

3.3.1 User login process

The first hurdle for system security is that users who want to enter the system must enter their own login information through the login window before they can log in. Only after the information entered by the user is accurate can they enter the operating system interface and perform function modules. The corresponding operation, if the information entered by the user is incorrect, a prompt box will appear in the window, and the user fails to log in. Return to the first step to re-enter, as shown in Figure 3-1.

                                                                    Figure 3-1 Login operation flowchart

 

3.3.2 Information adding process

For the oa office management system, it is necessary to add the required data information at any time. For the user to add information, it is necessary to fill in the data information to be added according to the content of the check box on the adding interface. After the information input is completed, it is judged whether the data information meets the requirements. If the requirements are added, the addition is completed. If the information added by the user does not meet the requirements, it is necessary to return to the first step, re-enter the data information, and then perform the judgment operation, as shown in Figure 3-2.

                                                       

 

Figure 3-2 Information adding flow chart

3.3.3 Information deletion process

No matter which user role enters the unreasonable system operation interface, it can perform different information content operation functions. For the deletion of system data information, once the user deletes the information, the deleted data information will not be restored. Therefore, the user When deleting data, it is necessary to judge whether the content to be deleted is determined to be deleted. After confirming that it is correct, choose to confirm the deletion operation, as shown in Figure 3-3.

 

Figure 3-3 Information deletion flow chart

  1. system design

4.1 System architecture design

The overview design analysis of the oa office management system project, the main content is the specific analysis of the oa office management system information, the database is designed, the data uses the mysql database, and the system design adopts a more humanized operation design, and the system appears Error messages can be processed and fed back in a timely manner.

The design of the oa office management system is based on the existing network, which can realize administrators: user management, department management, employee management, attendance management, income management, expenditure management, reimbursement management, employee salary management, file information management, leave management, etc. understanding and statistical analysis. The module relationship diagram established according to the system functional requirements is as follows:

                 Figure 4-1 Administrator function module diagram

 

4.2 Development process design

The development of the oa office management system analyzes the management module and the database used by the system, writes generation development, planning and operation are the necessary three steps to build an information management application program, which determines whether the system can really realize the preset functions and whether it can Implement after successful design. In the development process, each stage must be developed in strict accordance with the linear sequence, and each work generated in the corresponding stage can be verified and checked by technology. Make sure that it is correct after the completion of one stage, and will not cause drag and drop phenomenon in the next stage, so that the system can be guaranteed after the design function is completed.

Judging from the successful development experience of oa office management system, the above method has the most obvious effect and reduces the complexity of system development to the greatest extent. As shown in Figure 4-2.

 

Figure 4-2 Flow chart of the development system

4.3 Database design

Database is the foundation and core of information system. The quality of database design directly affects the success or failure of information system development. Creating a database table first determines the attributes of entities and the relationships between entities. Create a data table based on the relationship.4.3.1 Entity ER Diagram

The database is the most important step in the entire software programming. For the database problem, it is mainly to determine the number of databases and the creation of structural formulas. The display system uses Mysql to manage the database to ensure data security and stability.

Conceptual models are designed to abstract real-world information and model the information world. It is a powerful tool for database design. Database conceptual model design can describe the conceptual model of the real world through ER diagrams. An ER diagram of a system shows the links between entities in the system. Moreover, the Mysql database is a database with relatively strong self-protection capabilities. The following figure is mainly an ER diagram of database entities:

(1) ER diagram of attendance statistics, as shown in Figure 4-3:

 

  Figure 4-3 Entity attribute diagram of attendance statistics

 (2) The ER diagram of leave management is shown in Figure 4-4:

 

Figure 4-4 leave management entity diagram

These functions can fully meet the requirements of oa office management system. The function of this system is relatively comprehensive, as shown in Figure 4-5 below the system function structure.

                                 

 

                            Figure 4-5 System function structure diagram

4.3.2 Data Sheet

According to the detailed analysis requirements of the data structure, we can analyze according to the requirements of the input and output data volume, determine what table, the relationship between the structure, we can verify, adjust and improve, query and browse the process, can realize the database, In order to make users have more requirements for data and functions.

Based on the characteristics of the database management system used by the system, the conceptual model of the database is converted and constructed. However, this system only needs to fully consider the functions of the oa office management system, and the organization is relatively clear.

name

type

length

not null

primary key

note

administrative_department_id

int

11

yes

yes

Management ID

gender

varchar

64

no

no

gender

post_type

varchar

64

no

no

job type

department_type

varchar

64

no

no

department type

examine_state

varchar

16

yes

no

Approval Status

recommend

int

11

yes

no

Intelligent Recommendation

user_id

int

11

yes

no

User ID

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

update time

name

type

length

not null

primary key

note

attendance_statistics_id

int

11

yes

yes

Attendance Statistics ID

statistical_number

varchar

64

no

no

Statistics number

statistical_type

varchar

64

no

no

statistic type

number_of_people

int

11

no

no

number of people

time

date

0

no

no

time

personnel_department

int

11

no

no

personnel department

recommend

int

11

yes

no

Intelligent Recommendation

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

update time

name

type

length

not null

primary key

note

department_information_id

int

11

yes

yes

Department Information ID

department_number

varchar

64

no

no

Department Number

department_type

varchar

64

no

no

department type

number_of_departments

varchar

64

no

no

department headcount

department_profile

text

0

no

no

G

recommend

int

11

yes

no

Intelligent Recommendation

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

update time

name

type

length

not null

primary key

note

employee_salary_id

int

11

yes

yes

Employee Salary ID

salary_number

varchar

64

no

no

salary number

ordinary_staff

int

11

no

no

General staff

personnel_department

int

11

no

no

personnel department

financial_department

int

11

no

no

financial department

administrative_department

int

11

no

no

Management

department_type

varchar

64

no

no

department type

post_type

varchar

64

no

no

job type

full_name

varchar

64

no

no

Name

base_pay

int

11

no

no

Basic wage

deduction_fee

int

11

no

no

Chargeback fee

overtime_pay

int

11

no

no

overtime pay

total_amount

varchar

64

no

no

lump sum

finance

int

11

no

no

finance

recommend

int

11

yes

no

Intelligent Recommendation

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

update time

name

type

length

not null

primary key

note

expenditure_information_id

int

11

yes

yes

Expenditure ID

expenditure_number

varchar

64

no

no

Expenditure number

expenditure_type

varchar

64

no

no

type of expenditure

payment_slip

int

11

no

no

pay expenses

expenditure_time

date

0

no

no

spending time

expenditure_personnel

varchar

64

no

no

Expenditure staff

finance

int

11

no

no

finance

expenditure_remarks

text

0

no

no

Expenditure Remarks

recommend

int

11

yes

no

Intelligent Recommendation

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

update time

name

type

length

not null

primary key

note

file_information_id

int

11

yes

yes

file information ID

document_number

varchar

64

no

no

File No

file_type

varchar

64

no

no

file type

document_title

varchar

64

no

no

file title

enclosure

varchar

255

no

no

appendix

ordinary_staff

int

11

no

no

General staff

financial_department

int

11

no

no

financial department

personnel_department

int

11

no

no

personnel department

sender

int

11

no

no

sender

sending_time

date

0

no

no

sending time

document_content

text

0

no

no

document content

recommend

int

11

yes

no

Intelligent Recommendation

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

update time

name

type

length

not null

primary key

note

leave_management_id

int

11

yes

yes

leave management ID

leave_no

varchar

64

no

no

leave number

leave_type

varchar

64

no

no

leave type

leave_start_time

date

0

no

no

leave start time

leave_end_time

date

0

no

no

leave end time

total_time

varchar

64

no

no

total duration

ordinary_staff

int

11

no

no

General staff

personnel_department

int

11

no

no

personnel department

financial_department

int

11

no

no

financial department

reason_for_leave

text

0

no

no

Reason for leave

examine_state

varchar

16

yes

no

Approval Status

examine_reply

varchar

16

no

no

review reply

recommend

int

11

yes

no

Intelligent Recommendation

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

update time

name

type

length

not null

primary key

note

position_information_id

int

11

岗位信息ID

job_no

varchar

64

岗位编号

post_type

varchar

64

岗位类型

number_of_posts

varchar

64

岗位人数

job_profile

text

0

岗位简介

recommend

int

11

智能推荐

create_time

datetime

0

创建时间

update_time

timestamp

0

更新时间

名称

类型

长度

不是null

主键

注释

reimbursement_information_id

int

11

报销信息ID

reimbursement_no

varchar

64

报销编号

reimbursement_type

varchar

64

报销类型

reimbursement_amount

int

11

报销金额

reimbursement_time

date

0

报销时间

ordinary_staff

int

11

普通员工

personnel_department

int

11

人事部门

financial_department

int

11

财务部门

reimbursement_data

longtext

0

报销资料

examine_state

varchar

16

审核状态

examine_reply

varchar

16

审核回复

recommend

int

11

智能推荐

create_time

datetime

0

创建时间

update_time

timestamp

0

更新时间

  1. 系统实现
    1. 数据库访问层的实现

该系统是通过jdbc和MySQL达成连接的,新建一个jdbc.properties文件来填写与数据库连接所需要的驱动和参数。

jdbc.driverClass=com.MySQL.jdbc.Driver

jdbc.url=jdbc:MySQL://localhost:3306/tsi

jdbc.username=root

jdbc.password=123

第一个参数代表MySQL数据库的驱动,第二个参数代表要连接的数据库,第三个和第四个参数代表数据库连接名和密码。

后台与数据库访问主要是通过HQL语句来进行查询的,查询语句中的表名是表格的实体类名,在这种查询语句中*是不允许使用的,除非适合聚合函数一起使用才可以。

    1. 注册模块的实现

用户在填写数据的时候必须与注册页面上的验证相匹配否则会注册失败,注册页面的表单验证是通过JavaScript进行验证的,用户名的长度必须在6到18之间,邮箱必须带有@符号,密码和密码确认必须相同,你输入的密码,系统会根据你输入密码的强度给出指定的值,电话号码和身份证号码必须要求输入格式与生活相符合,当你前台验证通过的时候你点击注册,表单会将你输入的值通过name值传递给后台并保存到数据库中。

用户注册流程图如下图所示。

 

图5-1用户注册流程图

用户注册代码如下:

    /**

     * 注册

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

}

    1. 用户登录模块的实现

主要由两部分组成,登录前的登录界面以及登录后的用户功能界面。登录界面,要求用户输入用户名和密码,当用户名和密码其中一个输入为空时,给出提示“用户名,密码不能为空”。获取用户名和密码后到数据库中查找,如果用户名存在,以及对应的密码正确,则登录成功,否则登录失败。登录失败后给出提示,并把焦点停在文本框中。登录成功后将该次会话的全局变量username设置为用户名。登录成功后进入会员的功能模块,主要有会员基本信息修改,已经发布族谱申报信息管理,发布信息,和退出功能。退出功能是清除全局变量username的值,并跳回到首页。

登录流程图如下图所示。

 

图5-1登录流程图

用户登录界面如下图所示。

 

图5-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;

        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;

}

    1. 用户资料修改模块的实现

用户登录/注册成功之后可以修改自己的基本信息。修改页面的表单中每一个input的name值都要与实体类中的参数相匹配,在用户点击修改页面的时候,如果改后用户名与数据库里面重复了,页面会提示该用户名已经存在了,否则通过Id来查询用户,并将用户的信息修改为表单提交的数据。

    1. 部门信息模块的实现

如果部门信息需要修改,管理员可以通过查询数据库中的部门信息数据,查询部门信息数据是通过ajax技术来进行查询的,需要传递部门名称、部门类型等参数然后在返回到该页面中,可以选中要修改或删除的那条信息,如果选中了超过一条数据,页面会挑一个窗口提醒只能选择一条数,如果没有选中数据会挑一个窗口题型必须选择一条数据。当选择确认修改的时候,后台会根据传过来的id到数据库查询,并将结果返回到修改页面中,可以在修改页面中修改刚刚选中的信息当点击确认的时候from表单会将修改的数据提交到后台并保存到数据库中,就是说如果提交的数据数据库中存在就修改,否则就保存。

部门信息展示界面如下图所示。

 

图5-1部门信息展示界面

    1. 用户管理模块的实现

根据需求,需要对用户进行添加、删除或修改详情信息。删除或修改用户时,系统根据用户的状态判定为可删除状态下,才会给出删除和修改链接,点击删除链接按钮时,请求到达后台,还会先查询用户状态再次做出判定能否删除。点击修改链接按钮时,会跳转到修改信息的页面,重新填写好数据后,数据提交到后台会对数据库中相应的记录做出修改。

添加用户时,会给出数据填写的页面,该页面根据填写好的用户编号同样会事先发送Ajax请求查询编号是否已存在,数据填写好之后提交到后台,会调用相关服务在数据库中插入记录。

用户管理流程图如下图所示。

 

图5-1用户管理流程图

用户管理页面设计效果如下图所示。

 

                                            图5-1用户管理界面

用户管理关键代码如下所示。

@RequestMapping(value = "/del")

    @Transactional

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

        service.delete(service.readQuery(request), service.readConfig(request));

        return success(1);

}

    1. 考勤信息管理模块

根据需求,需要对考勤信息进行添加、删除或修改详情信息。删除或修改考勤信息时,系统根据考勤信息的状态判定为可删除状态下,才会给出删除和修改链接,点击删除链接按钮时,请求到达后台,还会先查询考勤信息状态再次做出判定能否删除。点击修改链接按钮时,会跳转到修改信息的页面,重新填写好数据后,数据提交到后台会对数据库中相应的记录做出修改。

添加考勤信息时,会给出数据填写的页面,该页面根据填写好的考勤信息编号同样会事先发送Ajax请求查询编号是否已存在,数据填写好之后提交到后台,会调用相关服务在数据库中插入记录。

考勤信息管理流程图如下图所示。

 

图5-1考勤信息管理流程图

考勤信息管理页面设计效果如下图所示。

 

                                           图5-1考勤信息管理界面

考勤信息管理关键代码如下所示。

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

}

    1. 文件信息管理模块的实现

根据需求,需要对文件信息进行添加、删除或修改详情信息。删除或修改文件信息时,系统根据文件信息的状态判定为可删除状态下,才会给出删除和修改链接,点击删除链接按钮时,请求到达后台,还会先查询文件信息状态再次做出判定能否删除。点击修改链接按钮时,会跳转到修改信息的页面,重新填写好数据后,数据提交到后台会对数据库中相应的记录做出修改。

添加文件信息时,会给出数据填写的页面,该页面根据填写好的文件信息编号同样会事先发送Ajax请求查询编号是否已存在,数据填写好之后提交到后台,会调用相关服务在数据库中插入记录。

文件信息管理流程图如下图所示。

 

图5-1文件信息管理流程图

文件信息管理页面设计效果如下图所示。

 

图5-1文件信息管理界面图

文件信息管理关键代码如下。

 public Map<String, Object> success(Object o) {

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

        if (o == null) {

            map.put("result", null);

            return map;

        }

        if (o instanceof List) {

            if (((List) o).size() == 1) {

               o =  ((List) o).get(0);

                map.put("result", o);

            }else {

                String jsonString = JSONObject.toJSONString(o);

                JSONArray objects = service.covertArray(JSONObject.parseArray(jsonString));

                map.put("result", objects);

            }

        } else if (o instanceof Integer || o instanceof String) {

            map.put("result", o);

        } else {

            String jsonString = JSONObject.toJSONString(o);

            JSONObject jsonObject = JSONObject.parseObject(jsonString);

            JSONObject j = service.covertObject(jsonObject);

            map.put("result", j);

        }

        return map

    1. 支出信息管理模块的实现

根据需求,需要对支出信息进行添加、删除或修改详情信息。删除或修改支出信息时,系统根据支出信息的状态判定为可删除状态下,才会给出删除和修改链接,点击删除链接按钮时,请求到达后台,还会先查询支出信息状态再次做出判定能否删除。点击修改链接按钮时,会跳转到修改信息的页面,重新填写好数据后,数据提交到后台会对数据库中相应的记录做出修改。

添加支出信息时,会给出数据填写的页面,该页面根据填写好的支出信息编号同样会事先发送Ajax请求查询编号是否已存在,数据填写好之后提交到后台,会调用相关服务在数据库中插入记录。

支出信息管理流程图如下图所示。

 

图5-1支出信息管理流程图

支出信息管理页面设计效果如下图所示。

 

图5-1支出信息管理界面图

支出信息管理关键代码如下。

 public Map<String, Object> success(Object o) {

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

        if (o == null) {

            map.put("result", null);

            return map;

        }

        if (o instanceof List) {

            if (((List) o).size() == 1) {

               o =  ((List) o).get(0);

                map.put("result", o);

            }else {

                String jsonString = JSONObject.toJSONString(o);

                JSONArray objects = service.covertArray(JSONObject.parseArray(jsonString));

                map.put("result", objects);

            }

        } else if (o instanceof Integer || o instanceof String) {

            map.put("result", o);

        } else {

            String jsonString = JSONObject.toJSONString(o);

            JSONObject jsonObject = JSONObject.parseObject(jsonString);

            JSONObject j = service.covertObject(jsonObject);

            map.put("result", j);

        }

        return map

  1. 系统测试
    1. 测试目的

程序设计不能保证没有错误,这是一个开发过程,在错误或错误的过程中难以避免,这是不可避免的,但我们不能使这些错误始终存在于系统中,错误可能会造成无法估量的后果 如系统崩溃,安全信息,系统无法正常启动,导致安装用户手机屏幕等,为了避免这些问题,我们需要测试程序,并发现这些问题,并纠正它们 ,并使系统更长时间稳定成熟,本章的作用是发现这些问题,并对其进行修改,虽然耗时费力,但长期非常重要和必要系统的开发。

软件测试与开发过程是一样的,都必须按照软件工程的正规原理进行,遵守管理学理论。不过,目前国内的软件测试已经积累了大量经验和方法,步骤相对成熟,软件测试的效率也越来越高。

oa办公室管理系统的实现,对于系统中功能模块的实现及操作都必须通过测试进行来评判系统是否可以准确的实现。在oa办公室管理系统正式上传使用之前必须做的一步就是系统测试,对于测试发现的错误及时修改处理,保证系统准确无误的供给用户使用。

    1. 测试方案设计

6.2.1 测试策略

1、功能测试

从用户的角度来看,测试时不了解新开发软件的内部结构,因此可以将系统与黑匣子进行比较,盲目输入后可以查看系统给出的反馈。这种测试属于黑盒测试,在测试中如果输入错误信息系统会报错。

2、性能测试

测试软件程序的整体状况(称为性能测试)通常使用自动化测试工具来检测系统的整体功能,在负载测试和压力测试之间进行分配,在某些情况下,将这两种情况结合起来。虽然压力测试可以检测到系统可以提供的最高级别的服务,但负载测试可以测试系统如何响应增加的负载。

6.2.2 测试分析

测试评估系统质量的方法不局限于系统编码和过程,应该与软件设计工作和历史需求分析密切相关。

软件测试应遵循以下原则:

(1)软件测试应尽快进行,整个测试部分应在软件开发和设计的整个过程中进行。如发现错误,立即处理,将大大减少软件开发的时间,并提高软件的质量。

(2)在软件的各种测试中,测试过程中使用的计划、报告等应妥善处理和存储。其主要目的是为了便于以后系统的维护。

(3)软件测试整个过程中的聚类现象应优先考虑。

(4)对于软件测试,我们应该尽量不去和自己设计的系统进行参考,而是要测试对方的程序,以确保软件测试结果的客观性和公平性。

(5)整个测试计划严格按照软件测试的具体实施细则进行。

(6)对整个测试结果进行综合检查,尽量避免重复错误。

本oa办公室管理系统满足用户的要求和需求,本oa办公室管理系统的使用能够有效的提高用户的使用率。

    1.  测试结果

测试后得到的性能和用例,系统具有足够的正确性、可靠性、稳定性,并且可以对输入数据进行准确的点击操作处理和响应测试用户的体验也得到了很好的反馈和响应时间。合理的范围,可以兼容所有主流浏览器,设计所需的效果。

  1. 总结与展望

通过oa办公室管理系统的开发,本人巩固了之前学过的知识,如今将平时所学到的知识融合在设计中,在设计过程中,做了很多的准备,首先,在数据库系统的设计过程中,尤其是在数据库的工作原理、工作特点,对其深刻的讨论,与此同时,对于小型站点来说,最好服务器的选择,其次,利用所学的知识点分析所做的系统,并在此基础上设计。

目前本系统已经上线,正在试运行阶段,用户反馈良好,基本完成用户所需,试运行过程中没有出现阻断性问题,有一些不足和小问题也及时予以修正,系统上线后,为了保证数据的安全性,对系统进行了备份操作,系统备份是每两个月备份一次,数据库备份为每周备份一次,系统部署在租赁的云平台服务器中。

本次系统上线成功后,得到了用户的高度认可,但是在功能上和性能上还需做进一步的研究处理,使其有更高的性能和更好的用户体验。

系统在以后的升级过程中,需要解决一系列用户所提出的问题,例如打印过程中如何避免浏览器的兼容性问题,大量用户访问时,如何保持较高的响应速度,在系统今后的升级过程中将着重解决这些安全性问题。

参考文献

[1]付曼.事业单位财务报销审核管理研究[J].财会学习,2022(07):8-11.

[2]林颖.事业单位90后员工的人力资源管理[J].人才资源开发,2022(01):36-37.DOI:10.19424/j.cnki.41-1372/d.2022.01.017.

[3]王冰,韩宝海.浅析办公室档案管理工作效率提升途径[J].兰台内外,2022(01):28-30.

[4]王冰,韩宝海.试论如何改进办公室档案管理工作[J].黑龙江档案,2021(06):192-193.

[5]郭丽娜.SMART原则在企业办公室管理中的应用[J].中外企业文化,2021(12):69-70.

[6]黄菊华.信息化背景下办公室档案管理创新策略[J].兰台内外,2021(35):13-15.

[7]刘家宏.企业费用报销管理路径分析[J].中国市场,2021(30):102-103.DOI:10.13939/j.cnki.zgsc.2021.30.102.

[8]王江霖,黄彩霞,樊旭龙.基于SSM框架的网络资源共享平台的研究与实现[J].电脑知识与技术,2021,17(28):76-78.DOI:10.14004/j.cnki.ckt.2021.2999.

[9]姚耀.道家柔性管理思想对新生代员工人力资源管理的启示[J].企业科技与发展,2021(07):147-150.

[10]董健.基于办公室管理中OA办公系统的应用分析[J].办公室业务,2021(12):178+192.

[11]曹建红.财务共享模式下费用报销管理探究[J].行政事业资产与财务,2021(11):98-99+89.

[12]曹华山.SSM框架在Web应用开发中的设计与实现[J].无线互联科技,2021,18(11):108-109.

[13]方昌勋. 基于Object-Z的业务逻辑Java代码自动生成器设计与实现[D].北京邮电大学,2021.DOI:10.26969/d.cnki.gbydu.2021.002208.

[14]陈钊.SSM框架在Web应用开发中的设计与实现研究[J].电脑知识与技术,2021,17(10):226-227.DOI:10.14004/j.cnki.ckt.2021.1097.

[15]王红庆.OA系统在办公室管理中的应用[J].现代工业经济和信息化,2019(20):68-70.DOI:10.16525/j.cnki.14-1362/n.2013.20.027.

致谢

时光飞逝,转眼间我在学校的这些年生活即将结束,回顾这几年的学习生活,收获良多,既有幸福也有难过,学校生活的结束对于我来说也是一个新的开始。论文即将完成,在此,我心中有许多想要感谢的人。首先感谢我的导师,不仅在学习研究方面加以指导,也在生活和为人处世上给予帮助。还要感谢授课老师,你们严谨的学术精神和积极向上的工作态度都在激励我的成长和进步。感谢多年来一直生活在一起的室友,谢谢你们多年来的陪伴和照顾。最后,要感谢各位论文评审老师,感谢您们在百忙之中抽空评阅本论文并给出宝贵的意见和建议。

请关注点赞+私信博主,免费领取项目源码

Guess you like

Origin blog.csdn.net/ID3461074420/article/details/131249953