From b362fc3b896af8e31147f29977f594c27cbd79e6 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 5 Jan 2026 08:19:38 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8D=95=E8=8E=B7=E9=99=A40=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/scripts/batch_gxerp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/wpm/scripts/batch_gxerp.py b/apps/wpm/scripts/batch_gxerp.py index 11d04d69..b5e15356 100644 --- a/apps/wpm/scripts/batch_gxerp.py +++ b/apps/wpm/scripts/batch_gxerp.py @@ -162,7 +162,7 @@ def main(batch: str, mgroup_obj): try: data["外观检验_直通合格率2"] = round((data["外观检验_直通合格数"]/data["尺寸检验_count_use"])*100, 2) - except decimal.InvalidOperation: + except (decimal.InvalidOperation, ZeroDivisionError): data["外观检验_直通合格率2"] = 0 if "尺寸检验_完全合格率" in data: