feat: wmaterial提供canfix的tag查询

This commit is contained in:
caoqianming 2025-05-28 16:30:50 +08:00
parent 37dc922c34
commit 70d80dafd2
1 changed files with 2 additions and 0 deletions

View File

@ -54,6 +54,8 @@ class WMaterialFilter(filters.FilterSet):
return qs
elif value == "done":
qs = queryset.filter(material__id__in=matoutIds).exclude(state=WMaterial.WM_REPAIR)|queryset.filter(state=WMaterial.WM_REPAIRED)
elif value == "canfix":
qs = queryset.filter(state=WMaterial.WM_REPAIR)| queryset.filter(material__id__in=matoutIds, state=WMaterial.WM_NOTOK).exclude(state=WMaterial.WM_REPAIR)
return qs
else:
raise ParseError("请提供工段查询条件")