Design and implementation of enterprise human resource management system based on SpringBoot

1 Introduction

With the development of economic reform and opening up, the competition among enterprises is becoming more and more fierce. The essence of a team is talent. The continuous increase in the demand for talents by enterprises has also led to the continuous change of the demand for human resource management. The traditional management methods can no longer meet the current management form. Therefore, the human resource management system can be managed through the Internet, thereby saving additional expenses and improving the management level.

The rationality of enterprise human resources management is an important link to determine the future development direction of enterprises. However, some small and medium-sized enterprises still have some basic management systems, which cannot realize the informatization and intelligentization of management.

Considering the cost of designing the system, many enterprises prefer to use a management system with low price and poor functions. Although it seems to save the cost for the enterprise on the surface, it still wastes more manpower and material resources in the long-term use process. and financial resources. Therefore, in order to truly save costs and achieve effective human resource management, it is necessary to utilize an intelligent human resource management system. Improve the efficiency of personnel management and really find ways to save money for the company. This system is developed based on the business needs of enterprise human resource management combined with information technology to ensure that the system can intelligently complete all the work of enterprise management, ensure the stability and permanence of the system, and improve the efficiency of human resource management.

2. Development technology

2.1 Java language

Java is a widely used cross-platform programming language launched in 1995 by Sun Microsystems (now Oracle). It is simple, object-oriented, robust, safe and portable, and is widely used in the development of various types of applications and systems.

Following are some key features and descriptions of the Java language:

(1) Easy to learn: Java borrows the syntax of the C++ language, and removes some complex and error-prone features, making Java relatively easier to learn. It has a clear grammatical structure, rich class library and powerful tools, making it easier for developers to learn and use Java.

(2) Object-oriented: Java is a pure object-oriented programming language. It supports object-oriented features such as encapsulation, inheritance, and polymorphism, enabling developers to structure and organize code in a more intuitive and modular manner. Object-oriented programming style also helps to improve code reusability and maintainability.

(3) Cross-platform: Java is highly portable, it can be written once and run everywhere. It uses the Java Virtual Machine (JVM) as a platform middle layer to convert Java bytecode into executable code on a specific platform. This enables Java programs to run on different operating systems (such as Windows, Linux, Mac, etc.) and hardware, providing developers with a wide range of target environments.

(4) Powerful class library and tools: Java has a powerful and rich class library, which provides a variety of predefined classes and methods, so that developers can quickly build various applications. These class libraries include functions in network, graphical interface, database connection, encryption, multi-threading and so on. In addition, Java also has rich development tools, such as integrated development environment (IDE) and debugger, to help developers improve efficiency and development quality.

(5) Security: Java is designed as a highly secure language. It provides security mechanisms such as bytecode verification and a sandbox security model to prevent potential security breaches and malicious operations. This makes Java have high credibility and security when developing networks and distributed systems.

(6) Multi-thread support: Java natively supports multi-thread programming, allowing multiple tasks to be executed concurrently. By using threads, developers can implement parallel computing, improve program response speed and processing power. Java provides built-in thread management and synchronization mechanisms that make it easier to write thread-safe code.

All in all, Java is a powerful, portable, safe and easy-to-learn programming language. It is based on the idea of ​​object-oriented programming and has rich class libraries and tool support. Through the cross-platform feature of the Java virtual machine, developers can write code once to run on multiple operating systems and hardware. Java is widely used in developing desktop applications, enterprise applications, mobile applications, and embedded systems.

2.2SpringBoot

Spring Boot is a framework for quickly building easily configurable, self-contained, production-grade Spring applications. It is based on the Spring framework and uses the principle of convention over configuration, aiming to simplify the development and deployment of Spring applications.

Here are some key features and descriptions of the Spring Boot framework:

(1) Simplified configuration: Spring Boot configures Spring applications in a way that conventions are superior to configurations, allowing developers to quickly start projects and develop them. It automatically configures many commonly used features such as database connections, web development, security, etc., following best practices by default.

(2) Microservice support: Spring Boot focuses on building applications based on microservice architecture. It provides some convenient features and tools, such as embedded application servers (such as Tomcat, Jetty), service registration and discovery, load balancing, etc., enabling developers to easily build and manage microservices.

(3) Automated dependency management: Spring Boot simplifies the dependency configuration of the project through automated dependency management. It provides a concept called "Starter", which is a predefined dependency package, which can introduce multiple related dependency libraries at one time. Developers only need to add the appropriate Starter dependencies, and Spring Boot will automatically resolve and import the required dependencies.

(4) Embedded Servlet container: Spring Boot integrates embedded Servlet containers (such as Tomcat, Jetty), making it easier and more convenient to develop and deploy Web applications. Developers don't need to manually install and configure Servlet containers, they only need to write codes, and they can run and test applications directly.

