jxing 5 vuotta sitten
vanhempi
commit
110e154d18
1 muutettua tiedostoa jossa 11 lisäystä ja 4 poistoa
  1. 11 4
      src/level/test.py

+ 11 - 4
src/level/test.py

@@ -45,8 +45,8 @@ def get_data(sql):
         connection = psycopg2.connect(
             database='datacenter',
             user='postgres',
-            password='123456',
-            host='192.168.20.236',
+            password='123qwe!@#',
+            host='47.94.89.44',
             port='5432'
         )
         cursor = connection.cursor()
@@ -74,12 +74,19 @@ def loads_curve(x):
 
 
 if __name__ == '__main__':
-    involved_model_sql = "select * from revit.model_floor_file_func('Pj1101010038') where folder_id = " \
-                         "'2ed9071c220411ea962a533003bf758f' and status in (31, 4) "
+    involved_model_sql = "select * from revit.model_floor_file_func('Pj1101120001') where folder_id = " \
+                         "'db2476b2612711eab6aa41564c532fd7' and (status in (31, 4)  or fid = 'befee8e262b911ea8ad1ad92633fdd32')"
     columns_data = get_data(involved_model_sql)
     if len(columns_data) == 0:
         sys.exit()
     model_list = [dict(zip(involved_model_keys, item)) for item in columns_data]
+    tmpdict = dict()
+    tmpdict['id'] = 'test'
+    tmpdict['floor_name'] = 'B2M1'
+    tmpdict['level'] = -13600.0
+    tmpdict['fid'] = 'test'
+
+    # model_list.append(tmpdict)
     level_data = dict()
     for item in model_list:
         level_data[item.get('fid')] = item.get('level')