IDEA+springboot+mybatis+shiro+bootstrap+Mysql WMS仓库管理系统

news2024/9/21 22:57:32

IDEA+springboot+mybatis+shiro+bootstrap+Mysql WMS仓库管理系统

  • 一、系统介绍
    • 1.环境配置
  • 二、系统展示
    • 1. 管理员登录
    • 2.修改密码
    • 3.系统日志
    • 4. 登陆日志
    • 5. 库存查询
    • 6. 出入库记录
    • 7.货物入库
    • 8.货物出库
    • 9.仓库管理员管理
    • 10.供应商信息管理
    • 11.客户信息管理
    • 12.货物信息管理
    • 13. 仓库信息管理
  • 三、部分代码
    • CustomerMapper.java
    • CustomerManageHandler.java
    • Customer.java
  • 四、其他
    • 获取源码


一、系统介绍

本系统实现了WMS仓库管理系统,管理端实现了管理员登录、修改密码、更改密码、 系统日志、 登陆日志、库存查询、 出入库记录、货物入库、货物出库、仓库管理员管理、供应商信息管理 、客户信息管理、 货物信息管理、 仓库信息管理

1.环境配置

JDK版本:1.8
Mysql:5.7

二、系统展示

1. 管理员登录

在这里插入图片描述

账号:1001 密码:123456

2.修改密码

在这里插入图片描述

3.系统日志

在这里插入图片描述

4. 登陆日志

在这里插入图片描述

5. 库存查询

在这里插入图片描述

6. 出入库记录

在这里插入图片描述

7.货物入库

在这里插入图片描述

8.货物出库

在这里插入图片描述

9.仓库管理员管理

在这里插入图片描述

10.供应商信息管理

在这里插入图片描述

11.客户信息管理

在这里插入图片描述

12.货物信息管理

在这里插入图片描述

13. 仓库信息管理

在这里插入图片描述

三、部分代码

CustomerMapper.java

package com.ken.wms.dao;

import com.ken.wms.domain.Customer;

import java.util.List;

/**
 * 客户信息 Customer 映射器
 *
 */
public interface CustomerMapper {

	/**
	 * 选择所有的 Customer
	 * @return 返回所有的 Customer
	 */
	List<Customer> selectAll();
	
	/**
	 * 选择指定 id 的 Supplier
	 * @param id Customer的ID
	 * @return 返回指定ID对应的Customer
	 */
	Customer selectById(Integer id);
	
	/**
	 * 选择指定 Customer name 的 customer
	 * @param customerName 客户的名称
	 * @return 返回指定CustomerName对应的Customer
	 */
	Customer selectByName(String customerName);
	
	/**
	 * 选择指定 customer name 的 Customer
	 * 与 selectByName 方法的区别在于本方法将返回相似匹配的结果
	 * @param customerName Customer 供应商名
	 * @return 返回模糊匹配指定customerName 对应的Customer
	 */
	List<Customer> selectApproximateByName(String customerName);
	
	/**
	 * 插入 Customer 到数据库中
	 * 不需要指定 Customer 的主键,采用的数据库 AI 方式
	 * @param customer Customer 实例
	 */
	void insert(Customer customer);
	
	/**
	 * 批量插入 Customer 到数据库中
	 * @param customers 存放 Customer 实例的 List
	 */
	void insertBatch(List<Customer> customers);
	
	/**
	 * 更新 Customer 到数据库
	 * 该 Customer 必须已经存在于数据库中,即已经分配主键,否则将更新失败
	 * @param customer customer 实例
	 */
	void update(Customer customer);
	
	/**
	 * 删除指定 id 的 customer
	 * @param id customer ID
	 */
	void deleteById(Integer id);
	
	/**
	 * 删除指定 customerName 的 customer
	 * @param customerName 客户名称
	 */
	void deleteByName(String customerName);
}



CustomerManageHandler.java

package com.ken.wms.common.controller;

import com.ken.wms.common.service.Interface.CustomerManageService;
import com.ken.wms.common.util.Response;
import com.ken.wms.common.util.ResponseUtil;
import com.ken.wms.domain.Customer;
import com.ken.wms.domain.Supplier;
import com.ken.wms.exception.CustomerManageServiceException;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.List;
import java.util.Map;

/**
 * 客户信息管理请求 Handler
 */
@RequestMapping(value = "/**/customerManage")
@Controller
public class CustomerManageHandler {

    @Autowired
    private CustomerManageService customerManageService;
    @Autowired
    private ResponseUtil responseUtil;

    private static final String SEARCH_BY_ID = "searchByID";
    private static final String SEARCH_BY_NAME = "searchByName";
    private static final String SEARCH_ALL = "searchAll";

    /**
     * 通用的结果查询方法
     *
     * @param searchType 查询方式
     * @param keyWord    查询关键字
     * @param offset     分页偏移值
     * @param limit      分页大小
     * @return 返回指定条件查询的结果
     */
    private Map<String, Object> query(String searchType, String keyWord, int offset, int limit) throws CustomerManageServiceException {
        Map<String, Object> queryResult = null;

        switch (searchType) {
            case SEARCH_BY_ID:
                if (StringUtils.isNumeric(keyWord))
                    queryResult = customerManageService.selectById(Integer.valueOf(keyWord));
                break;
            case SEARCH_BY_NAME:
                queryResult = customerManageService.selectByName(offset, limit, keyWord);
                break;
            case SEARCH_ALL:
                queryResult = customerManageService.selectAll(offset, limit);
                break;
            default:
                // do other thing
                break;
        }
        return queryResult;
    }

    /**
     * 搜索客户信息
     *
     * @param searchType 搜索类型
     * @param offset     如有多条记录时分页的偏移值
     * @param limit      如有多条记录时分页的大小
     * @param keyWord    搜索的关键字
     * @return 返回查询的结果,其中键值为 rows 的代表查询到的每一记录,若有分页则为分页大小的记录;键值为 total 代表查询到的符合要求的记录总条数
     */
    @SuppressWarnings("unchecked")
    @RequestMapping(value = "getCustomerList", method = RequestMethod.GET)
    public
    @ResponseBody
    Map<String, Object> getCustomerList(@RequestParam("searchType") String searchType,
                                        @RequestParam("offset") int offset,
                                        @RequestParam("limit") int limit,
                                        @RequestParam("keyWord") String keyWord) throws CustomerManageServiceException {
        // 初始化 Response
        Response responseContent = responseUtil.newResponseInstance();

        List<Supplier> rows = null;
        long total = 0;

        Map<String, Object> queryResult = query(searchType, keyWord, offset, limit);

        if (queryResult != null) {
            rows = (List<Supplier>) queryResult.get("data");
            total = (long) queryResult.get("total");
        }

        // 设置 Response
        responseContent.setCustomerInfo("rows", rows);
        responseContent.setResponseTotal(total);
        responseContent.setResponseResult(Response.RESPONSE_RESULT_SUCCESS);
        return responseContent.generateResponse();
    }

    /**
     * 添加一条客户信息
     *
     * @param customer 客户信息
     * @return 返回一个map,其中:key 为 result表示操作的结果,包括:success 与 error
     */
    @RequestMapping(value = "addCustomer", method = RequestMethod.POST)
    public
    @ResponseBody
    Map<String, Object> addCustomer(@RequestBody Customer customer) throws CustomerManageServiceException {
        // 初始化 Response
        Response responseContent = responseUtil.newResponseInstance();

        // 添加记录
        String result = customerManageService.addCustomer(customer) ? Response.RESPONSE_RESULT_SUCCESS : Response.RESPONSE_RESULT_ERROR;

        responseContent.setResponseResult(result);
        return responseContent.generateResponse();
    }

