庫存管理系統基于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¥帶走)

有問題,或者需要協助調試運行項目的也可以

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/diannao/38336.shtml
繁體地址,請注明出處:http://hk.pswp.cn/diannao/38336.shtml
英文地址,請注明出處:http://en.pswp.cn/diannao/38336.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

熱題系列章節7

劍指 Offer 04. 二維數組中的查找 題目描述&#xff1a; 在一個二維數組中&#xff08;每個一維數組的長度相同&#xff09;&#xff0c;每一行都按照從左到右遞增的順序排序&#xff0c;每一列都按照從上到下遞增的順序排序。請完成一個函數&#xff0c;輸入這樣的一個二維數…

Go 語言環境搭建

本篇文章為Go語言環境搭建及下載編譯器后配置Git終端方法。 目錄 安裝GO語言SDK Window環境安裝 下載 安裝測試 安裝編輯器 下載編譯器 設置git終端方法 總結 安裝GO語言SDK Window環境安裝 網站 Go下載 - Go語言中文網 - Golang中文社區 還有 All releases - The…

策略模式在金融業務中的應用及其框架實現

引言 策略模式&#xff08;Strategy Pattern&#xff09;是一種行為設計模式&#xff0c;它允許在不修改客戶端代碼的情況下&#xff0c;動態地改變一個類的行為。它通過定義一系列算法并將它們封裝在獨立的策略類中&#xff0c;使這些算法可以互相替換&#xff0c;而不會影響…

Spark Cache 的用武之地

在什么情況下適合使用 Cache 我建議你在做決策的時候遵循以下 2 條基本原則&#xff1a; 如果 RDD/DataFrame/Dataset 在應用中的引用次數為 1&#xff0c;就堅決不使用 Cache如果引用次數大于 1&#xff0c;且運行成本占比超過 30%&#xff0c;應當考慮啟用 Cache第一條很好…

各維度卷積神經網絡內容收錄

各維度卷積神經網絡內容收錄 卷積神經網絡&#xff08;CNN&#xff09;&#xff0c;通常是指用于圖像分類的2D CNN。但是&#xff0c;現實世界中還使用了其他兩種類型的卷積神經網絡&#xff0c;即1D CNN和3D CNN。 在1D CNN中&#xff0c;內核沿1個方向移動。1D CNN的輸入和…

高通Android 12 /13根據包名授權懸浮窗權限

代碼路徑frameworks/base/service/core/com/android/server/policy/PhoneWindowManager.java 1、 PhoneWindowManager.java中關于根據包名實現懸浮窗權限授權的功能實現 在實現根據包名授予懸浮窗權限的核心的功能開發中&#xff0c;在通過上述的功能原理實現的過程中分析得知…

EigenLayer 生態解析-再質押與 AVS 崛起

基于以太坊網絡的再質押協議 EigenLayer 提出了利用為以太坊網絡驗證而質押的 ETH 來與其他協議共享安全性和資本效率,同時為協議參與者提供額外利息。在 AVS、再質押、積分系統等概念的推動下,逐漸形成一個龐大的生態系統,從 2024 年初到現在 EigenLayer 的 TVL 增加了 12 …

5.Spring IOC 循環依賴問題源碼深度剖析

Spring IOC 容器解決循環依賴問題主要涉及到幾個關鍵的緩存和對象創建過程中的處理邏輯。以下是對循環依賴問題進行深度剖析的概述&#xff1a; 循環依賴的背景 循環依賴發生在兩個或多個Bean相互依賴對方&#xff0c;形成一個閉環。這可能是直接的&#xff0c;比如Bean A依賴B…

全球最大智能立體書庫|北京:3萬貨位,715萬冊,自動出庫、分揀、搬運

導語 大家好&#xff0c;我是社長&#xff0c;老K。專注分享智能制造和智能倉儲物流等內容。 新書《智能物流系統構成與技術實踐》 北京城市圖書館的立體書庫采用了先進的WMS&#xff08;倉庫管理系統&#xff09;和WCS&#xff08;倉庫控制系統&#xff09;&#xff0c;與圖書…

Linux磁盤監控思路分析

