基于Springboot实现校园疫情防控管理系统平台(一)https://developer.aliyun.com/article/1423475
4.2.7 个人信息维护
学生和老师登陆疫情管理系统后,可以在个人中心处修改自己的信息。具体操作界面如下图4-18所示:
图4-18 个人信息维护功能界面图
4.2.8 健康打卡
学生和老师登陆疫情管理系统后,可以在个人中心处选择健康管理,进行在线填写个人健康信息进行打卡。具体操作界面如下图4-19所示:
图4-19 个人信息维护功能界面图
4.2.9 离校申请
学生登陆疫情管理系统后,可以在个人中心处选择离校申请,进行在线填写离校申请的相关信息,等待自己的老师进行审核,并可以在我的申请处查看申请的记录和审核结果。具体操作界面如下图4-20、4-21所示:
图4-20 离校申请功能界面图
图4-21 我的申请功能界面图
4.2.10 离校审核
老师登陆疫情管理系统后,可以在个人中心处选择离校申请管理,进行在线审核学生的离校申请信息。具体操作界面如下图4-22所示:
图4-22 离校申请审核功能界面图
四,核心代码展示
package com.zhiku.yiqing.web; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.zhiku.yiqing.common.R; import com.zhiku.yiqing.pojo.*; import com.zhiku.yiqing.service.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.Arrays; import java.util.Date; import java.util.List; @RestController @RequestMapping("/menhu") public class MenHuController { @Autowired private YiqingNewsService yiqingNewsService; @Autowired private NewsService newsService; @Autowired private DynamicService dynamicService; @Autowired private SchoolGeneralService schoolGeneralService; @Autowired private FankuiService fankuiService; @Autowired private ClaService claService; @GetMapping("/queryAllDynamic/{type}") public R queryAllDynamic(@PathVariable("type") Integer type){ List<Dynamic> dynamics = dynamicService.queryDynamicByType(type); return R.success(dynamics); } @GetMapping("/queryYiqingNewsById/{id}") public R queryYiqingNewsById(@PathVariable("id") Integer id){ YiqingNews yiqingNews = yiqingNewsService.queryYiQingNewsById(id); return R.success(yiqingNews); } @GetMapping("/queryDynamicById/{id}") public R queryDynamicById(@PathVariable("id") Integer id){ Dynamic dynamic = dynamicService.queryDynamicById(id); return R.success(dynamic); } @GetMapping("/querySchoolGeneralById/{id}") public R querySchoolGeneralById(@PathVariable("id") Integer id){ SchoolGeneral schoolGeneral = schoolGeneralService.querySchoolGeneralById(id); return R.success(schoolGeneral); } /** * 查询所有的防疫措施 * @return */ @GetMapping("/queryAllSchoolGenerals") public R queryAllSchoolGenerals(){ List<SchoolGeneral> schoolGenerals = schoolGeneralService.menHuQueryAllSchoolGeneral(); return R.success(schoolGenerals); } /** * 查询所有的疫情新闻 * @return */ @GetMapping("/queryAllYiqingNews") public R queryAllYiqingNews(){ List<YiqingNews> yiqingNews = yiqingNewsService.menhuQueryAllYiqingNews(); return R.success(yiqingNews); } /** * 查询所有的疫情知识 * @return */ @GetMapping("/queryAllNews") public R queryAllNews(){ List<News> news = newsService.menhuQueryAllNews(); return R.success(news); } /** * 查询单个的疫情知识 * @return */ @GetMapping("/queryNewsById/{id}") public R queryNewsById(@PathVariable("id") Integer id){ News news = newsService.queryNewsById(id); return R.success(news); } /** * 填写个人反馈 * @return */ @PostMapping("/addFankui") public R addFankui(@RequestBody Fankui fankui){ fankui.setCreatetime(new Date()); fankuiService.save(fankui); return R.success(); } /** * 查询所有的个人反馈--根据本人编号查询 * @return */ @GetMapping("/queryAllFankui/{snumber}") public R queryAllFankui(@PathVariable("snumber") String snumber){ QueryWrapper<Fankui> queryWrapper = new QueryWrapper<>(); queryWrapper.eq("snumber",snumber); List<Fankui> list = fankuiService.list(queryWrapper); return R.success(list); } /** * 删除个人反馈 * @return */ @DeleteMapping("/delFankui/{id}") public R delFankui(@PathVariable("id") Integer id){ fankuiService.removeById(id); return R.success(); } /** * 查询所有的个人反馈 * @return */ @GetMapping("/queryFankuiList/{page}/{pagesize}") public R queryFankuiList(@PathVariable("page") Integer page,@PathVariable("pagesize") Integer pagesize){ Page<Fankui> pages = new Page<>(page, pagesize); Page<Fankui> page1 = fankuiService.page(pages); return R.success(page1); } /** * 删除个人反馈 * @return */ @DeleteMapping("/batchDelFankuiById/{ids}") public R batchDelFankuiById(@PathVariable("ids") Integer[] ids){ fankuiService.removeBatchByIds(Arrays.asList(ids)); return R.success(); } /** * 班级添加 * @return */ @PostMapping("/addCla") public R addCla(@RequestBody Cla cla){ claService.save(cla); return R.success(); } /** * 查询所有的班级 * @return */ @GetMapping("/queryClaList") public R queryClaList(){ List<Cla> list = claService.list(); return R.success(list); } /** * 查询所有的班级 * @return */ @GetMapping("/queryAllCla/{page}/{pagesize}") public R queryAllCla(@PathVariable("page") Integer page,@PathVariable("pagesize") Integer pagesize){ Page<Cla> pages = new Page<>(page, pagesize); Page<Cla> page1 = claService.page(pages); return R.success(page1); } /** * 删除班级 * @return */ @DeleteMapping("/delCla/{id}") public R delCla(@PathVariable("id") Integer id){ try { claService.removeById(id); return R.success(); }catch (Exception e){ return R.failure(); } } /** * 查询班级详情 * @return */ @GetMapping("/queryClaById/{id}") public R queryClaById(@PathVariable("id") Integer id){ Cla cla = claService.getById(id); return R.success(cla); } /** * 更新班级详情 * @return */ @PutMapping("/updateClaById") public R updateClaById(@RequestBody Cla cla){ claService.updateById(cla); return R.success(); } }
package com.zhiku.yiqing.web; import com.zhiku.yiqing.common.R; import com.zhiku.yiqing.pojo.*; import com.zhiku.yiqing.service.*; import com.zhiku.yiqing.vo.StudentUpdatePasswordVo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; /** * 学生个人中心 */ @RestController @RequestMapping("/mstudent") public class MenHuStudentController { @Autowired StudentService studentService; @Autowired LeaveManagementService leaveManagementService; @Autowired ReturnManagementService returnManagementService; @Autowired TeacherService teacherService; @Autowired HealthService healthService; /** * 删除个人离校申请 * @param id * @return */ @DeleteMapping("/delStudentLeaveById/{id}") public R delStudentLeaveById(@PathVariable("id") String id){ leaveManagementService.delLeaveById(id); return R.success(); } /** * 提交离校申请 * @param leaveManagement * @return */ @PostMapping("/commitStudentLeave") public R commitStudentLeave(@RequestBody LeaveManagement leaveManagement){ // System.out.println(leaveManagement+"--------------------------"); leaveManagementService.commitStudentLeave(leaveManagement); return R.success(); } /** * 查询所有离校申请 * @param snumber * @return */ @GetMapping("/queryAllMyLeave/{snumber}") public R queryAllMyLeave( @PathVariable("snumber") String snumber){ System.out.println(snumber+"--------------------"); List<LeaveManagement> leaveManagements = leaveManagementService.queryAllMyLeave(snumber); return R.success(leaveManagements); } /** * 删除个人离归校申请 * @param id * @return */ @DeleteMapping("/delStudentReturnById/{id}") public R delStudentReturnById(@PathVariable("id") String id){ returnManagementService.delReturnById(id); return R.success(); } /** * 提交归校申请 * @param returnManagement * @return */ @PostMapping("/commitStudentReturn") public R commitStudentReturn(@RequestBody ReturnManagement returnManagement){ // System.out.println(leaveManagement+"--------------------------"); returnManagementService.commitStudentReturn(returnManagement); return R.success(); } /** * 查询所有归校申请 * @param snumber * @return */ @GetMapping("/queryAllMyReturn/{snumber}") public R queryAllMyReturn( @PathVariable("snumber") String snumber){ System.out.println(snumber+"--------------------"); List<ReturnManagement> returnManagements = returnManagementService.queryAllMyReturn(snumber); return R.success(returnManagements); } @PostMapping("/commitStudentHealth") public R commitStudentHealth(@RequestBody Health health){ // System.out.println(health); healthService.commitStudentHealth(health); return R.success(); } @GetMapping("/queryAllTeacher") public R queryAllTeacher(){ List<Teacher> teacherList = teacherService.menhuQueryAllTeacher(); return R.success(teacherList); } @GetMapping("/getStudentInfoById/{id}") public R getStudentInfoById(@PathVariable("id") Integer id){ Student student = studentService.getStudentInfoById(id); return R.success(student); } @PutMapping("/updateStudentInfoById") public R updateStudentInfoById(@RequestBody Student student){ System.out.println(student+"--------------------"); studentService.updateStudentInfoById(student); return R.success(); } @PutMapping("/updateStudentPasswordById") public R updateStudentPasswordById(@RequestBody StudentUpdatePasswordVo student){ System.out.println(student+"--------------------"); boolean isExist = studentService.findUserPasswordById(student.getId(), student.getPassword()); // 代表存在 if (!isExist) { return R.failure().setMessage("原始密码输入错误"); } studentService.updatePasswordById(student); return R.success(); } }
五,项目总结
本次开发和设计的校园疫情管理系统,主要切合目前互联网时代己进入WEB3.0的新时代,利用新技术新思路为学校的信息化建设添砖加瓦。系统的整体功能按原先的任务书要求己经实现了相关的核心业务功能,包含前端用户操作界面和后台管理界面,主要围绕用户、教师、管理员三个用户角色的业务操作功能来进行开发和实现,基于前期的需求分析,己经完成学生管理、教师管理、健康打卡、离校审核等业务模块的开发和测试。