|
@@ -316,6 +316,8 @@ class EquipmentManagerV3(View):
|
|
|
def do_batch_add(self, userID, request_dict, response, request):
|
|
|
# 批量添加设备
|
|
|
uidContent = request_dict.get('uidContent', None)
|
|
|
+ family_id = request_dict.get('familyId', None)
|
|
|
+ room_id = request_dict.get('roomId', None)
|
|
|
|
|
|
if not uidContent:
|
|
|
return response.json(444, {'param': 'uidContent'})
|
|
@@ -464,6 +466,9 @@ class EquipmentManagerV3(View):
|
|
|
version=version,
|
|
|
vodPrimaryUserID=vodPrimaryUserID, vodPrimaryMaster=vodPrimaryMaster)
|
|
|
userDevice.save()
|
|
|
+ # 添加到家庭房间
|
|
|
+ if family_id:
|
|
|
+ EquipmentFamilyView.family_room_device_save(family_id, room_id, userDevice.id, Type)
|
|
|
uid_serial_qs = UIDCompanySerialModel.objects.filter(uid__uid=UID)
|
|
|
if uid_serial_qs.exists():
|
|
|
uid_serial = uid_serial_qs[0]
|