智慧物流|Springboot+Vue+Nodejs实现智慧物流系统

简介: 智慧物流|Springboot+Vue+Nodejs实现智慧物流系统

项目编号:BS-XX-162

前言:

随着全球经济的快速发展,以及信息化步伐的加快,物流公司对行业信息的需求越来越大,这就促使物流信息网迅速发展,以适应物流行业的市场变化。而经济全球化进程的加快,使现代企业的专业分工和协作对现代物流提出了越来越高的要求,物流行业的人工管理早已不再适应企业发展的要求,信息化、自动化、网络化、智能化、柔性化已成为现代物流的鲜明特征。物流行业的发展,使物流的信息化日益被广大从业者和信息系统提供商所重视。 物流信息网信息的及时性、准确性完全符合国内物流企业对行业信息的要求。同时,现代企业的供应链时刻在提醒我们,物流要在激烈的竞争中占据绝对的优势,必须要求企业及时准确的掌握客户信息,同时对客户的需求做出快速的反应,在最短的时间内以最大限度挖掘和优化物流资源来满足客户需求,从而建立高效的物流经济。

一,项目简介

本项目存在三个角色:顾客、员工、管理员,顾客对应使用的是前台管理系统,而员工和管理员对应使用后台管理系统。前台管理系统包括首页、用户订单、用户信息、关于我们等,后台管理系统包括用户管理、货物流程管理、轨迹管理、财务管理、运营数据等。其主要功能模块图如图1-1所示:

图3-1功能模块图

前台管理系统

客户对象:

(1)客户可以查看个人信息,针对个人信息内容进行修改,但是不能进行删除。

(2)客户进入用户订单页面可以查看自己的所有物流订单信息,还可以在此页面进行下单操作。

(3)客户可以通过首页和关于我们了解公司的基本信息

(4)客户可以在前台页面进行登录账户以及注册账号的操作。

图3-2前台管理系统功能模块图

后台管理系统:

员工对象:

(1)员工可以对员工个人信息进行修改。

(2)员工可以进行货物流程的操作,包括:收件、发件、派件、到件、签收五种操作。

(3)员工可以查看自己的定位,员工可以看到货物运输的轨迹,还可以对运输路线进行规划。

(4)员工可以看到网点财务的数据,以及员工财务数据。

管理员对象:

(1)管理员可以对自己的个人信息进行修改操作。

(2)管理员同样可以进行货物流程的操作,包括:收件、发件、派件、到件、签收五种操作。

(3)管理员可以对该系统内所有用户的个人信息进行增加、查找、修改以及删除操作,管理员还可以给不同的用户设置不同的权限。

(4)管理员可以查看司机位置,查看货物运输的轨迹,以及规划货运运输路线。

(5)管理员可以查看财务管理的所有数据,包括:中心财务数据,网点财务数据以及员工财务数据。

(6)管理员可以看到公司的总体运营数据,以便掌握公司的经营状况,对公司的未来进行规划。

图3-3后台管理系统功能模块图

二,环境介绍

语言环境:Java:  jdk1.8

数据库:Mysql: mysql5.7

应用服务器:Tomcat:  tomcat8.5.31

开发工具:IDEA或eclipse

后台开发:Springboot+mybatis

前台开发:Vue+ElementUI+Nodejs

三,系统展示

6.1 登录界面原型

6.2 注册界面原型

6.3 首页界面原型

6.4 订单中心界面原型

6.5 个人信息界面原型

6.6 用户管理界面原型

6.7 货物流程管理界面原型

6.8 轨迹管理界面原型


6.9 财务界面原型

6.10 运营数据界面原型

四,核心代码展示

