赞
踩
本项目名称为品达物流TMS,TMS全称为:Transportation Management System,即运输管理系统,是对运输作业从运力资源准备到最终货物抵达目的地的全流程管理。TMS系统适用于运输公司、各企业下面的运输队等,它主要包括订单管理、配载作业、调度分配、行车管理、GPS车辆定位系统、车辆管理、线路管理、车次管理、人员管理、数据报表、基本信息维护等模块。该系统对车辆、驾驶员、线路等进行全面详细的统计考核,能大大提高运作效率,降低运输成本,使公司能够在激烈的市场竞争中处于领先地位。
本项目从用户层面可以分为四个端:TMS后台系统管理端、客户端App、快递员端App、司机端App。
品达速运
,外部客户使用,可以寄件、查询物流信息等品达快递员
,公司内部的快递员使用,可以接收取派件任务等品达司机宝
,公司内部的司机使用,可以接收运输任务、上报位置信息等物流运输市场目前上最普遍的有四种行业类别:快递、快运、专线、三方。这四种行业支撑着全国商品货物的流通。
快递:物流行业外的人对物流的直接反应就是快递,快递只是物流行业的一种形态,得益于电商的发展把快递行业推到大众视野之中。快递的接收群体大多为个人,也称C端。快运、专线、三方的发货和接收群体主要为B端,主要为企业与企业之间的合作,也有少量个人。
快运:快运承运的多是小批量货物,一般为几立方货物或几十公斤货物,如德邦快递、远成快运,运输对象为单个沙发,桌椅等,配送网络为自建和加盟两种方式。
专线:专线衔接的货物多数为大宗商品,货物往往依照吨来结算,送货主要送到仓库,工厂,门店。整个配送网络都是社会化网络,由不同的专线进行配合,货物运输需要经过多次中转、集拼。
三方:三方不直接从事货物运输,主要通过与工厂签订运输合同,将货物交给专线或者联系车队、司机将货物送到指定地点,属于轻资产运作模式。
参见资料中提供的"品达物流项目产品PRD文档_V0.5.1.docx"。
可以通过蓝湖在线查看产品原型。
蓝湖是一款产品文档和设计图的共享平台,帮助互联网团队更好地管理文档和设计图。
下图展示的是从寄件人下单到最终收件人签收的整个流程:
本项目的开发过程并不是从零开始,而是基于一些已有框架和服务来进行开发的。例如:TMS的后台管理端是通过通用权限系统进行菜单的配置、权限的配置、用户的配置、认证和鉴权等。客户端App是通过注册登录服务来完成C端用户的注册和登录功能。快递员端App是通过文件服务来完成附件的上传操作。
通用权限系统是黑马程序员自研的一个通用的开发平台和权限管理平台,提供了通用的岗位、组织结构、菜单、角色、用户等基础数据的维护功能,同时还提供了认证和鉴权功能,TMS项目可以直接来使用这些功能。
由于本课程主要开发的是TMS项目,所以依赖的通用权限系统已经提前部署好,我们直接使用即可。
企业开发中经常会使用到短信功能,市面上有多种短信服务平台可供选用,但是不同的短信平台调用方式都不相同,为了在项目中统一调用方式,黑马程序员对市面上主流的短信平台进行了整合,提供了统一的短信服务。在TMS中我们直接使用即可。
文件的上传、下载功能是软件系统中常见的功能,包括上传文件、下载文件、查看文件等。例如:电商系统中需要上传商品的图片、广告视频,办公系统中上传附件,社交类系统中上传用户头像等等。上传的文件有多种存储方式,例如:本地存储、FastDFS存储、云存储(阿里云、腾讯云、七牛云)等方式。不同的存储方式对应的处理方式都不相同,如果后期需要改变存储方式,维护成本比较高。针对以上问题,黑马程序员自研了通用的文件服务,对以上不同的存储方式进行了整合,对外暴露统一的文件服务接口。如果要改变存储方式,只需要在文件服务中修改配置即可切换,调用端程序代码不用做任何修改。
在TMS项目中的文件上传操作我们直接使用此文件服务即可。
注册登录服务是黑马程序员自研的针对C端用户的通用的注册登录服务,在TMS的客户端App会使用此服务来完成C端用户的注册和登录操作。
组织结构数据是TMS的基础支撑数据,需要在通用权限系统中进行维护,如下图:
也可以直接执行资料中提供的sql脚本“pd_core_org.sql”来初始化TMS所需的组织结构数据,最终效果如下:
菜单和权限数据也属于基础支撑数据,需要在通用权限系统中配置TMS项目对应的菜单和权限数据,如下:
也可以直接执行资料中提供的sql脚本“pd_auth_menu.sql”和“pd_auth_resource.sql”来完成菜单和权限数据的初始化,最终效果如下:
岗位数据也属于基础支撑数据,可以在通用权限系统中配置TMS项目所需的岗位数据,如下:
也可以直接执行资料中的sql脚本“pd_core_station.sql”来初始化TMS项目相关的岗位数据,如下:
角色数据也属于基础支撑数据,可以在通用权限系统中配置TMS项目所需的角色数据,如下:
也可以直接执行资料中的sql脚本“pd_auth_role.sql”来初始化TMS项目相关的角色数据,如下:
角色数据初始化完成后需要配置对应的菜单,如下:
用户数据也属于基础数据,需要在通用权限系统中维护TMS中的用户数据,如下:
也可以直接执行资料中的sql脚本“pd_auth_user.sql”来初始化TMS项目相关的用户数据,如下:
用户数据初始化完成后需要在角色管理中进行角色和用户的关联操作,如下:
注意:此处维护的TMS用户数据分为三类:TMS后台系统用户
、快递员
、司机
。
执行资料中提供的sql脚本来完成TMS项目数据库的初始化工作
可以看到TMS项目共使用到6个数据库,如下:
各个数据库存放数据说明:
新建命名空间:pinda-tms
物理地址:pinda-tms 85960ebd-c585-43cd-9fbc-c64c209adb5f
TMS项目所需的配置文件需要统一配置在Nacos配置中心来统一管理和维护。由于TMS项目是属于微服务类型的项目,即根据业务拆分成若干个微服务,每个微服务都需要有对应的配置文件。
直接将资料中提供的压缩文件导入到Nacos中即可
导入后如下:
注:Nacos在作为配置中心的同时,还作为服务注册中心使用。
TMS项目的maven工程结构提前已经搭建好,直接导入IEDA中,在此基础上进行开发即可。
下图展示了各个微服务的调用关系:
上面我们导入的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 at http://www.apache.org/licenses/LICENSE-2.0 Unless 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包图例:
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。