- Add meeting_number field (M-YYYYMMDD-XX format) with auto-generation - Refactor Excel export to use cell coordinates instead of placeholders - Export files saved to backend/record/ directory with meeting number filename - Add database migration for meeting_number column - Add start.sh script for managing frontend/backend/sidecar services - Update OpenSpec documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
65 lines
2.3 KiB
Markdown
65 lines
2.3 KiB
Markdown
# Tasks: Update Excel Template Export
|
||
|
||
## 1. Database Schema Updates
|
||
- [x] 1.1 新增 `meeting_number` 欄位至 `meeting_records` 表(VARCHAR(20),格式 M-YYYYMMDD-XX)
|
||
- Migration SQL: `backend/migrations/001_add_meeting_number.sql`
|
||
|
||
## 2. Backend Model Updates
|
||
- [x] 2.1 更新 `schemas.py`:`MeetingResponse` 新增 `meeting_number` 欄位
|
||
|
||
## 3. Backend API Updates
|
||
- [x] 3.1 更新 `meetings.py`:實作會議編號自動生成邏輯(使用現有 `generate_system_code("M", ...)`)
|
||
- [x] 3.2 更新 `meetings.py`:在 create_meeting 和 response 中包含 meeting_number
|
||
|
||
## 4. Excel Export Refactoring
|
||
- [x] 4.1 修正 `export.py`:模板路徑從 `templates/` 改為 `template/`
|
||
- [x] 4.2 重構 `export.py`:改用儲存格座標填充方式(D3, D4, D5, F4, F5, D6, C8, D8)
|
||
- [x] 4.3 實作動態行填充:代辦事項從第 10 行開始往下延伸(C, D, F, G, H 列)
|
||
- [x] 4.4 實作結論合併邏輯:多條結論用換行符合併至 D8
|
||
- [x] 4.5 H 列填入 action.status 作為執行現況
|
||
|
||
## 5. Testing
|
||
- [x] 5.1 手動測試 Excel 導出與模板填充
|
||
- [x] 5.2 驗證各欄位正確填入對應儲存格
|
||
- 測試腳本:`backend/tests/test_excel_export.py`
|
||
- 測試結果:✅ 全部通過
|
||
|
||
## 6. Documentation
|
||
- [x] 6.1 ✅ Dify System Prompt 已提供於 proposal.md
|
||
|
||
## 測試結果
|
||
|
||
```
|
||
Template exists: True
|
||
|
||
=== Testing with template ===
|
||
D3 (Subject): 專案進度討論會議
|
||
D4 (Time): 2025-12-11 14:30
|
||
D5 (Chair): 王經理
|
||
F4 (Location): 會議室A
|
||
F5 (Recorder): 李小明
|
||
D6 (Attendees): 張三, 李四, 王五
|
||
C8 (Meeting Number): M-20251211-01
|
||
D8 (Conclusions): 確認專案時程延後兩週
|
||
同意增加測試人力
|
||
下次會議改為線上進行
|
||
|
||
Action Items:
|
||
Row 10: C=A-20251211-01, D=更新專案時程表, F=張三, G=2025-12-15, H=Open
|
||
Row 11: C=A-20251211-02, D=聯繫人資部門增聘測試人員, F=李四, G=2025-12-20, H=In Progress
|
||
Row 12: C=A-20251211-03, D=準備線上會議設備, F=王五, G=, H=Open
|
||
|
||
✅ Test completed successfully!
|
||
```
|
||
|
||
## 部署前須執行
|
||
|
||
請在資料庫執行以下 SQL 來新增 `meeting_number` 欄位:
|
||
|
||
```sql
|
||
ALTER TABLE meeting_records
|
||
ADD COLUMN meeting_number VARCHAR(20) NULL AFTER uuid;
|
||
|
||
CREATE INDEX idx_meeting_number ON meeting_records(meeting_number);
|
||
```
|