一键报警事件2分钟
This commit is contained in:
parent
582eca2df3
commit
a644292590
|
@ -491,7 +491,7 @@ def handle_xx_event(name: str, data: dict):
|
||||||
# 找到最近未处理同一人发生的事件
|
# 找到最近未处理同一人发生的事件
|
||||||
if cate:
|
if cate:
|
||||||
last_event = Event.objects.filter(cates__code=name, employee=blts.employee, handle_user=None).order_by('-create_time').first()
|
last_event = Event.objects.filter(cates__code=name, employee=blts.employee, handle_user=None).order_by('-create_time').first()
|
||||||
if last_event and last_event.create_time + timedelta(minutes=1) > timezone.now():
|
if last_event and last_event.create_time + timedelta(minutes=2) > timezone.now():
|
||||||
return
|
return
|
||||||
event = Event()
|
event = Event()
|
||||||
# 查询定位信息
|
# 查询定位信息
|
||||||
|
|
Loading…
Reference in New Issue