update : 13.11.2024 10:53:39,22

This commit is contained in:
Sabron 2024-11-13 10:53:39 +07:00
parent 3c4410912f
commit 2fa1d88d47

View File

@ -452,7 +452,9 @@ def load_sotekom():
cursor = mssql.executeSQL(conn,SQL_QUERY)
records = cursor.fetchall()
for data in records:
#logging.message(str(data))
if position[1] == 315:
logging.message(f'data = {data}')
element = Equipment.objects.filter(uid=data[0]).first()
name="" if data[4] is None else data[4]
full_name="" if data[3] is None else data[3]
@ -482,7 +484,7 @@ def load_sotekom():
cursor_position = cursor.fetchall()
for position in cursor_position:
if position[1] == 315:
logging.message(f' position = {position}')
logging.message(f' === position = {position}')
element.time=time=datetime.now() if position[2] is None else position[2]
# element.time = row[0]+ timedelta(hours=7)
element.lat = 0 if position[3] is None else position[3]