fix:修改重复判断common_start_datetime_utc的问题

pull/134/head
kakascx 2022-03-09 15:12:01 +08:00
parent e7548a7ea4
commit c0acb105db
16 changed files with 50 additions and 50 deletions

View File

@ -458,7 +458,7 @@ def worker(combined_equipment):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all virtual meters") print("Getting common time slot of energy values for all virtual meters")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0: if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0:
for meter_id, energy_hourly in energy_virtual_meter_hourly.items(): for meter_id, energy_hourly in energy_virtual_meter_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -472,7 +472,7 @@ def worker(combined_equipment):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all offline meters") print("Getting common time slot of energy values for all offline meters")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0: if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0:
for meter_id, energy_hourly in energy_offline_meter_hourly.items(): for meter_id, energy_hourly in energy_offline_meter_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -486,7 +486,7 @@ def worker(combined_equipment):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all equipments...") print("Getting common time slot of energy values for all equipments...")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_equipment_hourly is not None and len(energy_equipment_hourly) > 0: if energy_equipment_hourly is not None and len(energy_equipment_hourly) > 0:
for equipment_id, energy_hourly in energy_equipment_hourly.items(): for equipment_id, energy_hourly in energy_equipment_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:

View File

@ -461,7 +461,7 @@ def worker(combined_equipment):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all virtual meters") print("Getting common time slot of energy values for all virtual meters")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0: if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0:
for meter_id, energy_hourly in energy_virtual_meter_hourly.items(): for meter_id, energy_hourly in energy_virtual_meter_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -475,7 +475,7 @@ def worker(combined_equipment):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all offline meters") print("Getting common time slot of energy values for all offline meters")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0: if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0:
for meter_id, energy_hourly in energy_offline_meter_hourly.items(): for meter_id, energy_hourly in energy_offline_meter_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -489,7 +489,7 @@ def worker(combined_equipment):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all equipments") print("Getting common time slot of energy values for all equipments")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_equipment_hourly is not None and len(energy_equipment_hourly) > 0: if energy_equipment_hourly is not None and len(energy_equipment_hourly) > 0:
for equipment_id, energy_hourly in energy_equipment_hourly.items(): for equipment_id, energy_hourly in energy_equipment_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:

View File

@ -458,7 +458,7 @@ def worker(combined_equipment):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all virtual meters") print("Getting common time slot of energy values for all virtual meters")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0: if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0:
for meter_id, energy_hourly in energy_virtual_meter_hourly.items(): for meter_id, energy_hourly in energy_virtual_meter_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -472,7 +472,7 @@ def worker(combined_equipment):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all offline meters") print("Getting common time slot of energy values for all offline meters")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0: if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0:
for meter_id, energy_hourly in energy_offline_meter_hourly.items(): for meter_id, energy_hourly in energy_offline_meter_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -486,7 +486,7 @@ def worker(combined_equipment):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all equipments...") print("Getting common time slot of energy values for all equipments...")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_equipment_hourly is not None and len(energy_equipment_hourly) > 0: if energy_equipment_hourly is not None and len(energy_equipment_hourly) > 0:
for equipment_id, energy_hourly in energy_equipment_hourly.items(): for equipment_id, energy_hourly in energy_equipment_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:

View File

@ -388,7 +388,7 @@ def worker(equipment):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all virtual meters") print("Getting common time slot of energy values for all virtual meters")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0: if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0:
for meter_id, energy_hourly in energy_virtual_meter_hourly.items(): for meter_id, energy_hourly in energy_virtual_meter_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -402,7 +402,7 @@ def worker(equipment):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all offline meters") print("Getting common time slot of energy values for all offline meters")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0: if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0:
for meter_id, energy_hourly in energy_offline_meter_hourly.items(): for meter_id, energy_hourly in energy_offline_meter_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:

View File

@ -391,7 +391,7 @@ def worker(equipment):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all virtual meters") print("Getting common time slot of energy values for all virtual meters")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0: if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0:
for meter_id, energy_hourly in energy_virtual_meter_hourly.items(): for meter_id, energy_hourly in energy_virtual_meter_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -405,7 +405,7 @@ def worker(equipment):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all offline meters") print("Getting common time slot of energy values for all offline meters")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0: if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0:
for meter_id, energy_hourly in energy_offline_meter_hourly.items(): for meter_id, energy_hourly in energy_offline_meter_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:

View File