磁盤監控原理 設備又名I/O設備&#xff0c;泛指計算機系統中除主機以外的所有外部設備。 1.1 計算機分類 1.1.1 按照信息傳輸速度分&#xff1a; 1.低速設備&#xff1a;每秒傳輸信息僅幾個字節或者百個字節&#xff0c;如&#xff1a;鍵盤、鼠標等 2.中速設備&#xff1a…

leetCode.98. 驗證二叉搜索樹

leetCode.98. 驗證二叉搜索樹 題目描述 代碼 /*** Definition for a binary tree node.* struct TreeNode {* int val;* TreeNode *left;* TreeNode *right;* TreeNode() : val(0), left(nullptr), right(nullptr) {}* TreeNode(int x) : val(x), left(n…

100張linux C/C++工程師面試高質量圖

文章目錄 雜項BIOSlinux開機啟動流程內核啟動流程網絡編程網絡編程流程tcp狀態機三次握手四次斷開reactor模型proactor模型select原理poll原理epoll原理文件系統虛擬文件系統文件系統調用阻塞IO非阻塞IO異步IO同步阻塞同步非阻塞IO多路復用進程管理進程狀態程序加載內存管理MMU…

力扣(2024.06.30)

1. 81——搜索旋轉排序數組2 已知存在一個按非降序排列的整數數組 nums &#xff0c;數組中的值不必互不相同。 在傳遞給函數之前&#xff0c;nums 在預先未知的某個下標 k&#xff08;0 < k < nums.length&#xff09;上進行了旋轉&#xff0c;使數組變為 [nums[k], n…

vue響應式原理細節分享

在講解之前&#xff0c;我們先了解一下數據響應式是什么&#xff1f;所謂數據響應式就是建立響應式數據與依賴&#xff08;調用了響應式數據的操作&#xff09;之間的關系&#xff0c;當響應式數據發生變化時&#xff0c;可以通知那些使用了這些響應式數據的依賴操作進行相關更…

前端:多服務端接口資源整合與zip打包下載

項目需求 前端項目開發中,有一個頁面需要去整合多個服務接口返回的數據資源,并且需要將這多個服務接口接口返回的數據進行資源壓縮,最終打包成zip壓縮包,并在客戶端完成下載。 基本需求梳理如下, 實現思路 這個需求點其實本質上還是傳統的“文件下載”功能需求,常見的例如…

Python使用defaultdict簡化值為list的字典

原始代碼&#xff1a; from typing import Dictrelated_objects_for_fetch: Dict[str, list] {}for key, value in [(k1, v1), (k1, v2), (k2, v2), (k3, v3), (k2, v2)]:if key not in related_objects_for_fetch:related_objects_for_fetch[key] []if value not in (value…

貪心問題(POJ1700/1017/1065)(C++)

一、貪心問題 貪心算法 貪心算法&#xff08;greedy algorithm&#xff09;&#xff0c;是用計算機來模擬一個「貪心」的人做出決策的過程。這個人十分貪婪&#xff0c;每一步行動總是按某種指標選取最優的操作。而且他目光短淺&#xff0c;總是只看眼前&#xff0c;并不考慮…

第三天:LINK3D核心原理講解【第1部分】

第三天:LINK3D核心原理講解 LINK3D學習筆記 目標 了解LINK3D velodyne64線激光雷達LINK3D質心點提取效果: 分布在車道與墻體的交界處。 課程內容 LINK3D論文精講LINK3D聚合關鍵點提取代碼講解LINK3D描述子匹配代碼講解除了ALOAM的線特征、面特征,還有其他點云特征嗎,是…

如何使用 Postgres 折疊您的堆棧 實現一切#postgresql認證

技術蔓延如何蔓延 假設您正在開發一款新產品或新功能。一開始&#xff0c;您的團隊會列出需要解決的技術問題。有些解決方案您將自行開發&#xff08;您的秘訣&#xff09;&#xff0c;而其他解決方案您將使用現有技術&#xff08;可能至少包括一個數據庫&#xff09;來解決。…

人工智能期末復習筆記(更新中)

分類問題 分類&#xff1a;根據已知樣本的某些特征&#xff0c;判斷一個新的樣本屬于哪種已知的樣本類 垃圾分類、圖像分類 怎么解決分類問題 分類和回歸的區別 1. 邏輯回歸分類 用于解決分類問題的一種模型。根據數據特征或屬性&#xff0c;計算其歸屬于某一類別 的概率P,…