Added 'excelexporters.combinedequipmentenergyitem.export()' method

pull/1/MERGE
YangZhang-GitHub 2021-03-03 11:47:26 +08:00
parent 46dedb15b4
commit 0d6c14b999
1 changed files with 8 additions and 0 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.combinedequipmentenergyitem
class Reporting:
@ -516,4 +517,11 @@ class Reporting:
"values": parameters_data['values']
}
# export result to Excel file and then encode the file to base64 string
result['excel_bytes_base64'] = excelexporters.combinedequipmentenergyitem.export(result,
combined_equipment['name'],
reporting_start_datetime_local,
reporting_end_datetime_local,
period_type)
resp.body = json.dumps(result)