@ -388,7 +388,7 @@ def worker(equipment):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all virtual meters") print("Getting common time slot of energy values for all virtual meters")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0: if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0:
for meter_id, energy_hourly in energy_virtual_meter_hourly.items(): for meter_id, energy_hourly in energy_virtual_meter_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -402,7 +402,7 @@ def worker(equipment):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all offline meters") print("Getting common time slot of energy values for all offline meters")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0: if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0:
for meter_id, energy_hourly in energy_offline_meter_hourly.items(): for meter_id, energy_hourly in energy_offline_meter_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:

View File

@ -455,7 +455,7 @@ def worker(shopfloor):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all virtual meters") print("Getting common time slot of energy values for all virtual meters")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0: if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0:
for meter_id, energy_hourly in energy_virtual_meter_hourly.items(): for meter_id, energy_hourly in energy_virtual_meter_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -469,7 +469,7 @@ def worker(shopfloor):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all offline meters") print("Getting common time slot of energy values for all offline meters")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0: if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0:
for meter_id, energy_hourly in energy_offline_meter_hourly.items(): for meter_id, energy_hourly in energy_offline_meter_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -483,7 +483,7 @@ def worker(shopfloor):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all equipments...") print("Getting common time slot of energy values for all equipments...")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_equipment_hourly is not None and len(energy_equipment_hourly) > 0: if energy_equipment_hourly is not None and len(energy_equipment_hourly) > 0:
for equipment_id, energy_hourly in energy_equipment_hourly.items(): for equipment_id, energy_hourly in energy_equipment_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:

View File

@ -458,7 +458,7 @@ def worker(shopfloor):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all virtual meters") print("Getting common time slot of energy values for all virtual meters")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0: if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0:
for meter_id, energy_hourly in energy_virtual_meter_hourly.items(): for meter_id, energy_hourly in energy_virtual_meter_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -472,7 +472,7 @@ def worker(shopfloor):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all offline meters") print("Getting common time slot of energy values for all offline meters")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0: if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0:
for meter_id, energy_hourly in energy_offline_meter_hourly.items(): for meter_id, energy_hourly in energy_offline_meter_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -486,7 +486,7 @@ def worker(shopfloor):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all equipments...") print("Getting common time slot of energy values for all equipments...")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_equipment_hourly is not None and len(energy_equipment_hourly) > 0: if energy_equipment_hourly is not None and len(energy_equipment_hourly) > 0:
for equipment_id, energy_hourly in energy_equipment_hourly.items(): for equipment_id, energy_hourly in energy_equipment_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:

View File

@ -802,7 +802,7 @@ def worker(space):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all virtual meters") print("Getting common time slot of energy values for all virtual meters")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0: if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0:
for meter_id, energy_hourly in energy_virtual_meter_hourly.items(): for meter_id, energy_hourly in energy_virtual_meter_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -816,7 +816,7 @@ def worker(space):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all offline meters") print("Getting common time slot of energy values for all offline meters")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0: if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0:
for meter_id, energy_hourly in energy_offline_meter_hourly.items(): for meter_id, energy_hourly in energy_offline_meter_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -830,7 +830,7 @@ def worker(space):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all combined equipments") print("Getting common time slot of energy values for all combined equipments")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_combined_equipment_hourly is not None and len(energy_combined_equipment_hourly) > 0: if energy_combined_equipment_hourly is not None and len(energy_combined_equipment_hourly) > 0:
for combined_equipment_id, energy_hourly in energy_combined_equipment_hourly.items(): for combined_equipment_id, energy_hourly in energy_combined_equipment_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -844,7 +844,7 @@ def worker(space):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all equipments") print("Getting common time slot of energy values for all equipments")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_equipment_hourly is not None and len(energy_equipment_hourly) > 0: if energy_equipment_hourly is not None and len(energy_equipment_hourly) > 0:
for equipment_id, energy_hourly in energy_equipment_hourly.items(): for equipment_id, energy_hourly in energy_equipment_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -858,7 +858,7 @@ def worker(space):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all shopfloors") print("Getting common time slot of energy values for all shopfloors")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_shopfloor_hourly is not None and len(energy_shopfloor_hourly) > 0: if energy_shopfloor_hourly is not None and len(energy_shopfloor_hourly) > 0:
for shopfloor_id, energy_hourly in energy_shopfloor_hourly.items(): for shopfloor_id, energy_hourly in energy_shopfloor_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -872,7 +872,7 @@ def worker(space):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all stores") print("Getting common time slot of energy values for all stores")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_store_hourly is not None and len(energy_store_hourly) > 0: if energy_store_hourly is not None and len(energy_store_hourly) > 0:
for store_id, energy_hourly in energy_store_hourly.items(): for store_id, energy_hourly in energy_store_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -886,7 +886,7 @@ def worker(space):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all tenants") print("Getting common time slot of energy values for all tenants")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_tenant_hourly is not None and len(energy_tenant_hourly) > 0: if energy_tenant_hourly is not None and len(energy_tenant_hourly) > 0:
for tenant_id, energy_hourly in energy_tenant_hourly.items(): for tenant_id, energy_hourly in energy_tenant_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -900,7 +900,7 @@ def worker(space):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all child spaces") print("Getting common time slot of energy values for all child spaces")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_child_space_hourly is not None and len(energy_child_space_hourly) > 0: if energy_child_space_hourly is not None and len(energy_child_space_hourly) > 0:
for child_space_id, energy_hourly in energy_child_space_hourly.items(): for child_space_id, energy_hourly in energy_child_space_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:

