From cf7673cd981ac7b43c68cd08e4b63528891cb5b9 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Fri, 13 Jun 2025 14:31:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81=E4=BB=8Ewpr=E5=A4=84?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=88=87=E7=89=87=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/wpm/views.py b/apps/wpm/views.py index 6d9a1636..9d98ba17 100644 --- a/apps/wpm/views.py +++ b/apps/wpm/views.py @@ -639,6 +639,8 @@ class MlogbInViewSet(CreateModelMixin, UpdateModelMixin, DestroyModelMixin, Cust {"count_real": d_count_real, "count_ok": d_count_ok})) for mlogbwin in Mlogbw.objects.filter(mlogb=mlogbin).order_by("number"): wpr_ = mlogbwin.wpr + if wpr_.oinfo.get("切片数", None) is not None: + div_number = wpr_.oinfo["切片数"] if div_number == 1: Mlogbw.objects.get_or_create(wpr=wpr_, mlogb=mlogbout, defaults={"number": wpr_.number, "mlogbw_from": mlogbwin}) else: @@ -651,7 +653,7 @@ class MlogbInViewSet(CreateModelMixin, UpdateModelMixin, DestroyModelMixin, Cust mlogbout.count_json_from = mlogbin.count_json_from mlogbout.save(update_fields=["count_json_from"]) elif mtype == Process.PRO_MERGE: # 支持批到批,批到个 - xcount = math.floor( (mlogbin.count_use-mlogbin.count_pn_jgqbl) / route.div_number) + xcount = math.floor( (mlogbin.count_use-mlogbin.count_pn_jgqbl) / div_number) d_count_real = xcount d_count_ok = xcount mlogbout, _ = Mlogb.objects.get_or_create(mlogb_from=mlogbin, defaults=update_dict(m_dict, {"count_real": d_count_real, "count_ok": d_count_ok}))