package com.zh.log.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.zh.log.common.Result;
import com.zh.log.entity.Goods;
import com.zh.log.mapper.GoodsMapper;
import com.zh.log.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
@RestController
@RequestMapping("/finForm")
public class FinFormController {
    @Autowired
    private GoodsService goodsService;
    @Autowired
    private GoodsMapper goodsMapper;
    //各网点每月营业总额
    @GetMapping("/month")
    public Result bj(){
        AtomicInteger m1 = new AtomicInteger();
        AtomicInteger m2 = new AtomicInteger();
        AtomicInteger m3 = new AtomicInteger();
        AtomicInteger m4 = new AtomicInteger();
        AtomicInteger m5 = new AtomicInteger();
        AtomicInteger m6 = new AtomicInteger();
        AtomicInteger m7 = new AtomicInteger();
        AtomicInteger m8 = new AtomicInteger();
        AtomicInteger m9 = new AtomicInteger();
        AtomicInteger m10 = new AtomicInteger();
        AtomicInteger m11 = new AtomicInteger();
        AtomicInteger m12 = new AtomicInteger();
        List<Goods> goodsList = goodsService.list();
        QueryWrapper<Goods> wrapper1 =new QueryWrapper<>();
        wrapper1.select("goodsPayway").groupBy("goodsPayway");
        List<Goods> goods1 = goodsService.list(wrapper1);
        String[] strname=new String[goods1.size()];
        int[][] price = new int[goods1.size()][12];
        for (int i=0;i<goods1.size();i++){
            strname[i]=goods1.get(i).getGoodsPayway();
        }
        Map<String, Object> map = new HashMap<>();
        goodsList.stream().forEach(item->{
            String date = item.getGoodsDate();
            String[] strNow1 =date.split("-");
            int month = Integer.parseInt(strNow1[1]);
            if(month==1){
                int i=0;
                m1.addAndGet(Integer.parseInt(item.getGoodsPrice()));
                while (true){
                    if(i>=goods1.size()){
                        break;
                    }
                    String s = item.getGoodsPayway();
                    String s1 =strname[i];
                    if (s.equals(s1)){
                        price[i][0]=price[i][0]+Integer.parseInt(item.getGoodsPrice());
                        break;
                    }
                    i++;
                }
            }
            if(month==2){
                int i=0;
                m2.addAndGet(Integer.parseInt(item.getGoodsPrice()));
                while (true){
                    if(i>=goods1.size()){
                        break;
                    }
                    if (item.getGoodsPayway().equals(strname[i])){
                        price[i][1]=price[i][1]+Integer.parseInt(item.getGoodsPrice());
                        break;
                    }
                    i++;
                }
            }
            if(month==3){
                int i=0;
                m3.addAndGet(Integer.parseInt(item.getGoodsPrice()));
                while (true){
                    if(i>=goods1.size()){
                        break;
                    }
                    if (item.getGoodsPayway().equals(strname[i])){
                        price[i][2]=price[i][2]+Integer.parseInt(item.getGoodsPrice());
                        break;
                    }
                    i++;
                }
            }
            if(month==4){
                int i=0;
                m4.addAndGet(Integer.parseInt(item.getGoodsPrice()));
                while (true){
                    if(i>=goods1.size()){
                        break;
                    }
                    if (item.getGoodsPayway().equals(strname[i])){
                        price[i][3]=price[i][3]+Integer.parseInt(item.getGoodsPrice());
                        break;
                    }
                    i++;
                }
            }
            if(month==5){
                int i=0;
                m5.addAndGet(Integer.parseInt(item.getGoodsPrice()));
                while (true){
                    if(i>=goods1.size()){
                        break;
                    }
                    if (item.getGoodsPayway().equals(strname[i])){
                        price[i][4]=price[i][4]+Integer.parseInt(item.getGoodsPrice());
                        break;
                    }
                    i++;
                }
            }
            if(month==6){
                int i=0;
                m6.addAndGet(Integer.parseInt(item.getGoodsPrice()));
                while (true){
                    if(i>=goods1.size()){
                        break;
                    }
                    if (item.getGoodsPayway().equals(strname[i])){
                        price[i][5]=price[i][5]+Integer.parseInt(item.getGoodsPrice());
                        break;
                    }
                    i++;
                }
            }
            if(month==7){
                int i=0;
                m7.addAndGet(Integer.parseInt(item.getGoodsPrice()));
                while (true){
                    if(i>=goods1.size()){
                        break;
                    }
                    if (item.getGoodsPayway().equals(strname[i])){
                        price[i][6]=price[i][6]+Integer.parseInt(item.getGoodsPrice());
                        break;
                    }
                    i++;
                }
            }
            if(month==8){
                int i=0;
                m8.addAndGet(Integer.parseInt(item.getGoodsPrice()));
                while (true){
                    if(i>=goods1.size()){
                        break;
                    }
                    if (item.getGoodsPayway().equals(strname[i])){
                        price[i][7]=price[i][7]+Integer.parseInt(item.getGoodsPrice());
                        break;
                    }
                    i++;
                }
            }
            if(month==9){
                int i=0;
                m9.addAndGet(Integer.parseInt(item.getGoodsPrice()));
                while (true){
                    if(i>=goods1.size()){
                        break;
                    }
                    if (item.getGoodsPayway().equals(strname[i])){
                        price[i][8]=price[i][8]+Integer.parseInt(item.getGoodsPrice());
                        break;
                    }
                    i++;
                }
            }
            if(month==10){
                int i=0;
                m10.addAndGet(Integer.parseInt(item.getGoodsPrice()));
                while (true){
                    if(i>=goods1.size()){
                        break;
                    }
                    if (item.getGoodsPayway().equals(strname[i])){
                        price[i][9]=price[i][9]+Integer.parseInt(item.getGoodsPrice());
                        break;
                    }
                    i++;
                }
            }
            if(month==11){
                int i=0;
                m11.addAndGet(Integer.parseInt(item.getGoodsPrice()));
                while (true){
                    if(i>=goods1.size()){
                        break;
                    }
                    if (item.getGoodsPayway().equals(strname[i])){
                        price[i][10]=price[i][10]+Integer.parseInt(item.getGoodsPrice());
                        break;
                    }
                    i++;
                }
            }
            if(month==12){
                int i=0;
                m12.addAndGet(Integer.parseInt(item.getGoodsPrice()));
                while (true){
                    if(i>=goods1.size()){
                        break;
                    }
                    if (item.getGoodsPayway().equals(strname[i])){
                        price[i][11]=price[i][11]+Integer.parseInt(item.getGoodsPrice());
                        break;
                    }
                    i++;
                }
            }
        });
        for (int i=0;i<goods1.size();i++){
            ArrayList<Object> list = new ArrayList<>();
            for (int j=0;j<12;j++){
                list.add(price[i][j]);
            }
            String payway = goods1.get(i).getGoodsPayway();
            map.put(payway,list);
        }
        return Result.success(map);
    }
}
package com.zh.log.controller;
import com.zh.log.common.Result;
import com.zh.log.entity.Client;
import com.zh.log.entity.Role;
import com.zh.log.entity.User;
import com.zh.log.mapper.RoleMapper;
import com.zh.log.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@RestController
@RequestMapping("/role")
public class RoleController {
    @Resource
    private RoleMapper roleMapper;
    @Resource
    private RoleService roleService;
    //修改
    @PostMapping
    public Integer save(@RequestBody Role role) {
        return roleService.savee(role);
    }
    //查询所有
    @GetMapping
    public Result index(){
        List<Role> all = roleMapper.findAll();
        return Result.success(all);
    }
    //删除
    @DeleteMapping("/{userid}")
    public Integer delete(@PathVariable Integer userid){
        return roleMapper.deleteById(userid);
    }
    //分页查询
    @GetMapping("/page")
    public Map<String, Object> findPage(@RequestParam Integer pageNum,
                                        @RequestParam Integer pageSize,
                                        @RequestParam String username
    ){
        pageNum = (pageNum - 1) * pageSize;
        username = "%" + username + "%";
        List<Role> data = roleMapper.selectPage(pageNum,pageSize,username);
        Integer total = roleMapper.selectTotal(username);
        Map<String,Object> res = new HashMap<>();
        res.put("total",total);
        res.put("data",data);
        return res;
    }
}
package com.zh.log.controller;
import cn.hutool.core.util.StrUtil;
import cn.hutool.crypto.SecureUtil;
import cn.hutool.http.server.HttpServerRequest;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.zh.log.common.Constants;
import com.zh.log.common.Result;
import com.zh.log.controller.dto.UserPasswordDTO;
import com.zh.log.entity.User;
import com.zh.log.service.UserService;
import com.zh.log.utils.TokenUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import sun.security.util.Password;
import java.io.File;
import java.io.IOException;
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserService userService;
    @PostMapping("/login")
    public Result login(@RequestBody User user) {
        String username = user.getUsername();
        String password = user.getPassword();
        if (StrUtil.isBlank(username) || StrUtil.isBlank(password)) {
           return Result.error(Constants.CODE_400,"参数错误");
        }
        User dto = userService.login(user);
         return Result.success(dto);
    }
    @GetMapping("/gettoken")
    public Result token(HttpServerRequest request){
        User user = TokenUtils.getCurrentUser();
        String role = user.getRole();
        return Result.success(role);
    }
    @PostMapping("/register")
    public Result register(@RequestBody User user) {
        String username = user.getUsername();
        String password = user.getPassword();
        if (StrUtil.isBlank(username) || StrUtil.isBlank(password)) {
            return Result.error(Constants.CODE_400, "参数错误");
        }
        return Result.success(userService.register(user));
    }
    @GetMapping("/username/{username}")
    public Result findByUsername(@PathVariable String username) {
        QueryWrapper<User> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("username", username);
        return Result.success(userService.getOne(queryWrapper));
    }
    //修改用户信息
    @PostMapping("/save")
    public Result save(@RequestBody User user) {
        return Result.success(userService.saveOrUpdate(user));
    }
    /**
     * 修改密码
     * @param userPasswordDTO
     * @return
     */
    @PostMapping("/password")
    public Result password(@RequestBody UserPasswordDTO userPasswordDTO) {
        userPasswordDTO.setPassword(SecureUtil.md5(userPasswordDTO.getPassword()));
        userPasswordDTO.setNewPassword(SecureUtil.md5(userPasswordDTO.getNewPassword()));
        userService.updatePassword(userPasswordDTO);
        return Result.success();
    }
    }

