fix: 组节点QC标签键映射(dim→qc_type)

This commit is contained in:
yumoqing 2026-09-03 17:07:42 +08:00
parent 6a4518ef22
commit 6575bc3ca4

View File

@ -152,6 +152,8 @@ async with DBPools().sqlorContext(dbname) as sor:
# ── 维度/类型分组 ──
if role == 'agent.tender_analyst':
# 各维度最新一轮 QC 结果(组节点标签用,消除"任务已批准≠QC通过"误导)
DIM_QC = {'scoring': 'scoring_items', 'quals': 'qualifications',
'reqs_outline': 'doc_requirements', 'cost_benefit': 'cost_benefit'}
latest_qc = {}
for rv in await sor.sqlExe(
"SELECT qc_type, fit_score, passed, round FROM bid_qc_reviews "
@ -189,7 +191,7 @@ async with DBPools().sqlorContext(dbname) as sor:
})
else:
final_state = getattr(ts[-1], 'state', '') or ''
lq = latest_qc.get(key)
lq = latest_qc.get(DIM_QC.get(key, ''), None)
if lq:
lq_passed = str(getattr(lq, 'passed', '0')) == '1'
tail = "QC %.1f 分 %s" % (float(getattr(lq, 'fit_score', 0) or 0),