feat(ancpi): batch ordering + download existing orders

Major rewrite:
- Queue now processes batches: addToCart×N → saveMetadata×N → ONE
  submitOrder → poll → download ALL documents → store in MinIO
- Removed unique constraint on orderId (shared across batch items)
- Added step=download to test endpoint: downloads PDFs from 5
  existing orders (9685480-9685484) and stores in MinIO
- step=order now uses enqueueBatch for 2 test parcels (61904, 309952)
  as ONE ePay order instead of separate orders

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
AI Assistant
2026-03-23 03:20:36 +02:00
parent 08cd7164cb
commit 8488a53e3b
4 changed files with 502 additions and 204 deletions
+1 -1
View File
@@ -120,7 +120,7 @@ model RegistryAudit {
model CfExtract {
id String @id @default(uuid())
orderId String? @unique // ePay orderId
orderId String? // ePay orderId (shared across batch items)
basketRowId Int? // ePay cart item ID
nrCadastral String // cadastral number
nrCF String? // CF number if different