system introduction
This system implements the warehouse management system for SSM and realizes the basic functions required by the warehouse system such as supplier management, dealer management, commodity management, outbound management, and receipt order management. The system implementation is relatively clear in layering and operation is relatively simple.
functional module
Related technical points
Front-end: The system front-end is developed using a combination of jsp JavaScript css
Backend: SSM framework
Database: MySQL
Development and running environment: IDEA/Eclipse and other development tools, Tomcat7/8 container, JDK1.8/1.7, Mysql database.
Function screenshot
The system currently mainly implements the supplier management module, dealer management module, commodity management module, inventory management module, and order management module. Due to limited space, only screenshots of some functions are posted.
1
Supplier Management
Dealer Management
Product Management
Add product information
Inventory management
Order management
Part of the source code
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
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
Return buyermapper.findAll();
}
public void update(Buyer buyer) {
// TODO Auto-generated method stub
buyermapper.update(buyer);
}
public void delete(Integer buyer_id) {
// TODO Auto-generated method stub
buyermapper.delete(buyer_id);
}
public Buyer findBuyerByBuyer_id(Integer buyer_id) {
// TODO Auto-generated method stub
return buyermapper.findBuyerByBuyer_id(buyer_id);
}
public void insert(Buyer buyer) {
// TODO Auto-generated method stub
buyermapper.insert(buyer);
}
}
Mapper
package com.synnex.wms.mapper;
import java.util.List;
import org.springframework.stereotype.Repository;
import com.synnex.wms.pojo.Buyer;
public interface BuyerMapper {
List
void update(Buyer buyer);
void delete(Integer buyer_id);
Buyer findBuyerByBuyer_id(Integer buyer_id);
void insert(Buyer buyer);
}
MyBatis映射文件
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
update buyer SET
company = #{company},
phone = #{phone},
address = #{address},
email = #{email},
comment = #{comment}
where buyer_id = #{buyer_id}
delete from buyer where buyer_id = #{buyer_id}
insert into buyer(buyer_id,company,phone,address,email,comment)
value(#{buyer_id},#{company},#{phone},#{address},#{email},#{comment})
The above is the detailed content of How to use SSM+MySql to implement a warehouse management system. For more information, please follow other related articles on the PHP Chinese website!