(5) Powerful monitoring and management: Spring Boot provides powerful monitoring and management functions, enabling developers to better understand the health and performance indicators of the application. It integrates many out-of-the-box monitoring tools, such as health checks, metrics, logging, etc., to facilitate developers to troubleshoot and optimize performance.

(6) Ecosystem support: As a derivative version of the Spring framework, Spring Boot can make full use of all aspects of the Spring ecosystem. It can easily integrate other modules and extensions of the Spring framework, such as Spring Security, Spring Data, etc., to provide developers with richer and more complete functions and support.

All in all, Spring Boot is a framework that simplifies the development of Spring applications. It provides many convenient and convenient functions, such as simplified configuration, microservice support, and automatic dependency management. By using Spring Boot, developers can quickly build and deploy efficient and robust applications, and enjoy the rich features and support of the Spring ecosystem.

2.3 Vue

Vue.js is a popular JavaScript framework for building user interfaces (UIs), especially single-page applications. Vue is popular with developers for its simplicity, responsiveness, and flexibility, and is easy to integrate into existing projects.

Here are some key features and descriptions of Vue technology:

(1) Responsive: Vue uses a responsive data binding mechanism. By binding the data to the view, when the data changes, the view will be automatically updated. This enables developers to manage and respond to changes in data in an intuitive and concise manner.

(2) Componentization: Vue encourages developers to split applications into multiple reusable components. Each component has its own template, logic and styling, making the development process more modular and maintainable. Communication between components is achieved through props and events.

(3) Virtual DOM: Vue uses virtual DOM to optimize page rendering performance. Virtual DOM is a lightweight JavaScript object that represents the real DOM structure. By comparing the changes in the virtual DOM, Vue only updates the parts that actually need to be changed, improving the rendering efficiency of the page.

(4) Template syntax: Vue provides a concise and flexible template syntax for declaratively binding data to DOM. Template syntax supports interpolation, directives, and expressions, making it easy for developers to use JavaScript logic and dynamic content in templates.

(5) Routing and state management: Vue provides official plug-ins such as Vue Router and Vuex for routing and state management. Vue Router is used to implement the routing function of single-page applications, while Vuex provides centralized state management to facilitate the sharing and management of states between multiple components.

(6) Ecosystem and community support: Vue has an active open source community and a huge ecosystem. Many third-party libraries and plugins are seamlessly integrated with Vue, providing rich features and tooling support. The Vue community provides a wealth of documentation, tutorials, and examples, providing developers with resources to learn and solve problems.

By using Vue technology, developers can build interactive user interfaces and realize dynamic binding of data and views. Features such as Vue's responsiveness, componentization, and virtual DOM make the development process more efficient and flexible. At the same time, Vue's ecosystem and community support provide a wealth of tools and resources to help developers better build and maintain Vue applications.

2.4Mysql

MySQL is an open source relational database management system (RDBMS), developed by the Swedish company MySQL AB. It is widely used in various types of applications, from small personal websites to large enterprise-level applications.

Following are some key features and descriptions of the MySQL database:

(1) Relational database: MySQL is a relational database management system that organizes and stores data based on the concepts of tables and relationships. It supports SQL (Structured Query Language) as a standard language for querying and managing databases.

(2) Reliable and stable: MySQL is famous for its reliability and stability, and is used by many large organizations to process important data. It has high availability, fault tolerance and data integrity, and is suitable for processing large amounts of data at the enterprise level.

(3) Cross-platform: MySQL can run on multiple operating systems, including Windows, Linux, Mac, etc. This enables developers to use MySQL to build and deploy applications on different platforms.

(4) High performance: MySQL performs well in processing large amounts of data, and has efficient read and write speeds. It performs various performance optimizations, such as indexing, query optimization, and caching mechanisms, to provide fast data access and processing capabilities.

(5) Scalability: MySQL has good scalability and can handle large amounts of data without affecting performance. It supports horizontal expansion and vertical expansion, allowing the capacity and performance of the database to be increased by adding more servers, partitions, and clusters.

(6) Security: MySQL provides a variety of security mechanisms to protect data security. It supports functions such as user authentication, access control, encrypted transmission, and transaction processing, and can protect sensitive data from unauthorized access and malicious attacks.

(7) Rich functions: MySQL provides rich functions and features, such as stored procedures, triggers, foreign key constraints, views, backup and recovery, etc. These features enable developers to manage and operate databases more flexibly and efficiently.

All in all, MySQL is a reliable, stable and high-performance relational database management system. It excels in reliability, scalability, and security, and is cross-platform and feature-rich. As open source software, MySQL has a large user community and an active developer group, providing a lot of support, documentation and resources. Whether it's a small website or a large enterprise-level application, MySQL is a powerful choice.

