fix: wpr list filter bug

This commit is contained in:
caoqianming 2025-09-10 15:35:17 +08:00
parent 2369c1469e
commit e491d7b4fe
1 changed files with 2 additions and 0 deletions

View File

@ -38,9 +38,11 @@ class WprFilter(filters.FilterSet):
elif value == "done":
matoutIds = process.get_canout_mat_ids()
qs = queryset.filter(material__id__in=matoutIds).exclude(state=WMaterial.WM_REPAIR)|queryset.filter(state=WMaterial.WM_REPAIRED, wm__mgroup__id=mgroupId)
return qs
elif value == "canfix":
matoutIds = process.get_canout_mat_ids()
qs = queryset.filter(state=WMaterial.WM_REPAIR, wm__mgroup__id=mgroupId)| queryset.filter(material__id__in=matoutIds, state=WMaterial.WM_NOTOK)
return qs
else:
raise ParseError("请提供工段查询条件")