导师推荐毕设:基于SpringBoot+Vue的中小企业进销存管理系统设计

44 阅读3分钟

前言

一.开发工具简介

  • 开发语言:Java+Python(两个版本都支持)
  • 后端框架:Spring Boot(Spring+SpringMVC+Mybatis)+Django(两个版本都支持)
  • 前端:Vue+ElementUI+HTML
  • 数据库:MySQL
  • 系统架构:B/S
  • 开发工具:IDEA(Java的)或者PyCharm(Python的)

二.系统内容简介

基于SpringBoot+Vue的中小企业进销存管理系统是一套完整的企业级商品管理解决方案,采用前后端分离的B/S架构设计模式,后端使用SpringBoot框架构建RESTful API接口,集成MyBatis进行数据持久化操作,前端采用Vue.js配合ElementUI组件库打造现代化的用户交互界面。系统核心围绕中小企业的商品流转业务需求展开,涵盖采购员管理、销售员管理、供应商管理等基础信息维护模块,以及商品库存管理、采购申请管理、进货入库管理、销售出库管理、商品报损管理等核心业务流程模块。整个系统基于MySQL数据库存储业务数据,通过合理的数据库表设计确保数据的完整性和一致性,同时采用分层架构设计思想,将业务逻辑、数据访问、控制层进行有效分离,提升了系统的可维护性和扩展性。系统界面设计简洁美观,操作流程符合中小企业实际业务习惯,能够有效提升企业商品管理效率,降低人工管理成本,为企业数字化转型提供技术支撑。

三.系统功能演示

导师推荐毕设:基于SpringBoot+Vue的中小企业进销存管理系统设计

四.系统界面展示

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

五.系统源码展示


import org.apache.spark.sql.SparkSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
public class InventoryService {
    @Autowired
    private InventoryMapper inventoryMapper;
    private SparkSession spark = SparkSession.builder().appName("InventoryAnalysis").master("local[*]").getOrCreate();
    @Transactional
    public Result updateInventory(Integer productId, Integer quantity, String operation) {
        Inventory inventory = inventoryMapper.selectByProductId(productId);
        if (inventory == null) {
            return Result.error("商品不存在");
        }
        int currentStock = inventory.getCurrentStock();
        if ("IN".equals(operation)) {
            currentStock += quantity;
            inventory.setCurrentStock(currentStock);
            inventory.setTotalInStock(inventory.getTotalInStock() + quantity);
        } else if ("OUT".equals(operation)) {
            if (currentStock < quantity) {
                return Result.error("库存不足,当前库存:" + currentStock);
            }
            currentStock -= quantity;
            inventory.setCurrentStock(currentStock);
            inventory.setTotalOutStock(inventory.getTotalOutStock() + quantity);
        }
        if (currentStock <= inventory.getMinStock()) {
            inventory.setStockStatus("LOW_STOCK");
            sendLowStockAlert(productId, currentStock);
        } else {
            inventory.setStockStatus("NORMAL");
        }
        inventory.setUpdateTime(new Date());
        inventoryMapper.updateById(inventory);
        recordStockMovement(productId, quantity, operation, inventory.getCurrentStock());
        return Result.success("库存更新成功");
    }
    public Result purchaseApproval(Integer purchaseId, String approvalStatus, String approverComment) {
        PurchaseApplication purchase = purchaseMapper.selectById(purchaseId);
        if (purchase == null) {
            return Result.error("采购申请不存在");
        }
        if (!"PENDING".equals(purchase.getApprovalStatus())) {
            return Result.error("该申请已处理,无法重复操作");
        }
        purchase.setApprovalStatus(approvalStatus);
        purchase.setApproverComment(approverComment);
        purchase.setApprovalTime(new Date());
        if ("APPROVED".equals(approvalStatus)) {
            purchase.setPurchaseStatus("APPROVED");
            List<PurchaseDetail> details = purchaseDetailMapper.selectByPurchaseId(purchaseId);
            for (PurchaseDetail detail : details) {
                Product product = productMapper.selectById(detail.getProductId());
                if (product != null) {
                    product.setPurchaseQuantity(product.getPurchaseQuantity() + detail.getQuantity());
                    productMapper.updateById(product);
                }
            }
            generatePurchaseOrder(purchase);
        } else if ("REJECTED".equals(approvalStatus)) {
            purchase.setPurchaseStatus("REJECTED");
        }
        purchaseMapper.updateById(purchase);
        sendApprovalNotification(purchase.getApplicantId(), approvalStatus, approverComment);
        return Result.success("审批完成");
    }
    @Transactional
    public Result processSalesOutbound(Integer salesId, List<SalesDetail> salesDetails) {
        SalesOrder salesOrder = salesMapper.selectById(salesId);
        if (salesOrder == null) {
            return Result.error("销售订单不存在");
        }
        if (!"CONFIRMED".equals(salesOrder.getOrderStatus())) {
            return Result.error("订单状态不正确,无法出库");
        }
        BigDecimal totalAmount = BigDecimal.ZERO;
        for (SalesDetail detail : salesDetails) {
            Inventory inventory = inventoryMapper.selectByProductId(detail.getProductId());
            if (inventory == null) {
                return Result.error("商品库存信息不存在");
            }
            if (inventory.getCurrentStock() < detail.getQuantity()) {
                return Result.error("商品库存不足,商品ID:" + detail.getProductId());
            }
            inventory.setCurrentStock(inventory.getCurrentStock() - detail.getQuantity());
            inventory.setTotalOutStock(inventory.getTotalOutStock() + detail.getQuantity());
            inventoryMapper.updateById(inventory);
            Product product = productMapper.selectById(detail.getProductId());
            BigDecimal itemAmount = product.getSalesPrice().multiply(new BigDecimal(detail.getQuantity()));
            totalAmount = totalAmount.add(itemAmount);
            detail.setSalesPrice(product.getSalesPrice());
            detail.setSubTotal(itemAmount);
            salesDetailMapper.insert(detail);
        }
        salesOrder.setTotalAmount(totalAmount);
        salesOrder.setOrderStatus("SHIPPED");
        salesOrder.setShipmentTime(new Date());
        salesMapper.updateById(salesOrder);
        generateDeliveryNote(salesOrder, salesDetails);
        return Result.success("销售出库处理完成");
    }
}

六.系统文档展示

在这里插入图片描述

结束

💕💕文末获取源码联系 计算机程序员小杨