The main functions of the warehouse management system are as follows:
System functions include: product entry and exit registration, confirmation of in -depth information, and deleting information in the library.
System administrator function: add personnel, delete personnel, query information in the library, user management.
User functions include: query the information in the library, query the outbound information, query the inquiry information, and modify the user password.
Classified by managers, different authority personnel have different management functions.
Permissions/function | Administrator management | User management | Warehouse management | Item Classification Management | Item management | Recording management |
---|---|---|---|---|---|---|
Super administrator | √ | √ | √ | √ | √ | √ |
Ordinary administrator | × | √ | √ | √ | √ | √ |
staff | × | × | × | × | √ (there is restriction) | √ (there is restriction) |
In the management function of the item, employees can only inquire; in the recording management, employees can only query their entry and warehouse records.
SpringBoot
:后端框架MyBatisPlus
:持久层框架Vue2
:采用Vue作为前端框架,本项目前后端分离MD5
:用户密码使用MD5加密Docker
:使用Docker容器部署项目Git
:使用Github进行版本控制Main.js under the vue project file (the location of different items is not the same)
Vue.prototype.$httpUrl = 'http://{服务器ip}:{springboot端口号}';
eg:
Vue.prototype.$httpUrl = 'http://67.99.26.82:8081';
axios.defaults.baseURL="http://{服务器ip}:{端口号}"
In the vue project directory
npm run build
将打包好的dist文件移动到springboot项目resources/static
中
As shown in the figure, activate the production environment and configure the static resource directory
Then you need to configure to generate an environment, such as MySQL, Redis's password.
Run jar package in the front desk
java -jar xxx.jar
Run jar package in the background
nohup java -jar xxx.jar > msg.log 2>&1 &
[root@iZbp144worluc8frpn60arZ nginx2] # pwd
/root/nginx2
[root@iZbp144worluc8frpn60arZ ~ ] # cd nginx2
[root@iZbp144worluc8frpn60arZ nginx2] # ll
total 8
drwxr-xr-x 6 root root 4096 Jun 27 19:52 html
-rw-r--r-- 1 root root 550 Jun 26 16:02 nginx.conf
nginx.conf
# user root;
worker_processes 1 ;
events {
worker_connections 1024 ;
}
http {
include mime.types ;
default_type application/octet-stream ;
sendfile on ;
keepalive_timeout 65 ;
server {
listen 80 ;
server_name localhost ;
location / {
root /usr/share/nginx/html ;
try_files $uri $uri / /index.html last ; # 别忘了这个哈
index index.html index.htm ;
}
error_page 500 502 503 504 /50x.html ;
location = /50x.html {
root html ;
}
}
}
HTML directory (unzip the packaged different file to this)
[root@iZbp144worluc8frpn60arZ nginx2] # cd html
[root@iZbp144worluc8frpn60arZ html] # ll
total 32
drwxr-xr-x 2 root root 4096 Jun 27 19:52 css
-rw-r--r-- 1 root root 4286 Jun 27 19:52 favicon.ico
drwxr-xr-x 2 root root 4096 Jun 27 19:52 fonts
drwxr-xr-x 2 root root 4096 Jun 27 19:52 img
-rw-r--r-- 1 root root 670 Jun 27 19:52 index.html
drwxr-xr-x 2 root root 4096 Jun 27 19:52 js
-rw-r--r-- 1 root root 1524 Jun 27 19:52 logo.svg
Dockerfile file
FROM openjdk:8
EXPOSE 8082
ADD wms-0.0.1-SNAPSHOT.jar app.jar
RUN bash -c 'touch /app.jar'
ENTRYPOINT [ "java" , "-jar" , "/app.jar" , "--spring.profiles.active=prod" ]
docker-compose.yml
version : " 3 "
services :
nginx : # 服务名称,用户自定义
image : nginx:latest # 镜像版本
ports :
- 80:80 # 暴露端口
volumes : # 挂载
- /root/nginx2/html:/usr/share/nginx/html
- /root/nginx2/nginx.conf:/etc/nginx/nginx.conf
privileged : true # 这个必须要,解决nginx的文件调用的权限问题
mysql :
image : mysql:latest
ports :
- " 3306:3306 "
environment : # 指定用户root的密码
- MYSQL_ROOT_PASSWORD={password}
privileged : true
redis :
image : redis:latest
wms :
image : wms:latest
build : src # 表示以当前目录下的Dockerfile开始构建镜像
ports :
- 8082:8082
depends_on : # 依赖与mysql其实可以不填,默认已经表示可以
- mysql
- redis
If you use a cloud server, please pay attention to open the corresponding port in the security group (or firewall)
[root@iZbp144worluc8frpn60arZ WMS]# ls
docker-compose.yml Dockerfile wms-0.0.1-SNAPSHOT.jar
[root@iZbp144worluc8frpn60arZ WMS]# docker-compose up -d
If the service starts normally, you can access the website through an IP.