    /**
     * 查询指定 customer ID 客户的信息
     *
     * @param customerID 客户ID
     * @return 返回一个map,其中:key 为 result 的值为操作的结果,包括:success 与 error;key 为 data
     * 的值为客户信息
     */
    @RequestMapping(value = "getCustomerInfo", method = RequestMethod.GET)
    public
    @ResponseBody
    Map<String, Object> getCustomerInfo(@RequestParam("customerID") String customerID) throws CustomerManageServiceException {
        // 初始化 Response
        Response responseContent = responseUtil.newResponseInstance();
        String result = Response.RESPONSE_RESULT_ERROR;

        // 获取客户信息
        Customer customer = null;
        Map<String, Object> queryResult = query(SEARCH_BY_ID, customerID, -1, -1);
        if (queryResult != null) {
            customer = (Customer) queryResult.get("data");
            if (customer != null) {
                result = Response.RESPONSE_RESULT_SUCCESS;
            }
        }

        // 设置 Response
        responseContent.setResponseResult(result);
        responseContent.setResponseData(customer);

        return responseContent.generateResponse();
    }

    /**
     * 更新客户信息
     *
     * @param customer 客户信息
     * @return 返回一个map,其中:key 为 result表示操作的结果,包括:success 与 error
     */
    @RequestMapping(value = "updateCustomer", method = RequestMethod.POST)
    public
    @ResponseBody
    Map<String, Object> updateCustomer(@RequestBody Customer customer) throws CustomerManageServiceException {
        // 初始化 Response
        Response responseContent = responseUtil.newResponseInstance();

        // 更新
        String result = customerManageService.updateCustomer(customer) ? Response.RESPONSE_RESULT_SUCCESS : Response.RESPONSE_RESULT_ERROR;

        responseContent.setResponseResult(result);
        return responseContent.generateResponse();
    }

    /**
     * 删除客户记录
     *
     * @param customerIDStr 客户ID
     * @return 返回一个map,其中:key 为 result表示操作的结果,包括:success 与 error
     */
    @RequestMapping(value = "deleteCustomer", method = RequestMethod.GET)
    public
    @ResponseBody
    Map<String, Object> deleteCustomer(@RequestParam("customerID") String customerIDStr) throws CustomerManageServiceException {
        // 初始化 Response
        Response responseContent = responseUtil.newResponseInstance();

        // 参数检查
        if (StringUtils.isNumeric(customerIDStr)) {
            // 转换为 Integer
            Integer customerID = Integer.valueOf(customerIDStr);

            // 刪除
            String result = customerManageService.deleteCustomer(customerID) ? Response.RESPONSE_RESULT_SUCCESS : Response.RESPONSE_RESULT_ERROR;
            responseContent.setResponseResult(result);
        } else
            responseContent.setResponseResult(Response.RESPONSE_RESULT_ERROR);

        return responseContent.generateResponse();
    }

    /**
     * 导入客户信息
     *
     * @param file 保存有客户信息的文件
     * @return 返回一个map,其中:key 为 result表示操作的结果,包括:success 与
     * error;key为total表示导入的总条数;key为available表示有效的条数
     */
    @RequestMapping(value = "importCustomer", method = RequestMethod.POST)
    public
    @ResponseBody
    Map<String, Object> importCustomer(@RequestParam("file") MultipartFile file) throws CustomerManageServiceException {
        // 初始化 Response
        Response responseContent = responseUtil.newResponseInstance();
        String result = Response.RESPONSE_RESULT_SUCCESS;

        // 读取文件内容
        int total = 0;
        int available = 0;
        if (file == null)
            result = Response.RESPONSE_RESULT_ERROR;
        Map<String, Object> importInfo = customerManageService.importCustomer(file);
        if (importInfo != null) {
            total = (int) importInfo.get("total");
            available = (int) importInfo.get("available");
        }

        responseContent.setResponseResult(result);
        responseContent.setResponseTotal(total);
        responseContent.setCustomerInfo("available", available);
        return responseContent.generateResponse();
    }

