Merge branch 'master' of https://e.coding.net/ctcdevteam/ehs/ehs_server
This commit is contained in:
commit
1a61e5ab27
|
@ -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):
|
||||
"""
|
||||
停止作业监控
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue