门禁授权时需要等待1s
This commit is contained in:
parent
73ccc83637
commit
93a4fa7a8e
|
@ -1,3 +1,4 @@
|
|||
import time
|
||||
from apps.hrm.models import ClockRecord, Employee
|
||||
from apps.third.models import TDevice
|
||||
from apps.third.tapis import dhapis
|
||||
|
@ -121,6 +122,7 @@ class HrmService:
|
|||
"endDate": endDate,
|
||||
"departmentId": departmentId,
|
||||
}
|
||||
time.sleep(1)
|
||||
_, res = dhClient.request(**dhapis['card_update'], json=json_data)
|
||||
return cardNumber
|
||||
else:
|
||||
|
@ -145,6 +147,7 @@ class HrmService:
|
|||
"startDate": startDate,
|
||||
"endDate": endDate
|
||||
}
|
||||
time.sleep(1)
|
||||
_, res = dhClient.request(**dhapis['card_add'], json=json_data)
|
||||
cls.save(ep, data={'dh_face_card': cardNumber})
|
||||
return cardNumber
|
||||
|
|
Loading…
Reference in New Issue