计算机毕业设计 办公用品管理系统 Java+SpringBoot+Vue 前后端分离 文档报告 代码讲解 安装调试

🍊作者:计算机编程-吉哥
🍊简介:专业从事JavaWeb程序开发,微信小程序开发,定制化项目、 源码、代码讲解、文档撰写、ppt制作。做自己喜欢的事,生活就是快乐的。
🍊心愿:点赞 👍 收藏 ⭐评论 📝
🍅 文末获取源码联系

👇🏻 精彩专栏推荐订阅 👇🏻 不然下次找不到哟~
Java毕业设计项目~热门选题推荐《1000套》

目录

1.技术选型

2.开发工具

3.功能

3.1【角色】

3.2【前端功能模块】

3.3【后端功能模块】

4.项目演示截图

4.1 登录

4.2 办公用品管理

4.3 部门信息管理

4.4 用品采购管理

4.5 入库登记管理

4.6 申领用品管理

4.7 出库登记管理

4.8 系统管理

5.核心代码

5.1拦截器

5.2分页工具类

5.3文件上传下载

5.4前端请求

6.LW文档大纲参考


背景意义介绍: 

办公用品管理系统对于现代企业来说至关重要,它不仅有助于提高办公效率,还能有效控制成本和资源分配。基于Java、SpringBoot和Vue.js技术实现的系统,通过提供一个集成平台,使得办公用品的采购、库存管理、分配和跟踪变得更加高效和透明。

该系统通过前端功能模块,如登录、注册、首页、办公用品管理、交流心得等,为用户提供了直观的操作界面,使得用户可以轻松地进行申领、查看和管理办公用品。同时,个人中心的设置允许用户管理个人信息和收藏,进一步提升了用户体验。

后端功能模块则为管理员提供了强大的管理工具,包括用户管理、部门信息管理、供应商管理、用品分类管理、办公用品管理、用品采购管理、入库登记管理、申领用品管理、出库登记管理和系统管理等。这些模块确保了办公用品的整个生命周期都能得到有效监控和管理。

系统通过轮播图管理和新闻公告管理等功能,增强了信息传递的效率,确保所有用户都能及时获取到最新的公司政策和通知。此外,系统管理模块还涵盖了系统首页的统计功能,为管理员提供了全局的数据分析和报告,帮助他们做出更加明智的决策。

综上所述,办公用品管理系统不仅优化了办公用品的管理工作,还提升了企业的运营效率,是现代企业管理不可或缺的工具。通过数字化转型,企业能够更好地适应市场变化,实现可持续发展。

1.技术选型

springboot、mybatisplus、vue、elementui、html、css、js、mysql、jdk1.8

2.开发工具

idea、navicat

3.功能

3.1【角色】

管理员、用户

3.2【前端功能模块】

  • 登录
  • 注册
  • 办公用品管理(申领)
  • 申领用品管理

3.3【后端功能模块】

  • 登录
  • 系统首页(统计)
  • 个人中心
  • 用户管理
  • 部门信息管理
  • 供应商管理
  • 用品分类管理
  • 办公用品管理
  • 用品采购管理
  • 入库登记管理
  • 申领用品管理
  • 出库登记管理
  • 系统管理

4.项目演示截图

4.1 登录

4.2 办公用品管理

4.3 部门信息管理

4.4 用品采购管理

4.5 入库登记管理

4.6 申领用品管理

4.7 出库登记管理

4.8 系统管理

5.核心代码

5.1拦截器

java">package com.interceptor;
 
import com.alibaba.fastjson.JSONObject;
import com.annotation.IgnoreAuth;
import com.entity.TokenEntity;
import com.service.TokenService;
import com.utils.R;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.HandlerInterceptor;
 
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.PrintWriter;
 
/**
 * 权限(Token)验证
 */
@Component
public class AuthorizationInterceptor implements HandlerInterceptor {
 
    public static final String LOGIN_TOKEN_KEY = "Token";
 
    @Autowired
    private TokenService tokenService;
    
	@Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
 
		//支持跨域请求
        response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE");
        response.setHeader("Access-Control-Max-Age", "3600");
        response.setHeader("Access-Control-Allow-Credentials", "true");
        response.setHeader("Access-Control-Allow-Headers", "x-requested-with,request-source,Token, Origin,imgType, Content-Type, cache-control,postman-token,Cookie, Accept,authorization");
        response.setHeader("Access-Control-Allow-Origin", request.getHeader("Origin"));
	// 跨域时会首先发送一个OPTIONS请求,这里我们给OPTIONS请求直接返回正常状态
	if (request.getMethod().equals(RequestMethod.OPTIONS.name())) {
        	response.setStatus(HttpStatus.OK.value());
            return false;
        }
        
        IgnoreAuth annotation;
        if (handler instanceof HandlerMethod) {
            annotation = ((HandlerMethod) handler).getMethodAnnotation(IgnoreAuth.class);
        } else {
            return true;
        }
 
        //从header中获取token
        String token = request.getHeader(LOGIN_TOKEN_KEY);
        
