库存管理系统基于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毕业设计
文章目录 库存管理系统一、项目演示二、项目介绍三、部分功能截图四、部分代码展示五、底部获取项目源码(9.9¥带走) 库存管理系统 一、项目演示 库存管理系统 二、项目介绍 基于spingboot和vue前后端分离的库存管理系统 功能模块ÿ…...
【ArcGIS AddIn插件】【可用于全国水旱灾害风险普查】全网最强洪水淹没分析插件-基于8邻域种子搜索算法-有源淹没分析算法
最近有很多GIS小伙伴咨询我关于基于8邻域种子搜索算法的有源淹没分析插件的使用方法及原理,咱们通过这篇文章给大家详细介绍下这款插件的运行机制。 一、插件类型及适用版本 本插件属于ArcGIS AddIn工具条插件,基于ArcGIS Engine10.2.2的开发环境开发的&…...
==和equals的区别(面试题)
和equals有什么区别 对于基本数据类型,比较的是值是否相等,对于引用类型则是比较的地址是否相等;对于equals来说,基本数据类型没有equals方法,对于引用类型equals比较的是引用对象是否相同 那针对以上结论,…...
本地项目上传到GitHub上(李豆)
本地项目上传到GitHub上(李豆) 准备工作: 本地需要有 git 也需要有一个 GitHub 账号 首先需要在 GitHub 新建一个空仓库 在想要上传项目的文件夹中使用 Git 命令操作 初始化: git init与 github 仓库进行链接 :git remote add origin …...
碧海威L7云路由无线运营版 confirm.php/jumper.php 命令注入漏洞复现(XVE-2024-15716)
0x01 产品简介 碧海威L7网络设备是 北京智慧云巅科技有限公司下的产品,基于国产化ARM硬件平台,采用软硬一体协同设计方案,释放出产品最大效能,具有高性能,高扩展,产品性能强劲,具备万兆吞吐能力,支持上万用户同时在线等高性能。其采用简单清晰的可视化WEB管理界面,支持…...
redis实战-添加商户缓存
为什么要使用缓存 言简意赅:速度快,好用缓存数据存储于代码中,而代码运行在内存中,内存的读写性能远高于磁盘,缓存可以大大降低用户访问并发量带来的服务器读写压力实际开发中,企业的数据量,少…...
SQL游标的基本使用方法与示例
SQL游标的基本使用方法与示例 大家好,我是免费搭建查券返利机器人省钱赚佣金就用微赚淘客系统3.0的小编,也是冬天不穿秋裤,天冷也要风度的程序猿!今天我们来探讨SQL游标的基本使用方法及示例。在数据库编程中,游标是一…...
还不知道工业以太网和现场总线区别???
工业以太网 工业以太网是一种专为工业环境设计的网络通信技术,它基于标准的以太网技术,但针对工业应用进行了优化。工业以太网能够适应高温、低温、防尘等恶劣工业环境,采用TCP/IP协议,与IEEE 802.3标准兼容,并在应用层…...
量化交易 - 策略回测
策略回测 1、什么是策略回测?2、策略回测的作用3、策略回测系统概述3.1策略回测中相关的指标介绍3.2量化交易策略的资金容量3.3 完整的策略回测系统包含哪些内容 1、什么是策略回测? 策略回测,也称之为策略回溯测试,是指利用交易…...
Java--选择排序
思想 从左向右遍历数组,让每个数组元素依次作为基准,将基准数组扫描一次,若有元素比基准小则标记这个元素,若后续元素存在比此元素更小的,则标记更小的元素,遍历完此次数组之后,交换基准和标记数…...
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+调试文档+讲解等)
💗博主介绍:✌全网粉丝10W,CSDN作者、博客专家、全栈领域优质创作者,博客之星、平台优质作者、专注于Java、小程序技术领域和毕业项目实战✌💗 🌟文末获取源码数据库🌟 感兴趣的可以先收藏起来,…...
Mysql----表的约束
提示:以下是本篇文章正文内容,下面案例可供参考 一、表的约束 表的约束:表中一定要有约束,通过约束让插入表中的数据是符合预期的。它的本质是通过技术手段,让程序员插入正确的数据,约束的最终目标是保证…...
如何用 PHP 实现一个自定义爬虫框架
随着互联网的不断发展,信息量爆炸式增长,获取有价值的信息已经成为了许多人的需求。在这样的大环境下,爬虫技术逐渐兴起,成为了大数据时代的重要工具之一。爬虫技术的应用十分广泛,其可以用于网络舆情监测、数据分析、…...
【机器学习】机器学习的重要方法——强化学习:理论,方法与实践
目录 一、强化学习的核心概念 二、强化学习算法的分类与示例代码 三.强化学习的优势 四.强化学习的应用与挑战 五、总结与展望 强化学习:理论,方法和实践 在人工智能的广阔领域中,强化学习(Reinforcement Learning, RL&…...
Linux磁盘监控思路分析
磁盘监控原理 设备又名I/O设备,泛指计算机系统中除主机以外的所有外部设备。 1.1 计算机分类 1.1.1 按照信息传输速度分: 1.低速设备:每秒传输信息仅几个字节或者百个字节,如:键盘、鼠标等 2.中速设备:…...
pc端制作一个顶部固定的菜单栏
效果 hsl颜色 hsl颜色在css中比较方便 https://www.w3school.com.cn/css/css_colors_hsl.asp 色相(hue)是色轮上从 0 到 360 的度数。0 是红色,120 是绿色,240 是蓝色。饱和度(saturation)是一个百分比值…...
ONLYOFFICE 8.1版本桌面编辑器深度体验:创新功能与卓越性能的结合
ONLYOFFICE 8.1版本桌面编辑器深度体验:创新功能与卓越性能的结合 随着数字化办公的日益普及,一款高效、功能丰富的办公软件成为了职场人士的必备工具。ONLYOFFICE团队一直致力于为用户提供全面而先进的办公解决方案。最新推出的ONLYOFFICE 8.1版本桌面编…...
使用Java连接数据库并且执行数据库操作和创建用户登录图形化界面(2)
(1)在student数据库上创建一个用户表tb_account,该表包含用户id,用户名和密码。 字段名称 数据类型 注释 约束 user_id Char(8) 用户id 主键 user_name char(10) 用户名 不能为空 password char(10) 密码 默认值&a…...
socket编程常见操作
1、连接的建立 分为两种:服务端处理接收客户端的连接;服务端作为客户端连接第三方服务 //作为服务端 int listenfd socket(AF_INET, SOCK_STREAM, 0); bind(listenfd, (struct sockaddr*)&servaddr, sizeof(servaddr))) listen(listenfd, 10); //…...
[特殊字符] 智能合约中的数据是如何在区块链中保持一致的?
🧠 智能合约中的数据是如何在区块链中保持一致的? 为什么所有区块链节点都能得出相同结果?合约调用这么复杂,状态真能保持一致吗?本篇带你从底层视角理解“状态一致性”的真相。 一、智能合约的数据存储在哪里…...
Cesium1.95中高性能加载1500个点
一、基本方式: 图标使用.png比.svg性能要好 <template><div id"cesiumContainer"></div><div class"toolbar"><button id"resetButton">重新生成点</button><span id"countDisplay&qu…...
CMake基础:构建流程详解
目录 1.CMake构建过程的基本流程 2.CMake构建的具体步骤 2.1.创建构建目录 2.2.使用 CMake 生成构建文件 2.3.编译和构建 2.4.清理构建文件 2.5.重新配置和构建 3.跨平台构建示例 4.工具链与交叉编译 5.CMake构建后的项目结构解析 5.1.CMake构建后的目录结构 5.2.构…...
什么是库存周转?如何用进销存系统提高库存周转率?
你可能听说过这样一句话: “利润不是赚出来的,是管出来的。” 尤其是在制造业、批发零售、电商这类“货堆成山”的行业,很多企业看着销售不错,账上却没钱、利润也不见了,一翻库存才发现: 一堆卖不动的旧货…...
【git】把本地更改提交远程新分支feature_g
创建并切换新分支 git checkout -b feature_g 添加并提交更改 git add . git commit -m “实现图片上传功能” 推送到远程 git push -u origin feature_g...
均衡后的SNRSINR
本文主要摘自参考文献中的前两篇,相关文献中经常会出现MIMO检测后的SINR不过一直没有找到相关数学推到过程,其中文献[1]中给出了相关原理在此仅做记录。 1. 系统模型 复信道模型 n t n_t nt 根发送天线, n r n_r nr 根接收天线的 MIMO 系…...
HashMap中的put方法执行流程(流程图)
1 put操作整体流程 HashMap 的 put 操作是其最核心的功能之一。在 JDK 1.8 及以后版本中,其主要逻辑封装在 putVal 这个内部方法中。整个过程大致如下: 初始判断与哈希计算: 首先,putVal 方法会检查当前的 table(也就…...
AI病理诊断七剑下天山,医疗未来触手可及
一、病理诊断困局:刀尖上的医学艺术 1.1 金标准背后的隐痛 病理诊断被誉为"诊断的诊断",医生需通过显微镜观察组织切片,在细胞迷宫中捕捉癌变信号。某省病理质控报告显示,基层医院误诊率达12%-15%,专家会诊…...
认识CMake并使用CMake构建自己的第一个项目
1.CMake的作用和优势 跨平台支持:CMake支持多种操作系统和编译器,使用同一份构建配置可以在不同的环境中使用 简化配置:通过CMakeLists.txt文件,用户可以定义项目结构、依赖项、编译选项等,无需手动编写复杂的构建脚本…...
macOS 终端智能代理检测
🧠 终端智能代理检测:自动判断是否需要设置代理访问 GitHub 在开发中,使用 GitHub 是非常常见的需求。但有时候我们会发现某些命令失败、插件无法更新,例如: fatal: unable to access https://github.com/ohmyzsh/oh…...
