增加证书查询条件 employee__user
This commit is contained in:
parent
18344bd121
commit
ad4378dff1
|
@ -9,9 +9,9 @@ class EcmService:
|
|||
"""事件处理服务
|
||||
"""
|
||||
|
||||
def create_remind(cls):
|
||||
def create_remind_and_speak(cls):
|
||||
"""
|
||||
创建事件提醒并发送通知
|
||||
创建事件提醒并发送短信/微信/音响
|
||||
"""
|
||||
pass
|
||||
|
||||
|
@ -62,8 +62,14 @@ class EcmService:
|
|||
if area:
|
||||
json = {"railId": data['railId'], "type": ""}
|
||||
_, res = xxClient.request(**xxapis['rail_ibeacon_list'], json=json)
|
||||
if res['totalCount'] >= area.count_people_max:
|
||||
total_count = res['totalCount']
|
||||
if total_count >= area.count_people_max:
|
||||
# 触发超员事件
|
||||
area.count_people = res['totalCount']
|
||||
area.count_people = total_count
|
||||
area.save()
|
||||
pass
|
||||
elif total_count < area.count_people_min:
|
||||
# 触发缺员事件
|
||||
area.count_people_min = total_count
|
||||
area.save()
|
||||
pass
|
||||
|
|
|
@ -189,3 +189,4 @@ class CertificateViewSet(CustomModelViewSet):
|
|||
create_serializer_class = CertificateCreateUpdateSerializer
|
||||
update_serializer_class = CertificateCreateUpdateSerializer
|
||||
serializer_class = CertificateSerializer
|
||||
filterset_fields = ['employee__user']
|
||||
|
|
Loading…
Reference in New Issue