3. Functional design

 The research and development of this project mainly adopts the design pattern of web browser. Its system structure is shown in Figure 3-1:

This system uses modern computer network technology to integrate traditional information propaganda methods, and is designed and completed according to the practical process. At the same time, improve the service and preliminarily design an enterprise human resources system platform to facilitate related transaction operations. In order to make the system play a greater role in various managements and realize efficient management of computerized information, the functional requirements of the development target are introduced as follows:

(1) Administrator login module

The administrator has the right to manage the human resources platform of the system enterprise, but all registration and use of permissions must be authorized by the super administrator. The administrator can manage department management, training management, recruitment management, leave management, employee management, and attendance management. Administration, Payroll Administration.

(2) Department management module

Administrators with certain management rights can view the department management list, and add, delete, modify, and query corresponding department management.

(3) User management module

Administrators with certain management rights can view the data of the user list, as well as corresponding user addition, deletion, modification, and query operations.

(4) Training management list management module

Administrators with certain management rights can view the data of the user training management list and modify the training management.

4. Realize the effect display

 

5. Reference articles

 6. Core code

@RestController
@RequestMapping("renren/checkmanger")
public class CheckMangerController {
    @Autowired
    private CheckMangerService checkMangerService;

    /**
     * 列表
     */
    @RequestMapping("/list")
    /*@RequiresPermissions("renren:checkmanger:list")*/
    public R list(@RequestParam Map<String, Object> params){
        PageUtils page = checkMangerService.queryPage(params);
        Object principal = SecurityUtils.getSubject().getPrincipal();
        SysUserEntity userEntity = (SysUserEntity) principal;
        return R.ok().put("page", page).put("user",userEntity.getUsername());
    }


    /**
     * 信息
     */
    @RequestMapping("/info/{id}")
    /*@RequiresPermissions("renren:checkmanger:info")*/
    public R info(@PathVariable("id") Integer id){
		CheckMangerEntity checkManger = checkMangerService.getById(id);

        return R.ok().put("checkManger", checkManger);
    }

    /**
     * 保存
     */
    @RequestMapping("/save")
    /*@RequiresPermissions("renren:checkmanger:save")*/
    public R save(@RequestBody CheckMangerEntity checkManger){
        Object principal = SecurityUtils.getSubject().getPrincipal();
        SysUserEntity userEntity = (SysUserEntity) principal;
        QueryWrapper<CheckMangerEntity> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("staff_num",userEntity.getUserNum());
        List<CheckMangerEntity> list = checkMangerService.list(queryWrapper);
        //上班打卡
        if (checkManger.getRemark().equals("1")){
            if (list.size()>0){
                CheckMangerEntity checkMangerEntity = list.get(0);
                Date shanDa = checkMangerEntity.getShanDa();
                String format = DateUtils.format(shanDa, "yyyy-MM-dd");
                String format2 = DateUtils.format(new Date(), "yyyy-MM-dd");
                if (format.equals(format2)){
                    return R.error("今天已签到");
                }
            }
            checkManger.setShanDa(new Date());
        }
        if (checkManger.getRemark().equals("2")){
            if (list.size()>0){
                CheckMangerEntity checkMangerEntity = list.get(0);
                Date shanDa = checkMangerEntity.getXiaDa();
                String format = DateUtils.format(shanDa, "yyyy-MM-dd");
                if (format!=null){
                    String format2 = DateUtils.format(new Date(), "yyyy-MM-dd");
                    if (format.equals(format2)){
                        return R.error("今天已签到");
                    }
                }

            }
            CheckMangerEntity entity = list.get(0);
            entity.setXiaDa(new Date());
        /*    entity.setStaffNum(userEntity.getUserNum());
            entity.setPartName(userEntity.getUserPart());
            entity.setStaffName(userEntity.getUsereal());*/
            checkMangerService.updateById(entity);
            return R.ok();
        }

        checkManger.setStaffNum(userEntity.getUserNum());
        checkManger.setPartName(userEntity.getUserPart());
        checkManger.setStaffName(userEntity.getUsereal());


        checkMangerService.save(checkManger);

        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    /*@RequiresPermissions("renren:checkmanger:update")*/
    public R update(@RequestBody CheckMangerEntity checkManger){
		checkMangerService.updateById(checkManger);

        return R.ok();
    }

    /**
     * 删除
     */
    @RequestMapping("/delete")
    /*@RequiresPermissions("renren:checkmanger:delete")*/
    public R delete(@RequestBody Integer[] ids){
		checkMangerService.removeByIds(Arrays.asList(ids));

        return R.ok();
    }

}
@RestController
@RequestMapping("renren/coursemanager")
public class CourseManagerController {
    @Autowired
    private CourseManagerService courseManagerService;

