From f872a4e6d414e0683b8d12d70aef602c263aeeda Mon Sep 17 00:00:00 2001 From: Sabron Date: Tue, 12 Nov 2024 10:12:16 +0700 Subject: [PATCH] update : 12.11.2024 10:12:16,94 --- apps/schedulers/tasks.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/schedulers/tasks.py b/apps/schedulers/tasks.py index b114f6b..675020b 100644 --- a/apps/schedulers/tasks.py +++ b/apps/schedulers/tasks.py @@ -467,10 +467,12 @@ def load_sotekom(): element.time=time=datetime.now() if data[11] is None else data[11] - #SQL_QUERY = r'exec GetLastPos @objid = ' + "'" + str(data[0]) + "'" - #cursor = executeSQL(conn,SQL_QUERY) - #cursor_row = cursor.fetchall() - #for row in cursor_row: + SQL_QUERY = r'SELECT * FROM vw_INFO_DEVICE_TYPE WHERE id = ' + "'" + str(data[1]) + "'" + cursor = executeSQL(conn,SQL_QUERY) + cursor_model = cursor.fetchall() + for model in cursor_model: + logging.message(f'model = {str(model)}') + # element.time = row[0]+ timedelta(hours=7) # element.lat = 0 if row[2] is None else row[2] # element.lon = 0 if row[3] is None else row[3]