fix: wpr_bxerp 数据统计在mlogbw存在才继续

This commit is contained in:
caoqianming 2025-10-28 16:55:36 +08:00
parent dda876092e
commit fa2edf7298
1 changed files with 25 additions and 24 deletions

View File

@ -9,6 +9,7 @@ def main(wprId, mgroup:Mgroup):
data = {}
mgroup_name = mgroup.name
mlogbw = Mlogbw.objects.filter(wpr=wpr, mlogb__mlog__submit_time__isnull=False).order_by("-update_time").first()
if mlogbw:
data[f"{mgroup_name}_批次号"] = mlogbw.mlogb.batch
data[f"{mgroup_name}_日期"] = mlogbw.mlogb.mlog.handle_date.strftime("%Y-%m-%d")
ftestitems = FtestItem.objects.filter(ftest__mlogbw_ftest__wpr=wpr,