From 124c7f3086b380b1a3eea81568b43961f9ecea70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E5=89=8D=E6=98=8E?= <909355014@qq.com> Date: Sun, 11 Sep 2022 18:29:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=96=87=E5=8F=AD=E6=92=AD=E6=94=BE=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E6=89=93=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/opm/services.py | 4 ++++ apps/third/speaker.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/opm/services.py b/apps/opm/services.py index a44d4023..245226b5 100644 --- a/apps/opm/services.py +++ b/apps/opm/services.py @@ -1,4 +1,5 @@ +from apps.ecm.service import check_not_in_place from apps.ecm.tasks import opl_task from apps.opm.models import Operation, Opl, OplWorker from apps.third.models import TDevice @@ -84,6 +85,9 @@ def opl_start(ticket: Ticket): op.state = Operation.OP_WORK op.save() + # 检查作业人员是否就位 + check_not_in_place(opl) + # 给摄像头加载循环拍照算法 # 找到作业点的摄像头, 如果指定摄像头就用指定的摄像头 if op.vchannels: diff --git a/apps/third/speaker.py b/apps/third/speaker.py index b99cba3d..208d66a2 100644 --- a/apps/third/speaker.py +++ b/apps/third/speaker.py @@ -109,7 +109,7 @@ class SpClient: if raise_exception: raise ParseError(**err_detail) return 'fail', dict(detail=detail, code='sp_'+str(ret['code'])) - # self.handle_log(result='success', response=ret) + self.handle_log(result='success', response=ret) return 'success', ret self.handle_log(result='error', errors=traceback.format_exc()) if raise_exception: