chenjunkai 5 жил өмнө
parent
commit
ce39a5275b

+ 4 - 2
Controller/EquipmentManagerV2.py

@@ -158,10 +158,10 @@ class EquipmentManagerV2(View):
             nowTime = int(time.time())
             data = []
             # 设备拓展信息表
-            us_qs = UidSetModel.objects.filter(uid__in=uid_list).values('uid', 'version', 'nickname')
+            us_qs = UidSetModel.objects.filter(uid__in=uid_list).values('uid', 'version', 'nickname','ucode')
             uv_dict = {}
             for us in us_qs:
-                uv_dict[us['uid']] = {'version': us['version'], 'nickname': us['nickname']}
+                uv_dict[us['uid']] = {'version': us['version'], 'nickname': us['nickname'],'ucode':us['ucode']}
             for p in dvls:
                 p['vod'] = []
                 for dm in ubqs:
@@ -178,12 +178,14 @@ class EquipmentManagerV2(View):
                 if p_uid in uv_dict:
                     # 设备版本号
                     p['uid_version'] = uv_dict[p_uid]['version']
+                    p['ucode'] = uv_dict[p_uid]['ucode']
                     # 设备昵称 调用影子信息昵称,先阶段不可
                     if uv_dict[p_uid]['nickname']:
                         p['NickName'] = uv_dict[p_uid]['nickname']
                 else:
                     # 设备版本号
                     p['uid_version'] = ''
+                    p['ucode'] = ''
                 data.append(p)
             return response.json(0, data)
         else: