rovinces]
+
+ return {
+ 'scan_user_count': scan_user_count,
+ 'sell_volume_count': sell_volume_count,
+ 'user_count_increase_pct': user_count_increase_pct,
+ 'volume_count_increase_pct': volume_count_increase_pct,
+ 'models': models,
+ 'salesmen': salesmen,
+ 'provinces': provinces,
+ }
+
+
+@logit
+def v2_tj_distributor(request):
+ brand_id = request.POST.get('brand_id', settings.KODO_DEFAULT_BRAND_ID)
+
+ year = tc.local_string(format='%Y')
+ month = tc.local_string(format='%Y%m')
+ day = tc.local_string(format='%Y%m%d')
+
+ lastyear = tc.local_string(tc.several_time_ago(years=1), format='%Y')
+ lastmonth = tc.local_string(tc.several_time_ago(months=1), format='%Y%m')
+ lastday = tc.local_string(tc.several_time_ago(days=1), format='%Y%m%d')
+
+ year_data = ymdtj(brand_id, year, lastyear)
+ month_data = ymdtj(brand_id, month, lastmonth)
+ day_data = ymdtj(brand_id, day, lastday)
+
+ return response(200, 'Get TJ Data Success', u'获取统计数据成功', data={
+ 'year_data': year_data,
+ 'month_data': month_data,
+ 'day_data': day_data,
+ })