fix(dispatch): 받는 사람 정보는 라벨 PDF만 출처(TikTok 포함)

- TikTok xlsx 의 가려진 이름/주소가 우선 채워져 PDF 가 무시되던 문제 수정
- COLUMN_ALIASES 에서 recipient_* 매핑 제거 → xlsx PII 미사용
- 머지 시 PDF 값이 있으면 무조건 덮어씀(PDF authoritative)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-22 14:58:21 +09:00
parent 163537fd96
commit 95561270a9
2 changed files with 5 additions and 6 deletions
+3 -1
View File
@@ -260,12 +260,14 @@ async def batch_create(
except PdfParseError as exc:
logger.warning("라벨 PDF 파싱 실패 — PII 없이 진행: %s", exc)
recipients = {}
# PDF 가 받는 사람 정보의 정본(authoritative). xlsx 의 가려진 이름/주소는
# 신뢰하지 않으므로 PDF 값이 있으면 덮어쓴다.
for p in parcels:
rec = recipients.get((p.get("order_id") or "").strip())
if not rec:
continue
for field in ("recipient_name", "recipient_phone", "recipient_address"):
if rec.get(field) and not (p.get(field) or "").strip():
if rec.get(field):
p[field] = rec[field]
batch = st.create_batch(