baodan/api/insurance/db
wsb1224 1debd7df39 feat(ppt): upgrade renderer from 5 fixed slides to 10+ configurable pages
Rewrite fast_pptx_renderer.py to read requiredPageTypes from template
config instead of hardcoding 5 slides. Add 10 slide builder functions
(cover, company, narrative, chart, timeline, table, compare, synergy,
conclusion, closing) with python-pptx native charts.

Key changes:
- Renderer reads templateConfig.requiredPageTypes and slidesConfig
  from DeckContract to determine slide sequence and per-slide metadata
- routes.py loads PptTemplate and PptCompany from DB, normalizes all
  PDF extractions (not just the first), passes full context to renderer
- renderer.py injects templateConfig, company info, and multi-product
  data into DeckContract
- Add slides_config_json column to PptTemplate (migrate_017) for
  per-slide title/narrative/chartType configuration via admin UI
- Admin template editor now supports drag-reorder slides, per-slide
  title/narrative hint, chart/table type selection
- Add requiredPageTypes to savings/ink, savings/minimal, savings/business
  templates (were missing, causing fallback to defaults)
- Fix IUL normalizer: add payYears and totalPremium to policy dict
- Fix CI/IUL normalizer: add totalSurrenderValue alias to benefitRows
  so charts render correctly for all product types
- Port calculation functions from baodanppt: decade_rows, paid_premium,
  simple_return, compound_return, find_payback_year

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-24 17:49:09 +08:00
..
__init__.py 0712 修复一个版本 2026-07-12 14:17:18 +08:00
compat.py 第一次提交。可以使用企微群消息 2026-07-02 23:13:23 +08:00
database.py 0723 PPT加海报功能01版本修复 2026-07-23 17:40:12 +08:00
migrate_001.py 第一次提交。可以使用企微群消息 2026-07-02 23:13:23 +08:00
migrate_002.py 第一次提交。可以使用企微群消息 2026-07-02 23:13:23 +08:00
migrate_003.py 第一次提交。可以使用企微群消息 2026-07-02 23:13:23 +08:00
migrate_004.py 第一次提交。可以使用企微群消息 2026-07-02 23:13:23 +08:00
migrate_005.py 第一次提交。可以使用企微群消息 2026-07-02 23:13:23 +08:00
migrate_006.py 第一次提交。可以使用企微群消息 2026-07-02 23:13:23 +08:00
migrate_007.py 第一次提交。可以使用企微群消息 2026-07-02 23:13:23 +08:00
migrate_008.py 第一次提交。可以使用企微群消息 2026-07-02 23:13:23 +08:00
migrate_009.py 0712 修复一个版本 2026-07-12 14:17:18 +08:00
migrate_010.py 0712 修复一个版本 2026-07-12 14:17:18 +08:00
migrate_011.py 0712 修复一个版本 2026-07-12 14:17:18 +08:00
migrate_012.py 0712 修复一个版本 2026-07-12 14:17:18 +08:00
migrate_013.py 0712 修复一个版本 2026-07-12 14:17:18 +08:00
migrate_014.py 0723 PPT功能初步融合 2026-07-23 13:10:50 +08:00
migrate_015.py 0723 PPT加海报功能01版本修复 2026-07-23 17:40:12 +08:00
migrate_016.py fix: 添加 PyMuPDF 详细错误信息并创建缺失的迁移文件 2026-07-24 11:29:49 +08:00
migrate_017.py feat(ppt): upgrade renderer from 5 fixed slides to 10+ configurable pages 2026-07-24 17:49:09 +08:00
redis.py 0712 修复一个版本 2026-07-12 14:17:18 +08:00