        /**
         * 不需要验证权限的方法直接放过
         */
        if(annotation!=null) {
        	return true;
        }
        
        TokenEntity tokenEntity = null;
        if(StringUtils.isNotBlank(token)) {
        	tokenEntity = tokenService.getTokenEntity(token);
        }
        
        if(tokenEntity != null) {
        	request.getSession().setAttribute("userId", tokenEntity.getUserid());
        	request.getSession().setAttribute("role", tokenEntity.getRole());
        	request.getSession().setAttribute("tableName", tokenEntity.getTablename());
        	request.getSession().setAttribute("username", tokenEntity.getUsername());
        	return true;
        }
        
		PrintWriter writer = null;
		response.setCharacterEncoding("UTF-8");
		response.setContentType("application/json; charset=utf-8");
		try {
		    writer = response.getWriter();
		    writer.print(JSONObject.toJSONString(R.error(401, "请先登录")));
		} finally {
		    if(writer != null){
		        writer.close();
		    }
		}
		return false;
    }
}

5.2分页工具类

java"> 
package com.utils;
 
import java.io.Serializable;
import java.util.List;
import java.util.Map;
 
import com.baomidou.mybatisplus.plugins.Page;
 
/**
 * 分页工具类
 */
public class PageUtils implements Serializable {
	private static final long serialVersionUID = 1L;
	//总记录数
	private long total;
	//每页记录数
	private int pageSize;
	//总页数
	private long totalPage;
	//当前页数
	private int currPage;
	//列表数据
	private List<?> list;
	
	/**
	 * 分页
	 * @param list        列表数据
	 * @param totalCount  总记录数
	 * @param pageSize    每页记录数
	 * @param currPage    当前页数
	 */
	public PageUtils(List<?> list, int totalCount, int pageSize, int currPage) {
		this.list = list;
		this.total = totalCount;
		this.pageSize = pageSize;
		this.currPage = currPage;
		this.totalPage = (int)Math.ceil((double)totalCount/pageSize);
	}
 
	/**
	 * 分页
	 */
	public PageUtils(Page<?> page) {
		this.list = page.getRecords();
		this.total = page.getTotal();
		this.pageSize = page.getSize();
		this.currPage = page.getCurrent();
		this.totalPage = page.getPages();
	}
	
	/*
	 * 空数据的分页
	 */
	public PageUtils(Map<String, Object> params) {
 		Page page =new Query(params).getPage();
		new PageUtils(page);
	}
 
	 
	public int getPageSize() {
		return pageSize;
	}
 
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
 
	public int getCurrPage() {
		return currPage;
	}
 
	public void setCurrPage(int currPage) {
		this.currPage = currPage;
	}
 
	public List<?> getList() {
		return list;
	}
 
	public void setList(List<?> list) {
		this.list = list;
	}
 
	public long getTotalPage() {
		return totalPage;
	}
 
	public void setTotalPage(long totalPage) {
		this.totalPage = totalPage;
	}
 
	public long getTotal() {
		return total;
	}
 
	public void setTotal(long total) {
		this.total = total;
	}
	
}

5.3文件上传下载

java">package com.controller;
 
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.UUID;
 
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.util.ResourceUtils;
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 org.springframework.web.multipart.MultipartFile;
 
import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.ConfigEntity;
import com.entity.EIException;
import com.service.ConfigService;
import com.utils.R;
 
/**
 * 上传文件映射表
 */
@RestController
@RequestMapping("file")
@SuppressWarnings({"unchecked","rawtypes"})
public class FileController{
	@Autowired
    private ConfigService configService;
	/**
	 * 上传文件
	 */
	@RequestMapping("/upload")
    @IgnoreAuth
	public R upload(@RequestParam("file") MultipartFile file,String type) throws Exception {
		if (file.isEmpty()) {
			throw new EIException("上传文件不能为空");
		}
		String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);
		File path = new File(ResourceUtils.getURL("classpath:static").getPath());
		if(!path.exists()) {
		    path = new File("");
		}
		File upload = new File(path.getAbsolutePath(),"/upload/");
		if(!upload.exists()) {
		    upload.mkdirs();
		}
		String fileName = new Date().getTime()+"."+fileExt;
		File dest = new File(upload.getAbsolutePath()+"/"+fileName);
		file.transferTo(dest);
		if(StringUtils.isNotBlank(type) && type.equals("1")) {
			ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));
			if(configEntity==null) {
				configEntity = new ConfigEntity();
				configEntity.setName("faceFile");
				configEntity.setValue(fileName);
			} else {
				configEntity.setValue(fileName);
			}
			configService.insertOrUpdate(configEntity);
		}
		return R.ok().put("file", fileName);
	}
	
	/**
	 * 下载文件
	 */
	@IgnoreAuth
	@RequestMapping("/download")
	public ResponseEntity<byte[]> download(@RequestParam String fileName) {
		try {
			File path = new File(ResourceUtils.getURL("classpath:static").getPath());
			if(!path.exists()) {
			    path = new File("");
			}
			File upload = new File(path.getAbsolutePath(),"/upload/");
			if(!upload.exists()) {
			    upload.mkdirs();
			}
			File file = new File(upload.getAbsolutePath()+"/"+fileName);
			if(file.exists()){
 
				HttpHeaders headers = new HttpHeaders();
			    headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);    
			    headers.setContentDispositionFormData("attachment", fileName);    
			    return new ResponseEntity<byte[]>(FileUtils.readFileToByteArray(file),headers, HttpStatus.CREATED);
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
		return new ResponseEntity<byte[]>(HttpStatus.INTERNAL_SERVER_ERROR);
	}
	
}

