——————————DescriptionStart——————————
运行环境 Java≥8、MySQL≥5.7、Tomcat≥8
开发工具 eclipse/idea/myeclipse/sts等均可配置运行
适用 课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
基于javaweb的SSM+Maven教务管理系统(java+ssm+jsp+layui+echarts+mysql)
项目介绍
随着中国教育体制的不断改革与完善,学校的学生教师管理员等对互联网的使用也越来越频繁。随着学生与教师数量的不断增多,教务管理的容量,安全性,便捷性显得尤为重要。传统的人工管理的劣势也慢慢显现出来,但是其中的一优点还需要继续采纳,所以传统的人工与计算机的结合成为了目前的主流。对此我开发了一套基于SSM框架的教务管理系统。 该系统采用的是Spring、SpringMVC、Mybatis、Shiro、LayUI、腾讯云。
该项目分为管理员、教师、学生三种角色。 主要实现了用户的登录注册,公告的浏览,选课操作,不同的管理员对不同信息的管理,教师对课程评分,教师结课等功能。该系统我在完成基础功能的前提下完成了上线。 关键词:教务;教务管理系统;云服务器;JAVA;SSM
环境需要
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.数据库:MySql 8.0版本; 6.是否Maven项目:是;
技术栈
后端:Spring+SpringMVC+Mybatis+Shiro 2. 前端:JSP+LayUI+Echarts+jQuery
使用说明
使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven; 若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中db.properties配置文件中的数据库配置改为自己的配置; 4. 运行项目,输入localhost:8080/ 登录 管理员:admin 123456 学生:zhangsan 123456 教师:wangliu 123456
——————————CodeStart——————————
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 */ @RequestMapping("/easEchart") @Controller public class EasEchartController { @Autowired private EasStudentService easStudentService; @Autowired private EasTeacherService easTeacherService; @Autowired private EasCourseService easCourseService; @Autowired private EasBaseCourseService easBaseCourseService; @RequestMapping("/scoreEchart") public String scoreEchart () { return "echarts/ScoreEcharts" ; } @RequestMapping("/peopleEchart") public String peopleEchart () { return "echarts/peopleEcharts" ; } @RequestMapping("/getAllStuAndTea") @ResponseBody public Map<String,Object> getAllStuAndTea () { Map<String, Object> map = new HashMap<>(); int totalStu = easStudentService.getTotal(); int totalTea = easTeacherService.getTotal(); map.put("totalStu" ,totalStu); map.put("totalTea" ,totalTea); map.put("code" ,0 ); map.put("msg" ,"我是返回的内容" ); return map; } @RequestMapping("/getAllSex") @ResponseBody public Map<String,Object> getAllSex () { Map<String, Object> map = new HashMap<>(); int totalMan = easStudentService.getTotalSex("男" ); int totalWoman = easStudentService.getTotalSex("女" );
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 @Controller @RequestMapping("/easRole") public class EasRoleController { @Autowired private EasRoleMapper easRoleMapper; @RequestMapping("/search") @ResponseBody public List<EasRole> search () throws Exception { return easRoleMapper.getAll(); } @RequestMapping("/index") @RequiresPermissions("role:query") public String index () throws Exception { return "system/role/index" ; } @RequestMapping("/rolePers") @ResponseBody public List<Long> rolePers (Integer id) throws Exception { return easRoleMapper.getPerIdsByRoleId(id); } @RequestMapping("/assignPers") @ResponseBody public Map<String,Object> assignPers (Integer roleId, String persIds) throws Exception { Map<String,Object> map = new HashMap<>(); easRoleMapper.deleteRolePermissions(roleId); easRoleMapper.addRolePermissions(roleId,persIds.split("," )); return map; } @RequestMapping("/list") @ResponseBody public Map<String,Object> list (@RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer limit, EasRole easRole) throws Exception { Map<String,Object> map = new HashMap<>(); int count = easRoleMapper.getCount(); PageUtil pageUtil = new PageUtil(page,limit);
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 pageUtil.setTotal(count); pageUtil.setCount(limit); int totalPage = pageUtil.getTotalPage(); map.put("totalPage" ,totalPage); map.put("count" ,count); map.put("data" ,list); map.put("code" ,0 ); map.put("msg" ,"" ); }else { int type = 3 ; int count = easNoticeService.getCountByTypeAndEasNotice(type,easNotice); List<EasNotice> list = easNoticeService.getNoticeListByTypeAndEasNotice(type,easNotice,pageUtil); pageUtil.setTotal(count); pageUtil.setCount(limit); int totalPage = pageUtil.getTotalPage(); map.put("totalPage" ,totalPage); map.put("count" ,count); map.put("data" ,list); map.put("code" ,0 ); map.put("msg" ,"" ); } } return map; } @RequestMapping(value="/lookNotice") public ModelAndView look (Integer id) { ModelAndView modelAndView = new ModelAndView(); List<EasNotice> list = easNoticeService.getNoticeById(id); modelAndView.addObject("noticeList" ,list); modelAndView.setViewName("system/notice/homeNotice" ); return modelAndView; }
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 @RequestMapping("/list") @ResponseBody public Map<String,Object> list (@RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer limit, EasUser condition, String roleIds) throws Exception { Map<String,Object> map = new HashMap<>(); if (roleIds != null && !roleIds.trim().equals("" )){ String[] array = roleIds.split("," ); List<EasRole> roles = new ArrayList<>(); for (int i = 0 ; i < array.length; i++) { EasRole role = new EasRole(); role.setId(Integer.parseInt(array[i])); roles.add(role); } condition.setRoles(roles); } int count = easUserService.getCount(); PageUtil pageUtil = new PageUtil(page,limit); List<EasUser> list = easUserMapper.getList(condition,pageUtil); map.put("count" ,count); map.put("data" ,list); map.put("code" ,0 ); map.put("msg" ,"" ); return map; } @RequestMapping("/form") public String form (ModelMap modelMap) throws Exception { modelMap.put("roleList" ,easRoleService.getAll()); return "system/user/form" ; } @RequestMapping("/basicForm") public String basicForm (ModelMap modelMap) throws Exception {
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 map.put("count" ,count); map.put("data" ,list); map.put("code" ,0 ); map.put("msg" ,"" ); return map; } @RequestMapping("/baseCourseAddForm") public String baseCourseAddForm () throws Exception { return "system/baseCourse/baseCourseAddForm" ; } @RequestMapping(value = "/addCourse",method = RequestMethod.POST) @ResponseBody public Map<String, Object> addCourse (EasCourse easCourse) throws Exception { Map<String,Object> map = new HashMap<>(); int res = 0 ; List<EasCourse> list = easCourseService.findCourseByBaseCourseIdAndTeacherId(easCourse.getBaseCourseId(),easCourse.gettId()); if (easCourse.gettId() == null || easCourse.getBaseCourseId() == null ){ map.put("msg" ,"课程名称和教师姓名不能为空" ); map.put("result" ,false );; } else if (list.size() != 0 ){ map.put("msg" ,"课程已存在" ); map.put("result" ,false );; } else if (easCourse.getId() == null || easCourse.getId().equals("" )){ try { res = easCourseService.addCourse(easCourse); } catch (Exception e) { e.printStackTrace(); map.put("msg" ,"添加失败" );
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 map.put("code" ,0 ); map.put("msg" ,null ); map.put("data" ,easRoleMapper.getList(easRole,pageUtil)); map.put("count" ,count); return map; } @RequestMapping("/roleForm") public String roleForm () throws Exception { return "system/role/roleForm" ; } @RequestMapping(value = "/addRole",method = RequestMethod.POST) @ResponseBody public Map<String, Object> addRole (EasRole easRole) throws Exception { Map<String,Object> map = new HashMap<>(); List<EasRole> list = easRoleMapper.findRoleName(easRole.getName()); if (list.size() != 0 ){ map.put("msg" ,"角色已存在" ); map.put("result" ,false ); }else if (easRole.getName().length() <= 0 ){ map.put("msg" ,"角色名称不能为空" ); map.put("result" ,false ); }else { easRoleMapper.addRole(easRole); map.put("msg" ,"添加成功" ); map.put("result" ,true ); } return map; } @RequestMapping("/batchDeleteRole") @ResponseBody @RequiresPermissions("role:delete") public Map<String, Object> batchDeleteRole (Integer[] ids) throws Exception { Map<String,Object> map = new HashMap<String,Object>(); easRoleMapper.batchDeleteRole(ids); map.put("msg" ,"删除成功" ); map.put("result" ,true ); return map;
——————————PayStart——————————
项目链接: https://javayms.github.io?id=001122532008200pq https://javayms.pages.dev?id=001122532008200pq