Per-Batch Traceability via QR
Truy xuất Lô Sản xuất theo QR
Every shipped unit has a unique QR — material, shift, machine, QC details in one click.
Problem
An FMCG client required per-batch traceability within 5 minutes during recalls. The old system was fragmented: materials in WMS, shifts in HRM, QC in separate spreadsheets — no joins.
Architecture
MES per-batch records → Go service generates UID + QR (multi-size: 12 mm bottle + 25 mm carton + 50 mm pallet) → Bartender printer prints inline → end-customer scans QR → Next.js page renders timeline (material lot → date → shift → operator → QC result → ship date).
Stack & rationale
- Go: QR gen + DB joins are fast (1 ms/QR), inline printing at 12,000/hr.
- MES → ERP join via materialized view: <100 ms timeline query per product.
- Multi-size QR with same UID: different layouts per packaging level.
Results
| Metric | Value |
|---|---|
| Products with QR / month | 1.8 M |
| Time-to-trace one product | <30 s |
| Customer scan rate | 4.2% (industry avg 1-2%) |
| First recall drill | Found 320 units in 4 minutes |
Lessons
Multi-size QR with the same UID is critical for FMCG (customers scan at bottle level, ops at pallet level). Materialized-view refresh strategy needs care — full refresh overloads, incremental needs correct invalidation keys.