update : 11.03.2025 10:31:23,84

This commit is contained in:
Sabron 2025-03-11 10:31:23 +07:00
parent b454a15e72
commit f77e3a3a74

View File

@ -213,14 +213,23 @@ def test_edds():
#for row in cursor_row:
# print(row)
SQL_QUERY = r"SELECT * FROM objectstatus"
cursor = mssql.executeSQL(conn, SQL_QUERY)
cursor_row = cursor.fetchall()
for row in cursor_row:
print(row)
element.save()
#print(my_b.decode())
SQL_QUERY = r"SELECT * FROM objectstatus"
cursor = mssql.executeSQL(conn, SQL_QUERY)
cursor_row = cursor.fetchall()
for data in cursor_row:
print(data)
element = Equipment.objects.filter(uid=data[0]).first()
lon = 0 if data[4] is None else data[4]
lat = 0 if data[3] is None else data[3]
if element is not None:
element.lat = lat
element.lon = lon
element.save()
cursor.close()
conn.close()
return None