feat: wm todo排除repaired

This commit is contained in:
caoqianming 2025-07-27 13:15:35 +08:00
parent fa38cfdbdd
commit b3b77db0c1
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ class WMaterialFilter(filters.FilterSet):
process = Mgroup.objects.get(id=mgroup).process
matoutIds = process.get_canout_mat_ids()
if value == "todo":
qs = queryset.exclude(material__id__in=matoutIds)|queryset.filter(state=WMaterial.WM_REPAIR)
qs = queryset.exclude(material__id__in=matoutIds).exclude(state=WMaterial.WM_REPAIRED)|queryset.filter(state=WMaterial.WM_REPAIR)
return qs
elif value == "done":
qs = queryset.filter(material__id__in=matoutIds).exclude(state=WMaterial.WM_REPAIR)|queryset.filter(state=WMaterial.WM_REPAIRED)