您好!我是岛上程序猿,感谢您阅读本文,欢迎一键三连哦。
开发环境
开发语言:Java
框架:springboot
JDK版本:JDK1.8
服务器:tomcat7
数据库:mysql 5.7(一定要5.7版本)
数据库工具:Navicat11
开发软件:eclipse/myeclipse/idea
Maven包:Maven3.3.9
浏览器:谷歌浏览器
项目介绍
地方废物回收机构的需求和管理上的不断提升,地方废物回收机构管理的潜力将无限扩大,地方废物回收机构管理系统在业界被广泛关注,本系统及对此进行总体分析,将地方废物回收机构信息管理的发展提供参考。地方废物回收机构管理系统对地方废物回收机构有着明显的带动效应,对管理者的帮助更大。
本系统主要包括管理员和员工两个角色组成;主要包括:首页、个人中心、员工管理、员工请假管理、销假申请管理、工作日志管理、员工工资管理、员工任务管理、任务汇报管理、设备信息管理、设备借用管理、设备归还管理、设备保修管理、维修入库管理、员工打卡管理、员工评价管理、回收价格管理、宿舍信息管理、宿舍入住管理、宿舍搬出管理、管理员管理、系统管理等功能的管理系统。
功能介绍
主要对首页、个人中心、员工管理、员工请假管理、销假申请管理、工作日志管理、员工工资管理、员工任务管理、任务汇报管理、设备信息管理、设备借用管理、设备归还管理、设备保修管理、维修入库管理、员工打卡管理、员工评价管理、回收价格管理、宿舍信息管理、宿舍入住管理、宿舍搬出管理、管理员管理、系统管理的实现。
这个系统的功能结构设计如图所示。
系统功能模块图
效果图
目录
1 绪论 1
1.1课题背景 1
1.2课题研究现状 1
1.3初步设计方法与实施方案 2
1.4本文研究内容 2
2 系统开发环境 4
2.1 JAVA简介 4
2.2MyEclipse环境配置 4
2.3 B/S结构简介 4
2.4MySQL数据库 5
2.5 SPRINGBOOT框架 5
3 系统分析 6
3.1系统可行性分析 6
3.1.1经济可行性 6
3.1.2技术可行性 6
3.1.3运行可行性 6
3.2系统现状分析 6
3.3功能需求分析 7
3.4系统设计规则与运行环境 8
3.5系统流程分析 8
3.5.1操作流程 8
3.5.2添加信息流程 9
3.5.3删除信息流程 10
4 系统设计 11
4.1系统设计主要功能 11
4.2数据库设计 11
4.2.1数据库设计规范 11
4.2.2 E/R图 11
4.2.3数据表 12
5 系统实现 25
5.1系统功能模块 25
5.2后台模块 27
5.2.1管理员功能模块 27
5.2.2用户功能模块 30
6 系统测试 33
6.1功能测试 33
6.2可用性测试 33
6.3性能测试 34
6.4测试结果分析 34
7结 论 35
参考文献 36
致 谢 37
部分核心代码
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.YuangongpingjiaEntity;
import com.entity.view.YuangongpingjiaView;
import com.service.YuangongpingjiaService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
import java.io.IOException;
/**
* 员工评价
* 后端接口
* @author
* @email
* @date 2022-03-27 11:46:08
*/
@RestController
@RequestMapping("/yuangongpingjia")
public class YuangongpingjiaController {
@Autowired
private YuangongpingjiaService yuangongpingjiaService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,YuangongpingjiaEntity yuangongpingjia,
HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("yuangong")) {
yuangongpingjia.setYuangonggonghao((String)request.getSession().getAttribute("username"));
}
EntityWrapper<YuangongpingjiaEntity> ew = new EntityWrapper<YuangongpingjiaEntity>();
PageUtils page = yuangongpingjiaService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yuangongpingjia), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,YuangongpingjiaEntity yuangongpingjia,
HttpServletRequest request){
EntityWrapper<YuangongpingjiaEntity> ew = new EntityWrapper<YuangongpingjiaEntity>();
PageUtils page = yuangongpingjiaService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yuangongpingjia), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( YuangongpingjiaEntity yuangongpingjia){
EntityWrapper<YuangongpingjiaEntity> ew = new EntityWrapper<YuangongpingjiaEntity>();
ew.allEq(MPUtil.allEQMapPre( yuangongpingjia, "yuangongpingjia"));
return R.ok().put("data", yuangongpingjiaService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(YuangongpingjiaEntity yuangongpingjia){
EntityWrapper< YuangongpingjiaEntity> ew = new EntityWrapper< YuangongpingjiaEntity>();
ew.allEq(MPUtil.allEQMapPre( yuangongpingjia, "yuangongpingjia"));
YuangongpingjiaView yuangongpingjiaView = yuangongpingjiaService.selectView(ew);
return R.ok("查询员工评价成功").put("data", yuangongpingjiaView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
YuangongpingjiaEntity yuangongpingjia = yuangongpingjiaService.selectById(id);
return R.ok().put("data", yuangongpingjia);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
YuangongpingjiaEntity yuangongpingjia = yuangongpingjiaService.selectById(id);
return R.ok().put("data", yuangongpingjia);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody YuangongpingjiaEntity yuangongpingjia, HttpServletRequest request){
yuangongpingjia.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(yuangongpingjia);
yuangongpingjiaService.insert(yuangongpingjia);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody YuangongpingjiaEntity yuangongpingjia, HttpServletRequest request){
yuangongpingjia.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(yuangongpingjia);
yuangongpingjiaService.insert(yuangongpingjia);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody YuangongpingjiaEntity yuangongpingjia, HttpServletRequest request){
//ValidatorUtils.validateEntity(yuangongpingjia);
yuangongpingjiaService.updateById(yuangongpingjia);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
yuangongpingjiaService.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<YuangongpingjiaEntity> wrapper = new EntityWrapper<YuangongpingjiaEntity>();
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("yuangong")) {
wrapper.eq("yuangonggonghao", (String)request.getSession().getAttribute("username"));
}
int count = yuangongpingjiaService.selectCount(wrapper);
return R.ok().put("count", count);
}
}
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.SushebanchuEntity;
import com.entity.view.SushebanchuView;
import com.service.SushebanchuService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
import java.io.IOException;
/**
* 宿舍搬出
* 后端接口
* @author
* @email
* @date 2022-03-27 11:46:08
*/
@RestController
@RequestMapping("/sushebanchu")
public class SushebanchuController {
@Autowired
private SushebanchuService sushebanchuService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,SushebanchuEntity sushebanchu,
HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("yuangong")) {
sushebanchu.setYuangonggonghao((String)request.getSession().getAttribute("username"));
}
EntityWrapper<SushebanchuEntity> ew = new EntityWrapper<SushebanchuEntity>();
PageUtils page = sushebanchuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, sushebanchu), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,SushebanchuEntity sushebanchu,
HttpServletRequest request){
EntityWrapper<SushebanchuEntity> ew = new EntityWrapper<SushebanchuEntity>();
PageUtils page = sushebanchuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, sushebanchu), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( SushebanchuEntity sushebanchu){
EntityWrapper<SushebanchuEntity> ew = new EntityWrapper<SushebanchuEntity>();
ew.allEq(MPUtil.allEQMapPre( sushebanchu, "sushebanchu"));
return R.ok().put("data", sushebanchuService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(SushebanchuEntity sushebanchu){
EntityWrapper< SushebanchuEntity> ew = new EntityWrapper< SushebanchuEntity>();
ew.allEq(MPUtil.allEQMapPre( sushebanchu, "sushebanchu"));
SushebanchuView sushebanchuView = sushebanchuService.selectView(ew);
return R.ok("查询宿舍搬出成功").put("data", sushebanchuView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
SushebanchuEntity sushebanchu = sushebanchuService.selectById(id);
return R.ok().put("data", sushebanchu);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
SushebanchuEntity sushebanchu = sushebanchuService.selectById(id);
return R.ok().put("data", sushebanchu);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody SushebanchuEntity sushebanchu, HttpServletRequest request){
sushebanchu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(sushebanchu);
sushebanchuService.insert(sushebanchu);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody SushebanchuEntity sushebanchu, HttpServletRequest request){
sushebanchu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(sushebanchu);
sushebanchuService.insert(sushebanchu);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody SushebanchuEntity sushebanchu, HttpServletRequest request){
//ValidatorUtils.validateEntity(sushebanchu);
sushebanchuService.updateById(sushebanchu);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
sushebanchuService.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<SushebanchuEntity> wrapper = new EntityWrapper<SushebanchuEntity>();
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("yuangong")) {
wrapper.eq("yuangonggonghao", (String)request.getSession().getAttribute("username"));
}
int count = sushebanchuService.selectCount(wrapper);
return R.ok().put("count", count);
}
}