...
 
Commits (2)
    https://gitcode.net/myems/myems/-/commit/2311086e4be5a136c59020d3d9bc8960f8346320 updated energy storage power station dashboard 2024-05-08T21:19:43+08:00 nengyuanzhang 13011132526@163.com https://gitcode.net/myems/myems/-/commit/c9d24bd1b97a701efe8e9a3b1062bea2e0f1b3fd Merge branch 'develop' 2024-05-08T21:24:55+08:00 nengyuanzhang 13011132526@163.com
......@@ -40,13 +40,16 @@ from reports import equipmentsaving
from reports import equipmentstatistics
from reports import equipmenttracking
from reports import energystoragepowerstationdashboard
from reports import energystoragepowerstationsingledashboard
from reports import energystoragepowerstationitemdashboard
from reports import energystoragepowerstationdetails
from reports import energystoragepowerstationlist
from reports import energystoragepowerstationreporting
from reports import energystoragepowerstationsenergy
from reports import energystoragepowerstationsbilling
from reports import energystoragepowerstationscarbon
from reports import energystoragepowerstationcollectionenergy
from reports import energystoragepowerstationitemenergy
from reports import energystoragepowerstationcollectionbilling
from reports import energystoragepowerstationitembilling
from reports import energystoragepowerstationcollectioncarbon
from reports import energystoragepowerstationitemcarbon
from reports import fddfault
from reports import meterbatch
from reports import metercarbon
......@@ -932,20 +935,26 @@ api.add_route('/reports/dashboard',
dashboard.Reporting())
api.add_route('/reports/energystoragepowerstationdashboard',
energystoragepowerstationdashboard.Reporting())
api.add_route('/reports/energystoragepowerstationsingledashboard',
energystoragepowerstationsingledashboard.Reporting())
api.add_route('/reports/energystoragepowerstationitemdashboard',
energystoragepowerstationitemdashboard.Reporting())
api.add_route('/reports/energystoragepowerstationdetails',
energystoragepowerstationdetails.Reporting())
api.add_route('/reports/energystoragepowerstationlist',
energystoragepowerstationlist.Reporting())
api.add_route('/reports/energystoragepowerstationreporting',
energystoragepowerstationreporting.Reporting())
api.add_route('/reports/energystoragepowerstationsenergy',
energystoragepowerstationsenergy.Reporting())
api.add_route('/reports/energystoragepowerstationsbilling',
energystoragepowerstationsbilling.Reporting())
api.add_route('/reports/energystoragepowerstationscarbon',
energystoragepowerstationscarbon.Reporting())
api.add_route('/reports/energystoragepowerstationcollectionenergy',
energystoragepowerstationcollectionenergy.Reporting())
api.add_route('/reports/energystoragepowerstationitemenergy',
energystoragepowerstationitemenergy.Reporting())
api.add_route('/reports/energystoragepowerstationcollectionbilling',
energystoragepowerstationcollectionbilling.Reporting())
api.add_route('/reports/energystoragepowerstationitembilling',
energystoragepowerstationitembilling.Reporting())
api.add_route('/reports/energystoragepowerstationcollectioncarbon',
energystoragepowerstationcollectioncarbon.Reporting())
api.add_route('/reports/energystoragepowerstationitemcarbon',
energystoragepowerstationitemcarbon.Reporting())
api.add_route('/reports/equipmentbatch',
equipmentbatch.Reporting())
api.add_route('/reports/equipmentcarbon',
......
......@@ -38,11 +38,6 @@ class Reporting:
else:
api_key_control(req)
user_uuid = req.params.get('useruuid')
period_type = req.params.get('periodtype')
base_period_start_datetime_local = req.params.get('baseperiodstartdatetime')
base_period_end_datetime_local = req.params.get('baseperiodenddatetime')
reporting_period_start_datetime_local = req.params.get('reportingperiodstartdatetime')
reporting_period_end_datetime_local = req.params.get('reportingperiodenddatetime')
################################################################################################################
# Step 1: valid parameters
......@@ -54,88 +49,6 @@ class Reporting:
if len(user_uuid) != 36:
raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
description='API.INVALID_USER_UUID')
if period_type is None:
raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
description='API.INVALID_PERIOD_TYPE')
else:
period_type = str.strip(period_type)
if period_type not in ['hourly', 'daily', 'weekly', 'monthly', 'yearly']:
raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
description='API.INVALID_PERIOD_TYPE')
timezone_offset = int(config.utc_offset[1:3]) * 60 + int(config.utc_offset[4:6])
if config.utc_offset[0] == '-':
timezone_offset = -timezone_offset
base_start_datetime_utc = None
if base_period_start_datetime_local is not None and len(str.strip(base_period_start_datetime_local)) > 0:
base_period_start_datetime_local = str.strip(base_period_start_datetime_local)
try:
base_start_datetime_utc = datetime.strptime(base_period_start_datetime_local, '%Y-%m-%dT%H:%M:%S')
except ValueError:
raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
description="API.INVALID_BASE_PERIOD_START_DATETIME")
base_start_datetime_utc = \
base_start_datetime_utc.replace(tzinfo=timezone.utc) - timedelta(minutes=timezone_offset)
# nomalize the start datetime
if config.minutes_to_count == 30 and base_start_datetime_utc.minute >= 30:
base_start_datetime_utc = base_start_datetime_utc.replace(minute=30, second=0, microsecond=0)
else:
base_start_datetime_utc = base_start_datetime_utc.replace(minute=0, second=0, microsecond=0)
base_end_datetime_utc = None
if base_period_end_datetime_local is not None and len(str.strip(base_period_end_datetime_local)) > 0:
base_period_end_datetime_local = str.strip(base_period_end_datetime_local)
try:
base_end_datetime_utc = datetime.strptime(base_period_end_datetime_local, '%Y-%m-%dT%H:%M:%S')
except ValueError:
raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
description="API.INVALID_BASE_PERIOD_END_DATETIME")
base_end_datetime_utc = \
base_end_datetime_utc.replace(tzinfo=timezone.utc) - timedelta(minutes=timezone_offset)
if base_start_datetime_utc is not None and base_end_datetime_utc is not None and \
base_start_datetime_utc >= base_end_datetime_utc:
raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
description='API.INVALID_BASE_PERIOD_END_DATETIME')
if reporting_period_start_datetime_local is None:
raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
description="API.INVALID_REPORTING_PERIOD_START_DATETIME")
else:
reporting_period_start_datetime_local = str.strip(reporting_period_start_datetime_local)
try:
reporting_start_datetime_utc = datetime.strptime(reporting_period_start_datetime_local,
'%Y-%m-%dT%H:%M:%S')
except ValueError:
raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
description="API.INVALID_REPORTING_PERIOD_START_DATETIME")
reporting_start_datetime_utc = \
reporting_start_datetime_utc.replace(tzinfo=timezone.utc) - timedelta(minutes=timezone_offset)
# nomalize the start datetime
if config.minutes_to_count == 30 and reporting_start_datetime_utc.minute >= 30:
reporting_start_datetime_utc = reporting_start_datetime_utc.replace(minute=30, second=0, microsecond=0)
else:
reporting_start_datetime_utc = reporting_start_datetime_utc.replace(minute=0, second=0, microsecond=0)
if reporting_period_end_datetime_local is None:
raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
description="API.INVALID_REPORTING_PERIOD_END_DATETIME")
else:
reporting_period_end_datetime_local = str.strip(reporting_period_end_datetime_local)
try:
reporting_end_datetime_utc = datetime.strptime(reporting_period_end_datetime_local,
'%Y-%m-%dT%H:%M:%S').replace(tzinfo=timezone.utc) - \
timedelta(minutes=timezone_offset)
except ValueError:
raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
description="API.INVALID_REPORTING_PERIOD_END_DATETIME")
if reporting_start_datetime_utc >= reporting_end_datetime_utc:
raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
description='API.INVALID_REPORTING_PERIOD_END_DATETIME')
################################################################################################################
# Step 2: query the energy storage power station list
################################################################################################################
......
import re
from datetime import datetime, timedelta, timezone
from decimal import Decimal
import falcon
import mysql.connector
......@@ -22,11 +21,13 @@ class Reporting:
# PROCEDURES
# Step 1: valid parameters
# Step 2: query the energy storage power station
# Step 3: query charge data
# Step 4: query discharge data
# Step 5: query revenue data
# Step 6: query efficiency data
# Step 7: construct the report
# Step 3: query charge energy data
# Step 4: query discharge energy data
# Step 5: query charge billing data
# Step 6: query discharge billing data
# Step 7: query charge carbon data
# Step 8: query discharge carbon data
# Step 9: construct the report
####################################################################################################################
@staticmethod
def on_get(req, resp):
......@@ -39,11 +40,6 @@ class Reporting:
# this procedure accepts energy storage power station id or uuid
energy_storage_power_station_id = req.params.get('id')
energy_storage_power_station_uuid = req.params.get('uuid')
period_type = req.params.get('periodtype')
base_period_start_datetime_local = req.params.get('baseperiodstartdatetime')
base_period_end_datetime_local = req.params.get('baseperiodenddatetime')
reporting_period_start_datetime_local = req.params.get('reportingperiodstartdatetime')
reporting_period_end_datetime_local = req.params.get('reportingperiodenddatetime')
################################################################################################################
# Step 1: valid parameters
......@@ -65,91 +61,9 @@ class Reporting:
raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
description='API.INVALID_ENERGY_STORAGE_POWER_STATION_UUID')
if period_type is None:
raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
description='API.INVALID_PERIOD_TYPE')
else:
period_type = str.strip(period_type)
if period_type not in ['hourly', 'daily', 'weekly', 'monthly', 'yearly']:
raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
description='API.INVALID_PERIOD_TYPE')
timezone_offset = int(config.utc_offset[1:3]) * 60 + int(config.utc_offset[4:6])
if config.utc_offset[0] == '-':
timezone_offset = -timezone_offset
base_start_datetime_utc = None
if base_period_start_datetime_local is not None and len(str.strip(base_period_start_datetime_local)) > 0:
base_period_start_datetime_local = str.strip(base_period_start_datetime_local)
try:
base_start_datetime_utc = datetime.strptime(base_period_start_datetime_local, '%Y-%m-%dT%H:%M:%S')
except ValueError:
raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
description="API.INVALID_BASE_PERIOD_START_DATETIME")
base_start_datetime_utc = \
base_start_datetime_utc.replace(tzinfo=timezone.utc) - timedelta(minutes=timezone_offset)
# nomalize the start datetime
if config.minutes_to_count == 30 and base_start_datetime_utc.minute >= 30:
base_start_datetime_utc = base_start_datetime_utc.replace(minute=30, second=0, microsecond=0)
else:
base_start_datetime_utc = base_start_datetime_utc.replace(minute=0, second=0, microsecond=0)
base_end_datetime_utc = None
if base_period_end_datetime_local is not None and len(str.strip(base_period_end_datetime_local)) > 0:
base_period_end_datetime_local = str.strip(base_period_end_datetime_local)
try:
base_end_datetime_utc = datetime.strptime(base_period_end_datetime_local, '%Y-%m-%dT%H:%M:%S')
except ValueError:
raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
description="API.INVALID_BASE_PERIOD_END_DATETIME")
base_end_datetime_utc = \
base_end_datetime_utc.replace(tzinfo=timezone.utc) - timedelta(minutes=timezone_offset)
if base_start_datetime_utc is not None and base_end_datetime_utc is not None and \
base_start_datetime_utc >= base_end_datetime_utc:
raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
description='API.INVALID_BASE_PERIOD_END_DATETIME')
if reporting_period_start_datetime_local is None:
raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
description="API.INVALID_REPORTING_PERIOD_START_DATETIME")
else:
reporting_period_start_datetime_local = str.strip(reporting_period_start_datetime_local)
try:
reporting_start_datetime_utc = datetime.strptime(reporting_period_start_datetime_local,
'%Y-%m-%dT%H:%M:%S')
except ValueError:
raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
description="API.INVALID_REPORTING_PERIOD_START_DATETIME")
reporting_start_datetime_utc = \
reporting_start_datetime_utc.replace(tzinfo=timezone.utc) - timedelta(minutes=timezone_offset)
# nomalize the start datetime
if config.minutes_to_count == 30 and reporting_start_datetime_utc.minute >= 30:
reporting_start_datetime_utc = reporting_start_datetime_utc.replace(minute=30, second=0, microsecond=0)
else:
reporting_start_datetime_utc = reporting_start_datetime_utc.replace(minute=0, second=0, microsecond=0)
if reporting_period_end_datetime_local is None:
raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
description="API.INVALID_REPORTING_PERIOD_END_DATETIME")
else:
reporting_period_end_datetime_local = str.strip(reporting_period_end_datetime_local)
try:
reporting_end_datetime_utc = datetime.strptime(reporting_period_end_datetime_local,
'%Y-%m-%dT%H:%M:%S').replace(tzinfo=timezone.utc) - \
timedelta(minutes=timezone_offset)
except ValueError:
raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
description="API.INVALID_REPORTING_PERIOD_END_DATETIME")
if reporting_start_datetime_utc >= reporting_end_datetime_utc:
raise falcon.HTTPError(status=falcon.HTTP_400, title='API.BAD_REQUEST',
description='API.INVALID_REPORTING_PERIOD_END_DATETIME')
################################################################################################################
# Step 2: query the energy storage power station list
# Step 2: query the energy storage power station
################################################################################################################
cnx_system_db = mysql.connector.connect(**config.myems_system_db)
cursor_system_db = cnx_system_db.cursor()
# Get Spaces associated with energy storage power stations
......@@ -188,26 +102,7 @@ class Reporting:
raise falcon.HTTPError(status=falcon.HTTP_404, title='API.NOT_FOUND',
description='API.ENERGY_STORAGE_POWER_STATION_NOT_FOUND')
else:
energy_storage_power_station = dict()
# get gateway latest seen datetime to determine if it is online
query = (" SELECT tds.last_seen_datetime_utc "
" FROM tbl_energy_storage_power_stations_containers tespsc, "
" tbl_energy_storage_containers_batteries tescb, "
" tbl_points p, tbl_data_sources tds, tbl_gateways tg "
" WHERE tespsc.energy_storage_power_station_id = %s "
" AND tescb.energy_storage_container_id = tespsc.energy_storage_container_id "
" AND tescb.soc_point_id = p.id "
" AND p.data_source_id = tds.id "
" ORDER BY tds.last_seen_datetime_utc DESC "
" LIMIT 1 ")
cursor_system_db.execute(query, (row[0],))
row_datetime = cursor_system_db.fetchone()
is_online = False
if row_datetime is not None and len(row_datetime) > 0:
if isinstance(row_datetime[0], datetime):
if row_datetime[0] + timedelta(minutes=10) > datetime.utcnow():
is_online = True
energy_storage_power_station_id = row[0]
energy_storage_power_station = {
"id": row[0],
"name": row[1],
......@@ -219,35 +114,87 @@ class Reporting:
"longitude": row[6],
"rated_capacity": row[7],
"rated_power": row[8],
"description": row[9],
"status": 'online' if is_online else 'offline'}
"description": row[9]}
charge_ranking = list()
################################################################################################################
# Step 3: query charge energy data
################################################################################################################
cnx_energy_db = mysql.connector.connect(**config.myems_energy_db)
cursor_energy_db = cnx_energy_db.cursor()
cnx_billing_db = mysql.connector.connect(**config.myems_billing_db)
cursor_billing_db = cnx_billing_db.cursor()
discharge_ranking = list()
cnx_carbon_db = mysql.connector.connect(**config.myems_billing_db)
cursor_carbon_db = cnx_carbon_db.cursor()
revenue_ranking = list()
query = (" SELECT SUM(actual_value) "
" FROM tbl_energy_storage_power_station_charge_hourly "
" WHERE energy_storage_power_station_id = %s ")
cursor_energy_db.execute(query, (energy_storage_power_station_id, ))
row = cursor_energy_db.fetchone()
total_charge_energy = Decimal(0.0)
if row is not None:
total_charge_energy = row[0]
################################################################################################################
# Step 3: query charge data
# Step 4: query discharge energy data
################################################################################################################
cnx_energy = mysql.connector.connect(**config.myems_energy_db)
cursor_energy = cnx_energy.cursor()
cnx_billing = mysql.connector.connect(**config.myems_billing_db)
cursor_billing = cnx_billing.cursor()
query = (" SELECT SUM(actual_value) "
" FROM tbl_energy_storage_power_station_discharge_hourly "
" WHERE energy_storage_power_station_id = %s ")
cursor_energy_db.execute(query, (energy_storage_power_station_id, ))
row = cursor_energy_db.fetchone()
total_discharge_energy = Decimal(0.0)
if row is not None:
total_discharge_energy = row[0]
################################################################################################################
# Step 5: query charge billing data
################################################################################################################
query = (" SELECT SUM(actual_value) "
" FROM tbl_energy_storage_power_station_charge_hourly "
" WHERE energy_storage_power_station_id = %s ")
cursor_billing_db.execute(query, (energy_storage_power_station_id, ))
row = cursor_billing_db.fetchone()
total_charge_billing = Decimal(0.0)
if row is not None:
total_charge_billing = row[0]
################################################################################################################
# Step 4: query discharge data
# Step 6: query discharge billing data
################################################################################################################
query = (" SELECT SUM(actual_value) "
" FROM tbl_energy_storage_power_station_discharge_hourly "
" WHERE energy_storage_power_station_id = %s ")
cursor_billing_db.execute(query, (energy_storage_power_station_id, ))
row = cursor_billing_db.fetchone()
total_discharge_billing = Decimal(0.0)
if row is not None:
total_discharge_billing = row[0]
################################################################################################################
# Step 5: query revenue data
# Step 7: query charge carbon data
################################################################################################################
query = (" SELECT SUM(actual_value) "
" FROM tbl_energy_storage_power_station_charge_hourly "
" WHERE energy_storage_power_station_id = %s ")
cursor_carbon_db.execute(query, (energy_storage_power_station_id, ))
row = cursor_carbon_db.fetchone()
total_charge_carbon = Decimal(0.0)
if row is not None:
total_charge_carbon = row[0]
################################################################################################################
# Step 6: query efficiency data
# Step 8: query discharge carbon data
################################################################################################################
query = (" SELECT SUM(actual_value) "
" FROM tbl_energy_storage_power_station_discharge_hourly "
" WHERE energy_storage_power_station_id = %s ")
cursor_carbon_db.execute(query, (energy_storage_power_station_id, ))
row = cursor_carbon_db.fetchone()
total_discharge_carbon = Decimal(0.0)
if row is not None:
total_discharge_carbon = row[0]
################################################################################################################
# Step 7: construct the report
......@@ -257,23 +204,27 @@ class Reporting:
if cnx_system_db:
cnx_system_db.close()
if cursor_energy:
cursor_energy.close()
if cnx_energy:
cnx_energy.close()
if cursor_energy_db:
cursor_energy_db.close()
if cnx_energy_db:
cnx_energy_db.close()
if cursor_billing:
cursor_billing.close()
if cnx_billing:
cnx_billing.close()
if cursor_billing_db:
cursor_billing_db.close()
if cnx_billing_db:
cnx_billing_db.close()
result = dict()
if cursor_carbon_db:
cursor_carbon_db.close()
if cnx_carbon_db:
cnx_carbon_db.close()
result = dict()
result['energy_storage_power_station'] = energy_storage_power_station
result['charge_ranking'] = charge_ranking
result['total_charge'] = Decimal(0.0)
result['discharge_ranking'] = discharge_ranking
result['total_discharge'] = Decimal(0.0)
result['revenue_ranking'] = revenue_ranking
result['total_revenue'] = Decimal(0.0)
result['total_charge_energy'] = total_charge_energy
result['total_discharge_energy'] = total_discharge_energy
result['total_charge_billing'] = total_charge_billing
result['total_discharge_billing'] = total_discharge_billing
result['total_charge_carbon'] = total_charge_carbon
result['total_discharge_carbon'] = total_discharge_carbon
resp.text = json.dumps(result)
......@@ -39,7 +39,6 @@ class Reporting:
else:
api_key_control(req)
user_uuid = req.params.get('useruuid')
period_type = req.params.get('periodtype')
################################################################################################################
# Step 1: valid parameters
......
......@@ -39,7 +39,6 @@ class Reporting:
else:
api_key_control(req)
user_uuid = req.params.get('useruuid')
period_type = req.params.get('periodtype')
################################################################################################################
# Step 1: valid parameters
......
......@@ -39,7 +39,6 @@ class Reporting:
else:
api_key_control(req)
user_uuid = req.params.get('useruuid')
period_type = req.params.get('periodtype')
################################################################################################################
# Step 1: valid parameters
......
......@@ -7,7 +7,6 @@ import { toast } from 'react-toastify';
import { getCookieValue, createCookie, checkEmpty } from '../../../helpers/utils';
import withRedirect from '../../../hoc/withRedirect';
import { withTranslation } from 'react-i18next';
import moment from 'moment';
import { APIBaseURL, settings } from '../../../config';
import { getItemFromStore } from '../../../helpers/utils';
import CustomizeMapBox from '../common/CustomizeMapBox';
......@@ -16,23 +15,11 @@ import AppContext from '../../../context/Context';
import StackBarChart from './StackBarChart';
const Dashboard = ({ setRedirect, setRedirectUrl, t }) => {
let current_moment = moment();
const [isDashboardFetched, setIsDashboardFetched] = useState(false);
const [isEnergyStoragePowerStationsEnergyFetched, setIsEnergyStoragePowerStationsEnergyFetched] = useState(false);
const [isEnergyStoragePowerStationsBillingFetched, setIsEnergyStoragePowerStationsBillingFetched] = useState(false);
const [isEnergyStoragePowerStationsCarbonFetched, setIsEnergyStoragePowerStationsCarbonFetched] = useState(false);
const [periodType, setPeriodType] = useState('monthly');
const [basePeriodBeginsDatetime, setBasePeriodBeginsDatetime] = useState(
current_moment
.clone()
.subtract(1, 'years')
.startOf('year')
);
const [basePeriodEndsDatetime, setBasePeriodEndsDatetime] = useState(current_moment.clone().subtract(1, 'years'));
const [reportingPeriodBeginsDatetime, setReportingPeriodBeginsDatetime] = useState(
current_moment.clone().startOf('year')
);
const [reportingPeriodEndsDatetime, setReportingPeriodEndsDatetime] = useState(current_moment);
const [spinnerHidden, setSpinnerHidden] = useState(false);
const [activeTabLeft, setActiveTabLeft] = useState('1');
const toggleTabLeft = tab => {
......@@ -97,20 +84,7 @@ const Dashboard = ({ setRedirect, setRedirectUrl, t }) => {
);
fetch(
APIBaseURL +
'/reports/energystoragepowerstationdashboard?' +
'useruuid=' +
user_uuid +
'&periodtype=' +
periodType +
'&baseperiodstartdatetime=' +
(basePeriodBeginsDatetime != null ? basePeriodBeginsDatetime.format('YYYY-MM-DDTHH:mm:ss') : '') +
'&baseperiodenddatetime=' +
(basePeriodEndsDatetime != null ? basePeriodEndsDatetime.format('YYYY-MM-DDTHH:mm:ss') : '') +
'&reportingperiodstartdatetime=' +
reportingPeriodBeginsDatetime.format('YYYY-MM-DDTHH:mm:ss') +
'&reportingperiodenddatetime=' +
reportingPeriodEndsDatetime.format('YYYY-MM-DDTHH:mm:ss'),
APIBaseURL + '/reports/energystoragepowerstationdashboard?useruuid=' + user_uuid,
{
method: 'GET',
headers: {
......
......@@ -207,8 +207,8 @@ import MicrogridDetails from '../components/MyEMS/Microgrid/MicrogridDetails';
import MicrogridReporting from '../components/MyEMS/Microgrid/MicrogridReporting';
// Energy Storage Power Statioin
import EnergyStoragePowerStationDashboard from '../components/MyEMS/EnergyStoragePowerStation/Dashboard';
import MultipleEnergyStoragePowerStationDashboard from '../components/MyEMS/EnergyStoragePowerStation/MultipleDashboard';
import SingleEnergyStoragePowerStationDashboard from '../components/MyEMS/EnergyStoragePowerStation/SingleDashboard';
import EnergyStoragePowerStationCollectionDashboard from '../components/MyEMS/EnergyStoragePowerStation/CollectionDashboard';
import EnergyStoragePowerStationItemDashboard from '../components/MyEMS/EnergyStoragePowerStation/ItemDashboard';
import EnergyStoragePowerStationList from '../components/MyEMS/EnergyStoragePowerStation/EnergyStoragePowerStationList';
import EnergyStoragePowerStationDetails from '../components/MyEMS/EnergyStoragePowerStation/EnergyStoragePowerStationDetails';
import EnergyStoragePowerStationReporting from '../components/MyEMS/EnergyStoragePowerStation/EnergyStoragePowerStationReporting';
......