From 025c3ec0d5d2ad8df6039138ccafd100b3fadeb3 Mon Sep 17 00:00:00 2001 From: pengtao Date: Fri, 13 Dec 2019 11:47:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BB=85=E4=BB=85=202001=20?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E5=80=92=E9=87=8F=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- daily_report/dreport.py | 5 +++-- daily_report/templates/report.html | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/daily_report/dreport.py b/daily_report/dreport.py index d37dcd9..5503b49 100644 --- a/daily_report/dreport.py +++ b/daily_report/dreport.py @@ -245,13 +245,14 @@ class Report: activa = args['tga'].get_data(activa_sql)[0][0] or 0 new = args['tga'].get_data(new_sql)[0][0] or 0 share = args['tga'].get_data(share_sql)[0][0] or 0 + jumpout = args['tga'].get_data(jumpout_sql)[0][0] or 0 if activa: timeonlie = round(int(args['tga'].get_data(timeonlie_sql)[0][0] or 0) / activa, 2) + jump_per = round((100 * jumpout) / activa, 2) else: timeonlie = 0 + jump_per = 0 - jumpout = args['tga'].get_data(jumpout_sql)[0][0] or 0 - jump_per = round((100 * jumpout) / activa, 2) if args['gameid'] not in self.not_minigames: ad_101 = args['tga'].get_data(ad_101_sql)[0][0] or 0 ad_1 = args['tga'].get_data(ad_1_sql)[0][0] or 0 diff --git a/daily_report/templates/report.html b/daily_report/templates/report.html index b2b9ad8..df6b75b 100644 --- a/daily_report/templates/report.html +++ b/daily_report/templates/report.html @@ -126,6 +126,8 @@ + {% if line.input %} +

买量数据

@@ -150,7 +152,9 @@
+ {% endif %} + {% if line.output %}

卖量数据:

@@ -172,6 +176,7 @@
+ {% endif %} {% endfor %}