基于ssm班级管理系统源码和论文

本文介绍了在21世纪信息化背景下,如何利用HTML、JavaScript和SSM技术开发了一套学生班级管理系统,该系统简化了学生管理和数据分析工作,包括学生信息管理、成绩统计、教师和课程关联等功能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

21新世纪,全世界信息数字电子化的发展趋势无法阻挡。电子计算机存有于社会生活的各行各业,它的广泛运用给经济发展和社会生活产生了深入的改进。信息技术性不但更改了大家的作业和生活习惯,也变化了文化教育和培训的方法。伴随着学校教育的迅猛发展,入学率的普遍提高,各种教育培训公司的持续扩大,对学生班级管理的效果和规范性明确提出了更高的规定。3354学生班级管理做为监管的关键构成部分,涉及到很多的信息和复杂性的数据信息。假如这种信息全是手工整理得话,那么就太繁杂繁琐了。因此做了一个学生班级管理服务平台,系统软件的搜集整理这种数据信息。

由于学生班级管理劳动量大,为了更好地降低学生统计分析的反复和复杂,简单化管理方法,必须开发设计一套合适具体情况,可以处理具体问题的学生班级管理系统软件。立即为管理人员给予学生、班集体等各种信息,给予学生分配、考試准确度、成功率、遍布等监管作用。

这一学生班级管理服务平台是融合HTML和JavaScript开发设计的。在设计过程中,充分保证了系统软件编码优良的易读性、应用性、扩展性和实用性,有利于中后期维护保养,使用方便,网页页面简约。

关键词:学生班级管理平台;JavaScript;SSM;CSS

【636】基于ssm班级管理系统源码和论文代码讲解视频

                                               

ABSTRACT

In the 21st century, the trend of global information electronization is irresistible. Computer exists in every field of social life, and its wide application brings profound improvement to economic and social life. Information technology is not only changing the way people work and live, but also the way they are taught and learned. With the booming development of education, the higher enrollment rate and the continuous expansion of all kinds of education companies, higher requirements have been put forward for the efficiency and standardization of student management. As an important part of management of student achievement management, involved in the amount of information, data, complicated if fully using manual sorts through the data and how complicated and tedious, so I want to be a student achievement management platform and collection of the data systematically.

In view of the workload of student performance management is very large, in order to reduce the repetitive and tedious student performance statistics summary work, simplify the performance management, it is necessary to develop a set of suitable for the actual situation, can solve the actual problem of student performance management system. Provide timely and accurate information of students and classes to administrators, and provide management functions such as sorting out students' scores, test accuracy rate, pass rate and score distribution.

The student score management platform is developed on the basis of HTML and JavaScript. In the design process, the system code is fully guaranteed to be readable, practical, easy to expand, universal, convenient for later maintenance, simple operation and simple page.

Key words: Student score management platform; JavaScript; SSM; CSS

package com.niudada.controller;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.niudada.entity.*;
import com.niudada.service.*;
import com.niudada.utils.MapControl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpSession;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("/section")
public class SectionController {

    private static final String LIST = "section/list";
    private static final String ADD = "section/add";
    private static final String UPDATE = "section/update";

    @Autowired
    private SectionService sectionService;
    @Autowired
    private SubjectService subjectService;
    @Autowired
    private ClazzService clazzService;
    @Autowired
    private TeacherService teacherService;
    @Autowired
    private CourseService courseService;
    @Autowired
    private StudentService studentService;
    @Autowired
    public ScoreService scoreService;

    //跳转添加页面
    @GetMapping("/add")
    public String create(Integer clazzId, ModelMap modelMap) {
        //查询所有的班主任,存储到request域
        List<Teacher> teachers = teacherService.query(null);
        //查询所有的课程,存储到request域
        List<Course> courses = courseService.query(null);
        modelMap.addAttribute("teachers", teachers);
        modelMap.addAttribute("courses", courses);
        modelMap.addAttribute("clazzId", clazzId);
        return ADD;
    }

    //添加操作
    @PostMapping("/create")
    @ResponseBody
    public Map<String, Object> create(@RequestBody Section section) {
        int result = sectionService.create(section);
        if (result <= 0) {
            return MapControl.getInstance().error().getMap();
        }
        return MapControl.getInstance().success().getMap();
    }

    //根据id删除
    @PostMapping("/delete/{id}")
    @ResponseBody
    public Map<String, Object> delete(@PathVariable("id") Integer id) {
        int result = sectionService.delete(id);
        if (result <= 0) {
            return MapControl.getInstance().error().getMap();
        }
        return MapControl.getInstance().success().getMap();
    }

    //批量删除
    @PostMapping("/delete")
    @ResponseBody
    public Map<String, Object> delete(String ids) {
        int result = sectionService.delete(ids);
        if (result <= 0) {
            return MapControl.getInstance().error().getMap();
        }
        return MapControl.getInstance().success().getMap();
    }

