fix: 核验日报'数量一致'只看远程/本地总量, 状态差异单独第二段
This commit is contained in:
@@ -32,11 +32,12 @@ def _system_lines(name: str, report: dict, goods: dict, lines: list[str]) -> boo
|
||||
days_r = vr.get("days") or []
|
||||
post = vr.get("post")
|
||||
if post:
|
||||
remote_t, local_t, ok = post["remote"], post["local"], post.get("daysWithDiff", 0) == 0
|
||||
remote_t, local_t = post["remote"], post["local"]
|
||||
else:
|
||||
remote_t = sum(d.get("remote", 0) for d in days_r)
|
||||
local_t = sum(d.get("local", 0) for d in days_r)
|
||||
ok = all(d.get("ok") for d in days_r)
|
||||
# 数量一致只看总量;状态差异属第二段,不混入数量结论
|
||||
ok = remote_t == local_t
|
||||
|
||||
if ok:
|
||||
lines.append(f"**{name} 订单** 远程 {remote_t:,} · 本地 {local_t:,} ✅")
|
||||
|
||||
Reference in New Issue
Block a user