Added 'excelexporters.combinedequipmentsaving.export()' method

pull/7/head
YangZhang-GitHub 2021-03-05 16:55:40 +08:00
parent aaddf6b80b
commit 5e107e3b5c
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.combinedequipmentsaving
class Reporting:
@ -666,4 +667,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.combinedequipmentsaving.export(result,
combined_equipment['name'],
reporting_start_datetime_local,
reporting_end_datetime_local,
period_type)
resp.body = json.dumps(result)