Computer Graduation Project - SSH Laboratory Equipment Management Information System

Background of the project

In today's era, the information age is developing very rapidly. The rapid development of school education and teaching is inseparable from information processing. This is the environment where computers are widely used in information management systems. The greatest benefit of computers is that they can be used for information management. Using computers for information control not only improves work efficiency, but also greatly improves its security. Therefore, it is very necessary to develop a laboratory equipment management system and use the fast data processing and management capabilities of computers to conduct unified information management of all laboratory equipment in the school. Through analysis, the development of this system is mainly for laboratory equipment management, mainly using JAVA for code implementation and Mysql for database design.

feature design

Function module diagram

Insert image description here

Introduction to role module permissions
super administrator

Notification module:
This module is where the experiment administrator issues notifications and announcements, including new notifications and deletion notifications.
Reservation and borrowing modules:
These are two modules, and their design ideas are roughly the same. The borrowing record management module mainly records the borrowed equipment and instruments. It includes the borrower, borrowing time, return time and review. Borrowing equipment requires the approval of the administrator. The device can be loaned only after the administrator has approved it. Otherwise, it cannot be loaned. The laboratory appointment record management module is for teachers. After the teacher logs in to the system, he can query and reserve the laboratory information in the laboratory reservation module, and then use the laboratory through confirmation by the administrator. When the laboratory has been reserved, the equipment in the laboratory becomes It is not available for borrowing.
(1) View the current laboratory reservations and equipment borrowing, and review them. After passing the review, the status of the equipment and laboratory will change to the loaned status
(2) After the equipment and laboratory are used, return them and confirm the return. Equipment and experiments become available for loan.
Laboratory module:
The main content of this module includes two parts, namely laboratory addition and laboratory information management. Laboratory information management describes the situation of the laboratory and displays on the interface whether the laboratory is reserved or used. Convenient for teacher users to make laboratory reservations
(1) Display all current laboratories and the status of the experiments
(2) Add, delete, and modify laboratory information Includes: laboratory name, person in charge, specific location, laboratory description
Equipment information module
This module is for administrators and includes five parts: Technical parameter management , operation data management, equipment location management, equipment usage management and electronic document management.
Technical parameter management, view, add, modify and delete the technical parameters of newly purchased equipment in the laboratory. Equipment technical parameters include equipment model, equipment price, equipment manufacturer, and equipment serial number.
Operation data management, add, delete, check, and other operations on the operation data of newly purchased equipment in the laboratory. The operation data of the equipment specifically includes service start time, supplier contract (the contract is doc file, not displayed when the data is exported to excel)
Equipment location management, add, modify and delete the location data of newly purchased equipment in the laboratory. Location (name of laboratory)
Equipment usage management, managing the usage data of experimental equipment. When using equipment, you can know whether the equipment is what you need by simply reading the equipment usage description. device of. (Equivalent to adding a note one by one)
Electronic document management. In this module, you can add, modify, delete, and view electronic documents of the equipment. The specific content includes equipment drawings, installation instructions, equipment Related pictures, etc. Electronic document (format is doc file, same as supplier contract)
User module:
User registration review function, function to modify student and teacher information, user Delete function, user search function.
Users register on the login interface and fill in the information required by the system. The information is displayed in this module. The administrator checks the user's information. If it meets the requirements, the review is passed, and the user can log in to the system to operate. Otherwise, user registration fails and cannot log in to the system to operate. After the student graduates or the teacher leaves the school, the user can be deleted through this module.
Equipment maintenance module:
In this module, the equipment can be registered for maintenance based on the equipment information that has been added to the system
(1) The equipment status changes to maintenance status and the borrowing operation cannot be performed
(2) The equipment that has been repaired can be borrowed after restoration
Equipment data statistics module :
In this module, it supports the statistical function of device data, can generate corresponding reports based on the data, and supports the output and printing of data. Specifically:
The data in the web page directly generates an EXCL table.
Data includes:
Equipment data, maintenance data, equipment loan data

Function screenshot

Insert image description here
Insert image description here
Insert image description here
Insert image description here

Insert image description here

Related code

Database configuration

jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.url = jdbc:mysql://localhost:3306/laboratory?useUnicode=true&characterEncoding=utf-8
jdbc.username = root
jdbc.password = 123456
jdbc.database=cms

### direct log messages to stdout ###
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{
    
    ABSOLUTE} %5p %c{
    
    1}:%L - %m%n

### direct messages to file hibernate.log ###
#log4j.appender.file=org.apache.log4j.FileAppender
#log4j.appender.file.File=hibernate.log
#log4j.appender.file.layout=org.apache.log4j.PatternLayout
#log4j.appender.file.layout.ConversionPattern=%d{
    
    ABSOLUTE} %5p %c{
    
    1}:%L - %m%n

