와일들카드 선택 수정 .

This commit is contained in:
HyeongBaeYang committed 2026-07-07 17:16:19 +09:00
1 parent 8c700b1e08
commit 15f3d10eb6
11 files changed
+266 -10

No files matched your search

+11 -1
View File
@@ -146,7 +146,15 @@ class ChatEngine:
cond = c.get("condition")
ok = False
if cond == "check_wildcard_entry":
ok = (not ctx.get("wildcard_used")) and anchor < price <= anchor * 1.05
ok = (
(not ctx.get("wildcard_used"))
and anchor > 0
and anchor < price
and (
price <= anchor * 1.02
or (bool(ctx.get("allow_selected_wildcards", True)) and price <= anchor * 1.05)
)
)
elif cond == "check_is_supplier_type_c":
ok = False # 공급사 유형 미보유 (PoC 단순화)
elif cond == "check_price_match": # = 우선협상: 제시가가 앵커가 이하
@@ -176,6 +184,8 @@ class ChatEngine:
if anchor > 0 and price <= anchor * 1.02:
ctx["offer_1pct"] = int(round(price * 0.99)) # 1% 인하가
return "wild_card_1pct"
if not ctx.get("allow_selected_wildcards", True):
return "가격협상"
return "wild_card_budget"
# ---- render --------------------------------------------------------