diff --git a/apps/wpmw/filters.py b/apps/wpmw/filters.py index 607fc49c..fae8b731 100644 --- a/apps/wpmw/filters.py +++ b/apps/wpmw/filters.py @@ -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("请提供工段查询条件")