优化删除部门接口

This commit is contained in:
27942
2025-12-25 18:15:13 +08:00
parent a31e1e3d89
commit c66610c3ac

View File

@@ -1247,7 +1247,7 @@ class WarehousingDetail(APIView):
if unit:
Q_obj &= Q(unit__icontains=unit)
seas = Warehousing.objects.filter(Q_obj)
seas = Warehousing.objects.filter(Q_obj).order_by('-id')
total = len(seas)
paginator = Paginator(seas, per_page)
@@ -1374,7 +1374,7 @@ class PlatformDetail(APIView):
"""
page = request.data.get('page')
per_page = request.data.get('per_page')
seas = RegisterPlatform.objects.all()
seas = RegisterPlatform.objects.all().order_by('-id')
total = len(seas)
paginator = Paginator(seas, per_page)
@@ -1685,7 +1685,7 @@ class ScheduleDetail(APIView):
:param kwargs:
:return:
"""
sches = Schedule.objects.filter(state="未完成")
sches = Schedule.objects.filter(state="未完成").order_by('-id')
page = request.data.get('page')
per_page = request.data.get('per_page')
total = len(sches)