|
@@ -106,6 +106,7 @@ def plot_records(data, col_headers, title, prefix):
|
|
files = []
|
|
files = []
|
|
start = 0
|
|
start = 0
|
|
step = 120
|
|
step = 120
|
|
|
|
+ i = 1
|
|
while True:
|
|
while True:
|
|
if start==0 and ('百万组' in title or '十万组' in title or '菜鸟组' in title ):
|
|
if start==0 and ('百万组' in title or '十万组' in title or '菜鸟组' in title ):
|
|
step = 10
|
|
step = 10
|
|
@@ -114,7 +115,7 @@ def plot_records(data, col_headers, title, prefix):
|
|
|
|
|
|
part = data[start: start + step]
|
|
part = data[start: start + step]
|
|
part_nrows = len(part)
|
|
part_nrows = len(part)
|
|
- filename = u'/tmp/{}-{}.png'.format(title.split('-')[1], start)
|
|
|
|
|
|
+ filename = u'/tmp/{}{}.png'.format(title.split('-')[1][:3], i)
|
|
|
|
|
|
if start == 0:
|
|
if start == 0:
|
|
png_bytes = plot_records_as_table_and_convert_to_png(
|
|
png_bytes = plot_records_as_table_and_convert_to_png(
|
|
@@ -135,6 +136,7 @@ def plot_records(data, col_headers, title, prefix):
|
|
#ret.append({'filename': filename, 'image_url': image_url})
|
|
#ret.append({'filename': filename, 'image_url': image_url})
|
|
|
|
|
|
start += step
|
|
start += step
|
|
|
|
+ i = i+1
|
|
if start >= nrows:
|
|
if start >= nrows:
|
|
break
|
|
break
|
|
zpfile = get_zipfile(files)
|
|
zpfile = get_zipfile(files)
|