feat: mlogb cal_count_pn_jgqbl

This commit is contained in:
caoqianming 2025-06-06 17:44:19 +08:00
parent b102b78b02
commit 27b225face
1 changed files with 1 additions and 5 deletions

View File

@ -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")