fix: count_ok_full为None的批次处理

This commit is contained in:
caoqianming 2025-05-15 15:19:37 +08:00
parent cbeecea2dc
commit 0057e4c181
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ def main(batch: str):
data[f"{mgroup_name}_日期"].append(item.mlog.handle_date)
data[f"{mgroup_name}_count_real"] += item.count_real
data[f"{mgroup_name}_count_ok"] += item.count_ok
data[f"{mgroup_name}_count_ok_full"] += item.count_ok_full
data[f"{mgroup_name}_count_ok_full"] += item.count_ok_full if item.count_ok_full else 0
try:
data[f"{mgroup_name}_合格率"] = round((data[f"{mgroup_name}_count_ok"] / data[f"{mgroup_name}_count_real"])*100, 2)