From 8df57ed99a3fb578a551e47ddfd94a8acb9f5e7a Mon Sep 17 00:00:00 2001 From: caoqianming Date: Wed, 5 Apr 2023 10:04:35 +0800 Subject: [PATCH 1/2] =?UTF-8?q?refector:=20=E5=BC=80=E5=90=AF=E5=85=B3?= =?UTF-8?q?=E9=97=AD=E7=9B=91=E6=8E=A7=E5=8A=A0=E5=85=A5=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/opm/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/opm/views.py b/apps/opm/views.py index cf3afe2c..83ed3609 100644 --- a/apps/opm/views.py +++ b/apps/opm/views.py @@ -107,7 +107,7 @@ class OplViewSet(CustomModelViewSet): return super().update(request, *args, **kwargs) @action(methods=['post'], detail=True, perms_map={'post': '*'}, - serializer_class=Serializer, logging_methods=[]) + serializer_class=Serializer, logging_methods=['POST']) def start_mtask(self, request, pk=None): """ 开启作业监控 @@ -121,7 +121,7 @@ class OplViewSet(CustomModelViewSet): return Response(res) @action(methods=['post'], detail=True, perms_map={'post': '*'}, - serializer_class=Serializer, logging_methods=[]) + serializer_class=Serializer, logging_methods=['POST']) def stop_mtask(self, request, pk=None): """ 停止作业监控 From a6f5137dff82e16c33669091bae7059ed4d85fee Mon Sep 17 00:00:00 2001 From: caoqianming Date: Wed, 5 Apr 2023 10:15:05 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20close=5Fvisit=5Fby=5Fleave=5Ftime=20?= =?UTF-8?q?=E5=BE=85=E5=85=A5=E5=8E=82=E4=B9=9F=E5=BA=94=E6=AD=A3=E5=B8=B8?= =?UTF-8?q?=E5=85=B3=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/vm/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/vm/tasks.py b/apps/vm/tasks.py index 2a797d75..57e43b48 100644 --- a/apps/vm/tasks.py +++ b/apps/vm/tasks.py @@ -15,7 +15,7 @@ def close_visit_by_leave_time(): # 正常结束/其他关闭 vs = Visit.objects.filter(leave_time__lt=now).exclude(state__in=[Visit.V_DONE, Visit.V_CLOSE]) for i in vs: - if i.state == Visit.V_WORKING: + if i.state in [Visit.V_WORKING, Visit.V_ENTER]: i.state = Visit.V_DONE i.save() else: