# Reconciliation Service
ERP对账管理服务 - 账单核对、差异处理

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

## 功能清单
1. 平台对账
2. 交易核对
3. 账单生成

## API接口
| 方法 | 路径 | 描述 |
|------|------|------|
| GET | /api/reconciliation/bill/{id} | ReconciliationController接口 |
| GET | /api/reconciliation/bill/no/{billNo} | ReconciliationController接口 |
| GET | /api/reconciliation/bill/list | ReconciliationController接口 |
| GET | /api/reconciliation/check/order-amount | ReconciliationController接口 |
| GET | /api/reconciliation/check/order-stock | ReconciliationController接口 |
| GET | /api/reconciliation/check/waybill | ReconciliationController接口 |
| GET | /api/reconciliation/check/full | ReconciliationController接口 |
| GET | /api/reconciliation/difference/list | ReconciliationController接口 |
| GET | /api/reconciliation/difference/{id} | ReconciliationController接口 |
| GET | /api/reconciliation/difference/pending-stats | ReconciliationController接口 |
| GET | /api/reconciliation/task/list | ReconciliationController接口 |
| GET | /api/reconciliation/task/{id} | ReconciliationController接口 |
| GET | /api/reconciliation/statistics | ReconciliationController接口 |
| GET | /api/reconciliation/statistics/platform/{platform} | ReconciliationController接口 |
| GET | /api/reconciliation/statistics/shop/{shopId} | ReconciliationController接口 |
| GET | /api/reconciliation/statistics/difference-trend | ReconciliationController接口 |
| POST | /api/reconciliation/bill | ReconciliationController接口 |
| POST | /api/reconciliation/bill/{id}/confirm | ReconciliationController接口 |
| POST | /api/reconciliation/bill/{id}/reconcile | ReconciliationController接口 |
| POST | /api/reconciliation/bill/reconcile/batch | ReconciliationController接口 |
| POST | /api/reconciliation/bill/create-and-reconcile | ReconciliationController接口 |
| POST | /api/reconciliation/difference/{id}/handle | ReconciliationController接口 |
| POST | /api/reconciliation/difference/handle/batch | ReconciliationController接口 |
| POST | /api/reconciliation/task/{id}/cancel | ReconciliationController接口 |
| PUT | /api/reconciliation/bill/{id} | ReconciliationController接口 |
| DELETE | /api/reconciliation/bill/{id} | ReconciliationController接口 |

## 数据库表
| 表名 | 说明 |
|------|------|
| order_reconciliation_record | OrderReconciliationRecord |
| reconciliation_difference | ReconciliationDifference |
| reconciliation_task | ReconciliationTask |
| reconciliation_bill | ReconciliationBill |

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

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