基于javaweb+mysql的springboot学生考勤系统(java+springboot+vue+mybatis+maven+mysql)
运行环境
Java≥8、MySQL≥5.7、Node.js≥10
开发工具
后端:eclipse/idea/myeclipse/sts等均可配置运行
前端:WebStorm/VSCode/HBuilderX等均可
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
基于javaweb+mysql的SpringBoot学生考勤系统(java+springboot+vue+mybatis+maven+mysql)
一、项目运行 环境配置:
Jdk1.8 + Tomcat8.5 + Mysql + HBuilderX(Webstorm也行)+ Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)。
项目技术:
Spring + SpringBoot+ mybatis + Maven + Vue 等等组成,B/S模式 + Maven管理等等。
*/
@DeleteMapping("deleteLeave/{id}")
public void deleteData(@PathVariable("id") Integer id) {
leaveService.deleteLeave(id);
}
/**
* 查找辅导员管理的班级
* @param checkname
* @return
*/
@GetMapping("/findClass/{checkname}")
public List<String> findClass(@PathVariable("checkname") String checkname) {
List<Audit> audit = leaveService.FindClass(checkname);
List<String> list = new ArrayList<String>();
for(int i = 0 ; i < audit.size(); i++) {
String classes = audit.get(i).getClasses();
list.add(classes);
}
return list;
}
/**
* 删除辅导员管理的班级
* @param classes
*/
@DeleteMapping("delClass/{classes}")
public void delClass(@PathVariable("classes") String classes) {
leaveService.delClass(classes);
}
/**
* 添加辅导员要管理的班级
* @param classes
* @param realname
* @return
*/
@PostMapping("/insertClass")
public String insertClass(@RequestBody Audit aidit) {
return leaveService.insertAudit(aidit);
}
}catch (Exception e){
e.printStackTrace();
}
return "success";
}
}
@CrossOrigin
@RestController
@RequestMapping("/user")
public class AccountController {
@Autowired
private UserService userService;
@Autowired
private DataService dataService;
/**
* 注册
* @param user
* @return
*/
@PostMapping("/register")
public String register(@RequestBody User user) {
String username = user.getUsername();
String choice = user.getChoice();
String checkChoice = dataService.getChoice(username);
if(checkChoice.equals("empty")) {
// 学生信息不存在,请核对信息或者先进行录入
return "empty";
@CrossOrigin
@RestController
@RequestMapping("/leave")
public class LeaveController {
@Autowired
private LeaveService leaveService;
/**
* 发送申请表
* @param leave
* @return
*/
@PostMapping("/sendLeave")
public String sendLeave(@RequestBody Leave leave) {
return leaveService.InsertLeave(leave);
}
/**
* 修改申请表
* @param leave
* @return
*/
@PostMapping("/updateLeave")
public String updateLeave(@RequestBody Leave leave) {
return leaveService.UpdateLeave(leave);
}
/**
*查找单个申请表
* @param id
* @return
*/
@GetMapping("/findAllById/{id}")
public Leave findAllByUsername(@PathVariable("id") Integer id) {
return leaveService.findAllById(id);
}
* @return
*/
@GetMapping("FuzzyQuery/{currentPage}/{pageSize}/{realname}")
public Map<String, Object> FuzzyQuery(@PathVariable("currentPage") Integer currentPage,
@PathVariable("pageSize") Integer pageSize, @PathVariable("realname") String realname) {
PageHelper.startPage(currentPage, pageSize);
Map<String, Object> returnMap = new HashMap<String, Object>();
List<Data> list = null;
returnMap.put("content", list);
list = dataService.FuzzyQueryByRealname(realname);
returnMap.put("content", list);
return returnMap;
}
/**
*
* 按用户类型通过姓名模糊查询
* @param currentPage
* @param pageSize
* @param realname
* @param choice
* @return
*/
@GetMapping("FuzzyQuery/{currentPage}/{pageSize}/{realname}/{choice}")
public Map<String, Object> FuzzyQueryByChoice(@PathVariable("currentPage") Integer currentPage,
@PathVariable("pageSize") Integer pageSize, @PathVariable("realname") String realname,
@PathVariable("choice") String choice) {
PageHelper.startPage(currentPage, pageSize);
Map<String, Object> returnMap = new HashMap<String, Object>();
List<Data> list = null;
returnMap.put("content", list);
list = dataService.FuzzyQueryByChioce(realname, choice);
returnMap.put("content", list);
return returnMap;
}
/**
@CrossOrigin
@RestController
@RequestMapping("/attend")
public class AttendController {
@Autowired
private AttendService attendService;
@Autowired
private DataService dataService;
/**
* 添加学生考勤信息
* @param attend
* @return
*/
@PostMapping("/insertAttend")
public String insertAttend(@RequestBody Attend attend