480
+    #     i2 = 0
481
+    #     i3 = 0
482
+    #     i4 = 0
483
+    #     for i in range(0, len(distributor_logs)):
484
+    #         distributor_logs[i]['code1'] = 0
485
+    #         distributor_logs[i]['code2'] = 0
486
+    #         distributor_logs[i]['has_code1_scan_num'] = 0
487
+    #         distributor_logs[i]['has_code2_scan_num'] = 0
488
+    #         if i1 < len(distributor_code1_hasScan_logs) and distributor_logs[i]['distributor_name'] == distributor_code1_hasScan_logs[i1]['distributor_name']:
489
+    #             distributor_logs[i]['has_code1_scan_num'] = distributor_code1_hasScan_logs[i1]['num']
490
+    #             i1 += 1
491
+
492
+    #         if i2 < len(distributor_code1_logs) and distributor_logs[i]['distributor_name'] == distributor_code1_logs[i2]['distributor_name']:
493
+    #             distributor_logs[i]['code1'] = distributor_code1_logs[i2]['num']
494
+    #             i2 += 1
495
+
496
+    #         if i3 < len(distributor_code2_logs) and distributor_logs[i]['distributor_name'] == distributor_code2_logs[i3]['distributor_name']:
497
+    #             distributor_logs[i]['code2'] = distributor_code2_logs[i3]['num']
498
+    #             i3 += 1
499
+
500
+    #         if i4 < len(distributor_code2_hasScan_logs) and distributor_logs[i]['distributor_name'] == distributor_code2_hasScan_logs[i4]['distributor_name']:
501
+    #             distributor_logs[i]['has_code2_scan_num'] = distributor_code2_hasScan_logs[i4]['num']
502
+    #             i4 += 1
503
+
504
+    #     distributor_logs.sort(key=lambda k: (-k['num']))
491 505
 
492 506
     return response(200, 'Get Distributor Statistic Success', u'获取经销商统计成功', data={
493 507
         'daily_logs': daily_logs,

kodo - Gogs: Go Git Service

Geen omschrijving

FFIB: 88b564d033 fix coercing to Unicode: need string or buffer, long found 5 jaren geleden
..
migrations 96c4bec605 :art: Add api activity_group_share 5 jaren geleden
__init__.py 44a6cdf337 Statistic 8 jaren geleden
admin.py 78739fe7d3 KeyError 7 jaren geleden
apps.py 44a6cdf337 Statistic 8 jaren geleden
models.py 88b564d033 fix coercing to Unicode: need string or buffer, long found 5 jaren geleden
tests.py 44a6cdf337 Statistic 8 jaren geleden
views.py 53b8b2b0ec Opt salesman_id/salesman_name 7 jaren geleden