Browse Source

修改UID上传

chenshibin 4 năm trước cách đây
mục cha
commit
9dedfc1595
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      Controller/VPGController.py

+ 4 - 1
Controller/VPGController.py

@@ -217,6 +217,9 @@ def do_upload_uid(request):
     if (not MAC['is_active']) or (current_mac[-8:] == 'FF.FF.FF'):
         return response.json(175)
 
+    area = 0
+    if vpg_id != 1:
+        area = 1
     # path = '/'.join((BASE_DIR, 'static/uid')).replace('\\', '/') + '/'
     # if not os.path.exists(path):
     #     os.makedirs(path)
@@ -237,7 +240,7 @@ def do_upload_uid(request):
                     status=0,
                     add_time=add_time,
                     update_time=update_time,
-                    area=0,  # 关联vgp表已有区域信息,可以考虑去掉
+                    area=area,  # 关联vgp表已有区域信息,可以考虑去掉
                     vpg_id=vpg_id,
                 )
                 if len(uid) == 14:  # 宸云