|
@@ -205,6 +205,11 @@ class SerialNumberView(View):
|
|
|
count += 1
|
|
|
continue
|
|
|
|
|
|
+ # 判断序列号是否已绑定过uid
|
|
|
+ company_serial_qs = UIDCompanySerialModel.objects.filter(company_serial_id=company_serial.id)
|
|
|
+ if company_serial_qs.exists():
|
|
|
+ return response.json(380)
|
|
|
+
|
|
|
# UID关联【企业关联序列号】表创建数据
|
|
|
UIDCompanySerialModel.objects.create(uid_id=uid.id, company_serial_id=company_serial.id,
|
|
|
add_time=now_time, update_time=now_time)
|
|
@@ -237,7 +242,7 @@ class SerialNumberView(View):
|
|
|
'ip': ip,
|
|
|
'user_id': 1,
|
|
|
'status': 200,
|
|
|
- 'time': now_time,
|
|
|
+ 'time': int(time.time()),
|
|
|
'content': json.dumps(content),
|
|
|
'url': 'serialNumber/attachUID',
|
|
|
'operation': '序列号{}绑定uid: {}'.format(serial, uid.uid),
|