Browse Source

定时更新设备规格码

zhangdongming 2 years ago
parent
commit
be811d9425
1 changed files with 7 additions and 0 deletions
  1. 7 0
      Controller/Cron/CronTaskController.py

+ 7 - 0
Controller/Cron/CronTaskController.py

@@ -103,6 +103,13 @@ class CronDelDataView(View):
                           '730201450AA', '730201450MA', '730201450NA', '72V201252AA', '72V201253AA',
                           '72V201353AA', '72V201354AA', '72V201355AA', '72V201254AA']
             UidSetModel.objects.filter(ucode__in=ucode_list, is_custom_voice=0).update(is_custom_voice=1)
+
+            # 根据设备规格码更新is_ai
+            ucode_list = ['823C01552AA', '823C01550XA', 'C18201550KA', '823C01550TA',
+                          '823C01550VA', '823C01850XA', 'C18201850KA', '823C01850TA', '823C01850VA',
+                          '730201450AA', '730201450MA', '730201450NA', '72V201252AA', '72V201253AA',
+                          '72V201353AA', '72V201354AA', '72V201355AA', '72V201254AA']
+            UidSetModel.objects.filter(ucode__in=ucode_list, is_ai=2).update(is_ai=1)
             return response.json(0)
         except Exception as e:
             return response.json(500, 'error_line:{}, error_msg:{}'.format(e.__traceback__.tb_lineno, repr(e)))