updated maximum load value according to MINUTES_TO_COUNT in tenantbatch report
parent
d78db4c23e
commit
3c3016f8e1
|
@ -187,8 +187,7 @@ class Reporting:
|
|||
# Step 5: query reporting period energy input
|
||||
################################################################################################################
|
||||
for tenant_id in tenant_dict:
|
||||
|
||||
cursor_energy_db.execute(" SELECT energy_category_id, SUM(actual_value), max(actual_value)"
|
||||
cursor_energy_db.execute(" SELECT energy_category_id, SUM(actual_value), MAX(actual_value)"
|
||||
" FROM tbl_tenant_input_category_hourly "
|
||||
" WHERE tenant_id = %s "
|
||||
" AND start_datetime_utc >= %s "
|
||||
|
@ -204,7 +203,7 @@ class Reporting:
|
|||
for row_tenant_energy in rows_tenant_energy:
|
||||
if energy_category['id'] == row_tenant_energy[0]:
|
||||
subtotal = row_tenant_energy[1]
|
||||
maximum = row_tenant_energy[2]
|
||||
maximum = row_tenant_energy[2] * Decimal(60 / config.minutes_to_count)
|
||||
break
|
||||
tenant_dict[tenant_id]['values'].append(subtotal)
|
||||
tenant_dict[tenant_id]['maximum'].append(maximum)
|
||||
|
|
Loading…
Reference in New Issue