|
@@ -14,7 +14,7 @@ from Ansjer.config import OSS_STS_ACCESS_KEY, OSS_STS_ACCESS_SECRET, AWS_ACCESS_
|
|
|
AWS_SES_ACCESS_REGION
|
|
|
from Model.models import Device_Info, UidSetModel, LogModel, UID_Bucket, Unused_Uid_Meal, Order_Model, StsCrdModel, \
|
|
|
VodHlsModel, ExperienceContextModel, DeviceTypeModel, Equipment_Info, UidUserModel, ExperienceAiModel, AiService, \
|
|
|
- AppBundle, App_Info, AppDeviceType, DeviceNameLanguage, AppVersionNumber
|
|
|
+ AppBundle, App_Info, AppDeviceType, DeviceNameLanguage, AppVersionNumber, UIDCompanySerialModel
|
|
|
from Object.AWS.AmazonS3Util import AmazonS3Util
|
|
|
from Object.ResponseObject import ResponseObject
|
|
|
from Object.TokenObject import TokenObject
|
|
@@ -457,8 +457,9 @@ class DeviceManagement(View):
|
|
|
else:
|
|
|
# 序列号
|
|
|
serialNumberList = serialNumberList.splitlines() # 按行('\r', '\r\n', \n')切割字符串返回列表
|
|
|
- uid_qs = Device_Info.objects.filter(serial_number__in=serialNumberList).values_list('UID')
|
|
|
- uidList = [uid_qs]
|
|
|
+ uid_company_serial_qs = UIDCompanySerialModel.objects.filter(
|
|
|
+ company_serial__serial_number__in=serialNumberList).values('uid__uid')
|
|
|
+ uidList = [item[key] for item in uid_company_serial_qs for key in item]
|
|
|
# 根据删除项删除相关数据
|
|
|
if '设备信息数据' in delDataOptions:
|
|
|
Device_Info.objects.filter(UID__in=uidList).delete()
|
|
@@ -730,7 +731,7 @@ class DeviceManagement(View):
|
|
|
'user_id': 2,
|
|
|
'status': 200,
|
|
|
'time': int(time.time()),
|
|
|
- 'url': 'deviceManagement/resetVod',
|
|
|
+ 'url': 'deviceManagement/resetAll',
|
|
|
'content': json.dumps(content),
|
|
|
'operation': '{}重置所有'.format(uid),
|
|
|
}
|
|
@@ -754,4 +755,4 @@ class DeviceManagement(View):
|
|
|
return response.json(0)
|
|
|
except Exception as e:
|
|
|
print(e)
|
|
|
- return response.json(500, repr(e))
|
|
|
+ return response.json(500, repr(e))
|