ソースを参照

优化翻新入库检查

zhangdongming 9 ヶ月 前
コミット
e2d8a7af2c
1 ファイル変更2 行追加1 行削除
  1. 2 1
      Controller/UserDevice/SerialNumberCheckController.py

+ 2 - 1
Controller/UserDevice/SerialNumberCheckController.py

@@ -278,7 +278,8 @@ class SerialNumberView(View):
                 SerialNumberRenovateLog.objects.create(**insert_or_update_params)
             else:
                 # 如果存在入库记录,则更新操作计数和更新时间
-                renovation_logs.update(operation_count=renovation_logs[0].operation_count + 1, updated_time=now_time)
+                renovation_logs.update(operation_count=renovation_logs[0].operation_count + 1, count=1,
+                                       updated_time=now_time)
 
                 # 获取翻新前记录的操作计数
             count = renovation_before_logs[0].operation_count if renovation_before_logs.exists() else 0