From 93a4fa7a8e14dcc134ad9223180d44372117bb06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E5=89=8D=E6=98=8E?= <909355014@qq.com> Date: Tue, 23 Aug 2022 19:38:15 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=A8=E7=A6=81=E6=8E=88=E6=9D=83=E6=97=B6?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E7=AD=89=E5=BE=851s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/hrm/services.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/hrm/services.py b/apps/hrm/services.py index fe221af9..88aa565b 100755 --- a/apps/hrm/services.py +++ b/apps/hrm/services.py @@ -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