View File

@ -804,7 +804,7 @@ def worker(space):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all virtual meters") print("Getting common time slot of energy values for all virtual meters")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0: if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0:
for meter_id, energy_hourly in energy_virtual_meter_hourly.items(): for meter_id, energy_hourly in energy_virtual_meter_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -818,7 +818,7 @@ def worker(space):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all offline meters") print("Getting common time slot of energy values for all offline meters")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0: if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0:
for meter_id, energy_hourly in energy_offline_meter_hourly.items(): for meter_id, energy_hourly in energy_offline_meter_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -832,7 +832,7 @@ def worker(space):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all combined equipments") print("Getting common time slot of energy values for all combined equipments")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_combined_equipment_hourly is not None and len(energy_combined_equipment_hourly) > 0: if energy_combined_equipment_hourly is not None and len(energy_combined_equipment_hourly) > 0:
for combined_equipment_id, energy_hourly in energy_combined_equipment_hourly.items(): for combined_equipment_id, energy_hourly in energy_combined_equipment_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -846,7 +846,7 @@ def worker(space):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all equipments") print("Getting common time slot of energy values for all equipments")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_equipment_hourly is not None and len(energy_equipment_hourly) > 0: if energy_equipment_hourly is not None and len(energy_equipment_hourly) > 0:
for equipment_id, energy_hourly in energy_equipment_hourly.items(): for equipment_id, energy_hourly in energy_equipment_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -860,7 +860,7 @@ def worker(space):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all shopfloors") print("Getting common time slot of energy values for all shopfloors")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_shopfloor_hourly is not None and len(energy_shopfloor_hourly) > 0: if energy_shopfloor_hourly is not None and len(energy_shopfloor_hourly) > 0:
for shopfloor_id, energy_hourly in energy_shopfloor_hourly.items(): for shopfloor_id, energy_hourly in energy_shopfloor_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -874,7 +874,7 @@ def worker(space):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all stores") print("Getting common time slot of energy values for all stores")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_store_hourly is not None and len(energy_store_hourly) > 0: if energy_store_hourly is not None and len(energy_store_hourly) > 0:
for store_id, energy_hourly in energy_store_hourly.items(): for store_id, energy_hourly in energy_store_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -888,7 +888,7 @@ def worker(space):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all tenants") print("Getting common time slot of energy values for all tenants")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_tenant_hourly is not None and len(energy_tenant_hourly) > 0: if energy_tenant_hourly is not None and len(energy_tenant_hourly) > 0:
for tenant_id, energy_hourly in energy_tenant_hourly.items(): for tenant_id, energy_hourly in energy_tenant_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -902,7 +902,7 @@ def worker(space):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all child spaces") print("Getting common time slot of energy values for all child spaces")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_child_space_hourly is not None and len(energy_child_space_hourly) > 0: if energy_child_space_hourly is not None and len(energy_child_space_hourly) > 0:
for child_space_id, energy_hourly in energy_child_space_hourly.items(): for child_space_id, energy_hourly in energy_child_space_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:

View File