    /**
     * 导出客户信息
     *
     * @param searchType 查找类型
     * @param keyWord    查找关键字
     * @param response   HttpServletResponse
     */
    @SuppressWarnings("unchecked")
    @RequestMapping(value = "exportCustomer", method = RequestMethod.GET)
    public void exportCustomer(@RequestParam("searchType") String searchType, @RequestParam("keyWord") String keyWord,
                               HttpServletResponse response) throws CustomerManageServiceException, IOException {

        String fileName = "customerInfo.xlsx";

        List<Customer> customers = null;
        Map<String, Object> queryResult = query(searchType, keyWord, -1, -1);

        if (queryResult != null) {
            customers = (List<Customer>) queryResult.get("data");
        }

        // 获取生成的文件
        File file = customerManageService.exportCustomer(customers);

        // 写出文件
        if (file != null) {
            // 设置响应头
            response.addHeader("Content-Disposition", "attachment;filename=" + fileName);
            FileInputStream inputStream = new FileInputStream(file);
            OutputStream outputStream = response.getOutputStream();
            byte[] buffer = new byte[8192];

            int len;
            while ((len = inputStream.read(buffer, 0, buffer.length)) > 0) {
                outputStream.write(buffer, 0, len);
                outputStream.flush();
            }

            inputStream.close();
            outputStream.close();

        }
    }
}


Customer.java

package com.ken.wms.domain;

/**
 * 客户信息
 *
 */
public class Customer {

	private Integer id;// 客户ID
	private String name;// 客户名
	private String personInCharge;// 负责人
	private String tel;// 联系电话
	private String email;// 电子邮件
	private String address;// 地址

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPersonInCharge() {
		return personInCharge;
	}

	public void setPersonInCharge(String personInCharge) {
		this.personInCharge = personInCharge;
	}

