feat: mlog增加查询条件
This commit is contained in:
parent
e07034919d
commit
eb665c7943
|
@ -51,8 +51,13 @@ class MgroupViewSet(CustomModelViewSet):
|
|||
queryset = Mgroup.objects.all()
|
||||
serializer_class = MgroupSerializer
|
||||
select_related_fields = ['create_by', 'belong_dept', 'process']
|
||||
filterset_fields = ['belong_dept', 'process',
|
||||
'cate', 'belong_dept__name', 'name']
|
||||
filterset_fields = {
|
||||
"belong_dept": ["exact"],
|
||||
"process": ["exact"],
|
||||
"cate": ["exact"],
|
||||
"belong_dept__name": ["exact", "contains"],
|
||||
"name": ["exact", "contains"]
|
||||
}
|
||||
search_fields = ['number']
|
||||
ordering = ['sort', 'create_time']
|
||||
|
||||
|
|
|
@ -50,9 +50,10 @@ class MlogFilter(filters.FilterSet):
|
|||
"batch": ["exact"],
|
||||
"handle_date": ["exact"],
|
||||
"handle_user": ["exact"],
|
||||
"mtask__mgroup__belong_dept__name": ["exact"],
|
||||
"mgroup__belong_dept__name": ["exact", "in"],
|
||||
"mgroup__name": ["exact", "in"],
|
||||
"mgroup": ["exact"],
|
||||
"mtask__mgroup__belong_dept__name": ["exact", "contains", "in"],
|
||||
"mgroup__belong_dept__name": ["exact", "in", "contains"],
|
||||
"mgroup__name": ["exact", "in", "contains"],
|
||||
"submit_time": ["isnull"]
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue