add the reference of the storeenergycategory

pull/1/head
hyh123a 2021-02-28 14:46:39 +08:00
parent b0273e733a
commit bbd67b7f0e
1 changed files with 7 additions and 1 deletions

View File

@ -5,6 +5,7 @@ import config
from datetime import datetime, timedelta, timezone
from core import utilities
from decimal import Decimal
import excelexporters.storeenergycategory
class Reporting:
@ -562,5 +563,10 @@ class Reporting:
"timestamps": parameters_data['timestamps'],
"values": parameters_data['values']
}
# export result to Excel file and then encode the file to base64 string
result['excel_bytes_base64'] = excelexporters.storeenergycategory.export(result,
store['name'],
reporting_start_datetime_local,
reporting_end_datetime_local,
period_type)
resp.body = json.dumps(result)