Code Monkey home page Code Monkey logo

cygdos / greaterwms Goto Github PK

View Code? Open in Web Editor NEW

This project forked from greaterwms/greaterwms

0.0 0.0 0.0 12.26 MB

Open source warehouse management system follows Apache License 2.0 and front-back stage decoupling method. API uses restful protocol to facilitate for add-on functions development. The html & js code is constructed with quasar(base on Vue.js v2.6.0+). According to API, it can support business models such as multi warehouse, wave shipment, combined picking and milk-run and so on.

License: Apache License 2.0

Python 75.36% JavaScript 15.22% CSS 9.10% HTML 0.33%

greaterwms's Introduction

Django_WMS--Open source warehouse management software


Project Description:

Open source warehouse management software follows MIT protocol and front-back stage decoupling method. API uses restful protocol to facilitate for add-on functions development. The html & js code is constructed with quasar(base on Vue.js v2.6.0+). According to API, it can support business models such as multi warehouse, wave shipment, combined picking and milk-run and so on.

Software copyright Code:China: 2018SR517685

Gitee Link:Gitee

Technical QQ community:1051907485


Development Environment:

* Python v3.7.0 +

* Django v2.2.14(Django v2.2.14 can support Django-rest-swagger better. If you don't need Django-rest-swagger to debug api, you can pip install higher version Django)

* Django-rest-framework v3.9.2(Django-rest-framework v3.9.2 can support Django-rest-swagger better,If you don't need Django-rest-swagger to debug api, you can pip install higher version Django-rest-framework)

* Django-rest-swagger v2.2.0

* Django-silk v4.0.1(In production environment,please close silk,silk will leak user infomation)

* Quasar v1.7.2+

* Vue v2.6.0+

* API,follow restful protocol


Server deployment:

$ pip install -r requirements.txt

Install Python Library

$ python manage.py makemigrations

Run Django database migrate file.

$ python manage.py migrate

Confirm migrate database. Django Primordial support sqlite3 database. If you wanna change database to others. Please editor singosgu/settings.py.

Run Server:

Local Server

$ python manage.py runserver

Local Server Port Customize

$ python manage.py runserver 0.0.0.0:8001

If you customize the Port. The user in local area network can use 'server IP:Port' to browse the software

Production Server Run:

Nginx Config:

Only example for Nginx. You can get example nginx.conf in project files. Exchange you server nginx.conf is ok. Take attention the project path & domin name in nginx.conf must be real.

Install uwsgi:

$ pip install uwsgi

If you use virtual environment. You must install uwsgi in Production Environment once, then install uwsgi in virtual environment once again.

Run uwsgi:

$ uwsgi -x /path/to/***your project path***/mysite.xml

If you don't want the project refresh while the code changed . You can set py-autoreload as 0(zero)

uwsgi reload:

$ uwsgi --reload /path/to/***your project path***/mysite.pid

Uwsgi recorded a pid file. Each time you want to reload the uwsgi . Reload this pid is ok


Develop Extend:

According to front-back stage decoupling method. It support you to develop more extend software

Logistic_AI_ROBOT_AGV

* The project of AGV has been open-source. It use Tracking sensor,Ultrasonic obstacle avoidance sensor, Infrared obstacle avoidance sensor. Base on HTTP protocol & WEB Web Framework. In order to ensure safety, data interchange must bind AGV's MAC address and IP address .

Sales Management System

* Don't use warehouse modular, API can support fast develop a sales management system.

APP & WX Mini Program

* API can support you develop a real time data monitoring system.

SCM

* Goods' QTY, Create_time, Last_update_time be detailed record. So you can analyst the inventory cleary and develop a SCM system.

Multi Warehouse Management

* Openid is user's unique identification. Data unique identification is appid. Data-line unique identification is t_code. So it facilitate support Multi Warehouse Management

Wave Picking, Shipping

* Can set Cyclical-Requests to realize Wave picking & shipping.

Milk-Run

* Can edit supplier & customer's authorization. Let them know the goods demand & consumption

VMI

* Ditto

Picking Route Optimization

* You can set picking route rule to imporve picking productiveness.


Develop Guide:

baseurl

* statics/baseurl.js是发起请求的基本网址,如果是本地调试,则默认为http://127.0.0.1:8000/ ,如果部署在服务器,则需要将其改为你的网站访问url

django-silk

* django-silk为开发时的调试工具,可以统计每个接口的响应速度,如果需要部署到生产环境,请删除django-silk相关配置,因为会有泄露用户信息的风险,或者直接修改django-silk,让用户只能看到自己的请求数据

django-rest-swagger

* swagger会生成软件的开发者文档,访问'baseurl' + '/docs/',就可以看到具体的开发者文档,同时还可以对接口进行调试, 开发者文档使用的YML的格式,也可以自己在APIView里面修改,注意接口,get是修改get请求的API文档,post是修改post请求的API文档

数据库设计

* 数据库设计时考虑到数据迁移等问题,所以只有users里面的user_id和django自带的user_id做了外键,其余所有字段全部没有使用外键,方便数据备份和数据库迁移

关于数据传输

* post,patch,put请求会传输一个数据data,可以是一个json数据,也可以是一个json数据组,传输的data会被utils/datasolve处理,来判断是否有js文件或sql注入,从而保证了后台数据库的安全性,每个前端给后端发的请求,都会核对用户的唯一标识,以防止用户数据串流

openid

* openid是注册用户的唯一标识,当管理员直接注册时,会有developer=1这个管理员标识,管理员具备最高权限,而由管理员,或有新增用户权限的用户新建的用户,developer=0,developer作为管理员标识存在,每次向服务器发起请求,都需要url传值这个openid,服务器端会根据这个openid来判断是否为正常用户,从而保证数据不会被混乱访问,同时也可以根据openid来记录具体的访问用户,作为数据追溯依据,可以使用request.auth获得该条数据

appid

* appid是数据源唯一标识,每次新建用户(员工账号)时,用户的appid都会统一为管理员账号的appid,从而达到了所有数据的统一性,即新用户A在发起数据请求时,会带上自己的openid,服务器端根据这个openid去链接appid下的所有数据,防止访问到其他用户的数据,可以使用request.user.appid获得该条数据

用户权限

* 用户信息已经设计了权限管理,共45个,有字段aut1~~aut45,可自定义权限管理,先未对权限管理数据传输做任何限制,可自定义添加

t_code

* t_code是数据存在数据库里面的唯一标识,是具有唯一性的,所有的数据修改和删除,都是使用t_code来判断的,避免使用id判断时,会出现数据误操作,该条数据是由当时的时间戳+传入的一个string值,合并生成的MD5码

get请求设计

* get请求已经做好了分页设计,传值时:max_page参数为每页最大显示多少条内容,默认设计是1000条数据,因为如果数据过多,会造成数据较慢; page参数为请求第几页的数据,一般在返回的数据中,有一个totalpage参数,可以知道一共有多少页

数据传输流程

* 一般post,patch,put是4段式设计,1--审查用户权限,会return一个值'Y' or 'N',2--审查数据的安全性, 3--审查数据是否可以存入数据库或修改数据库数据,4--新增或修改数据,并返回一个data给到前端,这样做可以避免数据增删改的时候出现误改的情况

数据库设计

* 数据库设计时考虑到数据迁移等问题,所以只有users里面的user_id和django自带的user_id做了外键,其余所有字段全部没有使用外键,方便数据备份和数据库迁移

小程序开发

* 由于小程序不支持patch请求,所以需要自信在django中设置一个views,来访问patch请求的数据


WMS Project Show:

greaterwms's People

Contributors

dependabot[bot] avatar singosgu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.