第1章 项目概述和环境搭建

文章目录

  • 第1章 项目概述和环境搭建
    • 1. 项目概述
      • 1.1 项目介绍
      • 1.2 物流行业介绍
      • 1.3 系统架构
      • 1.4 技术架构
    • 2. 业务需求说明
      • 2.1 产品需求和原型设计
      • 2.2 整体业务流程
    • 3. 开发方式介绍
      • 3.1 软件架构介绍
      • 3.2 通用权限系统介绍
      • 3.3 短信服务介绍
      • 3.4 文件服务介绍
      • 3.5 注册登录服务介绍
    • 4. 基础数据配置
      • 4.1 配置组织基础数据
      • 4.2 配置菜单、权限基础数据
      • 4.3 配置岗位基础数据
      • 4.4 配置角色基础数据
      • 4.5 配置用户基础数据
    • 5. 搭建TMS项目开发环境
      • 5.1 数据库环境搭建
      • 5.2 配置中心Nacos
      • 5.3 导入maven初始工程
      • 5.4 配置maven配置文件

1. 项目概述

1.1 项目介绍

本项目名称为品达物流TMS,TMS全称为:Transportation Management System,即运输管理系统,是对运输作业从运力资源准备到最终货物抵达目的地的全流程管理。TMS系统适用于运输公司、各企业下面的运输队等,它主要包括订单管理、配载作业、调度分配、行车管理、GPS车辆定位系统、车辆管理、线路管理、车次管理、人员管理、数据报表、基本信息维护等模块。该系统对车辆、驾驶员、线路等进行全面详细的统计考核,能大大提高运作效率,降低运输成本,使公司能够在激烈的市场竞争中处于领先地位。

本项目从用户层面可以分为四个端:TMS后台系统管理端、客户端App、快递员端App、司机端App。

  • TMS后台系统管理端:公司内部管理员用户使用,可以进行基础数据维护、订单管理、运单管理等
  • 客户端App:App名称为品达速运,外部客户使用,可以寄件、查询物流信息等
  • 快递员端App:App名称为品达快递员,公司内部的快递员使用,可以接收取派件任务等
  • 司机端App:App名称为品达司机宝,公司内部的司机使用,可以接收运输任务、上报位置信息等

1.2 物流行业介绍

物流运输市场目前上最普遍的有四种行业类别:快递、快运、专线、三方。这四种行业支撑着全国商品货物的流通。

快递:物流行业外的人对物流的直接反应就是快递,快递只是物流行业的一种形态,得益于电商的发展把快递行业推到大众视野之中。快递的接收群体大多为个人,也称C端。快运、专线、三方的发货和接收群体主要为B端,主要为企业与企业之间的合作,也有少量个人。

快运:快运承运的多是小批量货物,一般为几立方货物或几十公斤货物,如德邦快递、远成快运,运输对象为单个沙发,桌椅等,配送网络为自建和加盟两种方式。

专线:专线衔接的货物多数为大宗商品,货物往往依照吨来结算,送货主要送到仓库,工厂,门店。整个配送网络都是社会化网络,由不同的专线进行配合,货物运输需要经过多次中转、集拼。

三方:三方不直接从事货物运输,主要通过与工厂签订运输合同,将货物交给专线或者联系车队、司机将货物送到指定地点,属于轻资产运作模式。

1.3 系统架构

1.4 技术架构

2. 业务需求说明

2.1 产品需求和原型设计

参见资料中提供的"品达物流项目产品PRD文档_V0.5.1.docx"。

可以通过蓝湖在线查看产品原型。

蓝湖是一款产品文档和设计图的共享平台,帮助互联网团队更好地管理文档和设计图。

2.2 整体业务流程

下图展示的是从寄件人下单到最终收件人签收的整个流程:

3. 开发方式介绍

3.1 软件架构介绍

