erp-java/services/inventory-service/README.md

60 lines
2.2 KiB
Markdown

# Inventory Service
库存盘点服务 - 库存管理、库存盘点、库存调整、预警管理
## 基本信息
- **服务端口**: 8084
- **服务名称**: inventory-service
- **模块分支**: 业务域/功能模块
- **数据库**: erp_db
## 功能清单
1. 库存查询
2. 库存预警
3. 库存调整
## API接口
| 方法 | 路径 | 描述 |
|------|------|------|
| GET | /api/stocks/show | StockController接口 |
| GET | /api/stocks/logs | StockController接口 |
| GET | /api/stocks/warning | StockController接口 |
| POST | /api/stocks/adjust | StockController接口 |
| POST | /api/stocks/inbound | StockController接口 |
| POST | /api/stocks/outbound | StockController接口 |
| POST | /api/stocks/defective-inbound | StockController接口 |
| POST | /api/stocks/check-consistency | StockController接口 |
| PUT | /api/stocks/threshold | StockController接口 |
| GET | /api/stocks/warning/rules | StockWarningController接口 |
| GET | /api/stocks/warning/rules/{id} | StockWarningController接口 |
| GET | /api/stocks/warning/records | StockWarningController接口 |
| GET | /api/stocks/warning/stats | StockWarningController接口 |
| GET | /api/stocks/warning/pending-count | StockWarningController接口 |
| POST | /api/stocks/warning/rules | StockWarningController接口 |
| POST | /api/stocks/warning/test | StockWarningController接口 |
| PUT | /api/stocks/warning/rules/{id} | StockWarningController接口 |
| PUT | /api/stocks/warning/rules/{id}/toggle | StockWarningController接口 |
| PUT | /api/stocks/warning/records/{id}/acknowledge | StockWarningController接口 |
| PUT | /api/stocks/warning/records/{id}/resolve | StockWarningController接口 |
| PUT | /api/stocks/warning/records/{id}/ignore | StockWarningController接口 |
| PUT | /api/stocks/warning/config | StockWarningController接口 |
| DELETE | /api/stocks/warning/rules/{id} | StockWarningController接口 |
## 数据库表
| 表名 | 说明 |
|------|------|
| stocks | Stock |
| stock_warning_records | StockWarningRecord |
| stock_logs | StockLog |
| stock_warning_rules | StockWarningRule |
| warehouses | Warehouse |
## 配置文件
- bootstrap.yml: Nacos配置
- application.yml: 应用配置
## 启动方式
```bash
mvn clean package
java -jar target/inventory-service.jar
```