feat: can_fix 排除维修完成品

This commit is contained in:
caoqianming 2025-06-05 08:40:55 +08:00
parent 9d1af24994
commit f06ad961f7
1 changed files with 2 additions and 1 deletions

View File

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