Add PACKAGE_LEF as a dedicated `package` field in the QC-GATE API payload and display it as a new column after LOT ID in LotTable.vue. Archive qc-gate-lot-package-column, historical-query-slow-connection, and msd-multifactor-backward-tracing changes with their delta specs synced to main specs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1.8 KiB
Context
The QC-GATE LOT detail table (LotTable.vue) displays 9 columns sourced from the /api/qc-gate/summary API. The backend (qc_gate_service.py) builds each lot payload from the Redis-cached WIP snapshot of DW_MES_LOT_V. The PACKAGE_LEF column already exists in the WIP data but is currently only used as a fallback for the product field — it is never exposed independently.
Goals / Non-Goals
Goals:
- Expose
PACKAGE_LEFas a dedicatedpackagefield in each lot's API payload. - Display a "Package" column in the LOT detail table, positioned immediately after "LOT ID".
- Keep the column sortable, consistent with existing column behavior.
Non-Goals:
- Changing the Product column's fallback logic (it still falls through to
PACKAGE_LEFwhenPRODUCTis null). - Adding chart-level grouping or filtering by package.
- Modifying the DB view or Redis cache schema —
PACKAGE_LEFis already available.
Decisions
-
Field name:
package— Maps directly toPACKAGE_LEFfromDW_MES_LOT_V. Simple, descriptive, consistent with existing snake_case payload keys (lot_id,wait_hours). -
Column position: after LOT ID (index 1) — The user explicitly requested "放在LOT ID之後". Insert into
HEADERSarray at index 1, shifting Product and subsequent columns right. -
No backend query changes —
PACKAGE_LEFis already present in the WIP cache DataFrame. We just read it in_build_lot_payload(), same as other fields.
Risks / Trade-offs
- Wide table on small screens → The table already has horizontal scroll (
lot-table-scroll); adding one more column is acceptable. - Null values → Many lots may have
PACKAGE_LEF = NULL. The existingformatValue()helper already renders'-'for nulls, so no special handling needed.