|
@@ -135,12 +135,6 @@ class SerialNumberView(View):
|
|
|
if serial in unused_serial_redis_list:
|
|
|
return response.json(5)
|
|
|
|
|
|
- # 查询app是否已扫码,未扫码不能进行绑定
|
|
|
- app_scanned_serial_qs = AppScannedSerial.objects.filter(serial=serial)
|
|
|
- if not app_scanned_serial_qs.exists():
|
|
|
- LOGGER.info(f'{serial}当前序列号未进行APP扫码')
|
|
|
- return response.json(5)
|
|
|
-
|
|
|
# 判断序列号是否已和企业关联
|
|
|
company_serial_qs = CompanySerialModel.objects.filter(company__secret=company_secret, serial_number=serial)
|
|
|
if not company_serial_qs.exists():
|
|
@@ -157,6 +151,12 @@ class SerialNumberView(View):
|
|
|
if not isLock:
|
|
|
return response.json(5)
|
|
|
|
|
|
+ # 查询app是否已扫码,未扫码不能进行绑定
|
|
|
+ app_scanned_serial_qs = AppScannedSerial.objects.filter(serial=serial)
|
|
|
+ if not app_scanned_serial_qs.exists():
|
|
|
+ LOGGER.info(f'{serial}当前序列号未进行APP扫码')
|
|
|
+ return response.json(5)
|
|
|
+
|
|
|
# 获取并判断region_id
|
|
|
region_id = CommonService.confirm_region_id()
|
|
|
if region_id not in REGION_ID_LIST:
|