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