    //修改操作
    @PostMapping("/update")
    @ResponseBody
    public Map<String, Object> update(@RequestBody Section section) {
        int result = sectionService.update(section);
        if (result <= 0) {
            return MapControl.getInstance().error().getMap();
        }
        return MapControl.getInstance().success().getMap();
    }

    //根据id查询,跳转修改页面
    @GetMapping("/detail/{id}")
    public String detail(@PathVariable("id") Integer id, ModelMap modelMap) {
        //查询出要修改的班级
        Section section = sectionService.detail(id);
        //查询所有的班主任
        List<Teacher> teachers = teacherService.query(null);
        //查询所有的课程
        List<Course> courses = courseService.query(null);
        modelMap.addAttribute("teachers", teachers);
        modelMap.addAttribute("courses", courses);
        modelMap.addAttribute("section", section);
        return UPDATE;
    }

    //查询所有
    @PostMapping("/query")
    @ResponseBody
    public Map<String, Object> query(@RequestBody Section section) {
        //查询所有的开课信息
        List<Section> list = sectionService.query(section);
        //查询所有的班主任
        List<Teacher> teachers = teacherService.query(null);
        //查询所有的班级
        List<Course> courses = courseService.query(null);
        //设置关联
        list.forEach(entity -> {
            teachers.forEach(teacher -> {
                //判断开课表的teacherId和班主任表的id是否一致
                if (teacher.getId() == entity.getTeacherId()) {
                    entity.setTeacher(teacher);
                }
            });
            courses.forEach(course -> {
                //判断开课表中的courseId和课程表的id是否一致
                if (course.getId() == entity.getCourseId()) {
                    entity.setCourse(course);
                }
            });
        });
        //查询宗记录条数
        Integer count = sectionService.count(section);
        return MapControl.getInstance().success().page(list, count).getMap();
    }

    //跳转列表页面
    @GetMapping("/list")
    public String list() {
        return LIST;
    }

    //生成zTree树形
    @PostMapping("/tree")
    @ResponseBody
    public List<Map> tree() {
        List<Subject> subjects = subjectService.query(null);
        List<Clazz> clazzes = clazzService.query(null);
        List<Map> list = new ArrayList<>();
        subjects.forEach(subject -> {
            Map<String, Object> map = new HashMap<>();
            map.put("id", subject.getId());
            map.put("name", subject.getSubjectName());
            map.put("parentId", 0);
            List<Map<String, Object>> childrenList = new ArrayList<>();
            clazzes.forEach(clazz -> {
                if (subject.getId() == clazz.getSubjectId()) {
                    Map<String, Object> children = new HashMap<>();
                    children.put("id", clazz.getId());
                    children.put("name", clazz.getClazzName());
                    children.put("parentId", subject.getId());
                    childrenList.add(children);
                }
            });
            map.put("children", childrenList);
            list.add(map);
        });
        ObjectMapper objectMapper = new ObjectMapper();
        try {
            String jsonString = objectMapper.writeValueAsString(list);
        } catch (JsonProcessingException e) {
            e.printStackTrace();
        }
        return list;
    }

    //跳转开课信息列表页面
    @GetMapping("/student_section")
    public String student_section() {
        return "section/student_section";
    }

    @PostMapping("/query_student_section")
    @ResponseBody
    public Map<String, Object> student_section(HttpSession session) {
        Student student = (Student) session.getAttribute("user");
        List<Section> sections = sectionService.queryByStudent(student.getId());
        List<Clazz> clazzes = clazzService.query(null);
        List<Teacher> teachers = teacherService.query(null);
        List<Course> courses = courseService.query(null);

        sections.forEach(section -> {
            clazzes.forEach(clazz -> {
                if (section.getClazzId() == clazz.getId()) {
                    section.setClazz(clazz);
                }
            });
            teachers.forEach(teacher -> {
                if (section.getTeacherId() == teacher.getId()) {
                    section.setTeacher(teacher);
                }
            });
            courses.forEach(course -> {
                if (section.getCourseId() == course.getId()) {
                    section.setCourse(course);
                }
            });



            Score score =scoreService.queryMystu(section.getId(),student.getId());
            if(score==null){
                score = new Score();
                score.setStuId(student.getId());
                score.setSectionId(section.getId());
                score.setCourseId(section.getCourseId());
                scoreService.insert(score);
            }

        });







        return MapControl.getInstance().success().add("data", sections).getMap();
    }

    @GetMapping("/teacher_section")
    public String teacher_section() {
        return "section/teacher_section";
    }