本项目的开发过程并不是从零开始,而是基于一些已有框架和服务来进行开发的。例如:TMS的后台管理端是通过通用权限系统进行菜单的配置、权限的配置、用户的配置、认证和鉴权等。客户端App是通过注册登录服务来完成C端用户的注册和登录功能。快递员端App是通过文件服务来完成附件的上传操作。

3.2 通用权限系统介绍

通用权限系统是黑马程序员自研的一个通用的开发平台和权限管理平台,提供了通用的岗位、组织结构、菜单、角色、用户等基础数据的维护功能,同时还提供了认证和鉴权功能,TMS项目可以直接来使用这些功能。

由于本课程主要开发的是TMS项目,所以依赖的通用权限系统已经提前部署好,我们直接使用即可。

3.3 短信服务介绍

企业开发中经常会使用到短信功能,市面上有多种短信服务平台可供选用,但是不同的短信平台调用方式都不相同,为了在项目中统一调用方式,黑马程序员对市面上主流的短信平台进行了整合,提供了统一的短信服务。在TMS中我们直接使用即可。

3.4 文件服务介绍

文件的上传、下载功能是软件系统中常见的功能,包括上传文件、下载文件、查看文件等。例如:电商系统中需要上传商品的图片、广告视频,办公系统中上传附件,社交类系统中上传用户头像等等。上传的文件有多种存储方式,例如:本地存储、FastDFS存储、云存储(阿里云、腾讯云、七牛云)等方式。不同的存储方式对应的处理方式都不相同,如果后期需要改变存储方式,维护成本比较高。针对以上问题,黑马程序员自研了通用的文件服务,对以上不同的存储方式进行了整合,对外暴露统一的文件服务接口。如果要改变存储方式,只需要在文件服务中修改配置即可切换,调用端程序代码不用做任何修改。

在TMS项目中的文件上传操作我们直接使用此文件服务即可。

3.5 注册登录服务介绍

注册登录服务是黑马程序员自研的针对C端用户的通用的注册登录服务,在TMS的客户端App会使用此服务来完成C端用户的注册和登录操作。

4. 基础数据配置

4.1 配置组织基础数据

组织结构数据是TMS的基础支撑数据,需要在通用权限系统中进行维护,如下图:

也可以直接执行资料中提供的sql脚本“pd_core_org.sql”来初始化TMS所需的组织结构数据,最终效果如下:

4.2 配置菜单、权限基础数据

菜单和权限数据也属于基础支撑数据,需要在通用权限系统中配置TMS项目对应的菜单和权限数据,如下:

也可以直接执行资料中提供的sql脚本“pd_auth_menu.sql”和“pd_auth_resource.sql”来完成菜单和权限数据的初始化,最终效果如下:

4.3 配置岗位基础数据

岗位数据也属于基础支撑数据,可以在通用权限系统中配置TMS项目所需的岗位数据,如下:

也可以直接执行资料中的sql脚本“pd_core_station.sql”来初始化TMS项目相关的岗位数据,如下:

4.4 配置角色基础数据

角色数据也属于基础支撑数据,可以在通用权限系统中配置TMS项目所需的角色数据,如下:

也可以直接执行资料中的sql脚本“pd_auth_role.sql”来初始化TMS项目相关的角色数据,如下:

角色数据初始化完成后需要配置对应的菜单,如下:

4.5 配置用户基础数据

用户数据也属于基础数据,需要在通用权限系统中维护TMS中的用户数据,如下:

也可以直接执行资料中的sql脚本“pd_auth_user.sql”来初始化TMS项目相关的用户数据,如下:

用户数据初始化完成后需要在角色管理中进行角色和用户的关联操作,如下:

注意:此处维护的TMS用户数据分为三类:TMS后台系统用户快递员司机

5. 搭建TMS项目开发环境

5.1 数据库环境搭建

执行资料中提供的sql脚本来完成TMS项目数据库的初始化工作

可以看到TMS项目共使用到6个数据库,如下:

各个数据库存放数据说明:

  • pd_aggregation:存放聚合之后的数据,便于查询
  • pd_base:存放TMS的基础数据,例如:车队、车辆、线路等
  • pd_dispatch:存放定时任务相关数据
  • pd_oms:存放订单相关数据
  • pd_users:存放C端用户相关数据
  • pd_work:存放作业相关数据,例如快递员的取件作业、司机的运输作业等

5.2 配置中心Nacos

新建命名空间:pinda-tms

物理地址:pinda-tms 85960ebd-c585-43cd-9fbc-c64c209adb5f

TMS项目所需的配置文件需要统一配置在Nacos配置中心来统一管理和维护。由于TMS项目是属于微服务类型的项目,即根据业务拆分成若干个微服务,每个微服务都需要有对应的配置文件。

直接将资料中提供的压缩文件导入到Nacos中即可

导入后如下:

注:Nacos在作为配置中心的同时,还作为服务注册中心使用。

5.3 导入maven初始工程

TMS项目的maven工程结构提前已经搭建好,直接导入IEDA中,在此基础上进行开发即可。

下图展示了各个微服务的调用关系:

5.4 配置maven配置文件

上面我们导入的maven工程中使用到了通用权限系统中的两个jar,对应的maven坐标如下:

<dependency><groupId>com.itheima</groupId><artifactId>pd-auth-entity</artifactId><version>1.0.0</version>
</dependency>
<dependency><groupId>com.itheima</groupId><artifactId>pd-auth-api</artifactId><version>1.0.0</version>
</dependency>

这两个jar在maven中央仓库是没有的,我们自己搭建了maven私服来管理这两个jar,这就需要在本地maven的settings.xml中进行私服的配置:

详细配置参照资料中初始工程\settings.xml

