怎麼用SSM+MySql實作倉庫管理系統

王林
發布: 2023-05-31 20:49:11
轉載
976 人瀏覽過

系統介紹

該系統為SSM實現在倉庫管理系統,實現了供應商管理、經銷商管理、商品管理、出庫管理、收貨單管理等等倉庫系統所需在基本功能。系統實作上分層比較明確,操作比較簡單。

功能模組

# 相關技術點

前端:系統前端採用jsp JavaScript css的組合開發

後端:SSM框架

資料庫:MySQL

開發運作環境:IDEA/Eclipse等開發工具,Tomcat7/8容器、JDK1.8/1.7、Mysql資料庫。

功能截圖

    系統目前主要實現了供應商管理模組、經銷商管理模組、商品管理模組、庫存管理模組、訂貨單管理模組。由於篇幅有限,只貼出部分功能的運作截圖。

1

供應商管理

經銷商管理

商品管理

新增商品資訊

# 庫存管理

訂貨單管理

部分原始碼

Controller

# package com.synnex.wms.controller;

# import java.io.IOException;

import java.util.List;

# import javax.servlet.ServletException;

# import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.stereotype.Controller;

# import org.springframework.web.bind.annotation.PathVariable;

# import org.springframework.web.bind.annotation.RequestMapping;

# import com.synnex.wms.pojo.Buyer;

# import com.synnex.wms.pojo.Storer;

import com.synnex.wms.service.BuyerService;

# @Controller

# @RequestMapping(value = "/buyer")

public class BuyerController {

#    @Autowired

#    BuyerService buyerService ;

   @RequestMapping(value = "/findAll")

   public void findAll(HttpServletRequest request, HttpServletResponse response)

         throws ServletException, IOException {

      List list_buyer = buyerService.findAll();

#       System.out.println("------list_buyer:" list_buyer);

      request.setAttribute("list_buyer", list_buyer);

      request.getRequestDispatcher("/jsp/buyer/buyer.jsp").forward(request,response);

   }

   @RequestMapping("/toUpdateBuyerPage/{buyer_id}")

   public void toUpdateStorerPage(@PathVariable Integer buyer_id,

         HttpServletResponse response, HttpServletRequest request)

         throws ServletException, IOException {

System.out.println("=-=-=-=-=------------------------------");

      Buyer buyer = buyerService.findBuyerByBuyer_id(buyer_id);

      System.out.println("===========================buyer" buyer);

      request.setAttribute("buyer", buyer);

      request.getRequestDispatcher("/jsp/buyer/updateBuyer.jsp").forward(

#             request, response);

#    }

   @RequestMapping(value = "/update")

   public String update(Buyer buyer) {

      buyerService.update(buyer);

      return "redirect:/buyer/findAll";

#    }

   @RequestMapping(value = "/delete/{buyer_id}")

   public String delete(@PathVariable Integer buyer_id) {

      buyerService.delete(buyer_id);

      return "redirect:/buyer/findAll";

#    }

   @RequestMapping(value = "/insert")

   public String insert(Buyer buyer) {

      buyerService.insert(buyer);

      return "redirect:/buyer/findAll";

#    }

}

Service

package com.synnex.wms.service;

import java.util.List;

# import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.stereotype.Service;

# import org.springframework.transaction.annotation.Transactional;

# import com.synnex.wms.mapper.BuyerMapper;

import com.synnex.wms.pojo.Buyer;

# @Service

@Transactional

public class BuyerService {

   @Autowired

#    BuyerMapper buyermapper;

   public List findAll(){

      return buyermapper.findAll();

   }

public void update(買家買家) {

// TODO 自動產生的方法存根

BuyerMapper.update(買家);

}

公共無效刪除(整數buyer_id){

// TODO 自動產生的方法存根

BuyerMapper.delete(buyer_id);

}

公營買家 findBuyerByBuyer_id(Integerbuyer_id) {

// TODO 自動產生的方法存根

return buyymapper.findBuyerByBuyer_id(buyer_id);

# }

public void insert(買家買家) {

// TODO 自動產生的方法存根

Buyermapper.insert(買家);

# }

}

映射器

套件 com.synnex.wms.mapper;

導入 java.util.List;

# 導入 org.springframework.stereotype.Repository;

# 導入 com.synnex.wms.pojo.Buyer;

# 公共介面 BuyerMapper {

清單找到所有();##### void update(買家買家);

# void delete(Integer buy_id);

買家findBuyerByBuyer_id(Integerbuyer_id);

void insert(買家買家);

# }

MyBatis 地圖檔

/p>

公開“-//mybatis.org//DTD Mapper 3.0//EN”

# “http://mybatis.org/dtd/mybatis-3-mapper.dtd”>

#

#

從買家中選擇*

#

從買家中選擇*,其中buyer_id = #{buyer_id}

#

#

更新買家設定

公司 = #{公司},

電話 = #{電話},

位址 = #{位址},

# 電子郵件 = #{電子郵件},

評論 = #{評論}

其中 buyer_id = #{buyer_id}

#

從買家中刪除,其中 buyer_id = #{buyer_id}

#

#

插入買家(買家 ID、公司、電話、地址、電子郵件、評論)

# value(#{buyer_id},#{公司},#{電話},#{地址},#{電子郵件},#{評論})

#

以上是怎麼用SSM+MySql實作倉庫管理系統的詳細內容。更多資訊請關注PHP中文網其他相關文章!

相關標籤:
來源:yisu.com
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!