# Purchase Service
采购管理服务 - 采购订单、供应商、入库、退货、统计

## 基本信息
- **服务端口**: 8010
- **服务名称**: purchase-service
- **模块分支**: 业务域/功能模块
- **数据库**: erp_db

## 功能清单
1. 采购订单
2. 采购入库
3. 供应商采购

## API接口
| 方法 | 路径 | 描述 |
|------|------|------|
| GET | /api/purchase/inbounds/page | PurchaseInboundController接口 |
| GET | /api/purchase/inbounds/{id} | PurchaseInboundController接口 |
| GET | /api/purchase/inbounds/no/{inboundNo} | PurchaseInboundController接口 |
| POST | /api/purchase/inbounds/{id}/confirm | PurchaseInboundController接口 |
| DELETE | /api/purchase/inbounds/{id} | PurchaseInboundController接口 |
| GET | /api/purchase/orders/page | PurchaseOrderController接口 |
| GET | /api/purchase/orders/{id} | PurchaseOrderController接口 |
| GET | /api/purchase/orders/no/{orderNo} | PurchaseOrderController接口 |
| POST | /api/purchase/orders/{id}/submit | PurchaseOrderController接口 |
| POST | /api/purchase/orders/{id}/approve | PurchaseOrderController接口 |
| POST | /api/purchase/orders/{id}/cancel | PurchaseOrderController接口 |
| DELETE | /api/purchase/orders/{id} | PurchaseOrderController接口 |
| GET | /api/purchase/statistics/summary | PurchaseStatisticsController接口 |
| GET | /api/purchase/statistics/by-supplier | PurchaseStatisticsController接口 |
| GET | /api/purchase/statistics/daily | PurchaseStatisticsController接口 |
| GET | /api/purchase/returns/page | PurchaseReturnController接口 |
| GET | /api/purchase/returns/{id} | PurchaseReturnController接口 |
| GET | /api/purchase/returns/no/{returnNo} | PurchaseReturnController接口 |
| POST | /api/purchase/returns/{id}/confirm | PurchaseReturnController接口 |
| DELETE | /api/purchase/returns/{id} | PurchaseReturnController接口 |
| GET | /api/suppliers/page | SupplierController接口 |
| GET | /api/suppliers/{id} | SupplierController接口 |
| PUT | /api/suppliers/{id}/status | SupplierController接口 |
| DELETE | /api/suppliers/{id} | SupplierController接口 |

## 数据库表
| 表名 | 说明 |
|------|------|
| purchase_return | PurchaseReturn |
| purchase_inbound | PurchaseInbound |
| purchase_order | PurchaseOrder |
| supplier | Supplier |

## 配置文件
- application.yml: 应用配置

## 启动方式
```bash
mvn clean package
java -jar target/purchase-service.jar
```
