基于javaweb+mysql的课程管理自动排课系统(java+SpringBoot+html+layui+thymeleaf+redis+mysql)

项目介绍
课程自动排课系统,该系统分两种角色:管理员与普通用户;

主要功能包括:
首页:查看分课、查看课表、查看空教室;
班级设置:添加班级、分配课程、编辑、删除课程;
教室设置:添加教室、编辑、删除;
课程设置:添加课程、编辑、删除;
教师设置:添加教师、编辑、删除;
排课管理:调整排课、删除排课;

用户管理:添加用户、编辑、删除;

环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可
4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;
5.是否Maven项目: 是;查看源码目录中是否包含pom.xml;若包含,则为maven项目,否则为非maven项目
6.数据库:MySql 8.0版本;

7.Redis数据库,redis配置已设置好,勿修改;

技术栈

  1. 后端:Springboot+redis

  2. 前端:html+layui+thymeleaf

使用说明

  1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
  2. 将项目中application.properties配置文件中的数据库配置改为自己的配置
  3. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;若为maven项目,导入成功后请执行maven clean;maven install命令,配置tomcat,然后运行;
  4. 运行项目,输入http://localhost:8080/login.html 登录请添加图片描述
    请添加图片描述
    请添加图片描述
    请添加图片描述
    请添加图片描述
    请添加图片描述
    请添加图片描述

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

        courseService.updateByPrimaryKey(course);
        return "redirect:/Course/queryAll";
    }
    @Transactional
    @RequestMapping("update1")
    public String update1(HttpServletRequest request,Course course){
        course.setStatus("1");
        courseService.updateByPrimaryKey(course);
        User user = (User) request.getSession().getAttribute("user");
        Curelation curelation1 = new Curelation();
        curelation1.setCourseid(course.getId());
        curelation1.setUserid(user.getId());
        List<Curelation> curelationList = curelationService.queryAll(curelation1);
		return "redirect:/Role/queryAll";
	}
	@RequestMapping("/delete")
	public String delete(String ID){
		depotService.deleteByPrimaryKey(ID);
		return "redirect:/Role/queryAll";
	}
	@RequestMapping("/queryAll")
	public String queryAll(HttpServletRequest request,Role role){
		List<Role> list = depotService.QueryAll(role);
		request.setAttribute("list", list);
	   if(null != role.getRolename()){
			request.setAttribute("rolename", role.getRolename());
		}
		return "Role";
	}
	@RequestMapping("/add")
	public String  add(String roleid,String rolename,String powerContent){
		Power power1 = new Power();
		Role role = new Role();
		String powerid = String.valueOf(Math.random()).substring(2, 8);
		role.setRoleid(String.valueOf(Math.random()).substring(2, 6));
		role.setPowerid(powerid);
		role.setRolename(rolename);
		power1.setPower(powerContent);
		power1.setRoleid(powerid);
		role.setRolename(rolename);
		depotService.update(role);
		List<Role> list = depotService.QueryAll(role);
		Role role1 = list.get(0);
		Power power = new Power();
		if(powerContent.indexOf("110") != -1){
			powerContent = powerContent + ",1100";
		}
		if(powerContent.indexOf("120") != -1){
			powerContent = powerContent + ",1200";
		}
		if(powerContent.indexOf("130") != -1){
			powerContent = powerContent + ",1300";
		}
		if(powerContent.indexOf("140") != -1){
			powerContent = powerContent + ",1400";
		}
		if(powerContent.indexOf("150") != -1){
	@RequestMapping("/addstudent")
	public String  addStudent(User user){
		String passWord = "123456";
		user.setPassword(passWord);
		user.setType(Constans.STUDENT);
		userService.insert(user);
		return "redirect:/User/student";
	}
	@ResponseBody
	@RequestMapping("/queryOne")
	public String queryOne(String ID){
		User user = new User();
		user.setId(ID);
		List<User> list = userService.QueryAll(user);
		user = list.get(0);
		JSONObject json = new JSONObject();
		String data = json.toJSONString(user);
		return data;
	}
	@RequestMapping("/quit")
	public ModelAndView quit(HttpServletRequest request) throws Exception{
		ModelAndView mav = new ModelAndView();
		HttpSession session1 = request.getSession();
		session1.invalidate();
@RequestMapping("/User")
public class UserController {
	@Autowired
	private UserService userService;
	@Autowired
	private PowerService powerService;
	@Autowired
	private RoleService roleService;
	@Autowired
	private NoticeService noticeService;
	@RequestMapping("/Main")
	public String res(HttpServletRequest request){
		String time = DateUtil.getStringToday();
		request.getSession().setAttribute("time", time);
		Notice notice = new Notice();
		List<Notice> list = noticeService.queryAll(notice);
		notice = list.get(0);
		User user = userService.selectByPrimaryKey(notice.getUserid());
		notice.setUserid(user.getName());
		request.getSession().setAttribute("notice", notice);
		return "Main";
		request.getSession().setAttribute("notice", notice);
		return "Main";
	}
	@RequestMapping("/changePa")
	public String res1(){
		return "changePass";
	}
	@RequestMapping("/Login")
	public ModelAndView login(HttpServletRequest request,String id,String password) throws Exception{
		ModelAndView mav = new ModelAndView();
		User user1 = userService.selectByPrimaryKey(id);
		if(user1 == null || !password.equals(user1.getPassword())){
			mav.setViewName("index");
		    request.getSession().setAttribute("info", "error");
			return mav;
		}else{
            curelationService.insert(curelation);
        }
        return "redirect:/Course/teacher";
    }
    @RequestMapping("update2")
    public String update2(HttpServletRequest request,Course course){
        User user = (User) request.getSession().getAttribute("user");
        Curelation curelation = new Curelation();
        curelation.setUserid(user.getId());
        curelation.setCourseid(course.getId());
        List<Curelation> curelationList = curelationService.queryAll(curelation);
        if(curelationList.size() == 0){
            curelation.setId(String.valueOf(Math.random()).substring(2, 10));
@RequestMapping("/User")
public class UserController {
	@Autowired
	private UserService userService;
	@Autowired
	private PowerService powerService;
	@Autowired
	private RoleService roleService;
	@Autowired
	private NoticeService noticeService;
	@RequestMapping("/Main")
	public String res(HttpServletRequest request){
		String time = DateUtil.getStringToday();
		request.getSession().setAttribute("time", time);
		Notice notice = new Notice();
		List<Notice> list = noticeService.queryAll(notice);
		notice = list.get(0);
		User user = userService.selectByPrimaryKey(notice.getUserid());
		notice.setUserid(user.getName());
		request.getSession().setAttribute("notice", notice);
		return "Main";
	}
	@RequestMapping("/changePa")
	public String res1(){
            String fileName = fileName1+fileName2;
            response.setHeader("Content-disposition", "attachment; filename=" +new String(fileName.getBytes("gbk"),"iso8859-1") + ".xls");
            String[] titles = { "成绩编号","学生编号", "学生姓名", "课程编号", "课程名称", "成绩" };
            courseService.export(titles, out,user);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    @RequestMapping("delete")
    public String delete(String ID){
        courseService.deleteByPrimaryKey(ID);
        return "redirect:/Course/queryAll";
    }
    @RequestMapping("update")
    public String update(Course course){
        courseService.updateByPrimaryKey(course);
        return "redirect:/Course/queryAll";
    }
    @Transactional
    @RequestMapping("update1")
    public String update1(HttpServletRequest request,Course course){
        course.setStatus("1");
        courseService.updateByPrimaryKey(course);
        User user = (User) request.getSession().getAttribute("user");
        Curelation curelation1 = new Curelation();
        curelation1.setCourseid(course.getId());
	public String delete(String ID){
		userService.deleteByPrimaryKey(ID);
		return "redirect:/User/queryAll";
	}
	@RequestMapping("/teacher")
	public String QueryAllTeacher(HttpServletRequest request,User user){
		List<User> list = userService.QueryAllTeacher(user);
		request.setAttribute("list", list);
	   if(null != user.getName()){
			request.setAttribute("name", user.getName());
		}
	   if(null != user.getMobile()){
			request.setAttribute("mobile", user.getMobile());
		}
		if(null != user.getMobile()){
			request.setAttribute("mobile", user.getMobile());
		}
		return "student";
	}
	@RequestMapping("/addteacher")
	public String  addUser(User user){
	    String passWord = "123456";
		user.setPassword(passWord);
		user.setType(Constans.TEACHER);
		userService.insert(user);
		return "redirect:/User/teacher";
	}

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
软件简介:鑫钜排课系统是一套智能排课系统 ,专门解决令头头疼的学校排课问题。 手工排课一向是学校教务工作中最令人头疼的事,非常费时费神,而且由于人工操作时多多少少会有些失误。往往经过一两天的冥思苦想排出来的课程表,却总会发现纰漏,导致课程表需要修改。而修改课程表一般都是牵一发而动全身,令人非常苦恼。 鑫钜排课系统的出现解决了以上所有难题,本系统特聘一位从事20余年学校教务工作的老师,根据自己多年来排课经验,全程跟踪系统开发,集众家排课软件之长,操作简单,直观;排课算法先进,合理分配每天的课程节次,排出来的课更合理、更科学,完全符合中小学排课的需要。让您从此告别繁琐的手工排课,只要设置好学校班数、节数、课程、教师任课,系统就会自动排出所有课程表。一个几十个班的学校,从信息开始录入到开始打印课程表的整个过程一般一个小时内就可以完全搞定,这在手工排课阶段,几乎是不可想象的。而且电脑自动排课的过程只需几秒钟,排完之后觉得不满意,完全可以根据系统提示进行调整。 功能特点:鑫钜排课系统还有很多特点都领先于同类软件,如: 1.傻瓜型的向导操作模式:《鑫钜排课系统》的向导操作模式使得对电脑一知半解的用户也可以操作自如。并采用教务工作者的思路来设计软件,即使不懂电脑的老教务主任操作起来也会有一种似曾相识的感觉。 2一流的排课算法: 《鑫钜排课系统》采用优秀的排课算法,自动排课无论速度及准确性是其它排课软件不可比拟的 3.直观的调课功能。能采用直观的卡片式显示方法,用不同的颜色显示哪些课可以调,哪些课不能调,调课直观,方便,像玩游戏一样,让您排出的课符合您的要求。 4.方便的查询功能。任意选中课表中某一节课(或几节课),能查询哪些老师在上课,哪些老师在休息,这样方便领导选派教师安排临时性的工作,或考勤查岗等事务,也可以在调课过程中利用它发现哪些课不合理,以便进行调整. 5.教学工作量统计功能。能自动统计全校任课教师的教学工作量,并导出到Excel(电子表格)中编辑、打印。以便根据您的需要计算出教师的教学工作量津贴等。 6.能合理分配场地受限的课程。例如:微机课、体育课。如果您学校只有一间微机教室,那么在同一课时排课系统会只安排一节微机课。 7.能设置教师在哪节课不排课。例如:有些老师每周固定时间开会,固定时间教研等。 8..能设置课程的不排节次。例如:体育不安排在上午第一、二节。 9.能根据您的需要安排固定课。例如:班会课、劳动课、自习课等安排在固定的某一节课;也可以用来做手工排课,如:把某班的语文课固定在第一节课上。 10.方便、灵活的打印功能。总功课表、班级课表、个人课表能一键导出到Excel(电子表格)中编辑、打印,让你打出更精美的课表。班级课表和个人课表还可以用A4纸张直接打印出来。 11.强大的手动调课功能。系统能够自动提示可调课程位置,可以方便地调动课程。 12.采用24小时在线升级技术。采用在线升级技术,令升级更方便。 13.立足用户的本地化改造。如校方对排课系统的某些功能需求有异,可在第一时间为校方做调整完善。 使用范围:适用于各类中学、小学、全日制、半日制、中专类院校等。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值