当前位置: 首页 > news >正文

库存管理系统基于spingboot vue的前后端分离仓库库存管理系统java项目java课程设计java毕业设计

文章目录

  • 库存管理系统
    • 一、项目演示
    • 二、项目介绍
    • 三、部分功能截图
    • 四、部分代码展示
    • 五、底部获取项目源码(9.9¥带走)

库存管理系统

一、项目演示

库存管理系统

二、项目介绍

基于spingboot和vue前后端分离的库存管理系统

功能模块:用户管理、部门管理、岗位管理、供应商信息、商品信息管理、商品入库、商品出库、商品库存、库存不足预警、商品过期警告、操作日志、登录日志

语言:java

前端技术:Vue、Element-Plus

后端技术:SpringBoot、Mybatis、Redis、Ruoyi

数据库:MySQL

三、部分功能截图

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

四、部分代码展示

package com.ruoyi.web.controller.common;import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.file.FileUploadUtils;
import com.ruoyi.common.utils.file.FileUtils;
import com.ruoyi.framework.config.ServerConfig;/*** 通用请求处理* **/
@RestController
public class CommonController
{private static final Logger log = LoggerFactory.getLogger(CommonController.class);@Autowiredprivate ServerConfig serverConfig;/*** 通用下载请求* * @param fileName 文件名称* @param delete 是否删除*/@GetMapping("common/download")public void fileDownload(String fileName, Boolean delete, HttpServletResponse response, HttpServletRequest request){try{if (!FileUtils.checkAllowDownload(fileName)){throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", fileName));}String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1);String filePath = RuoYiConfig.getDownloadPath() + fileName;response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);FileUtils.setAttachmentResponseHeader(response, realFileName);FileUtils.writeBytes(filePath, response.getOutputStream());if (delete){FileUtils.deleteFile(filePath);}}catch (Exception e){log.error("下载文件失败", e);}}/*** 通用上传请求*/@PostMapping("/common/upload")public AjaxResult uploadFile(MultipartFile file) throws Exception{try{// 上传文件路径String filePath = RuoYiConfig.getUploadPath();// 上传并返回新文件名称String fileName = FileUploadUtils.upload(filePath, file);String url = serverConfig.getUrl() + fileName;AjaxResult ajax = AjaxResult.success();ajax.put("fileName", fileName);ajax.put("url", url);return ajax;}catch (Exception e){return AjaxResult.error(e.getMessage());}}/*** 本地资源通用下载*/@GetMapping("/common/download/resource")public void resourceDownload(String resource, HttpServletRequest request, HttpServletResponse response)throws Exception{try{if (!FileUtils.checkAllowDownload(resource)){throw new Exception(StringUtils.format("资源文件({})非法,不允许下载。 ", resource));}// 本地资源路径String localPath = RuoYiConfig.getProfile();// 数据库资源地址String downloadPath = localPath + StringUtils.substringAfter(resource, Constants.RESOURCE_PREFIX);// 下载名称String downloadName = StringUtils.substringAfterLast(downloadPath, "/");response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);FileUtils.setAttachmentResponseHeader(response, downloadName);FileUtils.writeBytes(downloadPath, response.getOutputStream());}catch (Exception e){log.error("下载文件失败", e);}}
}
package com.ruoyi.common.core.controller;import java.beans.PropertyEditorSupport;
import java.util.Date;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.core.page.PageDomain;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.core.page.TableSupport;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.sql.SqlUtil;/*** web层通用数据处理* **/
public class BaseController
{protected final Logger logger = LoggerFactory.getLogger(this.getClass());/*** 将前台传递过来的日期格式的字符串,自动转化为Date类型*/@InitBinderpublic void initBinder(WebDataBinder binder){// Date 类型转换binder.registerCustomEditor(Date.class, new PropertyEditorSupport(){@Overridepublic void setAsText(String text){setValue(DateUtils.parseDate(text));}});}/*** 设置请求分页数据*/protected void startPage(){PageUtils.startPage();}/*** 设置请求排序数据*/protected void startOrderBy(){PageDomain pageDomain = TableSupport.buildPageRequest();if (StringUtils.isNotEmpty(pageDomain.getOrderBy())){String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());PageHelper.orderBy(orderBy);}}/*** 响应请求分页数据*/@SuppressWarnings({ "rawtypes", "unchecked" })protected TableDataInfo getDataTable(List<?> list){TableDataInfo rspData = new TableDataInfo();rspData.setCode(HttpStatus.SUCCESS);rspData.setMsg("查询成功");rspData.setRows(list);rspData.setTotal(new PageInfo(list).getTotal());return rspData;}/*** 返回成功*/public AjaxResult success(){return AjaxResult.success();}/*** 返回失败消息*/public AjaxResult error(){return AjaxResult.error();}/*** 返回成功消息*/public AjaxResult success(String message){return AjaxResult.success(message);}/*** 返回失败消息*/public AjaxResult error(String message){return AjaxResult.error(message);}/*** 响应返回结果* * @param rows 影响行数* @return 操作结果*/protected AjaxResult toAjax(int rows){return rows > 0 ? AjaxResult.success() : AjaxResult.error();}/*** 响应返回结果* * @param result 结果* @return 操作结果*/protected AjaxResult toAjax(boolean result){return result ? success() : error();}/*** 页面跳转*/public String redirect(String url){return StringUtils.format("redirect:{}", url);}/*** 获取用户缓存信息*/public LoginUser getLoginUser(){return SecurityUtils.getLoginUser();}/*** 获取登录用户id*/public Long getUserId(){return getLoginUser().getUserId();}/*** 获取登录部门id*/public Long getDeptId(){return getLoginUser().getDeptId();}/*** 获取登录用户名*/public String getUsername(){return getLoginUser().getUsername();}
}
package com.ruoyi.liuyb.controller;import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
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.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.liuyb.domain.DrugIn;
import com.ruoyi.liuyb.service.IDrugInService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;/*** 药品入库Controller* * @author liuyb* @date 2022-02-23*/
@RestController
@RequestMapping("/drug/drugin")
public class DrugInController extends BaseController
{@Autowiredprivate IDrugInService drugInService;/*** 查询药品入库列表*/@PreAuthorize("@ss.hasPermi('drug:drugin:list')")@GetMapping("/list")public TableDataInfo list(DrugIn drugIn){startPage();List<DrugIn> list = drugInService.selectDrugInList(drugIn);return getDataTable(list);}//查距离过保90天的@PreAuthorize("@ss.hasPermi('drug:drugin:list')")@GetMapping("/list1")public TableDataInfo list1(DrugIn drugIn){return getDataTable(drugInService.selectDrugInList1(drugIn));}//test@GetMapping("/getname")public AjaxResult getnameno(DrugIn drugIn){return AjaxResult.success(drugInService.selectDrugInNoName(drugIn));}/*** 查询本月的入库信息** @param drugIn* @return 药品入库集合*/@PreAuthorize("@ss.hasAnyPermi('drug:drugin:query')")@GetMapping("/getdata")public AjaxResult getdata(DrugIn drugIn){return AjaxResult.success(drugInService.selectDrugInNameAndNum(drugIn));}@PreAuthorize("@ss.hasAnyPermi('drug:drugin:query')")@GetMapping("/getmonthdata")public AjaxResult GetMonthData(DrugIn drugIn) {return AjaxResult.success(drugInService.selectDrugInNumByMonth(drugIn));}/*** 查询入库批次* @return*/@PreAuthorize("@ss.hasAnyPermi('drug:drugin:query')")@GetMapping("/drunginbatch")public AjaxResult GetBatch(){return AjaxResult.success(drugInService.selectDrugInBatch());}/*** 导出药品入库列表*/@PreAuthorize("@ss.hasPermi('drug:drugin:export')")@Log(title = "药品入库", businessType = BusinessType.EXPORT)@PostMapping("/export")public void export(HttpServletResponse response, DrugIn drugIn){List<DrugIn> list = drugInService.selectDrugInList(drugIn);ExcelUtil<DrugIn> util = new ExcelUtil<DrugIn>(DrugIn.class);util.exportExcel(response, list, "药品入库数据");}/*** 获取药品入库详细信息*/@PreAuthorize("@ss.hasPermi('drug:drugin:query')")@GetMapping(value = "/{druginid}")public AjaxResult getInfo(@PathVariable("druginid") Long druginid){return AjaxResult.success(drugInService.selectDrugInByDruginid(druginid));}/*** 新增药品入库*/@PreAuthorize("@ss.hasPermi('drug:drugin:add')")@Log(title = "药品入库", businessType = BusinessType.INSERT)@PostMappingpublic AjaxResult add(@RequestBody DrugIn drugIn){return toAjax(drugInService.insertDrugIn(drugIn));}/*** 修改药品入库*/@PreAuthorize("@ss.hasPermi('drug:drugin:edit')")@Log(title = "药品入库", businessType = BusinessType.UPDATE)@PutMappingpublic AjaxResult edit(@RequestBody DrugIn drugIn){return toAjax(drugInService.updateDrugIn(drugIn));}/*** 删除药品入库*/@PreAuthorize("@ss.hasPermi('drug:drugin:remove')")@Log(title = "药品入库", businessType = BusinessType.DELETE)@DeleteMapping("/{druginids}")public AjaxResult remove(@PathVariable Long[] druginids){return toAjax(drugInService.deleteDrugInByDruginids(druginids));}
}

五、底部获取项目源码(9.9¥带走)

有问题,或者需要协助调试运行项目的也可以

相关文章:

库存管理系统基于spingboot vue的前后端分离仓库库存管理系统java项目java课程设计java毕业设计

文章目录 库存管理系统一、项目演示二、项目介绍三、部分功能截图四、部分代码展示五、底部获取项目源码&#xff08;9.9&#xffe5;带走&#xff09; 库存管理系统 一、项目演示 库存管理系统 二、项目介绍 基于spingboot和vue前后端分离的库存管理系统 功能模块&#xff…...

【ArcGIS AddIn插件】【可用于全国水旱灾害风险普查】全网最强洪水淹没分析插件-基于8邻域种子搜索算法-有源淹没分析算法

最近有很多GIS小伙伴咨询我关于基于8邻域种子搜索算法的有源淹没分析插件的使用方法及原理&#xff0c;咱们通过这篇文章给大家详细介绍下这款插件的运行机制。 一、插件类型及适用版本 本插件属于ArcGIS AddIn工具条插件&#xff0c;基于ArcGIS Engine10.2.2的开发环境开发的&…...

==和equals的区别(面试题)

和equals有什么区别 对于基本数据类型&#xff0c;比较的是值是否相等&#xff0c;对于引用类型则是比较的地址是否相等&#xff1b;对于equals来说&#xff0c;基本数据类型没有equals方法&#xff0c;对于引用类型equals比较的是引用对象是否相同 那针对以上结论&#xff0c…...

本地项目上传到GitHub上(李豆)

本地项目上传到GitHub上(李豆) 准备工作&#xff1a; 本地需要有 git 也需要有一个 GitHub 账号 首先需要在 GitHub 新建一个空仓库 在想要上传项目的文件夹中使用 Git 命令操作 初始化&#xff1a; git init与 github 仓库进行链接 &#xff1a;git remote add origin …...

碧海威L7云路由无线运营版 confirm.php/jumper.php 命令注入漏洞复现(XVE-2024-15716)

0x01 产品简介 碧海威L7网络设备是 北京智慧云巅科技有限公司下的产品,基于国产化ARM硬件平台,采用软硬一体协同设计方案,释放出产品最大效能,具有高性能,高扩展,产品性能强劲,具备万兆吞吐能力,支持上万用户同时在线等高性能。其采用简单清晰的可视化WEB管理界面,支持…...

redis实战-添加商户缓存

为什么要使用缓存 言简意赅&#xff1a;速度快&#xff0c;好用缓存数据存储于代码中&#xff0c;而代码运行在内存中&#xff0c;内存的读写性能远高于磁盘&#xff0c;缓存可以大大降低用户访问并发量带来的服务器读写压力实际开发中&#xff0c;企业的数据量&#xff0c;少…...

SQL游标的基本使用方法与示例

SQL游标的基本使用方法与示例 大家好&#xff0c;我是免费搭建查券返利机器人省钱赚佣金就用微赚淘客系统3.0的小编&#xff0c;也是冬天不穿秋裤&#xff0c;天冷也要风度的程序猿&#xff01;今天我们来探讨SQL游标的基本使用方法及示例。在数据库编程中&#xff0c;游标是一…...

还不知道工业以太网和现场总线区别???

工业以太网 工业以太网是一种专为工业环境设计的网络通信技术&#xff0c;它基于标准的以太网技术&#xff0c;但针对工业应用进行了优化。工业以太网能够适应高温、低温、防尘等恶劣工业环境&#xff0c;采用TCP/IP协议&#xff0c;与IEEE 802.3标准兼容&#xff0c;并在应用层…...

量化交易 - 策略回测

策略回测 1、什么是策略回测&#xff1f;2、策略回测的作用3、策略回测系统概述3.1策略回测中相关的指标介绍3.2量化交易策略的资金容量3.3 完整的策略回测系统包含哪些内容 1、什么是策略回测&#xff1f; 策略回测&#xff0c;也称之为策略回溯测试&#xff0c;是指利用交易…...

Java--选择排序

思想 从左向右遍历数组&#xff0c;让每个数组元素依次作为基准&#xff0c;将基准数组扫描一次&#xff0c;若有元素比基准小则标记这个元素&#xff0c;若后续元素存在比此元素更小的&#xff0c;则标记更小的元素&#xff0c;遍历完此次数组之后&#xff0c;交换基准和标记数…...

Python基础之模块和包

文章目录 1 模块和包1.1 模块和包1.1.1 模块1.1.2 包1.1.3 简单使用 1.2 import 语句1.2.1 import1.2.2 from … import 语句1.2.3 from … import * 语句 1.4 深入模块1.4.1 模块符号表1.4.2 __name__属性1.4.3 dir() 函数1.4.4 作用域 1.5 常用内置模块 1 模块和包 1.1 模块…...

基于SpringBoot漫画网站系统设计和实现(源码+LW+调试文档+讲解等)

&#x1f497;博主介绍&#xff1a;✌全网粉丝10W,CSDN作者、博客专家、全栈领域优质创作者&#xff0c;博客之星、平台优质作者、专注于Java、小程序技术领域和毕业项目实战✌&#x1f497; &#x1f31f;文末获取源码数据库&#x1f31f; 感兴趣的可以先收藏起来&#xff0c;…...

Mysql----表的约束

提示&#xff1a;以下是本篇文章正文内容&#xff0c;下面案例可供参考 一、表的约束 表的约束&#xff1a;表中一定要有约束&#xff0c;通过约束让插入表中的数据是符合预期的。它的本质是通过技术手段&#xff0c;让程序员插入正确的数据&#xff0c;约束的最终目标是保证…...

如何用 PHP 实现一个自定义爬虫框架

随着互联网的不断发展&#xff0c;信息量爆炸式增长&#xff0c;获取有价值的信息已经成为了许多人的需求。在这样的大环境下&#xff0c;爬虫技术逐渐兴起&#xff0c;成为了大数据时代的重要工具之一。爬虫技术的应用十分广泛&#xff0c;其可以用于网络舆情监测、数据分析、…...

【机器学习】机器学习的重要方法——强化学习:理论,方法与实践

目录 一、强化学习的核心概念 二、强化学习算法的分类与示例代码 三.强化学习的优势 四.强化学习的应用与挑战 五、总结与展望 强化学习&#xff1a;理论&#xff0c;方法和实践 在人工智能的广阔领域中&#xff0c;强化学习&#xff08;Reinforcement Learning, RL&…...

Linux磁盘监控思路分析

磁盘监控原理 设备又名I/O设备&#xff0c;泛指计算机系统中除主机以外的所有外部设备。 1.1 计算机分类 1.1.1 按照信息传输速度分&#xff1a; 1.低速设备&#xff1a;每秒传输信息仅几个字节或者百个字节&#xff0c;如&#xff1a;键盘、鼠标等 2.中速设备&#xff1a…...

pc端制作一个顶部固定的菜单栏

效果 hsl颜色 hsl颜色在css中比较方便 https://www.w3school.com.cn/css/css_colors_hsl.asp 色相&#xff08;hue&#xff09;是色轮上从 0 到 360 的度数。0 是红色&#xff0c;120 是绿色&#xff0c;240 是蓝色。饱和度&#xff08;saturation&#xff09;是一个百分比值…...

ONLYOFFICE 8.1版本桌面编辑器深度体验:创新功能与卓越性能的结合

ONLYOFFICE 8.1版本桌面编辑器深度体验&#xff1a;创新功能与卓越性能的结合 随着数字化办公的日益普及&#xff0c;一款高效、功能丰富的办公软件成为了职场人士的必备工具。ONLYOFFICE团队一直致力于为用户提供全面而先进的办公解决方案。最新推出的ONLYOFFICE 8.1版本桌面编…...

使用Java连接数据库并且执行数据库操作和创建用户登录图形化界面(2)

&#xff08;1&#xff09;在student数据库上创建一个用户表tb_account&#xff0c;该表包含用户id&#xff0c;用户名和密码。 字段名称 数据类型 注释 约束 user_id Char(8) 用户id 主键 user_name char(10) 用户名 不能为空 password char(10) 密码 默认值&a…...

socket编程常见操作

1、连接的建立 分为两种&#xff1a;服务端处理接收客户端的连接&#xff1b;服务端作为客户端连接第三方服务 //作为服务端 int listenfd socket(AF_INET, SOCK_STREAM, 0); bind(listenfd, (struct sockaddr*)&servaddr, sizeof(servaddr))) listen(listenfd, 10); //…...

React hook之useRef

React useRef 详解 useRef 是 React 提供的一个 Hook&#xff0c;用于在函数组件中创建可变的引用对象。它在 React 开发中有多种重要用途&#xff0c;下面我将全面详细地介绍它的特性和用法。 基本概念 1. 创建 ref const refContainer useRef(initialValue);initialValu…...

渗透实战PortSwigger靶场-XSS Lab 14:大多数标签和属性被阻止

<script>标签被拦截 我们需要把全部可用的 tag 和 event 进行暴力破解 XSS cheat sheet&#xff1a; https://portswigger.net/web-security/cross-site-scripting/cheat-sheet 通过爆破发现body可以用 再把全部 events 放进去爆破 这些 event 全部可用 <body onres…...

生成 Git SSH 证书

&#x1f511; 1. ​​生成 SSH 密钥对​​ 在终端&#xff08;Windows 使用 Git Bash&#xff0c;Mac/Linux 使用 Terminal&#xff09;执行命令&#xff1a; ssh-keygen -t rsa -b 4096 -C "your_emailexample.com" ​​参数说明​​&#xff1a; -t rsa&#x…...

相机Camera日志分析之三十一:高通Camx HAL十种流程基础分析关键字汇总(后续持续更新中)

【关注我,后续持续新增专题博文,谢谢!!!】 上一篇我们讲了:有对最普通的场景进行各个日志注释讲解,但相机场景太多,日志差异也巨大。后面将展示各种场景下的日志。 通过notepad++打开场景下的日志,通过下列分类关键字搜索,即可清晰的分析不同场景的相机运行流程差异…...

docker 部署发现spring.profiles.active 问题

报错&#xff1a; org.springframework.boot.context.config.InvalidConfigDataPropertyException: Property spring.profiles.active imported from location class path resource [application-test.yml] is invalid in a profile specific resource [origin: class path re…...

Java求职者面试指南:计算机基础与源码原理深度解析

Java求职者面试指南&#xff1a;计算机基础与源码原理深度解析 第一轮提问&#xff1a;基础概念问题 1. 请解释什么是进程和线程的区别&#xff1f; 面试官&#xff1a;进程是程序的一次执行过程&#xff0c;是系统进行资源分配和调度的基本单位&#xff1b;而线程是进程中的…...

MFC 抛体运动模拟:常见问题解决与界面美化

在 MFC 中开发抛体运动模拟程序时,我们常遇到 轨迹残留、无效刷新、视觉单调、物理逻辑瑕疵 等问题。本文将针对这些痛点,详细解析原因并提供解决方案,同时兼顾界面美化,让模拟效果更专业、更高效。 问题一:历史轨迹与小球残影残留 现象 小球运动后,历史位置的 “残影”…...

2.3 物理层设备

在这个视频中&#xff0c;我们要学习工作在物理层的两种网络设备&#xff0c;分别是中继器和集线器。首先来看中继器。在计算机网络中两个节点之间&#xff0c;需要通过物理传输媒体或者说物理传输介质进行连接。像同轴电缆、双绞线就是典型的传输介质&#xff0c;假设A节点要给…...

Docker环境下安装 Elasticsearch + IK 分词器 + Pinyin插件 + Kibana(适配7.10.1)

做RAG自己打算使用esmilvus自己开发一个&#xff0c;安装时好像网上没有比较新的安装方法&#xff0c;然后找了个旧的方法对应试试&#xff1a; &#x1f680; 本文将手把手教你在 Docker 环境中部署 Elasticsearch 7.10.1 IK分词器 拼音插件 Kibana&#xff0c;适配中文搜索…...

本地部署drawDB结合内网穿透技术实现数据库远程管控方案

文章目录 前言1. Windows本地部署DrawDB2. 安装Cpolar内网穿透3. 实现公网访问DrawDB4. 固定DrawDB公网地址 前言 在数字化浪潮席卷全球的背景下&#xff0c;数据治理能力正日益成为构建现代企业核心竞争力的关键因素。无论是全球500强企业的数据中枢系统&#xff0c;还是初创…...