	public String getTel() {
		return tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	@Override
	public String toString() {
		return "Customer [id=" + id + ", name=" + name + ", personInCharge=" + personInCharge + ", tel=" + tel
				+ ", email=" + email + ", address=" + address + "]";
	}

}


四、其他

获取源码

点击以下链接获取源码。
IDEA+springboot+mybatis+shiro+bootstrap+Mysql WMS仓库管理系统
IDEA+spring+spring mvc+mybatis+bootstrap+jquery+Mysql运动会管理系统源码
IDEA+SpringBoot+mybatis+bootstrap+jquery+Mysql车险理赔管理系统源码
IDEA+Spring Boot + MyBatis + Layui+Mysql垃圾回收管理系统源码
IDEA+SpringBoot+mybatis+SSM+layui+Mysql学生就业信息管理系统源码
IDEA+springboot+jpa+Layui+Mysql销售考评系统源码
IDEA+Spring + Spring MVC + MyBatis+Bootstrap+Mysql酒店管理系统源码
IDEA+spring boot+mybatis+spring mvc+bootstrap+Mysql停车位管理系统源码

Java+Swing+Mysql实现学生宿舍管理系统

Java+Swing+Txt实现自助款机系统

Java+Swing+Mysql自助存取款机系统

Java+Swing+mysql5实现学生成绩管理系统(带分页)

Java+Swing+Mysql实现超市商品管理系统源码

Java+Swing+Mysql实现通讯录管理系统源码

Java+Swing+Mysql实现图书管理系统源码

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/736172.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

文件上传常用绕过方式

JavaScript前端验证绕过 JavaScript 验证就是所谓的客户端验证&#xff0c;也是最脆弱的一种验证。直接修改数据包或禁用 JavaScript.enable 即可绕过。 例如upload的第一题&#xff0c;在我们点击发送时&#xff0c;还没经过代理就直接弹窗报错&#xff0c;就考虑存在前端验证…

OSI参考模型,TCP/IP标准模型,TCP/IP对等模型三大模型详解

数通小白必看系列 第一章 初识华为数通&#xff08;2&#xff09; 前言 1.什么是OSI参考模型 2.我们为什么要学习OSI参考模型 3.我们怎么学习OSI参考模型 1.我们要了解OSI参考模型分为那几层 2.我们要怎么理解和记忆OSI的7层参考模型 前言告知&#xff1a;我们首先要记住…

将图片写入到excel某一列

将图片写入到excel某一列 参考视频&#xff1a;https://www.bilibili.com/video/BV1L5411e7Zj?p1&share_mediumiphone&share_platios&share_session_idF43BCE3C-CD23-4CF8-B998-C2FE8BD1F0F6&share_sourceWEIXIN&share_tags_i&timestamp1644493555&am…

数据库第二次作业

目录 一、要求 二、操作 建表 插入数据 1、显示所有职工的基本信息 2、查询所有职工所属部门的部门号&#xff0c;不显示重复的部门号 ​编辑 3、求出所有职工的人数​编辑 4、列出最高工和最低工资 ​5、列出职工的平均工资和总工资 6、创建一个只有职工号、姓名和…

【DDoS攻击检测】基于改进的非洲秃鹫优化算法和一种新的DDoS攻击检测传递函数的特征选择方法(Matlab代码实现)

&#x1f4a5;&#x1f4a5;&#x1f49e;&#x1f49e;欢迎来到本博客❤️❤️&#x1f4a5;&#x1f4a5; &#x1f3c6;博主优势&#xff1a;&#x1f31e;&#x1f31e;&#x1f31e;博客内容尽量做到思维缜密&#xff0c;逻辑清晰&#xff0c;为了方便读者。 ⛳️座右铭&a…

【Visual Studio】智能提示功能消失解决办法

问题 VS2013环境智能提示突然用不了&#xff0c;重启计算机也无效&#xff0c;一下有点不习惯。 解决方法 1、打开 VS2013开发人员提示。 2、输入一下命令&#xff0c;重置VS2013。 devenv.exe /resetsettings

虚拟文件系统(VFS)

为支持各种本机文件系统&#xff0c;且在同时允许访问其他操作系统的文件&#xff0c;Linux内核在用户进程&#xff08;或C标准库&#xff09;和文件系统实现之间引入了一个抽象层。该抽象层称之为虚拟文件系统&#xff08;Virtual File System&#xff09;&#xff0c;简称VFS…

git HEAD detached from

git HEAD detached from 解决&#xff0c;checkout切换分支即可&#xff0c;比如切换到master分支&#xff1a; git checkout master git gerrit code review提交代码HEAD:resf/for/_res/for的提交格式_zhangphil的博客-CSDN博客git gerrit code review提交代码HEAD:resf/for/如…

《 SVG 》三、SVG 图形元素

一、本文概述 本文所介绍 svg 元素&#xff0c;为常用 svg 图形元素&#xff0c;蕴含 “血与肉” 的元素&#xff0c;本文围绕其进行实战应用&#xff1b; 二、 SVG 图形元素 <circle> 绘制正圆&#xff1b;<ellipse> 绘制椭圆&#xff1b;<image> 渲染图…

2023通感一体化系统架构与关键技术白皮书

1 通感一体化业务与性能指标 1.1 通感一体化业务分类 根据通信与感知的相互关系 通信辅助感知类业务&#xff1a;通信的参考信号作为感知信号&#xff0c;实现目标定位、测速、手势识别等业务——高速可靠的通信能力为感知数据的汇聚提供保障&#xff0c;能够进一步提高感知精…

人工智能时代如何加强网络安全

人工智能正在为软件开发人员赋予以前被认为难以想象的新能力。新的生成式人工智能可以提供复杂、功能齐全的应用程序、调试代码或使用简单的自然语言提示添加内嵌注释。 它已准备好以指数方式推进低代码自动化。但与此同时&#xff0c;新一代人工智能可能会为不良行为者提供帮…

Spring MVC多种情况下的文件上传

一、原生方式上传 上传是Web工程中很常见的功能&#xff0c;SpringMVC框架简化了文件上传的代码&#xff0c;我们首先使用JAVAEE原生方式上传文件来进行详细描述&#xff1a; 1.1 修改web.xml项目版本 这里我们创建新的SpringMVC模块&#xff0c;在web.xml中将项目从2.3改为3.1…

SPSS数据排序

1.个案排序 &#xff08;1&#xff09;打开数据文件&#xff0c;选择“数据”——“个案排序”&#xff0c;弹出如下图所示的对话框&#xff0c;选中“树高”&#xff0c;再选择排序&#xff08;默认&#xff09; &#xff08;2&#xff09;选中“枝下高”&#xff0c;移到右边…

【IDEA】IDEA 版 Postman 新版发布,功能强大!

介绍 Restful Fast Request 是 IDEA 版 Postman&#xff0c;它是一个强大的 restful api 工具包插件&#xff0c;可以根据已有的方法帮助您快速生成 url 和 params。Restful Fast Request API 调试工具 API 管理工具 API 搜索工具。它有一个漂亮的界面来完成请求、检查服务…

智慧校园管理系统前台任意文件上传

如果沉醉满足于自己以往的历史就无异于生命大限的终临&#xff0c;人生旅程时刻处于“零公里”处。那么&#xff0c;要旨仍然应该是首先战胜自己&#xff0c;并将精神提升到不断发展着的生活所要求的那种高度&#xff0c;才有可能使自己重新走出洼地&#xff0c;亦步亦趋跟着生…

如何在Windows 11中轻松恢复意外删除的Chrome书签

当您意外删除了 Chrome 书签或书签文件夹时&#xff0c;您可以通过以下方法在 Windows 11 中恢复它们。Windows 11 中的 Chrome 浏览器提供了方便的恢复功能&#xff0c;让您可以轻松还原被删除的书签。 打开 Chrome 浏览器并导航到右上角的菜单按钮&#xff0c;点击打开菜单选…

ROS1到ROS2迁移教程(以rslidar_to_velodyne功能包为例)+ ROS2版本LIO-SAM试跑

一、引言 1、本博文主要目的是将rslidar_to_velodyne功能包的ros1版本转换为ros2版本 2、内容会包含ROS1到ROS2迁移技巧&#xff0c;是自己总结的一套简单的流程&#xff0c;可以保证ROS2下的代码试跑成功&#xff0c;如果需要将代码进一步转化为类的实现的方式&#xff0c;自…

开源教育对话大模型 EduChat

文章目录 一、&#x1f680; 前言二、&#x1f916; 本地部署三、&#x1f468;‍&#x1f4bb; 使用示例四、&#x1f50e; 总结 &#x1f349; CSDN 叶庭云&#xff1a;https://yetingyun.blog.csdn.net/ 一、&#x1f680; 前言 教育是一项对人类身心发展产生影响的社会实践…

Elasticsearch 8.X 聚合查询下的精度问题及其解决方案

1、线上环境问题 咕泡同学提问&#xff1a;我在看runtime文档的时候做个测试&#xff0c; agg求avg的时候不管是double还是long&#xff0c;数据都不准确&#xff0c;这种在生产环境中如何解决啊&#xff1f; 2、问题归类及出现场景 上述问题可以归类为&#xff1a;Elasticsear…

【计算机组成与体系结构Ⅰ】实验3 微程序控制器实验

一、实验目的 了解微程序控制器的组成原理 二、实验设备 TEC-4实验系统、万用表 三、实验内容 1&#xff1a;阅读微指令格式和微程序控制器的组成&#xff0c;微指令由操作控制和顺序控制两部分组成&#xff0c;1条微指令的字长35位&#xff08;一个存储单元35位&#xff0c;采…