main[ADD]attendance_flask:Codigos QR para asistencias
This commit is contained in:
parent
b57e7e4128
commit
900ed58fe8
@ -19,8 +19,8 @@ for d in data:
|
|||||||
'check_out': d[2],
|
'check_out': d[2],
|
||||||
'ip_branch': d[3],
|
'ip_branch': d[3],
|
||||||
}
|
}
|
||||||
# response = requests.post('https://erp.agofer.com/hr_attendance_extended/public/attendance/', json = params).json()
|
response = requests.post('https://erp.agofer.com/hr_attendance_extended/public/attendance/', json = params).json()
|
||||||
response = requests.post('http://137.184.126.24:8080/hr_attendance_extended/public/attendance/', json = params).json()
|
# response = requests.post('http://137.184.126.24:8080/hr_attendance_extended/public/attendance/', json = params).json()
|
||||||
if response["message"] == "Attendance successfully":
|
if response["message"] == "Attendance successfully":
|
||||||
time = datetime.now(pytz.timezone('America/Bogota')).strftime("%Y-%m-%d %H:%M:%S")
|
time = datetime.now(pytz.timezone('America/Bogota')).strftime("%Y-%m-%d %H:%M:%S")
|
||||||
if d[1] != '' and d[5] == '':
|
if d[1] != '' and d[5] == '':
|
||||||
|
|||||||
4
main.py
4
main.py
@ -93,8 +93,8 @@ def catch_uuids(id, hashed, type, ip_branch):
|
|||||||
existing2 = conn.execute(
|
existing2 = conn.execute(
|
||||||
'SELECT * FROM hits WHERE uuid2 = ?', (str(id),)).fetchone()
|
'SELECT * FROM hits WHERE uuid2 = ?', (str(id),)).fetchone()
|
||||||
params ={'access': 'YXR0ZW5kYW5jZXMvYWdvZmVy','employee_id': user,'check_in': '','check_out': '','ip_branch': '',}
|
params ={'access': 'YXR0ZW5kYW5jZXMvYWdvZmVy','employee_id': user,'check_in': '','check_out': '','ip_branch': '',}
|
||||||
# employee = requests.post('https://erp.agofer.com/hr_attendance_extended/public/attendance/', json = params).json()
|
employee = requests.post('https://erp.agofer.com/hr_attendance_extended/public/attendance/', json = params).json()
|
||||||
employee = requests.post('http://137.184.126.24:8080/hr_attendance_extended/public/attendance/', json = params).json()
|
# employee = requests.post('http://137.184.126.24:8080/hr_attendance_extended/public/attendance/', json = params).json()
|
||||||
if not user:
|
if not user:
|
||||||
error = 'NO_USERNAME'
|
error = 'NO_USERNAME'
|
||||||
elif existing1:
|
elif existing1:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user