    /**
     * 列表
     */
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params){
        PageUtils page = courseManagerService.queryPage(params);

        return R.ok().put("page", page);
    }


    /**
     * 信息
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Integer id){
		CourseManagerEntity courseManager = courseManagerService.getById(id);

        return R.ok().put("courseManager", courseManager);
    }

    /**
     * 保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody CourseManagerEntity courseManager){
		courseManagerService.save(courseManager);

        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody CourseManagerEntity courseManager){
		courseManagerService.updateById(courseManager);

        return R.ok();
    }

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Integer[] ids){
		courseManagerService.removeByIds(Arrays.asList(ids));

        return R.ok();
    }

}
@RestController
@RequestMapping("renren/coursetype")
public class CourseTypeController {
    @Autowired
    private CourseTypeService courseTypeService;

    /**
     * 列表
     */
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params){
        PageUtils page = courseTypeService.queryPage(params);

        return R.ok().put("page", page);
    }


    /**
     * 信息
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Integer id){
		CourseTypeEntity courseType = courseTypeService.getById(id);

        return R.ok().put("courseType", courseType);
    }

    /**
     * 保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody CourseTypeEntity courseType){
		courseTypeService.save(courseType);

        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody CourseTypeEntity courseType){
		courseTypeService.updateById(courseType);

        return R.ok();
    }

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Integer[] ids){
		courseTypeService.removeByIds(Arrays.asList(ids));

        return R.ok();
    }

}
@RestController
@RequestMapping("renren/hupart")
public class HuPartController {
    @Autowired
    private HuPartService huPartService;

    /**
     * 列表
     */
    @RequestMapping("/list")
    /*@RequiresPermissions("renren:hupart:list")*/
    public R list(@RequestParam Map<String, Object> params){
        PageUtils page = huPartService.queryPage(params);

        return R.ok().put("page", page);
    }


    /**
     * 信息
     */
    @RequestMapping("/info/{id}")
    /*@RequiresPermissions("renren:hupart:info")*/
    public R info(@PathVariable("id") Integer id){
		HuPartEntity huPart = huPartService.getById(id);

        return R.ok().put("huPart", huPart);
    }

    /**
     * 保存
     */
    @RequestMapping("/save")
    /*@RequiresPermissions("renren:hupart:save")*/
    public R save(@RequestBody HuPartEntity huPart){
		huPartService.save(huPart);

        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    /*@RequiresPermissions("renren:hupart:update")*/
    public R update(@RequestBody HuPartEntity huPart){
		huPartService.updateById(huPart);

        return R.ok();
    }

    /**
     * 删除
     */
    @RequestMapping("/delete")
   /* @RequiresPermissions("renren:hupart:delete")*/
    public R delete(@RequestBody Integer[] ids){
		huPartService.removeByIds(Arrays.asList(ids));

        return R.ok();
    }

}
@RestController
@RequestMapping("renren/leavemanger")
public class LeaveMangerController {
    @Autowired
    private LeaveMangerService leaveMangerService;

    /**
     * 列表
     */
    @RequestMapping("/list")
    /*@RequiresPermissions("renren:leavemanger:list")*/
    public R list(@RequestParam Map<String, Object> params){
        PageUtils page = leaveMangerService.queryPage(params);

        Object principal = SecurityUtils.getSubject().getPrincipal();
        SysUserEntity userEntity = (SysUserEntity) principal;
        return R.ok().put("page", page).put("user",userEntity.getUsername());
    }


    /**
     * 信息
     */
    @RequestMapping("/info/{id}")
    /*@RequiresPermissions("renren:leavemanger:info")*/
    public R info(@PathVariable("id") Integer id){
		LeaveMangerEntity leaveManger = leaveMangerService.getById(id);

        return R.ok().put("leaveManger", leaveManger);
    }

    /**
     * 保存
     */
    @RequestMapping("/save")
    /*@RequiresPermissions("renren:leavemanger:save")*/
    public R save(@RequestBody LeaveMangerEntity leaveManger){
		leaveMangerService.save(leaveManger);

        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    /*@RequiresPermissions("renren:leavemanger:update")*/
    public R update(@RequestBody LeaveMangerEntity leaveManger){
		leaveMangerService.updateById(leaveManger);

        return R.ok();
    }

    /**
     * 删除
     */
    @RequestMapping("/delete")
    /*@RequiresPermissions("renren:leavemanger:delete")*/
    public R delete(@RequestBody Integer[] ids){
		leaveMangerService.removeByIds(Arrays.asList(ids));

        return R.ok();
    }

}

Guess you like

Origin blog.csdn.net/lf21qp/article/details/131691293