瀏覽代碼

定制客户模块 APP扫码添加过滤已添加过序列号

linhaohong 1 年之前
父節點
當前提交
c3adb7db97
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      Controller/CustomCustomer/CustomCustomerController.py

+ 3 - 0
Controller/CustomCustomer/CustomCustomerController.py

@@ -109,6 +109,9 @@ class CustomCustomerView(View):
         if not custom_customer:
             return response.json(173)
 
+        custom_customer_device_qs = CustomCustomerDevice.objects.filter(full_code=full_code)
+        if custom_customer_device_qs.exists():
+            return response.json(174)
         # 创建新设备记录
         try:
             # 检查full_code的格式并提取相关字段