From 12d77e53b604e946fbbc46a433bf494d2e9b4a11 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Sun, 24 Nov 2024 17:03:39 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20mlog=20submit=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/services.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/wpm/services.py b/apps/wpm/services.py index ae7cff33..5fc58bef 100644 --- a/apps/wpm/services.py +++ b/apps/wpm/services.py @@ -198,6 +198,8 @@ def mlog_submit(mlog: Mlog, user: User, now: Union[datetime.datetime, None]): notok_sign = f.name.replace('count_n_', '') m_outs_list.append( (item.material_out, item.batch if item.batch else mlog.batch, getattr(item, f.name), mlog.count_real_eweight, notok_sign, item)) stored_notok = True + # 这里有一个漏洞,在产出物为兄弟件的情况下,不合格品的数量是记录在mlog上的, + # 而不是mlogb上,以上的额外处理就没有效果了, 不过光子不记录不合格品 else: m_outs_list = [(material_out, mlog.batch, mlog.count_ok, mlog.count_real_eweight, None, mlog)] # 一次填写的暂时不处理不合格品