基于java(springboot)大学生体质测试管理系统

基于java(springboot)大学生体质测试管理系统
大学生体质测试管理是基于java编程语言,mysql数据库,springboot框架,idea开发工具进行开发,本系统分为学生,管理员,教师三个角色,学生注册登陆系统,查看体测项目,在线留言,查看体测报告和成绩。教师可以管理体测信息,学生体测报告,体测项目。管理员对学生管理,教师管理,体测项目,体测成绩,体测报告,留言信息等进行管理。本系统功能齐全,适合作为java毕业设计和java课程设计参考学习。

一.技术环境

jdk版本:1.8 及以上
ide工具:IDEA
数据库: mysql5.7 (必须5.7)
编程语言: Java
tomcat: 8.0 及以上
java框架:SpringBoot
maven: 3.6.1
前端:layui,vue
详细技术:HTML+CSS+JS+JAVA+Springboot+MYSQL+JQUERY+MAVEN+VUE

二.系统功能

基于java(springboot)大学生体质测试管理系统
系统分为学生和管理员,教师三个角色
学生的主要功能有:
1.学生注册和登陆系统
2.查看系统的公告资讯信息
3.学生查看体质测试的项目,下载测试文件
4.学生留言板在线留言
5.学生个人中心修改个人资料,修改密码
6.学生个人中心查询我的体质测试项目
7.学生查看我的测试报告
8.学生查看我的测试成绩
9.退出登陆
管理员的主要功能有:
1.管理员输入账户登陆后台
2.个人中心:管理员修改密码和账户信息
3.学生管理:对注册的学生信息进行删除,查询
4.教师管理:对教师信息进行添加,修改,删除,查询
5.体质测试管理:对学生的体质测试信息进行查询,删除,修改6.测试报告信息:对学生的测试报表进行修改,查询,审核7.测试成绩管理:对学生的测试成绩进行修改,删除,查询8.留言板管理:对学生的在线留言信息进行查询,删除,修改,回复9.通知公告:对系统的通知公告进行添加,修改,查询,删除10.轮播图管理:对网站轮播图进行添加,修改,查询,删除

三.代码示例

package com.lmu.controller;
/**
 * 和登陆有关的都在这里
 */

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.lmu.model.Role;
import com.lmu.model.User;
import com.lmu.service.RoleService;
import com.lmu.service.UserService;
import com.lmu.utils.JsonUtils;
import com.lmu.utils.UserUtils;

import org.apache.commons.collections.map.HashedMap;
import org.apache.struts2.ServletActionContext;
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("loginController")
@Scope("prototype")
public class LoginController 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");
		ServletActionContext.getRequest().getSession().invalidate();
		return "login";
	}

}




package com.lmu.controller;

/**
 * 用户新增
 */

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;
import com.lmu.model.Role;
import com.lmu.model.User;
import com.lmu.service.RoleService;
import com.lmu.service.UserService;
import com.lmu.utils.JsonUtils;
import com.lmu.utils.Pager;
import com.lmu.utils.UserUtils;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import java.awt.event.FocusEvent;
import java.io.IOException;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

@Controller("userController")
@Scope("prototype")
public class UserController extends ActionSupport implements ModelDriven<User> {
    @Autowired
    private UserService userService;
    @Autowired
    private RoleService roleService;
    private User user;
    private Integer userId;
    private Map<String, Object> map = new HashMap();


    /**
     * list
     *
     * @return
     */
    public String list() throws IOException {
        User user1 = UserUtils.getUser();
        if (user1 == null || user1.getId() == null){
            ActionContext.getContext().put("login", 1);
            return SUCCESS;
        }
        Pager<User> pagers = null;
        Role role = user1.getRole();
        if (role.getEnName().equals("admin")) {
            pagers = userService.getList(user);
            ActionContext.getContext().put("pagers", pagers);
            ActionContext.getContext().put("user", user1);
            ActionContext.getContext().put("role", role);
            ActionContext.getContext().put("bean", user);
            return SUCCESS;
        } else if (role.getEnName().equals("xs") || role.getEnName().equals("js")) {
            pagers = userService.getList(user1);
            ActionContext.getContext().put("pagers", pagers);
            ActionContext.getContext().put("bean", user);
            return SUCCESS;
        }
        return null;
    }



    /**
     * 跳转add
     *
     * @return
     */
    public String add() {
        Pager<Role> pagers = roleService.pagers();
        ActionContext.getContext().put("pagers", pagers);
        return SUCCESS;
    }

    /**
     * 查询修改
     *
     * @return
     */
    public String edit() {
        User bean = userService.findById(userId);
        Pager<Role> pagers = roleService.pagers();
        ActionContext.getContext().put("bean", bean);
        ActionContext.getContext().put("pagers", pagers);
        return SUCCESS;
    }


    /**
     * 审核
     *
     * @return
     */
    public void updateSh() throws IOException {
        user.setIsSh(1);
        userService.updates(user);
        map.put("flag", true);
        map.put("url", "user_list.do");
        JsonUtils.toJson(map);
    }

    /**
     * 更新
     *
     * @return
     */
    public String update() throws IOException {
        if (user.getPass().equals("")){
            user.setPass(null);
        }
        userService.updates(user);
        map.put("flag", true);
        map.put("url", "user_list.do");
        JsonUtils.toJson(map);
        return SUCCESS;
    }

    /**
     * 保存
     *
     * @return
     */
    public void save() throws IOException {
        if (userService.getUser(user) != null){
            map.put("flag", false);
            map.put("url", "login_login.do");
            JsonUtils.toJson(map);
        } else {
            user.setTime(new Date());
            userService.save(user);
            map.put("flag", true);
            map.put("url", "login_login.do");
            JsonUtils.toJson(map);
        }
    }

    public void delete() throws IOException {
        User user1 = userService.findById(userId);
        user1.setIsDelete(1);
        userService.update(user1);
        map.put("flag", true);
        map.put("url", "user_list.do");
        JsonUtils.toJson(map);
    }

    @Override
    public User getModel() {
        if (user == null) {
            user = new User();
        }
        return user;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public User getUser() {
        return user;
    }

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


四.功能截图

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

  • 3
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
基于Spring Boot的学生体质测试管理系统是一个基于Web端的应用程序,用于方便学校或其他教育机构对学生进行体质测试和管理。 系统包括学生端和教师端两大模块,学生可以通过登录个人账号进行体质测试,记录自己的体测数据和成绩,并通过系统查看个人体测报告。教师端可以管理学生信息,安排体测任务,并查看学生的体测数据和报告。 系统的设计与开发过程包括以下几个主要步骤: 1. 需求分析:首先明确系统的功能和需求,包括学生信息管理、体测任务安排、数据录入和查询等功能。 2. 数据库设计:设计数据库表结构,包括学生信息表、体测任务表、体测数据表等,确保数据存储的规范性和完整性。 3. 系统架构设计:选择Spring Boot作为开发框架,使用MVC架构进行系统模块划分,确保系统的可维护性和扩展性。 4. 前端开发:使用HTML、CSS、JavaScript等技术进行前端页面设计和开发,实现用户友好的界面和交互体验。 5. 后端开发:使用Java语言和Spring Boot框架进行后端业务逻辑的开发,包括用户认证、数据存取等功能的实现。 6. 测试与部署:对系统进行单元测试和集成测试,确保系统的稳定性和安全性,然后将系统部署到服务器上,使其对外提供服务。 通过以上设计与开发,基于Spring Boot的学生体质测试管理系统可以方便学校对学生的体测数据进行管理和统计,提高学校体育工作的效率和质量。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值