### set log levels - for more verbose logging change 'info' to 'debug' ###

log4j.rootLogger=error, stdout

#log4j.logger.org.hibernate=info
#log4j.logger.org.hibernate=debug

### log HQL query parser activity
#log4j.logger.org.hibernate.hql.ast.AST=debug

### log just the SQL
log4j.logger.org.hibernate.SQL=error

### log JDBC bind parameters ###
#log4j.logger.org.hibernate.type=info
#log4j.logger.org.hibernate.type=debug

### log schema export/update ###
#log4j.logger.org.hibernate.tool.hbm2ddl=debug

### log HQL parse trees
#log4j.logger.org.hibernate.hql=debug

### log cache activity ###
#log4j.logger.org.hibernate.cache=debug

### log transaction activity
#log4j.logger.org.hibernate.transaction=debug

### log JDBC resource acquisition
#log4j.logger.org.hibernate.jdbc=debug

### enable the following line if you want to track down connection ###
### leakages when using DriverManagerConnectionProvider ###
#log4j.logger.org.hibernate.connection.DriverManagerConnectionProvider=trace

Control layer (Action)

package com.xznu.edu.leave.action;
/**
 * 和登陆有关的都在这里
 */

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.xznu.edu.leave.model.Role;
import com.xznu.edu.leave.model.User;
import com.xznu.edu.leave.service.RoleService;
import com.xznu.edu.leave.service.UserService;
import com.xznu.edu.leave.utils.JsonUtils;
import com.xznu.edu.leave.utils.UserUtils;
import org.apache.commons.collections.map.HashedMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

@Controller("loginAction")
@Scope("prototype")
public class LoginAction extends ActionSupport {
    
    
    @Autowired
    private UserService userService;
    @Autowired
    private RoleService roleService;
    private User user;
    private Map<String, Object> map = new HashMap();
    public User getUser() {
    
    
        return user;
    }

    public void setUser(User user) {
    
    
        this.user = user;
    }

    public UserService getUserService() {
    
    
        return userService;
    }

    public void setUserService(UserService userService) {
    
    
        this.userService = userService;
    }

    /**
 * 用户登陆
 * @return
 */
	public void index() throws IOException {
    
    
       User user1 = userService.getUser(user);
        if (user1 != null){
    
    
            if (user1.getIsSh() == 1){
    
    
                if (user1.getRole().getEnName().equals("admin")){
    
    
                    ActionContext.getContext().getSession().put("user", user1);
                }
                if (user1.getRole().getEnName().equals("js")){
    
    
                    ActionContext.getContext().getSession().put("user1", user1);
                }
                if (user1.getRole().getEnName().equals("xs")){
    
    
                    ActionContext.getContext().getSession().put("user2", user1);
                }
                map.put("flag", 1);
                map.put("url", "login_indexs.do");
                map.put("id", user1.getId());
                JsonUtils.toJson(map);
            } else {
    
    
                map.put("flag", 2);
                JsonUtils.toJson(map);
            }
        } else {
    
    
            map.put("flag", 3);
            JsonUtils.toJson(map);
        }
    }

    public String indexs() throws IOException {
    
    
        User u = UserUtils.getUser();
        if (u != null){
    
    
            ActionContext.getContext().put("user", u);
            String ss = u.getRole().getEnName();
            ActionContext.getContext().put("role", u.getRole().getEnName());
        }
        return SUCCESS;
    }
	//登陆页面
	public String login() {
    
    

        return SUCCESS;
	}

   //退出
	public String tuichu() {
    
    
		ActionContext ac = ActionContext.getContext();
		Map session = ac.getSession();
		session.remove("userName");
		session.remove("userId");
		return "login";
	}

}
Business layer (Service)

package com.xznu.edu.leave.service;

import com.xznu.edu.leave.model.User;
import com.xznu.edu.leave.utils.Pager;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;

import java.util.List;

public interface UserService extends BaseService<User> {
    
    

    User getUser(User user);

    Pager<User> getList(User user);

    List<User> getListAdmin();

    User findById(Integer id);
}
Control layer (Dao)



    package com.xznu.edu.leave.dao;
    
    import com.xznu.edu.leave.base.dao.BaseDao;
    import com.xznu.edu.leave.model.User;
    import com.xznu.edu.leave.utils.Pager;
    
    import java.util.List;
    
    public interface UserDao extends BaseDao<User> {
    
    
    
        User getUser(User user);
    
        Pager<User> getList(User user);
    
        User findById(Integer id);
    
        List<User> getListAdmin();


    }

Project acquisition:

Guess you like

Origin blog.csdn.net/WEB_DC/article/details/134988739