5.4前端请求

import axios from 'axios'
import router from '@/router/router-static'
import storage from '@/utils/storage'
 
const http = axios.create({
    timeout: 1000 * 86400,
    withCredentials: true,
    baseURL: '/furniture',
    headers: {
        'Content-Type': 'application/json; charset=utf-8'
    }
})
// 请求拦截
http.interceptors.request.use(config => {
    config.headers['Token'] = storage.get('Token') // 请求头带上token
    return config
}, error => {
    return Promise.reject(error)
})
// 响应拦截
http.interceptors.response.use(response => {
    if (response.data && response.data.code === 401) { // 401, token失效
        router.push({ name: 'login' })
    }
    return response
}, error => {
    return Promise.reject(error)
})
export default http

6.LW文档大纲参考

 具体LW如何写法,可以咨询博主,耐心分享!

你可能还有感兴趣的项目👇🏻👇🏻👇🏻

更多项目推荐:计算机毕业设计项目

如果大家有任何疑虑,请在下方咨询或评论


http://www.niftyadmin.cn/n/5665765.html

相关文章

【ARM】中断的处理

ARM的异常向量表 如果发生异常后并没有exception level切换&#xff0c;并且发生异常之 前使用的栈指针是SP_EL0&#xff0c;那么使用第一组异常向量表。如果发生异常后并没有exception level切换&#xff0c;并且发生异常之 前使用的栈指针是SP_EL1/2/3&#xff0c;那么使用第…

新能源汽车 BMS 学习笔记篇——N-MOS P-MOS 的开关原理及选型要点

前言&#xff1a; 在之前的文章&#xff0c;小编有提到继电器和 MOS 都可以用作 BMS&#xff08;电池管理系统&#xff09; 中控制电池充放电的开关。相比继电器&#xff0c;MOS 管在开关应用中具有更快的速度、更小的体积、更低的功耗、更高的可靠性、更少的噪声以及更长的耐…

Vue 图片预览功能实现指南

1. 介绍 在现代 web 应用程序中&#xff0c;图片预览功能提升了用户体验&#xff0c;使用户可以在上传图片之前查看图片内容。本文将详细介绍如何在 Vue.js 应用中实现图片预览功能&#xff0c;包括基本实现、进阶功能、与 Element UI 的集成、常见优化技巧以及与其他库的结合…

解决Gson将长数字( json字符串)转换为科学记数法格式

Gson&#xff08;又称Google Gson&#xff09;是Google公司发布的一个开放源代码的Java库&#xff0c;主要用途为序列化Java对象为JSON字符串&#xff0c;或反序列化JSON字符串成Java对象。 依赖 Gradle: dependencies {implementation com.google.code.gson:gson:2.11.0 }…

Axure RP 9最新安装程序及汉化包下载(支持Win、Mac版,附下载安装教程)

数月前Axure RP官方已经发布了Axure RP 9的消息&#xff0c;并计划在今年夏天发布beta版本。新版Axure RP 9将是该工具向前迈出的重要一步&#xff0c;其中包括一系列广泛的改进&#xff1a;全面的UI修改&#xff0c;新的设计和文档功能以及前所未有的内部优化。我们已经彻底重…

【深度学习】(2)--PyTorch框架认识

文章目录 PyTorch框架认识1. Tensor张量定义与特性创建方式 2. 下载数据集下载测试展现下载内容 3. 创建DataLoader&#xff08;数据加载器&#xff09;4. 选择处理器5. 神经网络模型构建模型 6. 训练数据训练集数据测试集数据 7. 提高模型学习率 总结 PyTorch框架认识 PyTorc…

客户文章 | DAP-seq助力揭示MYC2转录因子调控银杏萜内酯生物合成的分子机制

银杏萜内酯是银杏中重要的天然药用活性成分&#xff0c;具有抗血栓、抗炎、治疗心脑血管疾病和预防阿尔茨海默病等药理活性&#xff0c;也是血小板活化因子的强拮抗剂。萜内酯在银杏中的含量极低&#xff0c;难以满足医药行业的需求&#xff0c;限制了银杏产业的发展和临床应用…

【嵌入式人工智能】嵌入式AI在物联网中如何应用

嵌入式人工智能&#xff08;Embedded AI&#xff09;在物联网&#xff08;IoT&#xff09;中的应用是将AI算法集成到各种物联网设备中&#xff0c;使这些设备能够执行复杂的任务&#xff0c;如数据分析和决策制定&#xff0c;而无需将数据传输到云端或集中式服务器。这种应用可…