# Invoice Service
发票管理服务 - 提供发票申请、开具、作废等全生命周期管理

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

## 功能清单
1. 发票开具
2. 发票管理
3. 税率配置

## API接口
| 方法 | 路径 | 描述 |
|------|------|------|
| GET | /api/invoices/{id} | InvoiceController接口 |
| GET | /api/invoices/no/{invoiceNo} | InvoiceController接口 |
| GET | /api/invoices/order/{orderId} | InvoiceController接口 |
| GET | /api/invoices/customer/{customerId} | InvoiceController接口 |
| GET | /api/invoices/tenant/{tenantId}/amount | InvoiceController接口 |
| GET | /api/invoices/tenant/{tenantId}/count | InvoiceController接口 |
| GET | /api/invoices/{id}/items | InvoiceController接口 |
| POST | /api/invoices/{id}/audit | InvoiceController接口 |
| POST | /api/invoices/{id}/issue | InvoiceController接口 |
| POST | /api/invoices/{id}/void | InvoiceController接口 |
| POST | /api/invoices/{id}/reverse | InvoiceController接口 |
| PUT | /api/invoices/{id} | InvoiceController接口 |
| PUT | /api/invoices/{id}/pdf | InvoiceController接口 |
| PUT | /api/invoices/{id}/image | InvoiceController接口 |
| DELETE | /api/invoices/{id} | InvoiceController接口 |

## 数据库表
| 表名 | 说明 |
|------|------|
| invoices | Invoice |
| invoice_items | InvoiceItem |

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

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