feat: sync latest ARR implementation

This commit is contained in:
Wyndham ARR
2026-07-31 15:11:42 +08:00
parent d6f8a747fa
commit bf7939dd1a
185 changed files with 17527 additions and 2260 deletions

View File

@@ -7,8 +7,11 @@
- Finance source: `finance.v_active_daily_facts`, selected by `DEPARTURE` from month start through the requested as-of date.
- Booking source: `booking.v_current_room_items` and `booking.v_group_room_item_summary`, matched by normalized full Group Code only.
- Dates/nights come from Finance. Booking data only supplies room type and booked quantity.
- A Finance fact with no Group Code remains as its own output row and has blank `RES_COMMENT` and `Booking Room`; it is
never merged with another no-code fact. A present Group Code keeps its normal stay-segment row and `RES_COMMENT`, but
`Booking Room` is blank when no current accepted Booking room can be resolved.
- `Total Booking Price` uses each Finance daily `TOTAL PRICE`; it is not recomputed from booking unit price and is not collapsed across all rows sharing a Group Code.
- The program splits output by each Finance `(Group Code, ARRIVAL, DEPARTURE)` segment.
- The program splits matched output by each Finance `(Group Code, ARRIVAL, DEPARTURE)` segment.
- Report rows/versions are not persisted in PostgreSQL; a deterministic generation identity and source pins protect generation consistency.
Supported companies: `LianTai`, `QBD`, `DY-AI-Easy-KB`, `FengRun`, `HanaTour`.