当前位置: 首页 > 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); //…...

相机Camera日志实例分析之二:相机Camx【专业模式开启直方图拍照】单帧流程日志详解

【关注我&#xff0c;后续持续新增专题博文&#xff0c;谢谢&#xff01;&#xff01;&#xff01;】 上一篇我们讲了&#xff1a; 这一篇我们开始讲&#xff1a; 目录 一、场景操作步骤 二、日志基础关键字分级如下 三、场景日志如下&#xff1a; 一、场景操作步骤 操作步…...

2021-03-15 iview一些问题

1.iview 在使用tree组件时&#xff0c;发现没有set类的方法&#xff0c;只有get&#xff0c;那么要改变tree值&#xff0c;只能遍历treeData&#xff0c;递归修改treeData的checked&#xff0c;发现无法更改&#xff0c;原因在于check模式下&#xff0c;子元素的勾选状态跟父节…...

新能源汽车智慧充电桩管理方案:新能源充电桩散热问题及消防安全监管方案

随着新能源汽车的快速普及&#xff0c;充电桩作为核心配套设施&#xff0c;其安全性与可靠性备受关注。然而&#xff0c;在高温、高负荷运行环境下&#xff0c;充电桩的散热问题与消防安全隐患日益凸显&#xff0c;成为制约行业发展的关键瓶颈。 如何通过智慧化管理手段优化散…...

【C++从零实现Json-Rpc框架】第六弹 —— 服务端模块划分

一、项目背景回顾 前五弹完成了Json-Rpc协议解析、请求处理、客户端调用等基础模块搭建。 本弹重点聚焦于服务端的模块划分与架构设计&#xff0c;提升代码结构的可维护性与扩展性。 二、服务端模块设计目标 高内聚低耦合&#xff1a;各模块职责清晰&#xff0c;便于独立开发…...

OPenCV CUDA模块图像处理-----对图像执行 均值漂移滤波(Mean Shift Filtering)函数meanShiftFiltering()

操作系统&#xff1a;ubuntu22.04 OpenCV版本&#xff1a;OpenCV4.9 IDE:Visual Studio Code 编程语言&#xff1a;C11 算法描述 在 GPU 上对图像执行 均值漂移滤波&#xff08;Mean Shift Filtering&#xff09;&#xff0c;用于图像分割或平滑处理。 该函数将输入图像中的…...

网站指纹识别

网站指纹识别 网站的最基本组成&#xff1a;服务器&#xff08;操作系统&#xff09;、中间件&#xff08;web容器&#xff09;、脚本语言、数据厍 为什么要了解这些&#xff1f;举个例子&#xff1a;发现了一个文件读取漏洞&#xff0c;我们需要读/etc/passwd&#xff0c;如…...

云原生安全实战:API网关Kong的鉴权与限流详解

&#x1f525;「炎码工坊」技术弹药已装填&#xff01; 点击关注 → 解锁工业级干货【工具实测|项目避坑|源码燃烧指南】 一、基础概念 1. API网关&#xff08;API Gateway&#xff09; API网关是微服务架构中的核心组件&#xff0c;负责统一管理所有API的流量入口。它像一座…...

【JVM面试篇】高频八股汇总——类加载和类加载器

目录 1. 讲一下类加载过程&#xff1f; 2. Java创建对象的过程&#xff1f; 3. 对象的生命周期&#xff1f; 4. 类加载器有哪些&#xff1f; 5. 双亲委派模型的作用&#xff08;好处&#xff09;&#xff1f; 6. 讲一下类的加载和双亲委派原则&#xff1f; 7. 双亲委派模…...

Caliper 负载(Workload)详细解析

Caliper 负载(Workload)详细解析 负载(Workload)是 Caliper 性能测试的核心部分,它定义了测试期间要执行的具体合约调用行为和交易模式。下面我将全面深入地讲解负载的各个方面。 一、负载模块基本结构 一个典型的负载模块(如 workload.js)包含以下基本结构: use strict;/…...

【LeetCode】3309. 连接二进制表示可形成的最大数值(递归|回溯|位运算)

LeetCode 3309. 连接二进制表示可形成的最大数值&#xff08;中等&#xff09; 题目描述解题思路Java代码 题目描述 题目链接&#xff1a;LeetCode 3309. 连接二进制表示可形成的最大数值&#xff08;中等&#xff09; 给你一个长度为 3 的整数数组 nums。 现以某种顺序 连接…...