feat: wpr_bxerp优化mlogbw的获取
This commit is contained in:
parent
29f1a96c3b
commit
706cfd502b
|
|
@ -8,7 +8,7 @@ def main(wprId, mgroup:Mgroup):
|
|||
wpr = Wpr.objects.get(id=wprId)
|
||||
data = {}
|
||||
mgroup_name = mgroup.name
|
||||
mlogbw = Mlogbw.objects.filter(wpr=wpr, mlogb__mlog__submit_time__isnull=False).order_by("-update_time").first()
|
||||
mlogbw = Mlogbw.objects.filter(wpr=wpr, mlogb__mlog__mgroup=mgroup, 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")
|
||||
|
|
|
|||
Loading…
Reference in New Issue