docs: update README and CLAUDE.md with expired certificate report feature
This commit is contained in:
24
CLAUDE.md
24
CLAUDE.md
@@ -27,21 +27,33 @@ Non esistono test automatici al momento.
|
||||
|
||||
## Architettura
|
||||
|
||||
Il flusso di generazione è orchestrato da `ReportOrchestrator`:
|
||||
Il flusso di generazione è orchestrato da `ReportOrchestrator`, che sceglie il template in base al campo `Stato` del certificato:
|
||||
|
||||
```
|
||||
HTTP (ISIN) → ReportController → ReportOrchestrator
|
||||
├── CertificateDataService (4 SP → anagrafica, sottostanti, eventi, scenario)
|
||||
├── AnagraficaSectionRenderer → PdfDocument (Sezione 1)
|
||||
├── EventiSectionRenderer → PdfDocument (Sezione 2)
|
||||
├── ScenarioSectionRenderer → PdfDocument (Sezione 3, opzionale)
|
||||
│
|
||||
├── [Stato == "Quotazione"] — report certificati in quotazione (4 sezioni)
|
||||
│ ├── AnagraficaSectionRenderer → PdfDocument (Sezione 1)
|
||||
│ ├── EventiSectionRenderer → PdfDocument (Sezione 2)
|
||||
│ ├── ScenarioSectionRenderer → PdfDocument (Sezione 3, opzionale)
|
||||
│ └── ChartSectionRenderer → PdfDocument (Sezione 4)
|
||||
│
|
||||
├── [Stato != "Quotazione"] — report certificati non in quotazione (3 sezioni)
|
||||
│ ├── ExpiredAnagraficaSectionRenderer → PdfDocument (Sezione 1)
|
||||
│ ├── EventiSectionRenderer → PdfDocument (Sezione 2, colonne adattate)
|
||||
│ └── ChartSectionRenderer → PdfDocument (Sezione 3)
|
||||
│
|
||||
├── ChartDataService (3 SP → dati grafico)
|
||||
├── SkiaChartRenderer → PNG in memoria
|
||||
├── ChartSectionRenderer → PdfDocument (Sezione 4)
|
||||
└── PdfMergerService → byte[] → Response
|
||||
```
|
||||
|
||||
**Aggiungere una nuova sezione PDF**: implementare `IPdfSectionRenderer`, impostare `SectionName` e `Order`, registrare in `Program.cs` come `AddScoped<IPdfSectionRenderer, NuovaSezione>()`. L'orchestratore la include automaticamente ordinandola per `Order`.
|
||||
**Stato certificato**: il campo `Stato` viene dalla SP `rpt_Master_CFT_ISIN`. Valori: `"Quotazione"` (report attivo), `"Scaduto"` / `"Rimborsato"` / `"Revocato"` (report expired). Se `Stato` è vuoto, viene usato il flusso attivo come fallback.
|
||||
|
||||
**Aggiungere una nuova sezione PDF al flusso attivo**: implementare `IPdfSectionRenderer`, impostare `SectionName` e `Order`, registrare in `Program.cs` come `AddScoped<IPdfSectionRenderer, NuovaSezione>()`. L'orchestratore la include automaticamente ordinandola per `Order`.
|
||||
|
||||
**`ExpiredAnagraficaSectionRenderer`**: registrata come `AddScoped<ExpiredAnagraficaSectionRenderer>()` (senza interfaccia) e iniettata direttamente nell'orchestratore — non partecipa al ciclo `IEnumerable<IPdfSectionRenderer>`.
|
||||
|
||||
**Tema**: tutto in `PdfTheme.cs` — colori, font, layout, brush/pen. Modificare lì per aggiornare tutti i renderer.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user