-1

Brightcells лет %!s(int64=6): %!d(string=назад)
Родитель
Сommit
d9e17b83cd
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      statistic/views.py

+ 2 - 2
statistic/views.py

@@ -216,7 +216,7 @@ def ymdtj(brand_id, ymd, lastymd):
216 216
         last_scan_user_count = 0
217 217
 
218 218
     # 与上个统计周期数据的用户人数比例
219
-    user_count_increase_pct = '%.2f' % (scan_user_count * 100.0 / last_scan_user_count) if last_scan_user_count != 0 else 0
219
+    user_count_increase_pct = '%.2f' % (scan_user_count * 100.0 / last_scan_user_count) if last_scan_user_count != 0 else -1
220 220
 
221 221
     # [消费者维度] 统计周期内型号扫描排行数据,请按顺序返回
222 222
     current_models = ConsumeModelSaleStatisticInfo.objects.filter(brand_id=brand_id, ymd=ymd, status=True).order_by('-num')
@@ -229,7 +229,7 @@ def ymdtj(brand_id, ymd, lastymd):
229 229
     last_sell_volume_count = sum([m.num for m in last_models])
230 230
 
231 231
     # 与上个统计周期数据的销售支数比例
232
-    volume_count_increase_pct = '%.2f' % (sell_volume_count * 100.0 / last_sell_volume_count) if last_sell_volume_count != 0 else 0
232
+    volume_count_increase_pct = '%.2f' % (sell_volume_count * 100.0 / last_sell_volume_count) if last_sell_volume_count != 0 else -1
233 233
 
234 234
     # [经销商维度] 统计周期内销售员排行数据,请按顺序返回
235 235
     salesmen = SaleclerkSaleStatisticInfo.objects.filter(brand_id=brand_id, ymd=ymd, status=True).order_by('-num')[:20]