feat: batch_gxerp调整

This commit is contained in:
caoqianming 2025-05-19 13:37:10 +08:00
parent 5fe2b4db48
commit d0027679e6
1 changed files with 5 additions and 0 deletions

View File

@ -34,6 +34,11 @@ def main(batch: str):
data[f"{mgroup_name}_count_ok"] += item.count_ok
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_full"] / data[f"{mgroup_name}_count_real"])*100, 2)
except decimal.InvalidOperation:
data[f"{mgroup_name}_完全合格率"] = 0
try:
data[f"{mgroup_name}_合格率"] = round((data[f"{mgroup_name}_count_ok"] / data[f"{mgroup_name}_count_real"])*100, 2)
except decimal.InvalidOperation: