feat: mlogb cal_count_pn_jgqbl
This commit is contained in:
parent
b102b78b02
commit
27b225face
|
@ -438,11 +438,7 @@ class Mlogb(BaseModel):
|
|||
self.save(update_fields=["count_pn_jgqbl"])
|
||||
mlog = self.mlog
|
||||
if mlog:
|
||||
count_pn_jgqbl = MlogbDefect.get_defect_qs_from_mlog(mlog, ftype="in").aggregate(total=Sum("count"))["total"] or 0
|
||||
mlog.count_pn_jgqbl = count_pn_jgqbl
|
||||
if mlog.count_real == mlog.count_use:
|
||||
mlog.count_real = mlog.count_use - count_pn_jgqbl
|
||||
mlog.save(update_fields=["count_pn_jgqbl", "count_real"])
|
||||
mlog.cal_mlog_count_from_mlogb()
|
||||
|
||||
def cal_count_notok(self):
|
||||
mqs = MlogbDefect.get_defect_qs_from_mlogb(self, ftype="out")
|
||||
|
|
Loading…
Reference in New Issue