    @PostMapping("/query_teacher_section")
    @ResponseBody
    public Map<String, Object> query_teacher_section(HttpSession session) {
        //获取登录班主任的信息
        Teacher teacher = (Teacher) session.getAttribute("user");
        Section param = new Section();
        param.setTeacherId(teacher.getId());
        List<Section> sections = sectionService.query(param);
        List<Clazz> clazzes = clazzService.query(null);
        List<Course> courses = courseService.query(null);

        sections.forEach(section -> {

            clazzes.forEach(clazz -> {
                if (section.getClazzId() == clazz.getId().intValue()) {
                    section.setClazz(clazz);
                }
            });
            courses.forEach(course -> {
                if (section.getCourseId() == course.getId().intValue()) {
                    section.setCourse(course);
                }
            });

        });
        return MapControl.getInstance().success().add("data", sections).getMap();
    }

    @GetMapping("/teacher_student_score")
    public String teacher_student_score(Integer courseId, Integer sectionId, ModelMap modelMap) {
        List<HashMap> list = studentService.querySelectStudent(courseId, sectionId);
        modelMap.put("list", list);
        modelMap.put("sectionId", sectionId);
        modelMap.put("courseId", courseId);
        return "section/teacher_student_score";
    }

    @PostMapping("/teacher_student_score")
    @ResponseBody
    public Map<String, Object> teacher_student_score(Integer courseId, Integer sectionId, String stuIds, String scores) {

        int result = scoreService.update(courseId, sectionId, stuIds, scores);
        if (result <= 0) {
            return MapControl.getInstance().error().getMap();
        }
        return MapControl.getInstance().success().getMap();
    }
}

 

package com.niudada.controller;

import com.niudada.entity.Clazz;
import com.niudada.entity.Subject;
import com.niudada.service.ClazzService;
import com.niudada.service.SubjectService;
import com.niudada.utils.MapControl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("clazz")
public class ClazzController {

    private static final String LIST = "clazz/list";
    private static final String ADD = "clazz/add";
    private static final String UPDATE = "clazz/update";

    @Autowired
    private ClazzService clazzService;
    @Autowired
    private SubjectService subjectService;

    //跳转添加页面
    @GetMapping("/add")
    public String create(ModelMap modelMap) {
        //查询所有的专业,存储到request域
        List<Subject> subjects = subjectService.query(null);
        modelMap.addAttribute("subjects", subjects);
        return ADD;
    }

    //添加操作
    @PostMapping("/create")
    @ResponseBody
    public Map<String, Object> create(@RequestBody Clazz clazz) {
        int result = clazzService.create(clazz);
        if (result <= 0) {
            return MapControl.getInstance().error().getMap();
        }
        return MapControl.getInstance().success().getMap();
    }

    //根据id删除
    @PostMapping("/delete/{id}")
    @ResponseBody
    public Map<String, Object> delete(@PathVariable("id") Integer id) {
        int result = clazzService.delete(id);
        if (result <= 0) {
            return MapControl.getInstance().error().getMap();
        }
        return MapControl.getInstance().success().getMap();
    }

    //批量删除
    @PostMapping("/delete")
    @ResponseBody
    public Map<String, Object> delete(String ids) {
        int result = clazzService.delete(ids);
        if (result <= 0) {
            return MapControl.getInstance().error().getMap();
        }
        return MapControl.getInstance().success().getMap();
    }

    //修改
    @PostMapping("/update")
    @ResponseBody
    public Map<String, Object> update(@RequestBody Clazz clazz) {
        int result = clazzService.update(clazz);
        if (result <= 0) {
            return MapControl.getInstance().error().getMap();
        }
        return MapControl.getInstance().success().getMap();
    }

    //根据id查询,跳转修改页面
    @GetMapping("/detail/{id}")
    public String detail(@PathVariable("id") Integer id, ModelMap modelMap) {
        //查询所有的专业
        List<Subject> subjects = subjectService.query(null);
        //查询出要修改的班级的信息
        Clazz clazz = clazzService.detail(id);
        //将查询出来的数据存储到request域,实现表单回显
        modelMap.addAttribute("clazz", clazz);
        modelMap.addAttribute("subjects", subjects);
        return UPDATE;
    }

    //查询所有
    @PostMapping("/query")
    @ResponseBody
    public Map<String, Object> query(@RequestBody Clazz clazz) {
        //查询所有的班级
        List<Clazz> list = clazzService.query(clazz);
        //查询所有的专业
        List<Subject> subjects = subjectService.query(null);
        //设置关联
        list.forEach(entity -> {
            subjects.forEach(subject -> {
                //判断班级表中subjectId与专业表的id是否一致
                if (entity.getSubjectId() == subject.getId()) {
                    entity.setSubject(subject);
                }
            });
        });
        //查询班级总数
        Integer count = clazzService.count(clazz);
        return MapControl.getInstance().success().page(list, count).getMap();
    }

    //跳转列表页面
    @GetMapping("/list")
    public String list() {
        return LIST;
    }

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

程序猿毕业分享网

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值