使用SSM+JSP实现一个教务管理系统
最近为客户开发了一套学校用教务管理系统,主要实现学生、课程、老师、选课等相关的信息化管理功能,今天拿出来给大家介绍一下:
系统编号:BS-GX-020
后台技术:Spring+Springmvvc+mybatis+shiro
前端技术:Bootstrap+jquery+ajax
页面开发:JSP
开发工具:IDEA 或 Eclipse
数据库:mysql5
应用服务器:tomcat8
JAVA版本:jdk1.8
说明:本系统基于SSM框架开发而成,系统功能完整,界面简洁大方,运行无误,适合做毕业设计使用。
系统分三个角色:
1,管理员角色:可以管理课程,管理教师,管理学生,个人信息管理等
2,教师角色:可以管理选课成绩,对选修本人的课程进行打分,个人信息管理等
3,学生角色:可以进行选课,退课,查看选课信息,选课成绩,个人信息管理等
系统功能演示如下:
管理员登陆:
课程管理:
添加课程:分配老师
学生管理:
老师管理:
重置其它账户密码:
密码修改:
教师登陆:
为选课的学生打分
学生登陆:
己选课程:显示己选未结课(未打分)
己修课程:显示己选并结课(己打分)
以上是基于SSM教务管理系统的部分功能展示,本项目比较适合JAVA语言方面 的毕业设计系统使用。
部分项目实现代码:
package com.system.service.impl;
import com.system.mapper.CollegeMapper;
import com.system.po.College;
import com.system.po.CollegeExample;
import com.system.service.CollegeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;import java.util.List;
/**
* 院系管理
*/
@Service
public class CollegeServiceImpl implements CollegeService {@Autowired
private CollegeMapper collegeMapper;//查询所有院系
public List<College> finAll() throws Exception {
CollegeExample collegeExample = new CollegeExample();
CollegeExample.Criteria criteria = collegeExample.createCriteria();criteria.andCollegeidIsNotNull();
return collegeMapper.selectByExample(collegeExample);
}//添加院系
public void addCollege(College college) {
collegeMapper.insert(college);
}//查询单个院系
public College findCollegeById(Integer id){
return collegeMapper.selectByPrimaryKey(id);
}
//更新院系
public void updateCollege(College college) {
collegeMapper.updateByPrimaryKey(college);
}
}
package com.system.service.impl;
import com.system.mapper.CollegeMapper;
import com.system.mapper.CourseMapper;
import com.system.mapper.CourseMapperCustom;
import com.system.mapper.SelectedcourseMapper;
import com.system.po.*;
import com.system.service.CourseService;
import org.apache.commons.beanutils.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;import java.util.ArrayList;
import java.util.List;/**
课程管理业务实现
*/
@Service
public class CourseServiceImpl implements CourseService {@Autowired
private CourseMapper courseMapper;@Autowired
private CourseMapperCustom courseMapperCustom;@Autowired
private CollegeMapper collegeMapper;@Autowired
private SelectedcourseMapper selectedcourseMapper;public void upadteById(Integer id, CourseCustom courseCustom) throws Exception {
courseMapper.updateByPrimaryKey(courseCustom);
}public Boolean removeById(Integer id) throws Exception {
//自定义查询条件
SelectedcourseExample example = new SelectedcourseExample();
SelectedcourseExample.Criteria criteria = example.createCriteria();
criteria.andCourseidEqualTo(id);
List<Selectedcourse> list = selectedcourseMapper.selectByExample(example);if (list.size() == 0) {
courseMapper.deleteByPrimaryKey(id);
return true;
}return false;
}public List<CourseCustom> findByPaging(Integer toPageNo) throws Exception {
PagingVO pagingVO = new PagingVO();
pagingVO.setToPageNo(toPageNo);List<CourseCustom> list = courseMapperCustom.findByPaging(pagingVO);
return list;
}public Boolean save(CourseCustom couseCustom) throws Exception {
Course course = courseMapper.selectByPrimaryKey(couseCustom.getCourseid());
if (course == null) {
courseMapper.insert(couseCustom);
return true;
}
return false;
}public int getCountCouse() throws Exception {
//自定义查询对象
CourseExample courseExample = new CourseExample();
//通过criteria构造查询条件
CourseExample.Criteria criteria = courseExample.createCriteria();
criteria.andCoursenameIsNotNull();return courseMapper.countByExample(courseExample);
}public CourseCustom findById(Integer id) throws Exception {
Course course = courseMapper.selectByPrimaryKey(id);
CourseCustom courseCustom = null;
if (course != null) {
courseCustom = new CourseCustom();
BeanUtils.copyProperties(courseCustom, course);
}return courseCustom;
}public List<CourseCustom> findByName(String name) throws Exception {
CourseExample courseExample = new CourseExample();
//自定义查询条件
CourseExample.Criteria criteria = courseExample.createCriteria();criteria.andCoursenameLike("%" + name + "%");
List<Course> list = courseMapper.selectByExample(courseExample);
List<CourseCustom> courseCustomList = null;
if (list != null) {
courseCustomList = new ArrayList<CourseCustom>();
for (Course c : list) {
CourseCustom courseCustom = new CourseCustom();
//类拷贝
org.springframework.beans.BeanUtils.copyProperties(c, courseCustom);
//获取课程名
College college = collegeMapper.selectByPrimaryKey(c.getCollegeid());
courseCustom.setcollegeName(college.getCollegename());courseCustomList.add(courseCustom);
}
}return courseCustomList;
}public List<CourseCustom> findByTeacherID(Integer id) throws Exception {
CourseExample courseExample = new CourseExample();
//自定义查询条件
CourseExample.Criteria criteria = courseExample.createCriteria();
//根据教师id查课程
criteria.andTeacheridEqualTo(id);List<Course> list = courseMapper.selectByExample(courseExample);
List<CourseCustom> courseCustomList = null;if (list.size() > 0) {
courseCustomList = new ArrayList<CourseCustom>();
for (Course c : list) {
CourseCustom courseCustom = new CourseCustom();
//类拷贝
BeanUtils.copyProperties(courseCustom, c);
//获取课程名
College college = collegeMapper.selectByPrimaryKey(c.getCollegeid());
courseCustom.setcollegeName(college.getCollegename());courseCustomList.add(courseCustom);
}
}return courseCustomList;
}
}
package com.system.service.impl;
import com.system.mapper.CollegeMapper;
import com.system.mapper.StudentMapper;
import com.system.mapper.StudentMapperCustom;
import com.system.po.*;
import com.system.service.StudentService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;import java.util.ArrayList;
import java.util.List;/**
学生管理业务实现
*/
@Service
public class StudentServiceImpl implements StudentService {//使用spring 自动注入
@Autowired
private StudentMapperCustom studentMapperCustom;@Autowired
private StudentMapper studentMapper;@Autowired
private CollegeMapper collegeMapper;public void updataById(Integer id, StudentCustom studentCustom) throws Exception {
studentMapper.updateByPrimaryKey(studentCustom);
}public void removeById(Integer id) throws Exception {
studentMapper.deleteByPrimaryKey(id);
}public List<StudentCustom> findByPaging(Integer toPageNo) throws Exception {
PagingVO pagingVO = new PagingVO();
pagingVO.setToPageNo(toPageNo);List<StudentCustom> list = studentMapperCustom.findByPaging(pagingVO);
return list;
}public Boolean save(StudentCustom studentCustoms) throws Exception {
Student stu = studentMapper.selectByPrimaryKey(studentCustoms.getUserid());
if (stu == null) {
studentMapper.insert(studentCustoms);
return true;
}return false;
}//返回学生总数
public int getCountStudent() throws Exception {
//自定义查询对象
StudentExample studentExample = new StudentExample();
//通过criteria构造查询条件
StudentExample.Criteria criteria = studentExample.createCriteria();
criteria.andUseridIsNotNull();return studentMapper.countByExample(studentExample);
}public StudentCustom findById(Integer id) throws Exception {
Student student = studentMapper.selectByPrimaryKey(id);
StudentCustom studentCustom = null;
if (student != null) {
studentCustom = new StudentCustom();
//类拷贝
BeanUtils.copyProperties(student, studentCustom);
}return studentCustom;
}//模糊查询
public List<StudentCustom> findByName(String name) throws Exception {StudentExample studentExample = new StudentExample();
//自定义查询条件
StudentExample.Criteria criteria = studentExample.createCriteria();criteria.andUsernameLike("%" + name + "%");
List<Student> list = studentMapper.selectByExample(studentExample);
List<StudentCustom> studentCustomList = null;
if (list != null) {
studentCustomList = new ArrayList<StudentCustom>();
for (Student s : list) {
StudentCustom studentCustom = new StudentCustom();
//类拷贝
BeanUtils.copyProperties(s, studentCustom);
//获取课程名
College college = collegeMapper.selectByPrimaryKey(s.getCollegeid());
studentCustom.setcollegeName(college.getCollegename());studentCustomList.add(studentCustom);
}
}return studentCustomList;
}public StudentCustom findStudentAndSelectCourseListByName(String name) throws Exception {
StudentCustom studentCustom = studentMapperCustom.findStudentAndSelectCourseListById(Integer.parseInt(name));
List<SelectedCourseCustom> list = studentCustom.getSelectedCourseList();
// 判断该课程是否修完
for (SelectedCourseCustom s : list) {
if (s.getMark() != null) {
s.setOver(true);
}
}
return studentCustom;
}
}
package com.system.service.impl;
import com.system.exception.CustomException;
import com.system.mapper.CollegeMapper;
import com.system.mapper.CourseMapper;
import com.system.mapper.TeacherMapper;
import com.system.mapper.TeacherMapperCustom;
import com.system.po.*;
import com.system.service.TeacherService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;import java.util.ArrayList;
import java.util.List;/**
教师管理业务实现
*/
@Service
public class TeacherServiceImpl implements TeacherService {@Autowired
private TeacherMapper teacherMapper;@Autowired
private TeacherMapperCustom teacherMapperCustom;@Autowired
private CollegeMapper collegeMapper;@Autowired
private CourseMapper courseMapper;public void updateById(Integer id, TeacherCustom teacherCustom) throws Exception {
teacherMapper.updateByPrimaryKey(teacherCustom);
}public void removeById(Integer id) throws Exception {
CourseExample courseExample = new CourseExample();CourseExample.Criteria criteria = courseExample.createCriteria();
criteria.andTeacheridEqualTo(id);
List<Course> list = courseMapper.selectByExample(courseExample);if (list.size() != 0) {
throw new CustomException("请先删除该名老师所教授的课程");
}teacherMapper.deleteByPrimaryKey(id);
}public List<TeacherCustom> findByPaging(Integer toPageNo) throws Exception {
PagingVO pagingVO = new PagingVO();
pagingVO.setToPageNo(toPageNo);List<TeacherCustom> list = teacherMapperCustom.findByPaging(pagingVO);
return list;
}public Boolean save(TeacherCustom teacherCustom) throws Exception {
Teacher tea = teacherMapper.selectByPrimaryKey(teacherCustom.getUserid());
if (tea == null) {
teacherMapper.insert(teacherCustom);
return true;
}
return false;
}public int getCountTeacher() throws Exception {
//自定义查询对象
TeacherExample teacherExample = new TeacherExample();
//通过criteria构造查询条件
TeacherExample.Criteria criteria = teacherExample.createCriteria();
criteria.andUseridIsNotNull();return teacherMapper.countByExample(teacherExample);
}public TeacherCustom findById(Integer id) throws Exception {
Teacher teacher = teacherMapper.selectByPrimaryKey(id);
TeacherCustom teacherCustom = null;
if (teacher != null) {
teacherCustom = new TeacherCustom();
BeanUtils.copyProperties(teacher, teacherCustom);
}return teacherCustom;
}public List<TeacherCustom> findByName(String name) throws Exception {
TeacherExample teacherExample = new TeacherExample();
//自定义查询条件
TeacherExample.Criteria criteria = teacherExample.createCriteria();criteria.andUsernameLike("%" + name + "%");
List<Teacher> list = teacherMapper.selectByExample(teacherExample);
List<TeacherCustom> teacherCustomList = null;
if (list != null) {
teacherCustomList = new ArrayList<TeacherCustom>();
for (Teacher t : list) {
TeacherCustom teacherCustom = new TeacherCustom();
//类拷贝
BeanUtils.copyProperties(t, teacherCustom);
//获取课程名
College college = collegeMapper.selectByPrimaryKey(t.getCollegeid());
teacherCustom.setcollegeName(college.getCollegename());teacherCustomList.add(teacherCustom);
}
}return teacherCustomList;
}public List<TeacherCustom> findAll() throws Exception {
TeacherExample teacherExample = new TeacherExample();
TeacherExample.Criteria criteria = teacherExample.createCriteria();criteria.andUsernameIsNotNull();
List<Teacher> list = teacherMapper.selectByExample(teacherExample);
List<TeacherCustom> teacherCustomsList = null;
if (list != null) {
teacherCustomsList = new ArrayList<TeacherCustom>();
for (Teacher t: list) {
TeacherCustom teacherCustom = new TeacherCustom();
BeanUtils.copyProperties(t, teacherCustom);
teacherCustomsList.add(teacherCustom);
}
}
return teacherCustomsList;
}
}
使用SSM+JSP实现一个教务管理系统相关推荐
- (fym)ssm基于web的教务管理系统 毕业设计261620
ssm 教务管理系统 摘 要 随着互联网趋势的到来,各行各业都在考虑利用互联网将自己推广出去,最好方式就是建立自己的互联网系统,并对其进行维护和管理.在现实运用中,应用软件的工作规则和开发步骤,采用J ...
- 手把手教你使用SSM框架实现一个学生管理系统第二章之创建一个web工程及相关配置文件的介绍
SSM框架的基本介绍 文字概述: SSM:spring+springMVC+mybaits Spring:是一个容器,就是一个bean(实体对象)大集合. SpringMVC:控制器(业务逻辑层)(视 ...
- ssm+JSP计算机毕业设计果园管理系统2wbg5【源码、程序、数据库、部署】
项目运行 项目含有源码.文档.程序.数据库.配套开发软件.软件安装教程 环境配置: Jdk1.8 + Tomcat7.0 + Mysql + HBuilderX(Webstorm也行)+ Eclisp ...
- ssm+jsp计算机毕业设计养老院管理系统g72ka(程序+lw+源码+远程部署)
项目运行 项目含有源码(见文末).文档.程序.数据库.配套开发软件.软件安装教程 环境配置: Jdk1.8 + Tomcat7.0 + Mysql + HBuilderX(Webstorm也行)+ E ...
- ssm+JSP计算机毕业设计作业管理系统ctoc8【源码、程序、数据库、部署】
项目运行 项目含有源码(见文末).文档.程序.数据库.配套开发软件.软件安装教程 环境配置: Jdk1.8 + Tomcat7.0 + Mysql + HBuilderX(Webstorm也行)+ E ...
- ssm+jsp计算机毕业设计作业管理系统ctoc8(程序+lw+源码+远程部署)
项目运行 项目含有源码(见文末).文档.程序.数据库.配套开发软件.软件安装教程 环境配置: Jdk1.8 + Tomcat7.0 + Mysql + HBuilderX(Webstorm也行)+ E ...
- ssm+jsp计算机毕业设计刀具管理系统的设计与实现rhp57(程序+LW+源码+远程部署)
项目运行 项目含有源码(见文末).文档.程序.数据库.配套开发软件.软件安装教程 环境配置: Jdk1.8 + Tomcat7.0 + Mysql + HBuilderX(Webstorm也行)+ E ...
- ssm+jsp计算机毕业设计固定资产管理系统f1e21(程序+lw+源码+远程部署).
项目运行 项目含有源码(见文末).文档.程序.数据库.配套开发软件.软件安装教程 环境配置: Jdk1.8 + Tomcat7.0 + Mysql + HBuilderX(Webstorm也行)+ E ...
- ssm+jsp计算机毕业设计医院管理系统63lzg(程序+lw+源码+远程部署)
项目运行 项目含有源码(见文末).文档.程序.数据库.配套开发软件.软件安装教程 环境配置: Jdk1.8 + Tomcat7.0 + Mysql + HBuilderX(Webstorm也行)+ E ...
最新文章
- php中访问控制关键字,PHP 关于访问控制和运算符优先级简介
- 16、Event事件(定时任务)是什么?
- 导出.txt / .pdf / .xls
- Python3文件操作详解 Python3文件操作大全
- C# 跨平台的支付类库ICanPay
- mysql使用sql语句查询数据库所有表注释已经表字段注释
- camera(19)---camera 客观测试 Imatest教程
- MTK MODEM(1)--- MTK平台NV基本功能与操作
- 蔚来汽车再次自燃 股价继续大跌 官方:着火原因未明 已经启动调查
- 聚集索引表插入数据和删除数据的方式是怎样的
- https报文 完整_报文 HTTP HTTPS
- (转)中国首单运用区块链技术的交易所ABS获批
- 计算机基础 软件系统与硬件系统
- 小白文件管理器 无法与服务器建立联系,小白文件管理器怎么用
- 阿里云服务器实现内网互通
- linux无线蓝牙鼠标失效,无线蓝牙鼠标失灵怎么办 无线蓝牙鼠标失灵解决方法【详解】...
- linux 查看syn网络日志,Linux下分析SYN flood攻击案例
- URL、域名、子域名、主机名
- 第3关:球的表面积和体积
- mac 中 caps lock和control键交换,以及alt键替换option方法