五,项目总结

智能物流系统是对PC端用户使用的,所以用户基数大,需要合理划分后台资源,且现如今生活速度等越来越快,各种反应速度和分配速度应当简白明了。图4-1为系统部署图

图4-1 系统部署图


相关文章
|
6天前
|
缓存 JavaScript PHP
斩获开发者口碑!SnowAdmin:基于 Vue3 的高颜值后台管理系统,3 步极速上手!
SnowAdmin 是一款基于 Vue3/TypeScript/Arco Design 的开源后台管理框架,以“清新优雅、开箱即用”为核心设计理念。提供角色权限精细化管理、多主题与暗黑模式切换、动态路由与页面缓存等功能,支持代码规范自动化校验及丰富组件库。通过模块化设计与前沿技术栈(Vite5/Pinia),显著提升开发效率,适合团队协作与长期维护。项目地址:[GitHub](https://github.com/WANG-Fan0912/SnowAdmin)。
|
13天前
|
JavaScript 前端开发 Java
制造业ERP源码,工厂ERP管理系统,前端框架:Vue,后端框架:SpringBoot
这是一套基于SpringBoot+Vue技术栈开发的ERP企业管理系统,采用Java语言与vscode工具。系统涵盖采购/销售、出入库、生产、品质管理等功能,整合客户与供应商数据,支持在线协同和业务全流程管控。同时提供主数据管理、权限控制、工作流审批、报表自定义及打印、在线报表开发和自定义表单功能,助力企业实现高效自动化管理,并通过UniAPP实现移动端支持,满足多场景应用需求。
|
21天前
|
前端开发 Java 关系型数据库
基于Java+Springboot+Vue开发的鲜花商城管理系统源码+运行
基于Java+Springboot+Vue开发的鲜花商城管理系统(前后端分离),这是一项为大学生课程设计作业而开发的项目。该系统旨在帮助大学生学习并掌握Java编程技能,同时锻炼他们的项目设计与开发能力。通过学习基于Java的鲜花商城管理系统项目,大学生可以在实践中学习和提升自己的能力,为以后的职业发展打下坚实基础。技术学习共同进步
99 7
|
1月前
|
存储 Java 数据库
Spring Boot 注册登录系统:问题总结与优化实践
在Spring Boot开发中,注册登录模块常面临数据库设计、密码加密、权限配置及用户体验等问题。本文以便利店销售系统为例,详细解析四大类问题:数据库字段约束(如默认值缺失)、密码加密(明文存储风险)、Spring Security配置(路径权限不当)以及表单交互(数据丢失与提示不足)。通过优化数据库结构、引入BCrypt加密、完善安全配置和改进用户交互,提供了一套全面的解决方案,助力开发者构建更 robust 的系统。
61 0
|
14天前
|
供应链 JavaScript BI
ERP系统源码,基于SpringBoot+Vue+ElementUI+UniAPP开发
这是一款专为小微企业打造的 SaaS ERP 管理系统,基于 SpringBoot+Vue+ElementUI+UniAPP 技术栈开发,帮助企业轻松上云。系统覆盖进销存、采购、销售、生产、财务、品质、OA 办公及 CRM 等核心功能,业务流程清晰且操作简便。支持二次开发与商用,提供自定义界面、审批流配置及灵活报表设计,助力企业高效管理与数字化转型。
ERP系统源码,基于SpringBoot+Vue+ElementUI+UniAPP开发
|
2月前
|
人工智能 自然语言处理 Java
对话即服务:Spring Boot整合MCP让你的CRUD系统秒变AI助手
本文介绍了如何通过Model Context Protocol (MCP) 协议将传统Spring Boot服务改造为支持AI交互的智能系统。MCP作为“万能适配器”,让AI以统一方式与多种服务和数据源交互,降低开发复杂度。文章以图书管理服务为例,详细说明了引入依赖、配置MCP服务器、改造服务方法(注解方式或函数Bean方式)及接口测试的全流程。最终实现用户通过自然语言查询数据库的功能,展示了MCP在简化AI集成、提升系统易用性方面的价值。未来,“对话即服务”有望成为主流开发范式。
2940 7
|
2月前
|
JSON Java 数据格式
微服务——SpringBoot使用归纳——Spring Boot中的全局异常处理——处理系统异常
本文介绍了在Spring Boot项目中如何通过创建`GlobalExceptionHandler`类来全局处理系统异常。通过使用`@ControllerAdvice`注解,可以拦截项目中的各种异常,并结合`@ExceptionHandler`注解针对特定异常(如参数缺失、空指针等)进行定制化处理。文中详细展示了处理参数缺失异常和空指针异常的示例代码,并说明了通过拦截`Exception`父类实现统一异常处理的方法。虽然拦截`Exception`可一劳永逸,但为便于问题排查,建议优先处理常见异常,最后再兜底处理未知异常,确保返回给调用方的信息友好且明确。
173 0
微服务——SpringBoot使用归纳——Spring Boot中的全局异常处理——处理系统异常
|
1月前
|
JavaScript 前端开发 Java
Spring Boot 与 Vue.js 前后端分离中的数据交互机制
本文深入探讨了Spring Boot与Vue.js在前后端分离架构下的数据交互机制。通过对比传统`model.addAttribute()`方法与RESTful API的设计,分析了两者在耦合性、灵活性及可扩展性方面的差异。Spring Boot以RESTful API提供数据服务,Vue.js借助Axios消费API并动态渲染页面,实现了职责分明的解耦架构。该模式显著提升了系统的灵活性和维护性,适用于复杂应用场景如论坛、商城系统等,为现代Web开发提供了重要参考。
153 0
|
3月前
|
数据采集 JavaScript Android开发
【02】仿站技术之python技术,看完学会再也不用去购买收费工具了-本次找了小影-感觉页面很好看-本次是爬取vue需要用到Puppeteer库用node.js扒一个app下载落地页-包括安卓android下载(简单)-ios苹果plist下载(稍微麻烦一丢丢)-优雅草卓伊凡
【02】仿站技术之python技术,看完学会再也不用去购买收费工具了-本次找了小影-感觉页面很好看-本次是爬取vue需要用到Puppeteer库用node.js扒一个app下载落地页-包括安卓android下载(简单)-ios苹果plist下载(稍微麻烦一丢丢)-优雅草卓伊凡
117 7
【02】仿站技术之python技术,看完学会再也不用去购买收费工具了-本次找了小影-感觉页面很好看-本次是爬取vue需要用到Puppeteer库用node.js扒一个app下载落地页-包括安卓android下载(简单)-ios苹果plist下载(稍微麻烦一丢丢)-优雅草卓伊凡
|
3月前
|
前端开发 JavaScript Java
【03】Java+若依+vue.js技术栈实现钱包积分管理系统项目-若依框架搭建-服务端-后台管理-整体搭建-优雅草卓伊凡商业项目实战
【03】Java+若依+vue.js技术栈实现钱包积分管理系统项目-若依框架搭建-服务端-后台管理-整体搭建-优雅草卓伊凡商业项目实战
213 13
【03】Java+若依+vue.js技术栈实现钱包积分管理系统项目-若依框架搭建-服务端-后台管理-整体搭建-优雅草卓伊凡商业项目实战