From 19527f97364a484a5b22383a349b07dba0257df9 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Wed, 31 Jan 2024 10:24:40 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8F=98=E6=9B=B4attendance=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=92=8C=E6=8E=92=E5=BA=8F=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/hrm/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/hrm/views.py b/apps/hrm/views.py index c21244d5..8fb5bfaf 100755 --- a/apps/hrm/views.py +++ b/apps/hrm/views.py @@ -256,7 +256,8 @@ class AttendanceViewSet(CustomModelViewSet): filterset_fields = ['user', 'user__belong_dept', 'user__post', 'state', 'work_date', 'user__name', 'user__phone'] search_fields = ['user__name', 'user__phone'] - ordering = ['-work_date', '-create_time'] + ordering = ['-work_date', 'shift', '-create_time'] + ordering_fields = ['work_date', 'shift', 'create_time'] class ClockRecordViewSet(BulkCreateModelMixin, ListModelMixin, BulkDestroyModelMixin, CustomGenericViewSet):