# Print Service
ERP打印服务 - 打印模板管理、打印任务、多打印机支持

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

## 功能清单
1. 打印任务管理
2. 打印机组配置
3. 模板设计

## API接口
| 方法 | 路径 | 描述 |
|------|------|------|
| GET | /api/print/tasks/{id} | PrintTaskController接口 |
| GET | /api/print/tasks/no/{taskNo} | PrintTaskController接口 |
| POST | /api/print/tasks/{id}/cancel | PrintTaskController接口 |
| POST | /api/print/tasks/{id}/retry | PrintTaskController接口 |
| DELETE | /api/print/tasks/{id} | PrintTaskController接口 |
| GET | /api/print/configs/key/{configKey} | PrintConfigController接口 |
| PUT | /api/print/configs/{id} | PrintConfigController接口 |
| DELETE | /api/print/configs/{id} | PrintConfigController接口 |
| GET | /api/print/printers/{id} | PrinterController接口 |
| GET | /api/print/printers/code/{printerCode} | PrinterController接口 |
| GET | /api/print/printers/available | PrinterController接口 |
| POST | /api/print/printers/{id}/default | PrinterController接口 |
| PUT | /api/print/printers/{id} | PrinterController接口 |
| PUT | /api/print/printers/{id}/status | PrinterController接口 |
| DELETE | /api/print/printers/{id} | PrinterController接口 |
| GET | /api/print/templates/{id} | PrintTemplateController接口 |
| GET | /api/print/templates/code/{templateCode} | PrintTemplateController接口 |
| POST | /api/print/templates/{id}/default | PrintTemplateController接口 |
| PUT | /api/print/templates/{id} | PrintTemplateController接口 |
| DELETE | /api/print/templates/{id} | PrintTemplateController接口 |
| GET | /api/print/records/{id} | PrintRecordController接口 |
| GET | /api/print/records/no/{recordNo} | PrintRecordController接口 |
| GET | /api/print/records/statistics | PrintRecordController接口 |

## 数据库表
| 表名 | 说明 |
|------|------|
| printer | Printer |
| print_config | PrintConfig |
| print_task | PrintTask |
| print_template | PrintTemplate |
| print_record | PrintRecord |

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

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