刷卡日志
This commit is contained in:
parent
7c75aec1d5
commit
c67e5e0560
|
@ -1,3 +1,4 @@
|
|||
import logging
|
||||
import time
|
||||
from apps.hrm.models import ClockRecord, Employee
|
||||
from apps.third.models import TDevice
|
||||
|
@ -6,7 +7,7 @@ from apps.third.clients import dhClient
|
|||
from apps.utils.tools import rannum, ranstr
|
||||
from datetime import datetime
|
||||
from django.utils import timezone
|
||||
|
||||
myLogger = logging.getLogger('log')
|
||||
|
||||
class HrmService:
|
||||
|
||||
|
@ -198,8 +199,10 @@ class HrmService:
|
|||
from apps.rpm.models import Rpj
|
||||
nodeCode = data['info']['nodeCode']
|
||||
device = TDevice.objects.filter(code=nodeCode).first()
|
||||
|
||||
if device:
|
||||
id_number = data['info']['extend'].get('paperNumber', None)
|
||||
myLogger.info(data)
|
||||
if id_number: # 如果有身份证号
|
||||
if device.is_clock:
|
||||
# 如果设置为关联考勤
|
||||
|
|
Loading…
Reference in New Issue