@ -380,7 +380,7 @@ def worker(space):
common_end_datetime_utc = end_datetime_utc common_end_datetime_utc = end_datetime_utc
print("Getting common time slot of energy values for all combined equipments") print("Getting common time slot of energy values for all combined equipments")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_combined_equipment_hourly is not None and len(energy_combined_equipment_hourly) > 0: if energy_combined_equipment_hourly is not None and len(energy_combined_equipment_hourly) > 0:
for combined_equipment_id, energy_hourly in energy_combined_equipment_hourly.items(): for combined_equipment_id, energy_hourly in energy_combined_equipment_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -394,7 +394,7 @@ def worker(space):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all equipments...") print("Getting common time slot of energy values for all equipments...")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_equipment_hourly is not None and len(energy_equipment_hourly) > 0: if energy_equipment_hourly is not None and len(energy_equipment_hourly) > 0:
for equipment_id, energy_hourly in energy_equipment_hourly.items(): for equipment_id, energy_hourly in energy_equipment_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -408,7 +408,7 @@ def worker(space):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all child spaces...") print("Getting common time slot of energy values for all child spaces...")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_child_space_hourly is not None and len(energy_child_space_hourly) > 0: if energy_child_space_hourly is not None and len(energy_child_space_hourly) > 0:
for child_space_id, energy_hourly in energy_child_space_hourly.items(): for child_space_id, energy_hourly in energy_child_space_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:

View File

@ -385,7 +385,7 @@ def worker(store):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all virtual meters") print("Getting common time slot of energy values for all virtual meters")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0: if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0:
for meter_id, energy_hourly in energy_virtual_meter_hourly.items(): for meter_id, energy_hourly in energy_virtual_meter_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -399,7 +399,7 @@ def worker(store):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all offline meters") print("Getting common time slot of energy values for all offline meters")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0: if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0:
for meter_id, energy_hourly in energy_offline_meter_hourly.items(): for meter_id, energy_hourly in energy_offline_meter_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:

View File

@ -388,7 +388,7 @@ def worker(store):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all virtual meters") print("Getting common time slot of energy values for all virtual meters")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0: if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0:
for meter_id, energy_hourly in energy_virtual_meter_hourly.items(): for meter_id, energy_hourly in energy_virtual_meter_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -402,7 +402,7 @@ def worker(store):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all offline meters") print("Getting common time slot of energy values for all offline meters")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0: if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0:
for meter_id, energy_hourly in energy_offline_meter_hourly.items(): for meter_id, energy_hourly in energy_offline_meter_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:

View File

@ -385,7 +385,7 @@ def worker(tenant):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all virtual meters") print("Getting common time slot of energy values for all virtual meters")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0: if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0:
for meter_id, energy_hourly in energy_virtual_meter_hourly.items(): for meter_id, energy_hourly in energy_virtual_meter_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -399,7 +399,7 @@ def worker(tenant):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all offline meters") print("Getting common time slot of energy values for all offline meters")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0: if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0:
for meter_id, energy_hourly in energy_offline_meter_hourly.items(): for meter_id, energy_hourly in energy_offline_meter_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:

View File

@ -388,7 +388,7 @@ def worker(tenant):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all virtual meters") print("Getting common time slot of energy values for all virtual meters")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0: if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0:
for meter_id, energy_hourly in energy_virtual_meter_hourly.items(): for meter_id, energy_hourly in energy_virtual_meter_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -402,7 +402,7 @@ def worker(tenant):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("Getting common time slot of energy values for all offline meters") print("Getting common time slot of energy values for all offline meters")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0: if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0:
for meter_id, energy_hourly in energy_offline_meter_hourly.items(): for meter_id, energy_hourly in energy_offline_meter_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:

View File

@ -348,7 +348,7 @@ def worker(virtual_meter):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("getting common time slot of energy values for all virtual meters...") print("getting common time slot of energy values for all virtual meters...")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0: if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0:
for meter_id, energy_hourly in energy_virtual_meter_hourly.items(): for meter_id, energy_hourly in energy_virtual_meter_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0:
@ -362,7 +362,7 @@ def worker(virtual_meter):
common_end_datetime_utc = max(energy_hourly.keys()) common_end_datetime_utc = max(energy_hourly.keys())
print("getting common time slot of energy values for all offline meters...") print("getting common time slot of energy values for all offline meters...")
if common_start_datetime_utc is not None and common_start_datetime_utc is not None: if common_start_datetime_utc is not None and common_end_datetime_utc is not None:
if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0: if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0:
for meter_id, energy_hourly in energy_offline_meter_hourly.items(): for meter_id, energy_hourly in energy_offline_meter_hourly.items():
if energy_hourly is None or len(energy_hourly) == 0: if energy_hourly is None or len(energy_hourly) == 0: