diff --git a/apps/gto/templates/report/repor_speed.html b/apps/gto/templates/report/repor_speed.html
new file mode 100644
index 0000000..51be2c1
--- /dev/null
+++ b/apps/gto/templates/report/repor_speed.html
@@ -0,0 +1,176 @@
+{% extends "default.html" %}
+{% load static %}
+{% load mysettings %}
+
+
+{% block header_link %}
+
+
+
+
+
+
+
+
+{% endblock header_link %}
+
+
+{% block content %}
+Превышения скорости
+
+ Отчет не сформирован. Нажмите "Сформировать" для получения отчета
+
| № | -Датчик | -Дата | -Показание | -
|---|---|---|---|
| """+str(nom)+""" | -"""+str(indicators.sensor)+""" | -"""+indicators.date_time.strftime('%d.%m.%Y %H:%M')+""" | - """ - html = html+""""""+str(indicators.value/indicators.sensor.ratio)+""" """+str(indicators.sensor.unit)+""" |
| № | -Датчик | -Дата | -Показание | -
|---|---|---|---|
| """+str(nom)+""" | -"""+str(indicators.sensor)+""" | -"""+indicators.date_time.strftime('%d.%m.%Y %H:%M')+""" | - """ - html = html+""""""+str(indicators.value/indicators.sensor.ratio)+""" """+str(indicators.sensor.unit)+""" |
| № | -Дата | -Датчик | -Описание | -
|---|---|---|---|
| """+str(nom)+""" | -"""+indicators.date_time.strftime('%d.%m.%Y %H:%M')+""" | -"""+str(indicators.sensor)+""" | -"""+str(indicators.text_alarm)+""" | -
| № | -Датчик | -Дата | -Показание | -
|---|---|---|---|
| """+str(nom)+""" | -"""+str(indicators.sensor)+""" | -"""+indicators.date_time.strftime('%d.%m.%Y %H:%M')+""" | - """ - html = html+""""""+str(indicators.value/indicators.sensor.ratio)+""" """+str(indicators.sensor.unit)+""" |
| № | -Датчик | -Дата | -Показание | +Время | +Объект | +Широта | +Долгота | +Скорость |
|---|---|---|---|---|---|---|---|---|
| """+str(nom)+""" | -"""+str(indicators.sensor)+""" | -"""+indicators.date_time.strftime('%d.%m.%Y %H:%M')+""" | - """ - html = html+""""""+str(indicators.value/indicators.sensor.ratio)+""" """+str(indicators.sensor.unit)+""" | """+indicators.time.strftime('%d.%m.%Y %H:%M')+""" | +"""+str(indicators.equipment)+""" | +"""+str(indicators.lat)+""" | +"""+str(indicators.lon)+""" | +"""+str(indicators.speed)+""" | + """ @@ -152,8 +103,6 @@ def show_report_alarm_ToHTML(request): try: dict_param=request.POST.dict() print(dict_param) - #data_start=datetime.strptime(dict_param['DataStart']+' 00:00:00', "%d.%m.%Y %H:%M:%S") - #data_stop=datetime.strptime(dict_param['DataStop']+' 23:59:59', "%d.%m.%Y %H:%M:%S") data_start=datetime.strptime(dict_param['DataStart']+' 00:00:00', "%Y-%m-%d %H:%M:%S") data_stop=datetime.strptime(dict_param['DataStop']+' 23:59:59', "%Y-%m-%d %H:%M:%S") myquery =Q() @@ -327,41 +276,17 @@ def sensor_ajax(request): except Exception as err: logging.error(traceback.format_exc()) - -@login_required(login_url='/accounts/login/?next=') -@never_cache -def report_error(request): - try: - if request.method == "GET": - sensor_list = AcsSensor.objects.all() - context = { - 'sensor_list':sensor_list, - } - return render(request, 'report/repor_error.html',context) - if request.method == "POST": - dict_param=request.POST.dict() - if dict_param['metod']=='create': - return show_report_error_ToHTML(request) - - except Exception as err: - logging.error(traceback.format_exc()) - @login_required(login_url='/accounts/login/?next=') @never_cache def report_value(request): try: if request.method == "GET": - sensor_list = AcsSensor.objects.all() - context = { - 'sensor_list':sensor_list, - } - return render(request, 'report/repor_value.html',context) + context = generalmodule.get_context_template() + return render(request, 'report/repor_speed.html',context) if request.method == "POST": dict_param=request.POST.dict() if dict_param['metod']=='create': return show_report_value_ToHTML(request) - #elif dictParametr['metod']=='download': - # return ReportTableWorksToXLS(request) except Exception as err: logging.error(traceback.format_exc()) @@ -388,9 +313,7 @@ def report_list(request): param=request.GET.dict() if 'name' in param: name = param['name'] - if name == 'reporterror': - return report_error(request) - if name == 'reportvalue': + if name == 'reportspeed': return report_value(request) if name == 'reportskuv': return report_alarm(request)