<?xml version="1.0" encoding="UTF-8"?><!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
--><!--| This is the configuration file for Maven. It can be specified at two levels:||  1. User Level. This settings.xml file provides configuration for a single user,|                 and is normally provided in ${user.home}/.m2/settings.xml.||                 NOTE: This location can be overridden with the CLI option:||                 -s /path/to/user/settings.xml||  2. Global Level. This settings.xml file provides configuration for all Maven|                 users on a machine (assuming they're all using the same Maven|                 installation). It's normally provided in|                 ${maven.conf}/settings.xml.||                 NOTE: This location can be overridden with the CLI option:||                 -gs /path/to/global/settings.xml|| The sections in this sample file are intended to give you a running start at| getting the most out of your Maven installation. Where appropriate, the default| values (values used when the setting is not specified) are provided.||-->
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"><!-- localRepository| The path to the local repository maven will use to store artifacts.|| Default: ${user.home}/.m2/repository<localRepository>/path/to/local/repo</localRepository>--><!-- 修改成本地仓库地址    --><localRepository>C:\Users\ChangxiaoGuan\.m2\repository</localRepository><!-- interactiveMode| This will determine whether maven prompts you when it needs input. If set to false,| maven will use a sensible default value, perhaps based on some other setting, for| the parameter in question.|| Default: true<interactiveMode>true</interactiveMode>--><!-- offline| Determines whether maven should attempt to connect to the network when executing a build.| This will have an effect on artifact downloads, artifact deployment, and others.|| Default: false<offline>false</offline>--><!-- pluginGroups| This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e.| when invoking a command line like "mvn prefix:goal". Maven will automatically add the group identifiers| "org.apache.maven.plugins" and "org.codehaus.mojo" if these are not already contained in the list.|--><pluginGroups><!-- pluginGroup| Specifies a further group identifier to use for plugin lookup.<pluginGroup>com.your.plugins</pluginGroup>--></pluginGroups><!-- proxies| This is a list of proxies which can be used on this machine to connect to the network.| Unless otherwise specified (by system property or command-line switch), the first proxy| specification in this list marked as active will be used.|--><proxies><!-- proxy| Specification for one proxy, to be used in connecting to the network.|<proxy><id>optional</id><active>true</active><protocol>http</protocol><username>proxyuser</username><password>proxypass</password><host>proxy.host.net</host><port>80</port><nonProxyHosts>local.net|some.host.com</nonProxyHosts></proxy>--></proxies><!-- servers| This is a list of authentication profiles, keyed by the server-id used within the system.| Authentication profiles can be used whenever maven must make a connection to a remote server.|--><servers><!-- server| Specifies the authentication information to use when connecting to a particular server, identified by| a unique name within the system (referred to by the 'id' attribute below).|| NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are|       used together.|<server><id>deploymentRepo</id><username>repouser</username><password>repopwd</password></server>--><!-- Another sample, using keys to authenticate.<server><id>siteServer</id><privateKey>/path/to/private/key</privateKey><passphrase>optional; leave empty if not used.</passphrase></server>--><server><id>rdc-releases</id><username>ioo7VD</username><password>pQ2PlVFa3a</password></server><server><id>rdc-snapshots</id><username>ioo7VD</username><password>pQ2PlVFa3a</password></server></servers><!-- mirrors| This is a list of mirrors to be used in downloading artifacts from remote repositories.|| It works like this: a POM may declare a repository to use in resolving certain artifacts.| However, this repository may have problems with heavy traffic at times, so people have mirrored| it to several places.|| That repository definition will have a unique id, so we can create a mirror reference for that| repository, to be used as an alternate download site. The mirror site will be the preferred| server for that repository.|--><mirrors><!-- mirror| Specifies a repository mirror site to use instead of a given repository. The repository that| this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used| for inheritance and direct lookup purposes, and must be unique across the set of mirrors.|<mirror><id>mirrorId</id><mirrorOf>repositoryId</mirrorOf><name>Human Readable Name for this Mirror.</name><url>http://my.repository.com/repo/path</url></mirror>--><mirror><id>mirror</id><mirrorOf>!rdc-releases,!rdc-snapshots</mirrorOf><name>mirror</name><url>https://maven.aliyun.com/nexus/content/groups/public</url></mirror></mirrors><!-- profiles| This is a list of profiles which can be activated in a variety of ways, and which can modify| the build process. Profiles provided in the settings.xml are intended to provide local machine-| specific paths and repository locations which allow the build to work in the local environment.|| For example, if you have an integration testing plugin - like cactus - that needs to know where| your Tomcat instance is installed, you can provide a variable here such that the variable is| dereferenced during the build process to configure the cactus plugin.|| As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles| section of this document (settings.xml) - will be discussed later. Another way essentially| relies on the detection of a system property, either matching a particular value for the property,| or merely testing its existence. Profiles can also be activated by JDK version prefix, where a| value of '1.4' might activate a profile when the build is executed on a JDK version of '1.4.2_07'.| Finally, the list of active profiles can be specified directly from the command line.|| NOTE: For profiles defined in the settings.xml, you are restricted to specifying only artifact|       repositories, plugin repositories, and free-form properties to be used as configuration|       variables for plugins in the POM.||--><profiles><!-- profile| Specifies a set of introductions to the build process, to be activated using one or more of the| mechanisms described above. For inheritance purposes, and to activate profiles via <activatedProfiles/>| or the command line, profiles have to have an ID that is unique.|| An encouraged best practice for profile identification is to use a consistent naming convention| for profiles, such as 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc.| This will make it more intuitive to understand what the set of introduced profiles is attempting| to accomplish, particularly when you only have a list of profile id's for debug.|| This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo.<profile><id>jdk-1.4</id><activation><jdk>1.8</jdk></activation><repositories><repository><id>jdk14</id><name>Repository for JDK 1.4 builds</name><url>http://www.myhost.com/maven/jdk14</url><layout>default</layout><snapshotPolicy>always</snapshotPolicy></repository></repositories></profile>--><!--| Here is another profile, activated by the system property 'target-env' with a value of 'dev',| which provides a specific path to the Tomcat instance. To use this, your plugin configuration| might hypothetically look like:|| ...| <plugin>|   <groupId>org.myco.myplugins</groupId>|   <artifactId>myplugin</artifactId>||   <configuration>|     <tomcatLocation>${tomcatPath}</tomcatLocation>|   </configuration>| </plugin>| ...|| NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to|       anything, you could just leave off the <value/> inside the activation-property.|<profile><id>env-dev</id><activation><property><name>target-env</name><value>dev</value></property></activation><properties><tomcatPath>/path/to/tomcat/instance</tomcatPath></properties></profile>--><profile><id>nexus</id><repositories><repository><id>central</id><url>https://maven.aliyun.com/nexus/content/groups/public</url><releases><enabled>true</enabled></releases><snapshots><enabled>false</enabled></snapshots></repository><repository><id>snapshots</id><url>https://maven.aliyun.com/nexus/content/groups/public</url><releases><enabled>false</enabled></releases><snapshots><enabled>true</enabled></snapshots></repository><repository><id>rdc-releases</id><url>https://repo.rdc.aliyun.com/repository/130518-release-5pCGIf/</url><releases><enabled>true</enabled></releases><snapshots><enabled>false</enabled></snapshots></repository><repository><id>rdc-snapshots</id><url>https://repo.rdc.aliyun.com/repository/130518-snapshot-DMsWgc/</url><releases><enabled>false</enabled></releases><snapshots><enabled>true</enabled></snapshots></repository></repositories><pluginRepositories><pluginRepository><id>central</id><url>https://maven.aliyun.com/nexus/content/groups/public</url><releases><enabled>true</enabled></releases><snapshots><enabled>false</enabled></snapshots></pluginRepository><pluginRepository><id>snapshots</id><url>https://maven.aliyun.com/nexus/content/groups/public</url><releases><enabled>false</enabled></releases><snapshots><enabled>true</enabled></snapshots></pluginRepository><pluginRepository><id>rdc-releases</id><url>https://repo.rdc.aliyun.com/repository/130518-release-5pCGIf/</url><releases><enabled>true</enabled></releases><snapshots><enabled>false</enabled></snapshots></pluginRepository><pluginRepository><id>rdc-snapshots</id><url>https://repo.rdc.aliyun.com/repository/130518-snapshot-DMsWgc/</url><releases><enabled>false</enabled></releases><snapshots><enabled>true</enabled></snapshots></pluginRepository></pluginRepositories></profile></profiles><!-- activeProfiles| List of profiles that are active for all builds.|<activeProfiles><activeProfile>alwaysActiveProfile</activeProfile><activeProfile>anotherAlwaysActiveProfile</activeProfile></activeProfiles>--><activeProfiles><activeProfile>nexus</activeProfile></activeProfiles>
</settings>
相关jar包图例:

品达物流TMS项目_第1章 项目概述和环境搭建相关推荐

  1. 品达物流TMS项目_第6章 数据聚合服务开发(pd-aggregation)

    品达物流TMS项目_第6章 数据聚合服务开发(pd-aggregation) 文章目录 品达物流TMS项目_第6章 数据聚合服务开发(pd-aggregation) 第6章 数据聚合服务开发(pd-a ...

  2. 品达物流TMS项目_第11章 TMS司机端、快递员端开发

    品达物流TMS项目_第11章 TMS司机端.快递员端开发 文章目录 品达物流TMS项目_第11章 TMS司机端.快递员端开发 第11章 TMS司机端.快递员端开发 1. 导入功能代码 2. 分布式事务 ...

  3. 品达物流TMS项目_第12章 项目总结

    品达物流TMS项目_第12章 项目总结 文章目录 品达物流TMS项目_第12章 项目总结 第12章 项目总结 1. 微服务架构 2. 软件架构体系 3. 系统架构 4. 技术架构 5. 业务流程 6. ...

  4. 尚医通_第1章-项目简介

    尚医通_第1章-项目简介 文章目录 尚医通_第1章-项目简介 二.业务流程 三.系统架构 一.功能简介 尚医通即为网上预约挂号系统,网上预约挂号是近年来开展的一项便民就医服务,旨在缓解看病难.挂号难的 ...

  5. 宠物诊所java项目_任务一宠物诊所项目概述.PDF

    任务一宠物诊所项目概述 1 任务一 宠物诊所项目概述 l 理解项目需求 l 理解项目设计 l 掌握开发环境搭建 l 掌握?Eclipse 的使用 1.1 宠物诊所项目简介 如今,饲养宠物的热潮正在我国 ...

  6. 2022 最新 Android 基础教程,从开发入门到项目实战【b站动脑学院】学习笔记——第一章:Android开发环境搭建

    第 1 章 Android开发环境搭建 本章介绍了如何在个人电脑上搭建Android开发环境,主要包括:Android开发的发展历史是怎样的.Android Studio的开发环境是如何搭建的.如何创 ...

  7. Day_01 传智健康项目-项目概述和环境搭建

    第1章 项目概述和环境搭建 1. 项目概述 1.1 项目介绍 传智健康管理系统是一款应用于健康管理机构的业务系统,实现健康管理机构工作内容可视化.会员管理专业化.健康评估数字化.健康干预流程化.知识库 ...

  8. 传智健康—第1章 项目概述和环境搭建

    传智健康-第1章 项目概述和环境搭建 文章目录 传智健康-第1章 项目概述和环境搭建 第1章 项目概述和环境搭建 1. 项目概述 1.1 项目介绍 1.2 原型展示 1.3 技术架构 1.4 功能架构 ...

  9. swift 项目_如何对iOS项目进行静态分析

    随着项目的扩大,依靠人工codereview来保证项目的质量,越来越不现实,这时就有必要借助于一种自动化的代码审查工具:程序静态分析. 程序静态分析(Program Static Analysis)是 ...

最新文章

  1. Android sudio Day01-1
  2. 使用IDEA界面或者命令行进行git cherry-pick
  3. 【学术相关】刚刚,中科院最新预警期刊名单发布!
  4. another mysql daemon,[守护进程详解及创建,daemon()使用
  5. Stanley-系列三
  6. python3发布时间_什么时候python 3 才能有更好的支持呢?
  7. bash脚本之条件判断
  8. jquery tmpl的使用
  9. C++支持参数个数不确定的函数
  10. VTD的官方help翻译-ROD部分(1~4章)
  11. SpreadJS使用小结
  12. python的基础列表_python基础入门 列表
  13. C++的 new 和 detele
  14. HTB-SolidState
  15. .length和.length()
  16. 如何用电脑调试安卓手机浏览器上的网页
  17. Linux应用程序利用libudev库识别USB设备
  18. MIT 操作系统 jos make grade出现no jos.out
  19. SQL Server DBCC
  20. matplotlib 饼图 plt.pie()

热门文章

  1. Java云同桌学习系列(十三)——前端技术之HTML与CSS
  2. 微信小程序数组push报错
  3. VUEX 报错:Do not mutate vuex store state outside mutation handlers.
  4. excel中如何动态地创建控件以显示查询结果_年终汇报,Excel图表真难搞?80份可视化图表帮你10秒搞定...
  5. 倍福--AX5000驱动器的参数设置
  6. 求最小公倍数或最大公约数
  7. 基于第三方开发Android锁屏
  8. 天然气阶梯是按年还是按月_燃气阶梯价是按自然年算吗
  9. 成为优秀沟通者的要素_如果您想成为更好的设计师,请成为更好的沟通者
  10. 后端技术大全(69个点)