rovinces] 247
+
248
+    return {
249
+        'scan_user_count': scan_user_count,
250
+        'sell_volume_count': sell_volume_count,
251
+        'user_count_increase_pct': user_count_increase_pct,
252
+        'volume_count_increase_pct': volume_count_increase_pct,
253
+        'models': models,
254
+        'salesmen': salesmen,
255
+        'provinces': provinces,
256
+    }
257
+
258
+
259
+@logit
260
+def v2_tj_distributor(request):
261
+    brand_id = request.POST.get('brand_id', settings.KODO_DEFAULT_BRAND_ID)
262
+
263
+    year = tc.local_string(format='%Y')
264
+    month = tc.local_string(format='%Y%m')
265
+    day = tc.local_string(format='%Y%m%d')
266
+
267
+    lastyear = tc.local_string(tc.several_time_ago(years=1), format='%Y')
268
+    lastmonth = tc.local_string(tc.several_time_ago(months=1), format='%Y%m')
269
+    lastday = tc.local_string(tc.several_time_ago(days=1), format='%Y%m%d')
270
+
271
+    year_data = ymdtj(brand_id, year, lastyear)
272
+    month_data = ymdtj(brand_id, month, lastmonth)
273
+    day_data = ymdtj(brand_id, day, lastday)
274
+
275
+    return response(200, 'Get TJ Data Success', u'获取统计数据成功', data={
276
+        'year_data': year_data,
277
+        'month_data': month_data,
278
+        'day_data': day_data,
279
+    })

kodo - Gogs: Go Git Service

暂无描述

huangqimin001: 3e9628d0c9 iSort & Pycodestyle 5 年之前
..
management 3e9628d0c9 iSort & Pycodestyle 5 年之前
migrations b95db9c5c3 Basic gis command 8 年之前
__init__.py b95db9c5c3 Basic gis command 8 年之前
admin.py b95db9c5c3 Basic gis command 8 年之前
apps.py b95db9c5c3 Basic gis command 8 年之前
models.py b95db9c5c3 Basic gis command 8 年之前
tests.py b95db9c5c3 Basic gis command 8 年之前
views.py b95db9c5c3 Basic gis command 8 年之前