# WMS **Repository Path**: tabdon/WMS ## Basic Information - **Project Name**: WMS - **Description**: 仓库管理系统后端,功能包括(物料管理、权限管理、人员管理、http通信加密、物料库存预警根据物料流水自动更新、多客户端登录问题解决等) - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: zwb - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2023-09-23 - **Last Updated**: 2026-02-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # WMS Warehouse Management System ## Project Overview WMS (Warehouse Management System) is a comprehensive enterprise-level warehouse management application developed based on Spring Boot. The system implements functions such as material inbound and outbound management, inventory control, user permission management, role-based access control, and supports exporting data to Excel reports. ## Technology Stack - **Backend Framework**: Spring Boot - **Persistence Layer**: MyBatis Plus - **Database**: MySQL - **Cache**: Redis - **Encryption**: RSA + AES Hybrid Encryption - **Excel Export**: EasyExcel - **Scheduled Tasks**: Spring Scheduler ## Core Features ### 1. Material Management - Maintain material information (CRUD operations) - Manage material inventory quantities - Inventory alert functionality - Fuzzy search by material name - Material category statistics ### 2. Inbound and Outbound Management - New material inbound - Existing material outbound - Batch inbound and outbound for multiple materials - Query inbound/outbound records - Query by date range - Logistics throughput statistics ### 3. User Permission Management - User registration and login (RSA encrypted transmission) - User information management - Role assignment - Permission assignment - Role-Based Access Control (RBAC) ### 4. Data Reporting - Export material data (Excel) - Export inbound/outbound data - Export ledger data ### 5. System Security - Request parameter decryption - Response data encryption - Login interception and validation - Token-based authentication ### 6. Scheduled Tasks - Automatically update material quantities weekly ## Project Structure ``` com.wms ├── annotation # Custom annotations ├── aop # AOP aspect handling ├── config # Configuration classes ├── controller # Controllers ├── dto # Data Transfer Objects ├── entity # Entity classes ├── exception # Exception handling ├── interceptor # Interceptors ├── mapper # Persistence layer interfaces ├── result # Unified response results ├── service # Business layer interfaces and implementations ├── TimeTask # Scheduled tasks ├── utils # Utility classes └── machineLearn # Machine learning module ``` ## Quick Start ### Environment Requirements - JDK 1.8+ - Maven 3.6+ - MySQL 5.7+ - Redis ### Configuration Instructions Configure the following in `application.properties` or `application.yml`: ```properties # Database configuration spring.datasource.url=jdbc:mysql://localhost:3306/wms spring.datasource.username=root spring.datasource.password=yourpassword # Redis configuration spring.redis.host=localhost spring.redis.port=6379 # RSA key configuration RSA.publicKey=your_public_key RSA.privateKey=your_private_key # Login validity period (in hours) User.LoginTime=24 ``` ### Initialize Database Execute the `wms.sql` script in the project root directory to create database tables. ### Run the Project ```bash mvn clean install mvn spring-boot:run ``` ## API Endpoints ### User Endpoints | Endpoint | Method | Description | |----------|--------|-------------| | `/user/login` | GET | User login | | `/user/register` | POST | User registration | | `/user/quitlogin` | GET | Logout | | `/user/getRSApublicKey` | GET | Retrieve RSA public key | ### Material Endpoints | Endpoint | Method | Description | |----------|--------|-------------| | `/material` | GET | Retrieve all materials | | `/material/{id}` | GET | Retrieve material by ID | | `/material/like/{name}` | GET | Fuzzy search materials by name | | `/material/update` | POST | Update material information | | `/material/delete/{mid}` | GET | Delete material | ### Inbound/Outbound Endpoints | Endpoint | Method | Description | |----------|--------|-------------| | `/inout/new` | POST | Inbound new material | | `/inout/old` | POST | Inbound existing material | | `/inout/out` | POST | Outbound material | | `/inout/mul/out` | POST | Batch outbound | | `/inout/mul/in` | POST | Batch inbound | | `/inout/date` | GET | Query by date range | ### Reporting Endpoints | Endpoint | Method | Description | |----------|--------|-------------| | `/excel/material/export` | GET | Export material data | | `/excel/inout/export` | GET | Export inbound/outbound data | | `/excel/ledger/export` | GET | Export ledger data | ## Security Mechanism ### Encryption Flow 1. Client retrieves the RSA public key 2. Client encrypts the AES key using RSA 3. Subsequent requests use the AES key to encrypt data transmission 4. Server responds with data encrypted using AES ### Annotation Descriptions - `@DecryptRequest`: Decrypts request parameters - `@EncryptResponse`: Encrypts response data ## Scheduled Task The system executes a material quantity update task every Sunday at 3:10 AM: ```java @Scheduled(cron = "0 10 3 ? * 1") public void updateMaterialNum() ``` ## License This project is intended solely for learning and communication purposes.