——————————DescriptionStart——————————
运行环境
Java≥8、MySQL≥5.7、Tomcat≥8
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明


管理员:

教师:


学生:

辅导员:



基于javaweb的SSM+Maven学生考勤请假管理系统(java+ssm+jsp+layui+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.数据库:MySql 5.7版本; 6.是否Maven项目:是;
技术栈
- 后端:Spring+SpringMVC+Mybatis 2. 前端:JSP+CSS+JavaScript+layui
使用说明
- 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven; 若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中db.properties配置文件中的数据库配置改为自己的配置; 4. 运行项目,输入localhost:8080/ 登录
——————————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
| public String exUpdate(Qj qj, Model model, HttpServletRequest request, HttpServletResponse response) { qjService.updateById(qj); return "redirect:/qj/myqj.action"; } @RequestMapping(value = "/sp") public String sp(Qj qj, Model model, HttpServletRequest request, HttpServletResponse response) { Qj byId = qjService.getById(qj.getId()); byId.setStatus(qj.getStatus()); byId.setContent(qj.getContent()); qjService.updateById(byId); return "redirect:/qj/findBySql.action"; }
@RequestMapping(value = "/delete") public String delete(Integer id, Model model, HttpServletRequest request, HttpServletResponse response) { qjService.deleteById(id); return "redirect:/qj/myqj.action"; } } package com.kwxy.hyt.controller;
|
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 49 50
| */
@Controller @RequestMapping("/qj") public class QjController extends BaseController {
@Autowired private QjService qjService; @Autowired private StudentService studentService; @Autowired private FdyService fdyService;
@RequestMapping(value = "/findBySql") public String findBySql(Qj qj, Model model, HttpServletRequest request, HttpServletResponse response) { Object attribute = request.getSession().getAttribute("userId"); if (attribute == null){ return "redirect:/login/uLogin"; } Integer userId = Integer.valueOf(attribute.toString()); String sql = "SELECT * FROM qj WHERE fdyId = "+userId; if(!isEmpty(qj.getBjId())){ sql += " and bjId like '%"+qj.getBjId()+"%'"; } if(!isEmpty(qj.getStudentId())){ sql += " and studentId like '%"+qj.getStudentId()+"%'"; } if(!isEmpty(qj.getFdyId())){ sql += " and fdyId like '%"+qj.getFdyId()+"%'"; } if(!isEmpty(qj.getStartTime())){
|
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
| } if(!isEmpty(bj.getIsDelete())){ sql += " and isDelete like '%"+bj.getIsDelete()+"%'"; } sql += " ORDER BY ID DESC "; Pager<Bj> pagers = bjService.findBySqlRerturnEntity(sql); model.addAttribute("pagers", pagers); model.addAttribute("obj", bj); return "bj/bj"; }
@RequestMapping(value = "/findByMap") public String findByMap(Bj bj, Model model, HttpServletRequest request, HttpServletResponse response) { Map<String,Object> params = new HashMap<String,Object>(); if(!isEmpty(bj.getName())){ params.put("name", bj.getName()); } if(!isEmpty(bj.getZy())){ params.put("zy", bj.getZy()); } if(!isEmpty(bj.getIsDelete())){ params.put("isDelete", bj.getIsDelete()); } Pager<Bj> pagers = bjService.findByMap(params); model.addAttribute("pagers", pagers); model.addAttribute("obj", bj); return "bj/bj"; }
|
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
| package com.kwxy.hyt.controller;
@Controller @RequestMapping("/bj") public class BjController extends BaseController {
@Autowired private BjService bjService;
|
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 49 50 51 52 53 54
| params.put("isDelete", bj.getIsDelete()); } Pager<Bj> pagers = bjService.findByMap(params); model.addAttribute("pagers", pagers); model.addAttribute("obj", bj); return "bj/bj"; }
@RequestMapping(value = "/add") public String add() { return "bj/add"; }
@RequestMapping(value = "/view") public String view(Integer id,Model model) { Bj obj = bjService.load(id); model.addAttribute("obj",obj); return "bj/view"; }
@RequestMapping(value = "/exAdd") public String exAdd(Bj bj, Model model, HttpServletRequest request, HttpServletResponse response) { bj.setIsDelete(0); bjService.insert(bj); return "redirect:/bj/findBySql.action"; }
@RequestMapping(value = "/update") public String update(Integer id,Model model) { Bj obj = bjService.load(id); model.addAttribute("obj",obj); return "bj/update"; }
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=561122572008200uj
https://javayms.pages.dev?id=561122572008200uj