feat: 消费停录汇总与查结果同口径,并更新分类与 TSV
- 停录时由 details 经 build_consumption_summary 写 TSV/终端汇总,移除 consumption_log_totals 与时间窗累加 - 更新 consumable_classifier 权重、YAML 标签与 consumable_vision_algorithm - 扩展 consumption TSV 相关测试与配置注释 Made-with: Cursor
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
- 置信度 ≥ 自动阈值但 Top1 不在候选内 → 视 voice_confirmation_enabled 入 pending。
|
||||
- 中等置信度 → 入 pending(若有可展示候选项)。
|
||||
|
||||
需医生确认时:消耗 TSV / 内存明细记「待确认」(不写模型 top1 商品名);语音确认后再落最终耗材并更新汇总。
|
||||
需医生确认时:消耗 TSV / 内存明细记「待确认」(不写模型 top1 商品名);语音确认后**替换**该条 TSV 为最终耗材。停录时 TSV/终端汇总与查结果 API 同口径,由 details 经 ``build_consumption_summary`` 生成。
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
@@ -85,7 +85,6 @@ class VisionClassificationHandler:
|
||||
camera_id=camera_id,
|
||||
wall_start_epoch=ready.wall_lo,
|
||||
wall_end_epoch=ready.wall_hi,
|
||||
running_totals=state.consumption_log_totals,
|
||||
)
|
||||
|
||||
async def handle(
|
||||
@@ -99,7 +98,8 @@ class VisionClassificationHandler:
|
||||
) -> None:
|
||||
conf = cls_res.confidence
|
||||
label = (cls_res.label or "").strip()
|
||||
item_id = resolve_consumption_item_id(label, "", state.name_to_code)
|
||||
t1_pid = (ready.best.t1_pid if ready is not None else "")
|
||||
item_id = resolve_consumption_item_id(label, t1_pid, state.name_to_code)
|
||||
voice_floor = self._s.video_voice_confirm_min_confidence
|
||||
if conf < voice_floor:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user