作者主页:源码空间站2022
简介:Java领域优质创作者、Java项目、学习资料、技术互助
文末获取源码
项目介绍
基于Springboot + vue实现的幼儿园管理系统
本系统包含管理员、教师、家长三个个角色。
管理员:用户管理、教师管理、幼儿信息管理、班级信息管理、工作日志管理、会议记录管理、待办事项管理、职工考核管理、请假信息管理、缴费信息管理、儿童体检管理、资源信息管理、原料信息管理、菜谱信息管理。
教师:登录系统、查看教学进度、查看幼儿信息、查看班级情况、记录工作日志、整理会议内容、管理待办事项、参与职工考核、处理请假信息和缴费信息。
家长:幼儿请假管理、查看缴费信息、查看菜谱信息。
使用人群:
正在做毕设的学生,或者需要项目实战练习的Java学习者
由于本程序规模不大,可供课程设计,毕业设计学习演示之用
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;
4.数据库:MySql 5.7/8.0版本均可;
5.是否Maven项目:是;
技术栈
后端:SpringBoot+Mybaits
前端:Vue + elementui
使用说明
项目运行:
1. 使用Navicat或者其它工具,在mysql中创建对应sql文件名称的数据库,并导入项目的sql文件;
2. 使用IDEA/Eclipse/MyEclipse导入项目,导入成功后请执行maven clean;maven install命令;
3. 将项目中application.yml配置文件中的数据库配置改为自己的配置;
4. 运行项目,在浏览器中输入地址:
登录页面
http://localhost:8080/springboot4023t/admin/dist/index.html
管理员账户:abo 密码:abo
普通用户:用户1 密码:123456
教师账户:教师1 密码:123456
注意项目文件路径中不能含有中文、空格、特殊字符等,否则图片会上传不成功。
运行截图
论文
运行截图
相关代码
YouerqingjiaController
package com.controller;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.entity.YouerqingjiaEntity;
import com.entity.view.YouerqingjiaView;
import com.service.YouerqingjiaService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
/**
* 幼儿请假
* 后端接口
* @author
* @email
* @date 2021-03-18 15:04:00
*/
@RestController
@RequestMapping("/youerqingjia")
public class YouerqingjiaController {
@Autowired
private YouerqingjiaService youerqingjiaService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,YouerqingjiaEntity youerqingjia,
HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("jiaoshi")) {
youerqingjia.setGonghao((String)request.getSession().getAttribute("username"));
}
if(tableName.equals("yonghu")) {
youerqingjia.setYonghuming((String)request.getSession().getAttribute("username"));
}
EntityWrapper<YouerqingjiaEntity> ew = new EntityWrapper<YouerqingjiaEntity>();
PageUtils page = youerqingjiaService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, youerqingjia), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,YouerqingjiaEntity youerqingjia, HttpServletRequest request){
EntityWrapper<YouerqingjiaEntity> ew = new EntityWrapper<YouerqingjiaEntity>();
PageUtils page = youerqingjiaService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, youerqingjia), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( YouerqingjiaEntity youerqingjia){
EntityWrapper<YouerqingjiaEntity> ew = new EntityWrapper<YouerqingjiaEntity>();
ew.allEq(MPUtil.allEQMapPre( youerqingjia, "youerqingjia"));
return R.ok().put("data", youerqingjiaService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(YouerqingjiaEntity youerqingjia){
EntityWrapper< YouerqingjiaEntity> ew = new EntityWrapper< YouerqingjiaEntity>();
ew.allEq(MPUtil.allEQMapPre( youerqingjia, "youerqingjia"));
YouerqingjiaView youerqingjiaView = youerqingjiaService.selectView(ew);
return R.ok("查询幼儿请假成功").put("data", youerqingjiaView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
YouerqingjiaEntity youerqingjia = youerqingjiaService.selectById(id);
return R.ok().put("data", youerqingjia);
}
/**
* 前端详情
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
YouerqingjiaEntity youerqingjia = youerqingjiaService.selectById(id);
return R.ok().put("data", youerqingjia);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody YouerqingjiaEntity youerqingjia, HttpServletRequest request){
youerqingjia.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(youerqingjia);
youerqingjiaService.insert(youerqingjia);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody YouerqingjiaEntity youerqingjia, HttpServletRequest request){
youerqingjia.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(youerqingjia);
youerqingjiaService.insert(youerqingjia);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody YouerqingjiaEntity youerqingjia, HttpServletRequest request){
//ValidatorUtils.validateEntity(youerqingjia);
youerqingjiaService.updateById(youerqingjia);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
youerqingjiaService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
* 提醒接口
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
Wrapper<YouerqingjiaEntity> wrapper = new EntityWrapper<YouerqingjiaEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("jiaoshi")) {
wrapper.eq("gonghao", (String)request.getSession().getAttribute("username"));
}
if(tableName.equals("yonghu")) {
wrapper.eq("yonghuming", (String)request.getSession().getAttribute("username"));
}
int count = youerqingjiaService.selectCount(wrapper);
return R.ok().put("count", count);
}
}
YouerxinxiController
package com.controller;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.entity.YouerxinxiEntity;
import com.entity.view.YouerxinxiView;
import com.service.YouerxinxiService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
/**
* 幼儿信息
* 后端接口
* @author
* @email
* @date 2021-03-18 15:04:00
*/
@RestController
@RequestMapping("/youerxinxi")
public class YouerxinxiController {
@Autowired
private YouerxinxiService youerxinxiService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,YouerxinxiEntity youerxinxi,
HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("yonghu")) {
youerxinxi.setYonghuming((String)request.getSession().getAttribute("username"));
}
if(tableName.equals("jiaoshi")) {
youerxinxi.setGonghao((String)request.getSession().getAttribute("username"));
}
EntityWrapper<YouerxinxiEntity> ew = new EntityWrapper<YouerxinxiEntity>();
PageUtils page = youerxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, youerxinxi), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,YouerxinxiEntity youerxinxi, HttpServletRequest request){
EntityWrapper<YouerxinxiEntity> ew = new EntityWrapper<YouerxinxiEntity>();
PageUtils page = youerxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, youerxinxi), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( YouerxinxiEntity youerxinxi){
EntityWrapper<YouerxinxiEntity> ew = new EntityWrapper<YouerxinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( youerxinxi, "youerxinxi"));
return R.ok().put("data", youerxinxiService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(YouerxinxiEntity youerxinxi){
EntityWrapper< YouerxinxiEntity> ew = new EntityWrapper< YouerxinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( youerxinxi, "youerxinxi"));
YouerxinxiView youerxinxiView = youerxinxiService.selectView(ew);
return R.ok("查询幼儿信息成功").put("data", youerxinxiView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
YouerxinxiEntity youerxinxi = youerxinxiService.selectById(id);
return R.ok().put("data", youerxinxi);
}
/**
* 前端详情
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
YouerxinxiEntity youerxinxi = youerxinxiService.selectById(id);
return R.ok().put("data", youerxinxi);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody YouerxinxiEntity youerxinxi, HttpServletRequest request){
youerxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(youerxinxi);
youerxinxiService.insert(youerxinxi);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody YouerxinxiEntity youerxinxi, HttpServletRequest request){
youerxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(youerxinxi);
youerxinxiService.insert(youerxinxi);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody YouerxinxiEntity youerxinxi, HttpServletRequest request){
//ValidatorUtils.validateEntity(youerxinxi);
youerxinxiService.updateById(youerxinxi);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
youerxinxiService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
* 提醒接口
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
Wrapper<YouerxinxiEntity> wrapper = new EntityWrapper<YouerxinxiEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("yonghu")) {
wrapper.eq("yonghuming", (String)request.getSession().getAttribute("username"));
}
if(tableName.equals("jiaoshi")) {
wrapper.eq("gonghao", (String)request.getSession().getAttribute("username"));
}
int count = youerxinxiService.selectCount(wrapper);
return R.ok().put("count", count);
}
}
如果也想学习本系统,下面领取。关注并回复:220springboot