基于springboot的大创管理系统源码和论文070
摘要
随着信息技术在管理上越来越深入而广泛的应用,管理信息系统的实施在技术上已逐步成熟。本文介绍了大创管理系统的开发全过程。通过分析大创管理系统管理的不足,创建了一个计算机管理大创管理系统的方案。文章介绍了大创管理系统的系统分析部分,包括可行性分析等,系统设计部分主要介绍了系统功能设计和数据库设计。
本大创管理系统有院系管理员,指导老师以及学生三个角色。学生功能有优秀项目,项目信息,评审方案,大创资讯,项目申报管理,项目中检管理,项目结项管理,项目评审管理,专家评审管理。指导老师功能有个人中心,优秀项目管理,项目类型管理,项目信息管理,项目申报管理,项目中检管理,项目结项管理,项目评审管理,专家评审管理,评审方案管理。院系管理员功能有个人中心,优秀项目管理,项目类型管理,项目信息管理,项目申报管理,项目中检管理,项目结项管理,项目评审管理,专家评审管理,评审方案管理。因而具有一定的实用性。
本站是一个B/S模式系统,采用SSM框架,MYSQL数据库设计开发,充分保证系统的稳定性。系统具有界面清晰、操作简单,功能齐全的特点,使得大创管理系统管理工作系统化、规范化。本系统的使用使管理人员从繁重的工作中解脱出来,实现无纸化办公,能够有效的提高大创管理系统管理效率。
关键词:大创管理系统;SSM框架;MYSQL数据库;Spring Boot
演示视频:
基于springboot的大创管理系统源码和论文
Abstract
With the deepening and extensive application of information technology in management, the implementation of management information systems has gradually matured in technology. This article introduces the entire development process of Daiso's management system. By analyzing the deficiencies of Daiso’s management system, a computer-based solution for Daiso’s management system was created. The article introduces the system analysis part of Daiso management system, including feasibility analysis, etc. The system design part mainly introduces the system function design and database design.
The Daiso management system has three roles: department administrator, instructor and student. Student functions include excellent projects, project information, review plans, Daiso information, project application management, project in-process inspection management, project closure management, project review management, and expert review management. The functions of the instructor include personal center, excellent project management, project type management, project information management, project declaration management, project inspection management, project completion management, project review management, expert review management, and review plan management. Department administrator functions include personal center, excellent project management, project type management, project information management, project declaration management, project inspection management, project completion management, project review management, expert review management, and review plan management. So it has a certain practicability.
This site is a B/S mode system, using SSM framework, MYSQL database design and development, fully guarantee the stability of the system. The system has the characteristics of clear interface, simple operation, and complete functions, which makes Daiso's management system systematized and standardized. The use of this system frees managers from heavy work, realizes a paperless office, and can effectively improve the management efficiency of Daiso's management system.
Keywords: Daiso Management System; SSM framework; MYSQL database; Spring Boot
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.ZhidaolaoshiEntity;
import com.entity.view.ZhidaolaoshiView;
import com.service.ZhidaolaoshiService;
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-04-21 16:28:27
*/
@RestController
@RequestMapping("/zhidaolaoshi")
public class ZhidaolaoshiController {
@Autowired
private ZhidaolaoshiService zhidaolaoshiService;
@Autowired
private TokenService tokenService;
/**
* 登录
*/
@IgnoreAuth
@RequestMapping(value = "/login")
public R login(String username, String password, String captcha, HttpServletRequest request) {
ZhidaolaoshiEntity user = zhidaolaoshiService.selectOne(new EntityWrapper<ZhidaolaoshiEntity>().eq("zhanghao", username));
if(user==null || !user.getMima().equals(password)) {
return R.error("账号或密码不正确");
}
String token = tokenService.generateToken(user.getId(), username,"zhidaolaoshi", "指导老师" );
return R.ok().put("token", token);
}
/**
* 注册
*/
@IgnoreAuth
@RequestMapping("/register")
public R register(@RequestBody ZhidaolaoshiEntity zhidaolaoshi){
//ValidatorUtils.validateEntity(zhidaolaoshi);
ZhidaolaoshiEntity user = zhidaolaoshiService.selectOne(new EntityWrapper<ZhidaolaoshiEntity>().eq("zhanghao", zhidaolaoshi.getZhanghao()));
if(user!=null) {
return R.error("注册用户已存在");
}
Long uId = new Date().getTime();
zhidaolaoshi.setId(uId);
zhidaolaoshiService.insert(zhidaolaoshi);
return R.ok();
}
/**
* 退出
*/
@RequestMapping("/logout")
public R logout(HttpServletRequest request) {
request.getSession().invalidate();
return R.ok("退出成功");
}
/**
* 获取用户的session用户信息
*/
@RequestMapping("/session")
public R getCurrUser(HttpServletRequest request){
Long id = (Long)request.getSession().getAttribute("userId");
ZhidaolaoshiEntity user = zhidaolaoshiService.selectById(id);
return R.ok().put("data", user);
}
/**
* 密码重置
*/
@IgnoreAuth
@RequestMapping(value = "/resetPass")
public R resetPass(String username, HttpServletRequest request){
ZhidaolaoshiEntity user = zhidaolaoshiService.selectOne(new EntityWrapper<ZhidaolaoshiEntity>().eq("zhanghao", username));
if(user==null) {
return R.error("账号不存在");
}
user.setMima("123456");
zhidaolaoshiService.updateById(user);
return R.ok("密码已重置为:123456");
}
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,ZhidaolaoshiEntity zhidaolaoshi,
HttpServletRequest request){
EntityWrapper<ZhidaolaoshiEntity> ew = new EntityWrapper<ZhidaolaoshiEntity>();
PageUtils page = zhidaolaoshiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, zhidaolaoshi), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,ZhidaolaoshiEntity zhidaolaoshi, HttpServletRequest request){
EntityWrapper<ZhidaolaoshiEntity> ew = new EntityWrapper<ZhidaolaoshiEntity>();
PageUtils page = zhidaolaoshiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, zhidaolaoshi), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( ZhidaolaoshiEntity zhidaolaoshi){
EntityWrapper<ZhidaolaoshiEntity> ew = new EntityWrapper<ZhidaolaoshiEntity>();
ew.allEq(MPUtil.allEQMapPre( zhidaolaoshi, "zhidaolaoshi"));
return R.ok().put("data", zhidaolaoshiService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(ZhidaolaoshiEntity zhidaolaoshi){
EntityWrapper< ZhidaolaoshiEntity> ew = new EntityWrapper< ZhidaolaoshiEntity>();
ew.allEq(MPUtil.allEQMapPre( zhidaolaoshi, "zhidaolaoshi"));
ZhidaolaoshiView zhidaolaoshiView = zhidaolaoshiService.selectView(ew);
return R.ok("查询指导老师成功").put("data", zhidaolaoshiView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
ZhidaolaoshiEntity zhidaolaoshi = zhidaolaoshiService.selectById(id);
return R.ok().put("data", zhidaolaoshi);
}
/**
* 前端详情
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
ZhidaolaoshiEntity zhidaolaoshi = zhidaolaoshiService.selectById(id);
return R.ok().put("data", zhidaolaoshi);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody ZhidaolaoshiEntity zhidaolaoshi, HttpServletRequest request){
zhidaolaoshi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(zhidaolaoshi);
ZhidaolaoshiEntity user = zhidaolaoshiService.selectOne(new EntityWrapper<ZhidaolaoshiEntity>().eq("zhanghao", zhidaolaoshi.getZhanghao()));
if(user!=null) {
return R.error("用户已存在");
}
zhidaolaoshi.setId(new Date().getTime());
zhidaolaoshiService.insert(zhidaolaoshi);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody ZhidaolaoshiEntity zhidaolaoshi, HttpServletRequest request){
zhidaolaoshi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(zhidaolaoshi);
ZhidaolaoshiEntity user = zhidaolaoshiService.selectOne(new EntityWrapper<ZhidaolaoshiEntity>().eq("zhanghao", zhidaolaoshi.getZhanghao()));
if(user!=null) {
return R.error("用户已存在");
}
zhidaolaoshi.setId(new Date().getTime());
zhidaolaoshiService.insert(zhidaolaoshi);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody ZhidaolaoshiEntity zhidaolaoshi, HttpServletRequest request){
//ValidatorUtils.validateEntity(zhidaolaoshi);
zhidaolaoshiService.updateById(zhidaolaoshi);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
zhidaolaoshiService.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<ZhidaolaoshiEntity> wrapper = new EntityWrapper<ZhidaolaoshiEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = zhidaolaoshiService.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.PingshenfanganEntity;
import com.entity.view.PingshenfanganView;
import com.service.PingshenfanganService;
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-04-21 16:28:28
*/
@RestController
@RequestMapping("/pingshenfangan")
public class PingshenfanganController {
@Autowired
private PingshenfanganService pingshenfanganService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,PingshenfanganEntity pingshenfangan,
HttpServletRequest request){
EntityWrapper<PingshenfanganEntity> ew = new EntityWrapper<PingshenfanganEntity>();
PageUtils page = pingshenfanganService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, pingshenfangan), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,PingshenfanganEntity pingshenfangan, HttpServletRequest request){
EntityWrapper<PingshenfanganEntity> ew = new EntityWrapper<PingshenfanganEntity>();
PageUtils page = pingshenfanganService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, pingshenfangan), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( PingshenfanganEntity pingshenfangan){
EntityWrapper<PingshenfanganEntity> ew = new EntityWrapper<PingshenfanganEntity>();
ew.allEq(MPUtil.allEQMapPre( pingshenfangan, "pingshenfangan"));
return R.ok().put("data", pingshenfanganService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(PingshenfanganEntity pingshenfangan){
EntityWrapper< PingshenfanganEntity> ew = new EntityWrapper< PingshenfanganEntity>();
ew.allEq(MPUtil.allEQMapPre( pingshenfangan, "pingshenfangan"));
PingshenfanganView pingshenfanganView = pingshenfanganService.selectView(ew);
return R.ok("查询评审方案成功").put("data", pingshenfanganView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
PingshenfanganEntity pingshenfangan = pingshenfanganService.selectById(id);
return R.ok().put("data", pingshenfangan);
}
/**
* 前端详情
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
PingshenfanganEntity pingshenfangan = pingshenfanganService.selectById(id);
return R.ok().put("data", pingshenfangan);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody PingshenfanganEntity pingshenfangan, HttpServletRequest request){
pingshenfangan.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(pingshenfangan);
pingshenfanganService.insert(pingshenfangan);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody PingshenfanganEntity pingshenfangan, HttpServletRequest request){
pingshenfangan.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(pingshenfangan);
pingshenfanganService.insert(pingshenfangan);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody PingshenfanganEntity pingshenfangan, HttpServletRequest request){
//ValidatorUtils.validateEntity(pingshenfangan);
pingshenfanganService.updateById(pingshenfangan);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
pingshenfanganService.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<PingshenfanganEntity> wrapper = new EntityWrapper<PingshenfanganEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = pingshenfanganService.selectCount(wrapper);
return R.ok().put("count", count);
}
}