报告增加总场次数量

main
rogersun 1 week ago
parent 39fc8272ba
commit 416204be0c
  1. 2
      ai/utils/basic_func.py
  2. 12
      ai/views.py

@ -159,7 +159,7 @@ def count_show(show_data):
show_count = []
for show, count in show_dict.items():
show_count.append(f"{show}{str(round(count / len(show_data) * 100, 2))}%,共排{str(count)}")
return '\n'.join(show_count)
return '\n'.join(show_count), f"{len(show_data)}"
# 处理黑名单

@ -87,10 +87,10 @@ def report(request):
# 获取影厅制式
hall_type = get_hall_type(cinema_code=zz_code)
# 计算排片占比
ai_count = count_show(ai_dict)
real_count = count_show(real_dict)
target_count = count_show(target_dict)
template_count = count_show(temp_dict)
ai_count, ai_total = count_show(ai_dict)
real_count, real_total = count_show(real_dict)
target_count, target_total = count_show(target_dict)
template_count, template_total = count_show(temp_dict)
# 生成时间
create_time = datetime.datetime.strftime((last_ai_data.created_at + datetime.timedelta(hours=8)),
'%Y-%m-%d %H:%M:%S')
@ -120,6 +120,10 @@ def report(request):
'real_count': real_count,
'target_count': target_count,
'template_count': template_count,
'ai_total': ai_total,
'real_total': real_total,
'target_total': target_total,
'template_total': template_total,
'result': last_ai_data.result,
'think': think,
'ai_model': last_ai_data.ai_model,

Loading…
Cancel
Save