feat: 支持从wpr处获取切片数
This commit is contained in:
parent
680608e16f
commit
cf7673cd98
|
@ -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}))
|
||||
|
|
Loading…
Reference in New Issue