diff --git a/admin/app/translations.js b/admin/app/translations.js index c37a090e..79c9b8ea 100644 --- a/admin/app/translations.js +++ b/admin/app/translations.js @@ -685,6 +685,7 @@ function config($translateProvider) { INVALID_CHANNEL: 'Invalid Channel', INVALID_COMBINED_EQUIPMENT_ID: 'Invalid Combined Equipment ID', INVALID_COMBINED_EQUIPMENT_NAME: 'Invalid Combined Equipment Name', + INVALID_COMBINED_EQUIPMENT_UUID: 'Invalid Combined Equipment UUID', INVALID_COMBINED_EQUIPMENT_PARAMETER_ID: 'Invalid Combined Equipment Parameter ID', INVALID_COMBINED_EQUIPMENT_PARAMETER_NAME: 'Invalid Combined Equipment Parameter Name', INVALID_COMBINED_EQUIPMENT_PARAMETER_TYPE: 'Invalid Combined Equipment Parameter Type', @@ -722,6 +723,7 @@ function config($translateProvider) { INVALID_EQUATION_IN_EXPRESSION: 'Invalid Equation In Expression', INVALID_EQUIPMENT_ID: 'Invalid Equipment ID', INVALID_EQUIPMENT_NAME: 'Invalid Equipment Name', + INVALID_EQUIPMENT_UUID: 'Invalid Equipment UUID', INVALID_EQUIPMENT_PARAMETER_ID: 'Invalid Equipment Parameter ID', INVALID_EQUIPMENT_PARAMETER_NAME: 'Invalid Equipment Parameter Name', INVALID_EQUIPMENT_PARAMETER_TYPE: 'Invalid Equipment Parameter Type', @@ -794,14 +796,17 @@ function config($translateProvider) { INVALID_SESSION_PLEASE_RE_LOGIN: 'Invalid Session Please Re-Login', INVALID_SHOPFLOOR_ID: 'Invalid Shopfloor ID', INVALID_SHOPFLOOR_NAME: 'Invalid Shopfloor Name', + INVALID_SHOPFLOOR_UUID: 'Invalid Shopfloor UUID', INVALID_SOURCE_NODE_ID: 'Invalid Source Node ID', INVALID_SPACE_ID: 'Invalid Space ID', INVALID_SPACE_NAME: 'Invalid Space Name', + INVALID_SPACE_UUID: 'Invalid Space UUID', INVALID_START_DATE_FORMAT: 'Invalid Start Date Format', INVALID_START_DATETIME: 'Invalid Start Datetime', INVALID_STATUS: 'Invalid Status', INVALID_STORE_ID: 'Invalid Store ID', INVALID_STORE_NAME: 'Invalid Store Name', + INVALID_STORE_UUID: 'Invalid Store UUID', INVALID_STORE_TYPE_DESCRIPTION: 'Invalid Store Type Description', INVALID_STORE_TYPE_ID: 'Invalid Store Type ID', INVALID_STORE_TYPE_NAME: 'Invalid Store Type Name', @@ -815,6 +820,7 @@ function config($translateProvider) { INVALID_TARIFF_TYPE: 'Invalid Tariff Type', INVALID_TENANT_ID: 'Invalid Tenant ID', INVALID_TENANT_NAME: 'Invalid Tenant Name', + INVALID_TENANT_UUID: 'Invalid Tenant UUID', INVALID_TENANT_TYPE_DESCRIPTION: 'Invalid Tenant Type Description', INVALID_TENANT_TYPE_ID: 'Invalid Tenant Type ID', INVALID_TENANT_TYPE_NAME: 'Invalid Tenant Type Name', @@ -1678,6 +1684,7 @@ function config($translateProvider) { INVALID_CHANNEL: 'Invalid Channel', INVALID_COMBINED_EQUIPMENT_ID: 'Invalid Combined Equipment ID', INVALID_COMBINED_EQUIPMENT_NAME: 'Invalid Combined Equipment Name', + INVALID_COMBINED_EQUIPMENT_UUID: 'Invalid Combined Equipment UUID', INVALID_COMBINED_EQUIPMENT_PARAMETER_ID: 'Invalid Combined Equipment Parameter ID', INVALID_COMBINED_EQUIPMENT_PARAMETER_NAME: 'Invalid Combined Equipment Parameter Name', INVALID_COMBINED_EQUIPMENT_PARAMETER_TYPE: 'Invalid Combined Equipment Parameter Type', @@ -1715,6 +1722,7 @@ function config($translateProvider) { INVALID_EQUATION_IN_EXPRESSION: 'Invalid Equation In Expression', INVALID_EQUIPMENT_ID: 'Invalid Equipment ID', INVALID_EQUIPMENT_NAME: 'Invalid Equipment Name', + INVALID_EQUIPMENT_UUID: 'Invalid Equipment UUID', INVALID_EQUIPMENT_PARAMETER_ID: 'Invalid Equipment Parameter ID', INVALID_EQUIPMENT_PARAMETER_NAME: 'Invalid Equipment Parameter Name', INVALID_EQUIPMENT_PARAMETER_TYPE: 'Invalid Equipment Parameter Type', @@ -1787,14 +1795,17 @@ function config($translateProvider) { INVALID_SESSION_PLEASE_RE_LOGIN: 'Invalid Session Please Re-Login', INVALID_SHOPFLOOR_ID: 'Invalid Shopfloor ID', INVALID_SHOPFLOOR_NAME: 'Invalid Shopfloor Name', + INVALID_SHOPFLOOR_UUID: 'Invalid Shopfloor UUID', INVALID_SOURCE_NODE_ID: 'Invalid Source Node ID', INVALID_SPACE_ID: 'Invalid Space ID', INVALID_SPACE_NAME: 'Invalid Space Name', + INVALID_SPACE_UUID: 'Invalid Space UUID', INVALID_START_DATE_FORMAT: 'Invalid Start Date Format', INVALID_START_DATETIME: 'Invalid Start Datetime', INVALID_STATUS: 'Invalid Status', INVALID_STORE_ID: 'Invalid Store ID', INVALID_STORE_NAME: 'Invalid Store Name', + INVALID_STORE_UUID: 'Invalid Store UUID', INVALID_STORE_TYPE_DESCRIPTION: 'Invalid Store Type Description', INVALID_STORE_TYPE_ID: 'Invalid Store Type ID', INVALID_STORE_TYPE_NAME: 'Invalid Store Type Name', @@ -1808,6 +1819,7 @@ function config($translateProvider) { INVALID_TARIFF_TYPE: 'Invalid Tariff Type', INVALID_TENANT_ID: 'Invalid Tenant ID', INVALID_TENANT_NAME: 'Invalid Tenant Name', + INVALID_TENANT_UUID: 'Invalid Tenant UUID', INVALID_TENANT_TYPE_DESCRIPTION: 'Invalid Tenant Type Description', INVALID_TENANT_TYPE_ID: 'Invalid Tenant Type ID', INVALID_TENANT_TYPE_NAME: 'Invalid Tenant Type Name', @@ -2669,6 +2681,7 @@ function config($translateProvider) { INVALID_CHANNEL: 'Invalid Channel', INVALID_COMBINED_EQUIPMENT_ID: 'Invalid Combined Equipment ID', INVALID_COMBINED_EQUIPMENT_NAME: 'Invalid Combined Equipment Name', + INVALID_COMBINED_EQUIPMENT_UUID: 'Invalid Combined Equipment UUID', INVALID_COMBINED_EQUIPMENT_PARAMETER_ID: 'Invalid Combined Equipment Parameter ID', INVALID_COMBINED_EQUIPMENT_PARAMETER_NAME: 'Invalid Combined Equipment Parameter Name', INVALID_COMBINED_EQUIPMENT_PARAMETER_TYPE: 'Invalid Combined Equipment Parameter Type', @@ -2706,6 +2719,7 @@ function config($translateProvider) { INVALID_EQUATION_IN_EXPRESSION: 'Invalid Equation In Expression', INVALID_EQUIPMENT_ID: 'Invalid Equipment ID', INVALID_EQUIPMENT_NAME: 'Invalid Equipment Name', + INVALID_EQUIPMENT_UUID: 'Invalid Equipment UUID', INVALID_EQUIPMENT_PARAMETER_ID: 'Invalid Equipment Parameter ID', INVALID_EQUIPMENT_PARAMETER_NAME: 'Invalid Equipment Parameter Name', INVALID_EQUIPMENT_PARAMETER_TYPE: 'Invalid Equipment Parameter Type', @@ -2778,14 +2792,17 @@ function config($translateProvider) { INVALID_SESSION_PLEASE_RE_LOGIN: 'Invalid Session Please Re-Login', INVALID_SHOPFLOOR_ID: 'Invalid Shopfloor ID', INVALID_SHOPFLOOR_NAME: 'Invalid Shopfloor Name', + INVALID_SHOPFLOOR_UUID: 'Invalid Shopfloor UUID', INVALID_SOURCE_NODE_ID: 'Invalid Source Node ID', INVALID_SPACE_ID: 'Invalid Space ID', INVALID_SPACE_NAME: 'Invalid Space Name', + INVALID_SPACE_UUID: 'Invalid Space UUID', INVALID_START_DATE_FORMAT: 'Invalid Start Date Format', INVALID_START_DATETIME: 'Invalid Start Datetime', INVALID_STATUS: 'Invalid Status', INVALID_STORE_ID: 'Invalid Store ID', INVALID_STORE_NAME: 'Invalid Store Name', + INVALID_STORE_UUID: 'Invalid Store UUID', INVALID_STORE_TYPE_DESCRIPTION: 'Invalid Store Type Description', INVALID_STORE_TYPE_ID: 'Invalid Store Type ID', INVALID_STORE_TYPE_NAME: 'Invalid Store Type Name', @@ -2799,6 +2816,7 @@ function config($translateProvider) { INVALID_TARIFF_TYPE: 'Invalid Tariff Type', INVALID_TENANT_ID: 'Invalid Tenant ID', INVALID_TENANT_NAME: 'Invalid Tenant Name', + INVALID_TENANT_UUID: 'Invalid Tenant UUID', INVALID_TENANT_TYPE_DESCRIPTION: 'Invalid Tenant Type Description', INVALID_TENANT_TYPE_ID: 'Invalid Tenant Type ID', INVALID_TENANT_TYPE_NAME: 'Invalid Tenant Type Name', diff --git a/myems-api/README.md b/myems-api/README.md index 5272d28e..002774d5 100644 --- a/myems-api/README.md +++ b/myems-api/README.md @@ -2215,38 +2215,65 @@ curl -i -H "User-UUID: 793f1bb4-6e25-4242-8cdc-2f662b25484f" -H "Token: GET-TOKE curl -i -X GET {{base_url}}/reports/combinedequipmentbatch?spaceid=1&reportingperiodstartdatetime=2021-05-01T00:00:00&reportingperiodenddatetime=2021-05-20T11:41:09 ``` * GET Combined Equipment Cost Report + +(parameter combinedequipmentid can be replaced with combinedequipmentuuid) + ```bash curl -i -X GET {{base_url}}/reports/combinedequipmentcost?combinedequipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Combined Equipment Efficiency Report + +(parameter combinedequipmentid can be replaced with combinedequipmentuuid) + ```bash curl -i -X GET {{base_url}}/reports/combinedequipmentefficiency?combinedequipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Combined Equipment Energy Category Report + +(parameter combinedequipmentid can be replaced with combinedequipmentuuid) + ```bash curl -i -X GET {{base_url}}/reports/combinedequipmentenergycategory?combinedequipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Combined Equipment Energy Item Report + +(parameter combinedequipmentid can be replaced with combinedequipmentuuid) + ```bash curl -i -X GET {{base_url}}/reports/combinedequipmentenergyitem?combinedequipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Combined Equipment Income Report + +(parameter combinedequipmentid can be replaced with combinedequipmentuuid) + ```bash curl -i -X GET {{base_url}}/reports/combinedequipmentincome?combinedequipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Combined Equipment Load Report + +(parameter combinedequipmentid can be replaced with combinedequipmentuuid) + ```bash curl -i -X GET {{base_url}}/reports/combinedequipmentload?combinedequipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Combined Equipment Output Report + +(parameter combinedequipmentid can be replaced with combinedequipmentuuid) + ```bash curl -i -X GET {{base_url}}/reports/combinedequipmentoutput?combinedequipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Combined Equipment Saving Report + +(parameter combinedequipmentid can be replaced with combinedequipmentuuid) + ```bash curl -i -X GET {{base_url}}/reports/combinedequipmentsaving?combinedequipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Combined Equipment Statistics Report + +(parameter combinedequipmentid can be replaced with combinedequipmentuuid) + ```bash curl -i -X GET {{base_url}}/reports/equipmentstatistics?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` @@ -2267,38 +2294,65 @@ curl -i -X GET {{base_url}}/reports/energyflowdiagram?energyflowdiagramid=1&repo curl -i -X GET {{base_url}}/reports/equipmentbatch?spaceid=1&reportingperiodstartdatetime=2021-05-01T00:00:00&reportingperiodenddatetime=2021-05-20T11:41:09 ``` * GET Equipment Cost Report + +(parameter equipmentid can be replaced with equipmentuuid) + ```bash curl -i -X GET {{base_url}}/reports/equipmentcost?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Equipment Efficiency Report + +(parameter equipmentid can be replaced with equipmentuuid) + ```bash curl -i -X GET {{base_url}}/reports/equipmentefficiency?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Equipment Energy Category Report + +(parameter equipmentid can be replaced with equipmentuuid) + ```bash curl -i -X GET {{base_url}}/reports/equipmentenergycategory?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Equipment Energy Item Report + +(parameter equipmentid can be replaced with equipmentuuid) + ```bash curl -i -X GET {{base_url}}/reports/equipmentenergyitem?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Equipment Income Report + +(parameter equipmentid can be replaced with equipmentuuid) + ```bash curl -i -X GET {{base_url}}/reports/equipmentincome?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Equipment Load Report + +(parameter equipmentid can be replaced with equipmentuuid) + ```bash curl -i -X GET {{base_url}}/reports/equipmentload?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Equipment Output Report + +(parameter equipmentid can be replaced with equipmentuuid) + ```bash curl -i -X GET {{base_url}}/reports/equipmentoutput?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Equipment Saving Report + +(parameter equipmentid can be replaced with equipmentuuid) + ```bash curl -i -X GET {{base_url}}/reports/equipmentsaving?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Equipment Statistics Report + +(parameter equipmentid can be replaced with equipmentuuid) + ```bash curl -i -X GET {{base_url}}/reports/equipmentstatistics?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` @@ -2308,35 +2362,35 @@ curl -i -X GET {{base_url}}/reports/meterbatch?spaceid=1&reportingperiodstartdat ``` * GET Meter Cost Report -(use meterid or meteruuid to get meter report) +(parameter meterid can be replaced with meteruuid) ```bash curl -i -X GET {{base_url}}/reports/metercost?meterid=6&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Meter Energy Report -(use meterid or meteruuid to get meter report) +(parameter meterid can be replaced with meteruuid) ```bash curl -i -X GET {{base_url}}/reports/meterenergy?meterid=6&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Meter Realtime Report -(use meterid or meteruuid to get meter report) +(parameter meterid can be replaced with meteruuid) ```bash curl -i -X GET {{base_url}}/reports/meterrealtime?meterid=1 ``` * GET Meter Submeters Balance Report -(use meterid or meteruuid to get meter report) +(parameter meterid can be replaced with meteruuid) ```bash curl -i -X GET {{base_url}}/reports/metersubmetersbalance?meterid=1&periodtype=daily&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Meter Trend Report -(use meterid or meteruuid to get meter report) +(parameter meterid can be replaced with meteruuid) ```bash curl -i -X GET {{base_url}}/reports/metertrend?meterid=6&reportingperiodstartdatetime=2020-09-10T00:00:00&reportingperiodenddatetime=2020-09-11T00:00:00 @@ -2357,63 +2411,108 @@ curl -i -X GET {{base_url}}/reports/offlinemetercost?offlinemeterid=1&periodtype ```bash curl -i -X GET {{base_url}}/reports/shopfloorbatch?spaceid=1&reportingperiodstartdatetime=2021-05-01T00:00:00&reportingperiodenddatetime=2021-05-20T11:41:09 ``` -* GET Shopfloor Cost Report +* GET Shopfloor Cost Report + +(parameter shopfloorid can be replaced with shopflooruuid) + ```bash curl -i -X GET {{base_url}}/reports/shopfloorcost?shopfloorid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Shopfloor Energy Category Report + +(parameter shopfloorid can be replaced with shopflooruuid) + ```bash curl -i -X GET {{base_url}}/reports/shopfloorenergycategory?shopfloorid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Shopfloor Energy Item Report + +(parameter shopfloorid can be replaced with shopflooruuid) + ```bash curl -i -X GET {{base_url}}/reports/shopfloorenergyitem?shopfloorid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Shopfloor Load Report + +(parameter shopfloorid can be replaced with shopflooruuid) + ```bash curl -i -X GET {{base_url}}/reports/shopfloorload?shopfloorid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Shopfloor Saving Report + +(parameter shopfloorid can be replaced with shopflooruuid) + ```bash curl -i -X GET {{base_url}}/reports/shopfloorsaving?shopfloorid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Shopfloor Statistics Report + +(parameter shopfloorid can be replaced with shopflooruuid) + ```bash curl -i -X GET {{base_url}}/reports/shopfloorstatistics?shopfloorid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Space Cost Report + +(parameter spaceid can be replaced with spaceuuid) + ```bash curl -i -X GET {{base_url}}/reports/spacecost?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Space Efficiency Report + +(parameter spaceid can be replaced with spaceuuid) + ```bash curl -i -X GET {{base_url}}/reports/spaceefficiency?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Space Energy Category Report + +(parameter spaceid can be replaced with spaceuuid) + ```bash curl -i -X GET {{base_url}}/reports/spaceenergycategory?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Space Energy Item Report + +(parameter spaceid can be replaced with spaceuuid) + ```bash curl -i -X GET {{base_url}}/reports/spaceenergyitem?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Space Income Report + +(parameter spaceid can be replaced with spaceuuid) + ```bash curl -i -X GET {{base_url}}/reports/spaceincome?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Space Load Report + +(parameter spaceid can be replaced with spaceuuid) + ```bash curl -i -X GET {{base_url}}/reports/spaceload?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Space Output Report + +(parameter spaceid can be replaced with spaceuuid) + ```bash curl -i -X GET {{base_url}}/reports/spaceoutput?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Space Saving Report + +(parameter spaceid can be replaced with spaceuuid) + ```bash curl -i -X GET {{base_url}}/reports/spacesaving?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Space Statistics Report + +(parameter spaceid can be replaced with spaceuuid) + ```bash curl -i -X GET {{base_url}}/reports/spacestatistics?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` @@ -2422,26 +2521,44 @@ curl -i -X GET {{base_url}}/reports/spacestatistics?spaceid=1&periodtype=daily&b curl -i -X GET {{base_url}}/reports/storebatch?spaceid=1&reportingperiodstartdatetime=2021-05-01T00:00:00&reportingperiodenddatetime=2021-05-20T11:41:09 ``` * GET Store Cost Report + +(parameter storeid can be replaced with storeuuid) + ```bash curl -i -X GET {{base_url}}/reports/storetcost?storeid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Store Energy Category Report + +(parameter storeid can be replaced with storeuuid) + ```bash curl -i -X GET {{base_url}}/reports/storeenergycategory?storeid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Store Energy Item Report + +(parameter storeid can be replaced with storeuuid) + ```bash curl -i -X GET {{base_url}}/reports/storeenergyitem?storeid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Store Load Report + +(parameter storeid can be replaced with storeuuid) + ```bash curl -i -X GET {{base_url}}/reports/storeload?storeid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Store Saving Report + +(parameter storeid can be replaced with storeuuid) + ```bash curl -i -X GET {{base_url}}/reports/storesaving?storeid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Store Statistics Report + +(parameter storeid can be replaced with storeuuid) + ```bash curl -i -X GET {{base_url}}/reports/storestatistics?storeid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` @@ -2450,30 +2567,51 @@ curl -i -X GET {{base_url}}/reports/storestatistics?storeid=1&periodtype=daily&b curl -i -X GET {{base_url}}/reports/tenantbatch?spaceid=1&reportingperiodstartdatetime=2021-05-01T00:00:00&reportingperiodenddatetime=2021-05-20T11:41:09 ``` * GET Tenant Bill Report + +(parameter storeid can be replaced with storeuuid) + ```bash curl -i -X GET {{base_url}}/reports/tenantbill?tenantid=1&reportingperiodstartdatetime=2020-10-01T00:00:00&reportingperiodenddatetime=2020-11-01T00:00:00 ``` * GET Tenant Cost Report + +(parameter storeid can be replaced with storeuuid) + ```bash curl -i -X GET {{base_url}}/reports/tenantcost?tenantid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Tenant Energy Category Report + +(parameter storeid can be replaced with storeuuid) + ```bash curl -i -X GET {{base_url}}/reports/tenantenergycategory?tenantid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Tenant Energy Item Report + +(parameter storeid can be replaced with storeuuid) + ```bash curl -i -X GET {{base_url}}/reports/tenantenergyitem?tenantid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Tenant Load Report + +(parameter storeid can be replaced with storeuuid) + ```bash curl -i -X GET {{base_url}}/reports/tenantload?tenantid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Tenant Saving Report + +(parameter storeid can be replaced with storeuuid) + ```bash curl -i -X GET {{base_url}}/reports/tenantsaving?tenantid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Tenant Statistics Report + +(parameter storeid can be replaced with storeuuid) + ```bash curl -i -X GET {{base_url}}/reports/tenantstatistics?tenantid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` diff --git a/myems-api/reports/combinedequipmentcost.py b/myems-api/reports/combinedequipmentcost.py index b17adfda..15ae019c 100644 --- a/myems-api/reports/combinedequipmentcost.py +++ b/myems-api/reports/combinedequipmentcost.py @@ -60,9 +60,8 @@ class Reporting: description='API.INVALID_COMBINED_EQUIPMENT_ID') if combined_equipment_uuid is not None: - combined_equipment_uuid = str.strip(combined_equipment_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(combined_equipment_uuid) + match = regex.match(str.strip(combined_equipment_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -158,6 +157,7 @@ class Reporting: " FROM tbl_combined_equipments " " WHERE uuid = %s ", (combined_equipment_uuid,)) row_combined_equipment = cursor_system.fetchone() + if row_combined_equipment is None: if cursor_system: cursor_system.close() @@ -582,9 +582,8 @@ class Reporting: result['reporting_period']['total'] += reporting[energy_category_id]['subtotal'] result['reporting_period']['total_increment_rate'] = \ - (result['reporting_period']['total'] - result['base_period']['total']) / \ - result['base_period']['total'] \ - if result['base_period']['total'] > Decimal(0.0) else None + (result['reporting_period']['total'] - result['base_period']['total']) / result['base_period']['total'] \ + if result['base_period']['total'] > Decimal(0.0) else None result['parameters'] = { "names": parameters_data['names'], diff --git a/myems-api/reports/combinedequipmentefficiency.py b/myems-api/reports/combinedequipmentefficiency.py index 2ac52c8c..54f68c36 100644 --- a/myems-api/reports/combinedequipmentefficiency.py +++ b/myems-api/reports/combinedequipmentefficiency.py @@ -62,9 +62,8 @@ class Reporting: description='API.INVALID_COMBINED_EQUIPMENT_ID') if combined_equipment_uuid is not None: - combined_equipment_uuid = str.strip(combined_equipment_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(combined_equipment_uuid) + match = regex.match(str.strip(combined_equipment_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -166,6 +165,7 @@ class Reporting: " FROM tbl_combined_equipments " " WHERE uuid = %s ", (combined_equipment_uuid,)) row_combined_equipment = cursor_system.fetchone() + if row_combined_equipment is None: if cursor_system: cursor_system.close() @@ -850,13 +850,13 @@ class Reporting: result['reporting_period_efficiency']['increment_rates_num'].append( (reporting[fraction['id']]['numerator_cumulation'] - base[fraction['id']]['numerator_cumulation']) / - base[fraction['id']]['numerator_cumulation'] if base[fraction['id']]['numerator_cumulation'] > - Decimal(0.0) else None) + base[fraction['id']]['numerator_cumulation'] + if base[fraction['id']]['numerator_cumulation'] > Decimal(0.0) else None) result['reporting_period_efficiency']['increment_rates_den'].append( (reporting[fraction['id']]['denominator_cumulation'] - base[fraction['id']]['denominator_cumulation']) / - base[fraction['id']]['denominator_cumulation'] if base[fraction['id']]['denominator_cumulation'] > - Decimal(0.0) else None) + base[fraction['id']]['denominator_cumulation'] + if base[fraction['id']]['denominator_cumulation'] > Decimal(0.0) else None) result['parameters'] = { "names": parameters_data['names'], diff --git a/myems-api/reports/combinedequipmentenergycategory.py b/myems-api/reports/combinedequipmentenergycategory.py index 450d2a0f..613b61f0 100644 --- a/myems-api/reports/combinedequipmentenergycategory.py +++ b/myems-api/reports/combinedequipmentenergycategory.py @@ -60,9 +60,8 @@ class Reporting: description='API.INVALID_COMBINED_EQUIPMENT_ID') if combined_equipment_uuid is not None: - combined_equipment_uuid = str.strip(combined_equipment_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(combined_equipment_uuid) + match = regex.match(str.strip(combined_equipment_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -158,6 +157,7 @@ class Reporting: " FROM tbl_combined_equipments " " WHERE uuid = %s ", (combined_equipment_uuid,)) row_combined_equipment = cursor_system.fetchone() + if row_combined_equipment is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/combinedequipmentenergyitem.py b/myems-api/reports/combinedequipmentenergyitem.py index 13fa2933..039dd7ac 100644 --- a/myems-api/reports/combinedequipmentenergyitem.py +++ b/myems-api/reports/combinedequipmentenergyitem.py @@ -60,9 +60,8 @@ class Reporting: description='API.INVALID_COMBINED_EQUIPMENT_ID') if combined_equipment_uuid is not None: - combined_equipment_uuid = str.strip(combined_equipment_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(combined_equipment_uuid) + match = regex.match(str.strip(combined_equipment_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -158,6 +157,7 @@ class Reporting: " FROM tbl_combined_equipments " " WHERE uuid = %s ", (combined_equipment_uuid,)) row_combined_equipment = cursor_system.fetchone() + if row_combined_equipment is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/combinedequipmentincome.py b/myems-api/reports/combinedequipmentincome.py index e5a8c8aa..0e6c302a 100644 --- a/myems-api/reports/combinedequipmentincome.py +++ b/myems-api/reports/combinedequipmentincome.py @@ -60,9 +60,8 @@ class Reporting: description='API.INVALID_COMBINED_EQUIPMENT_ID') if combined_equipment_uuid is not None: - combined_equipment_uuid = str.strip(combined_equipment_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(combined_equipment_uuid) + match = regex.match(str.strip(combined_equipment_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -158,6 +157,7 @@ class Reporting: " FROM tbl_combined_equipments " " WHERE uuid = %s ", (combined_equipment_uuid,)) row_combined_equipment = cursor_system.fetchone() + if row_combined_equipment is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/combinedequipmentload.py b/myems-api/reports/combinedequipmentload.py index 4c1292b5..71932213 100644 --- a/myems-api/reports/combinedequipmentload.py +++ b/myems-api/reports/combinedequipmentload.py @@ -60,9 +60,8 @@ class Reporting: description='API.INVALID_COMBINED_EQUIPMENT_ID') if combined_equipment_uuid is not None: - combined_equipment_uuid = str.strip(combined_equipment_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(combined_equipment_uuid) + match = regex.match(str.strip(combined_equipment_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -158,6 +157,7 @@ class Reporting: " FROM tbl_combined_equipments " " WHERE uuid = %s ", (combined_equipment_uuid,)) row_combined_equipment = cursor_system.fetchone() + if row_combined_equipment is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/combinedequipmentoutput.py b/myems-api/reports/combinedequipmentoutput.py index 81153a2a..5a899e49 100644 --- a/myems-api/reports/combinedequipmentoutput.py +++ b/myems-api/reports/combinedequipmentoutput.py @@ -60,9 +60,8 @@ class Reporting: description='API.INVALID_COMBINED_EQUIPMENT_ID') if combined_equipment_uuid is not None: - combined_equipment_uuid = str.strip(combined_equipment_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(combined_equipment_uuid) + match = regex.match(str.strip(combined_equipment_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -158,6 +157,7 @@ class Reporting: " FROM tbl_combined_equipments " " WHERE uuid = %s ", (combined_equipment_uuid,)) row_combined_equipment = cursor_system.fetchone() + if row_combined_equipment is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/combinedequipmentsaving.py b/myems-api/reports/combinedequipmentsaving.py index 8d4284dc..347aa2d1 100644 --- a/myems-api/reports/combinedequipmentsaving.py +++ b/myems-api/reports/combinedequipmentsaving.py @@ -60,9 +60,8 @@ class Reporting: description='API.INVALID_COMBINED_EQUIPMENT_ID') if combined_equipment_uuid is not None: - combined_equipment_uuid = str.strip(combined_equipment_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(combined_equipment_uuid) + match = regex.match(str.strip(combined_equipment_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -161,6 +160,7 @@ class Reporting: " FROM tbl_combined_equipments " " WHERE uuid = %s ", (combined_equipment_uuid,)) row_combined_equipment = cursor_system.fetchone() + if row_combined_equipment is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/combinedequipmentstatistics.py b/myems-api/reports/combinedequipmentstatistics.py index e801883b..1d266c70 100644 --- a/myems-api/reports/combinedequipmentstatistics.py +++ b/myems-api/reports/combinedequipmentstatistics.py @@ -60,9 +60,8 @@ class Reporting: description='API.INVALID_COMBINED_EQUIPMENT_ID') if combined_equipment_uuid is not None: - combined_equipment_uuid = str.strip(combined_equipment_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(combined_equipment_uuid) + match = regex.match(str.strip(combined_equipment_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -158,6 +157,7 @@ class Reporting: " FROM tbl_combined_equipments " " WHERE uuid = %s ", (combined_equipment_uuid,)) row_combined_equipment = cursor_system.fetchone() + if row_combined_equipment is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/equipmentcost.py b/myems-api/reports/equipmentcost.py index 6d215cc5..864823d9 100644 --- a/myems-api/reports/equipmentcost.py +++ b/myems-api/reports/equipmentcost.py @@ -58,9 +58,8 @@ class Reporting: description='API.INVALID_EQUIPMENT_ID') if equipment_uuid is not None: - equipment_uuid = str.strip(equipment_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(equipment_uuid) + match = regex.match(str.strip(equipment_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -156,6 +155,7 @@ class Reporting: " FROM tbl_equipments " " WHERE uuid = %s ", (equipment_uuid,)) row_equipment = cursor_system.fetchone() + if row_equipment is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/equipmentefficiency.py b/myems-api/reports/equipmentefficiency.py index c015ca24..8daad892 100644 --- a/myems-api/reports/equipmentefficiency.py +++ b/myems-api/reports/equipmentefficiency.py @@ -58,9 +58,8 @@ class Reporting: description='API.INVALID_EQUIPMENT_ID') if equipment_uuid is not None: - equipment_uuid = str.strip(equipment_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(equipment_uuid) + match = regex.match(str.strip(equipment_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -156,6 +155,7 @@ class Reporting: " FROM tbl_equipments " " WHERE uuid = %s ", (equipment_uuid,)) row_equipment = cursor_system.fetchone() + if row_equipment is None: if cursor_system: cursor_system.close() @@ -722,13 +722,12 @@ class Reporting: base[fraction['id']]['cumulation'] if base[fraction['id']]['cumulation'] > Decimal(0.0) else None) result['reporting_period_efficiency']['increment_rates_num'].append( (reporting[fraction['id']]['numerator_cumulation'] - base[fraction['id']]['numerator_cumulation']) / - base[fraction['id']]['numerator_cumulation'] if base[fraction['id']]['numerator_cumulation'] > - Decimal(0.0) else None) + base[fraction['id']]['numerator_cumulation'] + if base[fraction['id']]['numerator_cumulation'] > Decimal(0.0) else None) result['reporting_period_efficiency']['increment_rates_den'].append( (reporting[fraction['id']]['denominator_cumulation'] - - base[fraction['id']]['denominator_cumulation']) / - base[fraction['id']]['denominator_cumulation'] if base[fraction['id']]['denominator_cumulation'] > - Decimal(0.0) else None) + base[fraction['id']]['denominator_cumulation']) / base[fraction['id']]['denominator_cumulation'] + if base[fraction['id']]['denominator_cumulation'] > Decimal(0.0) else None) result['parameters'] = { "names": parameters_data['names'], diff --git a/myems-api/reports/equipmentenergycategory.py b/myems-api/reports/equipmentenergycategory.py index adfbab0f..01272369 100644 --- a/myems-api/reports/equipmentenergycategory.py +++ b/myems-api/reports/equipmentenergycategory.py @@ -58,9 +58,8 @@ class Reporting: description='API.INVALID_EQUIPMENT_ID') if equipment_uuid is not None: - equipment_uuid = str.strip(equipment_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(equipment_uuid) + match = regex.match(str.strip(equipment_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -156,6 +155,7 @@ class Reporting: " FROM tbl_equipments " " WHERE uuid = %s ", (equipment_uuid,)) row_equipment = cursor_system.fetchone() + if row_equipment is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/equipmentenergyitem.py b/myems-api/reports/equipmentenergyitem.py index fe21f8c7..7f9b2220 100644 --- a/myems-api/reports/equipmentenergyitem.py +++ b/myems-api/reports/equipmentenergyitem.py @@ -58,9 +58,8 @@ class Reporting: description='API.INVALID_EQUIPMENT_ID') if equipment_uuid is not None: - equipment_uuid = str.strip(equipment_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(equipment_uuid) + match = regex.match(str.strip(equipment_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -156,6 +155,7 @@ class Reporting: " FROM tbl_equipments " " WHERE uuid = %s ", (equipment_uuid,)) row_equipment = cursor_system.fetchone() + if row_equipment is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/equipmentincome.py b/myems-api/reports/equipmentincome.py index 85f6bb5e..6b526c16 100644 --- a/myems-api/reports/equipmentincome.py +++ b/myems-api/reports/equipmentincome.py @@ -58,9 +58,8 @@ class Reporting: description='API.INVALID_EQUIPMENT_ID') if equipment_uuid is not None: - equipment_uuid = str.strip(equipment_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(equipment_uuid) + match = regex.match(str.strip(equipment_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -156,6 +155,7 @@ class Reporting: " FROM tbl_equipments " " WHERE uuid = %s ", (equipment_uuid,)) row_equipment = cursor_system.fetchone() + if row_equipment is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/equipmentload.py b/myems-api/reports/equipmentload.py index f44ee9dc..2b0a3545 100644 --- a/myems-api/reports/equipmentload.py +++ b/myems-api/reports/equipmentload.py @@ -58,9 +58,8 @@ class Reporting: description='API.INVALID_EQUIPMENT_ID') if equipment_uuid is not None: - equipment_uuid = str.strip(equipment_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(equipment_uuid) + match = regex.match(str.strip(equipment_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -156,6 +155,7 @@ class Reporting: " FROM tbl_equipments " " WHERE uuid = %s ", (equipment_uuid,)) row_equipment = cursor_system.fetchone() + if row_equipment is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/equipmentoutput.py b/myems-api/reports/equipmentoutput.py index dee84500..cc982553 100644 --- a/myems-api/reports/equipmentoutput.py +++ b/myems-api/reports/equipmentoutput.py @@ -58,9 +58,8 @@ class Reporting: description='API.INVALID_EQUIPMENT_ID') if equipment_uuid is not None: - equipment_uuid = str.strip(equipment_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(equipment_uuid) + match = regex.match(str.strip(equipment_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -156,6 +155,7 @@ class Reporting: " FROM tbl_equipments " " WHERE uuid = %s ", (equipment_uuid,)) row_equipment = cursor_system.fetchone() + if row_equipment is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/equipmentsaving.py b/myems-api/reports/equipmentsaving.py index b82cf292..38252890 100644 --- a/myems-api/reports/equipmentsaving.py +++ b/myems-api/reports/equipmentsaving.py @@ -58,9 +58,8 @@ class Reporting: description='API.INVALID_EQUIPMENT_ID') if equipment_uuid is not None: - equipment_uuid = str.strip(equipment_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(equipment_uuid) + match = regex.match(str.strip(equipment_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -159,6 +158,7 @@ class Reporting: " FROM tbl_equipments " " WHERE uuid = %s ", (equipment_uuid,)) row_equipment = cursor_system.fetchone() + if row_equipment is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/equipmentstatistics.py b/myems-api/reports/equipmentstatistics.py index 278e7c68..944075ec 100644 --- a/myems-api/reports/equipmentstatistics.py +++ b/myems-api/reports/equipmentstatistics.py @@ -58,9 +58,8 @@ class Reporting: description='API.INVALID_EQUIPMENT_ID') if equipment_uuid is not None: - equipment_uuid = str.strip(equipment_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(equipment_uuid) + match = regex.match(str.strip(equipment_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -156,6 +155,7 @@ class Reporting: " FROM tbl_equipments " " WHERE uuid = %s ", (equipment_uuid,)) row_equipment = cursor_system.fetchone() + if row_equipment is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/metercost.py b/myems-api/reports/metercost.py index 3800d5a3..3923391b 100644 --- a/myems-api/reports/metercost.py +++ b/myems-api/reports/metercost.py @@ -55,9 +55,8 @@ class Reporting: raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', description='API.INVALID_METER_ID') if meter_uuid is not None: - meter_uuid = str.strip(meter_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(meter_uuid) + match = regex.match(str.strip(meter_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', description='API.INVALID_METER_UUID') @@ -157,6 +156,7 @@ class Reporting: " FROM tbl_meters m, tbl_energy_categories ec " " WHERE m.uuid = %s AND m.energy_category_id = ec.id ", (meter_uuid,)) row_meter = cursor_system.fetchone() + if row_meter is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/meterenergy.py b/myems-api/reports/meterenergy.py index 4f23ed50..31afdbec 100644 --- a/myems-api/reports/meterenergy.py +++ b/myems-api/reports/meterenergy.py @@ -54,9 +54,8 @@ class Reporting: raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', description='API.INVALID_METER_ID') if meter_uuid is not None: - meter_uuid = str.strip(meter_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(meter_uuid) + match = regex.match(str.strip(meter_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', description='API.INVALID_METER_UUID') @@ -154,6 +153,7 @@ class Reporting: " FROM tbl_meters m, tbl_energy_categories ec " " WHERE m.uuid = %s AND m.energy_category_id = ec.id ", (meter_uuid,)) row_meter = cursor_system.fetchone() + if row_meter is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/meterrealtime.py b/myems-api/reports/meterrealtime.py index 98fc97c0..1c433609 100644 --- a/myems-api/reports/meterrealtime.py +++ b/myems-api/reports/meterrealtime.py @@ -43,9 +43,8 @@ class Reporting: raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', description='API.INVALID_METER_ID') if meter_uuid is not None: - meter_uuid = str.strip(meter_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(meter_uuid) + match = regex.match(str.strip(meter_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', description='API.INVALID_METER_UUID') @@ -76,6 +75,7 @@ class Reporting: " FROM tbl_meters m, tbl_energy_categories ec " " WHERE m.uuid = %s AND m.energy_category_id = ec.id ", (meter_uuid,)) row_meter = cursor_system.fetchone() + if row_meter is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/metersubmetersbalance.py b/myems-api/reports/metersubmetersbalance.py index 2cf3e80d..b332c608 100644 --- a/myems-api/reports/metersubmetersbalance.py +++ b/myems-api/reports/metersubmetersbalance.py @@ -1,5 +1,4 @@ import re - import falcon import simplejson as json import mysql.connector @@ -52,9 +51,8 @@ class Reporting: raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', description='API.INVALID_METER_ID') if meter_uuid is not None: - meter_uuid = str.strip(meter_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(meter_uuid) + match = regex.match(str.strip(meter_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', description='API.INVALID_METER_UUID') @@ -122,6 +120,7 @@ class Reporting: " FROM tbl_meters m, tbl_energy_categories ec " " WHERE m.uuid = %s AND m.energy_category_id = ec.id ", (meter_uuid,)) row_meter = cursor_system.fetchone() + if row_meter is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/metertrend.py b/myems-api/reports/metertrend.py index 6897b68f..689d6f6a 100644 --- a/myems-api/reports/metertrend.py +++ b/myems-api/reports/metertrend.py @@ -1,5 +1,4 @@ import re - import falcon import simplejson as json import mysql.connector @@ -49,9 +48,8 @@ class Reporting: raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', description='API.INVALID_METER_ID') if meter_uuid is not None: - meter_uuid = str.strip(meter_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(meter_uuid) + match = regex.match(str.strip(meter_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', description='API.INVALID_METER_UUID') @@ -118,6 +116,7 @@ class Reporting: " FROM tbl_meters m, tbl_energy_categories ec " " WHERE m.uuid = %s AND m.energy_category_id = ec.id ", (meter_uuid,)) row_meter = cursor_system.fetchone() + if row_meter is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/shopfloorcost.py b/myems-api/reports/shopfloorcost.py index 0f1edae7..7e5dc087 100644 --- a/myems-api/reports/shopfloorcost.py +++ b/myems-api/reports/shopfloorcost.py @@ -59,9 +59,8 @@ class Reporting: description='API.INVALID_SHOPFLOOR_ID') if shopfloor_uuid is not None: - shopfloor_uuid = str.strip(shopfloor_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(shopfloor_uuid) + match = regex.match(str.strip(shopfloor_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -157,6 +156,7 @@ class Reporting: " FROM tbl_shopfloors " " WHERE uuid = %s ", (shopfloor_uuid,)) row_shopfloor = cursor_system.fetchone() + if row_shopfloor is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/shopfloorenergycategory.py b/myems-api/reports/shopfloorenergycategory.py index e19356ad..e88c34e8 100644 --- a/myems-api/reports/shopfloorenergycategory.py +++ b/myems-api/reports/shopfloorenergycategory.py @@ -59,9 +59,8 @@ class Reporting: description='API.INVALID_SHOPFLOOR_ID') if shopfloor_uuid is not None: - shopfloor_uuid = str.strip(shopfloor_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(shopfloor_uuid) + match = regex.match(str.strip(shopfloor_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -157,6 +156,7 @@ class Reporting: " FROM tbl_shopfloors " " WHERE uuid = %s ", (shopfloor_uuid,)) row_shopfloor = cursor_system.fetchone() + if row_shopfloor is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/shopfloorenergyitem.py b/myems-api/reports/shopfloorenergyitem.py index 0003308e..01b85ae4 100644 --- a/myems-api/reports/shopfloorenergyitem.py +++ b/myems-api/reports/shopfloorenergyitem.py @@ -59,9 +59,8 @@ class Reporting: description='API.INVALID_EQUIPMENT_ID') if shopfloor_uuid is not None: - shopfloor_uuid = str.strip(shopfloor_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(shopfloor_uuid) + match = regex.match(str.strip(shopfloor_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -157,6 +156,7 @@ class Reporting: " FROM tbl_shopfloors " " WHERE uuid = %s ", (shopfloor_uuid,)) row_shopfloor = cursor_system.fetchone() + if row_shopfloor is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/shopfloorload.py b/myems-api/reports/shopfloorload.py index b07bc641..2bcd052f 100644 --- a/myems-api/reports/shopfloorload.py +++ b/myems-api/reports/shopfloorload.py @@ -49,23 +49,22 @@ class Reporting: if shopfloor_id is None and shopfloor_uuid is None: raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', - description='API.INVALID_EQUIPMENT_ID') + description='API.INVALID_SHOPFLOOR_ID') if shopfloor_id is not None: shopfloor_id = str.strip(shopfloor_id) if not shopfloor_id.isdigit() or int(shopfloor_id) <= 0: raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', - description='API.INVALID_EQUIPMENT_ID') + description='API.INVALID_SHOPFLOOR_ID') if shopfloor_uuid is not None: - shopfloor_uuid = str.strip(shopfloor_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(shopfloor_uuid) + match = regex.match(str.strip(shopfloor_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', - description='API.INVALID_EQUIPMENT_UUID') + description='API.INVALID_SHOPFLOOR_UUID') if period_type is None: raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', description='API.INVALID_PERIOD_TYPE') @@ -157,6 +156,7 @@ class Reporting: " FROM tbl_shopfloors " " WHERE uuid = %s ", (shopfloor_uuid,)) row_shopfloor = cursor_system.fetchone() + if row_shopfloor is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/shopfloorsaving.py b/myems-api/reports/shopfloorsaving.py index 2970ff82..d581b049 100644 --- a/myems-api/reports/shopfloorsaving.py +++ b/myems-api/reports/shopfloorsaving.py @@ -59,9 +59,8 @@ class Reporting: description='API.INVALID_SHOPFLOOR_ID') if shopfloor_uuid is not None: - shopfloor_uuid = str.strip(shopfloor_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(shopfloor_uuid) + match = regex.match(str.strip(shopfloor_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -160,6 +159,7 @@ class Reporting: " FROM tbl_shopfloors " " WHERE uuid = %s ", (shopfloor_uuid,)) row_shopfloor = cursor_system.fetchone() + if row_shopfloor is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/shopfloorstatistics.py b/myems-api/reports/shopfloorstatistics.py index 27da853e..7c88932b 100644 --- a/myems-api/reports/shopfloorstatistics.py +++ b/myems-api/reports/shopfloorstatistics.py @@ -59,9 +59,8 @@ class Reporting: description='API.INVALID_SHOPFLOOR_ID') if shopfloor_uuid is not None: - shopfloor_uuid = str.strip(shopfloor_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(shopfloor_uuid) + match = regex.match(str.strip(shopfloor_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -156,6 +155,7 @@ class Reporting: " FROM tbl_shopfloors " " WHERE uuid = %s ", (shopfloor_uuid,)) row_shopfloor = cursor_system.fetchone() + if row_shopfloor is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/spacecost.py b/myems-api/reports/spacecost.py index 1512eed7..34530a35 100644 --- a/myems-api/reports/spacecost.py +++ b/myems-api/reports/spacecost.py @@ -61,9 +61,8 @@ class Reporting: description='API.INVALID_SPACE_ID') if space_uuid is not None: - space_uuid = str.strip(space_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(space_uuid) + match = regex.match(str.strip(space_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -159,6 +158,7 @@ class Reporting: " FROM tbl_spaces " " WHERE uuid = %s ", (space_uuid,)) row_space = cursor_system.fetchone() + if row_space is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/spaceefficiency.py b/myems-api/reports/spaceefficiency.py index 95fc8895..037d5391 100644 --- a/myems-api/reports/spaceefficiency.py +++ b/myems-api/reports/spaceefficiency.py @@ -61,9 +61,8 @@ class Reporting: description='API.INVALID_SPACE_ID') if space_uuid is not None: - space_uuid = str.strip(space_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(space_uuid) + match = regex.match(str.strip(space_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -158,6 +157,7 @@ class Reporting: " FROM tbl_spaces " " WHERE uuid = %s ", (space_uuid,)) row_space = cursor_system.fetchone() + if row_space is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/spaceenergycategory.py b/myems-api/reports/spaceenergycategory.py index 62c04b6c..07e751f9 100644 --- a/myems-api/reports/spaceenergycategory.py +++ b/myems-api/reports/spaceenergycategory.py @@ -61,9 +61,8 @@ class Reporting: description='API.INVALID_SPACE_ID') if space_uuid is not None: - space_uuid = str.strip(space_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(space_uuid) + match = regex.match(str.strip(space_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -159,6 +158,7 @@ class Reporting: " FROM tbl_spaces " " WHERE uuid = %s ", (space_uuid,)) row_space = cursor_system.fetchone() + if row_space is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/spaceenergyitem.py b/myems-api/reports/spaceenergyitem.py index 233ae142..1f9850c7 100644 --- a/myems-api/reports/spaceenergyitem.py +++ b/myems-api/reports/spaceenergyitem.py @@ -61,9 +61,8 @@ class Reporting: description='API.INVALID_SPACE_ID') if space_uuid is not None: - space_uuid = str.strip(space_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(space_uuid) + match = regex.match(str.strip(space_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -159,6 +158,7 @@ class Reporting: " FROM tbl_spaces " " WHERE uuid = %s ", (space_uuid,)) row_space = cursor_system.fetchone() + if row_space is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/spaceincome.py b/myems-api/reports/spaceincome.py index b930e8db..cd152716 100644 --- a/myems-api/reports/spaceincome.py +++ b/myems-api/reports/spaceincome.py @@ -61,9 +61,8 @@ class Reporting: description='API.INVALID_SPACE_ID') if space_uuid is not None: - space_uuid = str.strip(space_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(space_uuid) + match = regex.match(str.strip(space_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -159,6 +158,7 @@ class Reporting: " FROM tbl_spaces " " WHERE uuid = %s ", (space_uuid,)) row_space = cursor_system.fetchone() + if row_space is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/spaceload.py b/myems-api/reports/spaceload.py index 324d1ac1..e0a4916c 100644 --- a/myems-api/reports/spaceload.py +++ b/myems-api/reports/spaceload.py @@ -59,9 +59,8 @@ class Reporting: description='API.INVALID_SPACE_ID') if space_uuid is not None: - space_uuid = str.strip(space_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(space_uuid) + match = regex.match(str.strip(space_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -157,6 +156,7 @@ class Reporting: " FROM tbl_spaces " " WHERE uuid = %s ", (space_uuid,)) row_space = cursor_system.fetchone() + if row_space is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/spaceoutput.py b/myems-api/reports/spaceoutput.py index e349e3d0..68b12d38 100644 --- a/myems-api/reports/spaceoutput.py +++ b/myems-api/reports/spaceoutput.py @@ -61,9 +61,8 @@ class Reporting: description='API.INVALID_SPACE_ID') if space_uuid is not None: - space_uuid = str.strip(space_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(space_uuid) + match = regex.match(str.strip(space_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -159,6 +158,7 @@ class Reporting: " FROM tbl_spaces " " WHERE uuid = %s ", (space_uuid,)) row_space = cursor_system.fetchone() + if row_space is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/spacesaving.py b/myems-api/reports/spacesaving.py index 83759d3c..04e0d48a 100644 --- a/myems-api/reports/spacesaving.py +++ b/myems-api/reports/spacesaving.py @@ -61,9 +61,8 @@ class Reporting: description='API.INVALID_SPACE_ID') if space_uuid is not None: - space_uuid = str.strip(space_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(space_uuid) + match = regex.match(str.strip(space_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -162,6 +161,7 @@ class Reporting: " FROM tbl_spaces " " WHERE uuid = %s ", (space_uuid,)) row_space = cursor_system.fetchone() + if row_space is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/spacestatistics.py b/myems-api/reports/spacestatistics.py index 254eb8bd..9a4c1bf9 100644 --- a/myems-api/reports/spacestatistics.py +++ b/myems-api/reports/spacestatistics.py @@ -59,9 +59,8 @@ class Reporting: description='API.INVALID_SPACE_ID') if space_uuid is not None: - space_uuid = str.strip(space_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(space_uuid) + match = regex.match(str.strip(space_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -157,6 +156,7 @@ class Reporting: " FROM tbl_spaces " " WHERE uuid = %s ", (space_uuid,)) row_space = cursor_system.fetchone() + if row_space is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/storecost.py b/myems-api/reports/storecost.py index 0d9f1ee9..88c4be78 100644 --- a/myems-api/reports/storecost.py +++ b/myems-api/reports/storecost.py @@ -59,9 +59,8 @@ class Reporting: description='API.INVALID_STORE_ID') if store_uuid is not None: - space_uuid = str.strip(store_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(space_uuid) + match = regex.match(str.strip(store_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -157,6 +156,7 @@ class Reporting: " FROM tbl_stores " " WHERE uuid = %s ", (store_uuid,)) row_store = cursor_system.fetchone() + if row_store is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/storeenergycategory.py b/myems-api/reports/storeenergycategory.py index 3f32a35b..e62cff20 100644 --- a/myems-api/reports/storeenergycategory.py +++ b/myems-api/reports/storeenergycategory.py @@ -59,9 +59,8 @@ class Reporting: description='API.INVALID_STORE_ID') if store_uuid is not None: - space_uuid = str.strip(store_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(space_uuid) + match = regex.match(str.strip(store_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -157,6 +156,7 @@ class Reporting: " FROM tbl_stores " " WHERE uuid = %s ", (store_uuid,)) row_store = cursor_system.fetchone() + if row_store is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/storeenergyitem.py b/myems-api/reports/storeenergyitem.py index 3576c2ff..59b9a3eb 100644 --- a/myems-api/reports/storeenergyitem.py +++ b/myems-api/reports/storeenergyitem.py @@ -59,9 +59,8 @@ class Reporting: description='API.INVALID_STORE_ID') if store_uuid is not None: - space_uuid = str.strip(store_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(space_uuid) + match = regex.match(str.strip(store_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -157,6 +156,7 @@ class Reporting: " FROM tbl_stores " " WHERE uuid = %s ", (store_uuid,)) row_store = cursor_system.fetchone() + if row_store is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/storeload.py b/myems-api/reports/storeload.py index 31734079..d2f71dcc 100644 --- a/myems-api/reports/storeload.py +++ b/myems-api/reports/storeload.py @@ -59,9 +59,8 @@ class Reporting: description='API.INVALID_STORE_ID') if store_uuid is not None: - space_uuid = str.strip(store_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(space_uuid) + match = regex.match(str.strip(store_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -157,6 +156,7 @@ class Reporting: " FROM tbl_stores " " WHERE uuid = %s ", (store_uuid,)) row_store = cursor_system.fetchone() + if row_store is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/storesaving.py b/myems-api/reports/storesaving.py index 4e562d07..efb6bb33 100644 --- a/myems-api/reports/storesaving.py +++ b/myems-api/reports/storesaving.py @@ -59,9 +59,8 @@ class Reporting: description='API.INVALID_STORE_ID') if store_uuid is not None: - space_uuid = str.strip(store_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(space_uuid) + match = regex.match(str.strip(store_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -160,6 +159,7 @@ class Reporting: " FROM tbl_stores " " WHERE uuid = %s ", (store_uuid,)) row_store = cursor_system.fetchone() + if row_store is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/storestatistics.py b/myems-api/reports/storestatistics.py index 249b29de..16b13653 100644 --- a/myems-api/reports/storestatistics.py +++ b/myems-api/reports/storestatistics.py @@ -4,7 +4,6 @@ import simplejson as json import mysql.connector import config from datetime import datetime, timedelta, timezone - import excelexporters.storestatistics from core import utilities from decimal import Decimal @@ -60,9 +59,8 @@ class Reporting: description='API.INVALID_STORE_ID') if store_uuid is not None: - space_uuid = str.strip(store_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(space_uuid) + match = regex.match(str.strip(store_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -158,6 +156,7 @@ class Reporting: " FROM tbl_stores " " WHERE uuid = %s ", (store_uuid,)) row_store = cursor_system.fetchone() + if row_store is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/tenantbill.py b/myems-api/reports/tenantbill.py index 4deca0e5..e1687b72 100644 --- a/myems-api/reports/tenantbill.py +++ b/myems-api/reports/tenantbill.py @@ -55,9 +55,8 @@ class Reporting: description='API.INVALID_TENANT_ID') if tenant_uuid is not None: - space_uuid = str.strip(tenant_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(space_uuid) + match = regex.match(str.strip(tenant_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -121,6 +120,7 @@ class Reporting: " FROM tbl_tenants t, tbl_contacts c " " WHERE t.uuid = %s AND t.contact_id = c.id ", (tenant_uuid,)) row_tenant = cursor_system.fetchone() + if row_tenant is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/tenantcost.py b/myems-api/reports/tenantcost.py index 9da29eb5..3e27d3d4 100644 --- a/myems-api/reports/tenantcost.py +++ b/myems-api/reports/tenantcost.py @@ -59,9 +59,8 @@ class Reporting: description='API.INVALID_TENANT_ID') if tenant_uuid is not None: - space_uuid = str.strip(tenant_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(space_uuid) + match = regex.match(str.strip(tenant_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -159,6 +158,7 @@ class Reporting: " FROM tbl_tenants t, tbl_contacts c " " WHERE t.uuid = %s AND t.contact_id = c.id ", (tenant_uuid,)) row_tenant = cursor_system.fetchone() + if row_tenant is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/tenantenergycategory.py b/myems-api/reports/tenantenergycategory.py index 8fe23a9f..c2e0cc75 100644 --- a/myems-api/reports/tenantenergycategory.py +++ b/myems-api/reports/tenantenergycategory.py @@ -59,9 +59,8 @@ class Reporting: description='API.INVALID_TENANT_ID') if tenant_uuid is not None: - space_uuid = str.strip(tenant_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(space_uuid) + match = regex.match(str.strip(tenant_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -159,6 +158,7 @@ class Reporting: " FROM tbl_tenants t, tbl_contacts c " " WHERE t.uuid = %s AND t.contact_id = c.id ", (tenant_uuid,)) row_tenant = cursor_system.fetchone() + if row_tenant is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/tenantenergyitem.py b/myems-api/reports/tenantenergyitem.py index 246ed77e..65d29193 100644 --- a/myems-api/reports/tenantenergyitem.py +++ b/myems-api/reports/tenantenergyitem.py @@ -59,9 +59,8 @@ class Reporting: description='API.INVALID_TENANT_ID') if tenant_uuid is not None: - space_uuid = str.strip(tenant_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(space_uuid) + match = regex.match(str.strip(tenant_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -159,6 +158,7 @@ class Reporting: " FROM tbl_tenants t, tbl_contacts c " " WHERE t.uuid = %s AND t.contact_id = c.id ", (tenant_uuid,)) row_tenant = cursor_system.fetchone() + if row_tenant is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/tenantload.py b/myems-api/reports/tenantload.py index 35fb4662..c918e319 100644 --- a/myems-api/reports/tenantload.py +++ b/myems-api/reports/tenantload.py @@ -59,9 +59,8 @@ class Reporting: description='API.INVALID_TENANT_ID') if tenant_uuid is not None: - space_uuid = str.strip(tenant_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(space_uuid) + match = regex.match(str.strip(tenant_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -159,6 +158,7 @@ class Reporting: " FROM tbl_tenants t, tbl_contacts c " " WHERE t.uuid = %s AND t.contact_id = c.id ", (tenant_uuid,)) row_tenant = cursor_system.fetchone() + if row_tenant is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/tenantsaving.py b/myems-api/reports/tenantsaving.py index c7e83a61..2616b4c4 100644 --- a/myems-api/reports/tenantsaving.py +++ b/myems-api/reports/tenantsaving.py @@ -59,9 +59,8 @@ class Reporting: description='API.INVALID_TENANT_ID') if tenant_uuid is not None: - space_uuid = str.strip(tenant_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(space_uuid) + match = regex.match(str.strip(tenant_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -162,6 +161,7 @@ class Reporting: " FROM tbl_tenants t, tbl_contacts c " " WHERE t.uuid = %s AND t.contact_id = c.id ", (tenant_uuid,)) row_tenant = cursor_system.fetchone() + if row_tenant is None: if cursor_system: cursor_system.close() diff --git a/myems-api/reports/tenantstatistics.py b/myems-api/reports/tenantstatistics.py index d2932cc1..dc1fdf5f 100644 --- a/myems-api/reports/tenantstatistics.py +++ b/myems-api/reports/tenantstatistics.py @@ -59,9 +59,8 @@ class Reporting: description='API.INVALID_TENANT_ID') if tenant_uuid is not None: - space_uuid = str.strip(tenant_uuid) regex = re.compile('^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I) - match = regex.match(space_uuid) + match = regex.match(str.strip(tenant_uuid)) if not bool(match): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', @@ -159,6 +158,7 @@ class Reporting: " FROM tbl_tenants t, tbl_contacts c " " WHERE t.uuid = %s AND t.contact_id = c.id ", (tenant_uuid,)) row_tenant = cursor_system.fetchone() + if row_tenant is None: if cursor_system: cursor_system.close() diff --git a/web/src/i18n.js b/web/src/i18n.js index 839eedf0..0bf27390 100644 --- a/web/src/i18n.js +++ b/web/src/i18n.js @@ -466,6 +466,7 @@ const resources = { 'API.INVALID_CHANNEL': 'Invalid channel', 'API.INVALID_COMBINED_EQUIPMENT_ID': 'Invalid combined equipment id', 'API.INVALID_COMBINED_EQUIPMENT_NAME': 'Invalid combined equipment name', + 'API.INVALID_COMBINED_EQUIPMENT_UUID': 'Invalid combined equipment uuid', 'API.INVALID_COMBINED_EQUIPMENT_PARAMETER_ID': 'Invalid combined equipment parameter id', 'API.INVALID_COMBINED_EQUIPMENT_PARAMETER_NAME': 'Invalid combined equipment parameter name', 'API.INVALID_COMBINED_EQUIPMENT_PARAMETER_TYPE': 'Invalid combined equipment parameter type', @@ -502,8 +503,8 @@ const resources = { 'API.INVALID_ENERGY_ITEM_NAME': 'Invalid energy item name', 'API.INVALID_EQUATION_IN_EXPRESSION': 'Invalid equation in expression', 'API.INVALID_EQUIPMENT_ID': 'Invalid equipment id', - 'API.INVALID_equipment_ID': 'Invalid equipment id', 'API.INVALID_EQUIPMENT_NAME': 'Invalid equipment name', + 'API.INVALID_EQUIPMENT_UUID': 'Invalid equipment uuid', 'API.INVALID_EQUIPMENT_PARAMETER_ID': 'Invalid equipment parameter id', 'API.INVALID_EQUIPMENT_PARAMETER_NAME': 'Invalid equipment parameter name', 'API.INVALID_EQUIPMENT_PARAMETER_TYPE': 'Invalid equipment parameter type', @@ -576,14 +577,17 @@ const resources = { 'API.INVALID_SESSION_PLEASE_RE_LOGIN': 'Invalid session please re-login', 'API.INVALID_SHOPFLOOR_ID': 'Invalid shopfloor id', 'API.INVALID_SHOPFLOOR_NAME': 'Invalid shopfloor name', + 'API.INVALID_SHOPFLOOR_UUID': 'Invalid shopfloor uuid', 'API.INVALID_SOURCE_NODE_ID': 'Invalid source node id', 'API.INVALID_SPACE_ID': 'Invalid space id', 'API.INVALID_SPACE_NAME': 'Invalid space name', + 'API.INVALID_SPACE_UUID': 'Invalid space uuid', 'API.INVALID_START_DATE_FORMAT': 'Invalid start date format', 'API.INVALID_START_DATETIME': 'Invalid start datetime', 'API.INVALID_STATUS': 'Invalid status', 'API.INVALID_STORE_ID': 'Invalid store id', 'API.INVALID_STORE_NAME': 'Invalid store name', + 'API.INVALID_STORE_UUID': 'Invalid store uuid', 'API.INVALID_STORE_TYPE_DESCRIPTION': 'Invalid store type description', 'API.INVALID_STORE_TYPE_ID': 'Invalid store type id', 'API.INVALID_STORE_TYPE_NAME': 'Invalid store type name', @@ -597,6 +601,7 @@ const resources = { 'API.INVALID_TARIFF_TYPE': 'Invalid tariff type', 'API.INVALID_TENANT_ID': 'Invalid tenant id', 'API.INVALID_TENANT_NAME': 'Invalid tenant name', + 'API.INVALID_TENANT_UUID': 'Invalid tenant uuid', 'API.INVALID_TENANT_TYPE_DESCRIPTION': 'Invalid tenant type description', 'API.INVALID_TENANT_TYPE_ID': 'Invalid tenant type id', 'API.INVALID_TENANT_TYPE_NAME': 'Invalid tenant type name', @@ -1250,6 +1255,7 @@ const resources = { 'API.INVALID_CHANNEL': 'Invalid channel', 'API.INVALID_COMBINED_EQUIPMENT_ID': 'Invalid combined equipment id', 'API.INVALID_COMBINED_EQUIPMENT_NAME': 'Invalid combined equipment name', + 'API.INVALID_COMBINED_EQUIPMENT_UUID': 'Invalid combined equipment uuid', 'API.INVALID_COMBINED_EQUIPMENT_PARAMETER_ID': 'Invalid combined equipment parameter id', 'API.INVALID_COMBINED_EQUIPMENT_PARAMETER_NAME': 'Invalid combined equipment parameter name', 'API.INVALID_COMBINED_EQUIPMENT_PARAMETER_TYPE': 'Invalid combined equipment parameter type', @@ -1286,8 +1292,8 @@ const resources = { 'API.INVALID_ENERGY_ITEM_NAME': 'Invalid energy item name', 'API.INVALID_EQUATION_IN_EXPRESSION': 'Invalid equation in expression', 'API.INVALID_EQUIPMENT_ID': 'Invalid equipment id', - 'API.INVALID_equipment_ID': 'Invalid equipment id', 'API.INVALID_EQUIPMENT_NAME': 'Invalid equipment name', + 'API.INVALID_EQUIPMENT_UUID': 'Invalid equipment uuid', 'API.INVALID_EQUIPMENT_PARAMETER_ID': 'Invalid equipment parameter id', 'API.INVALID_EQUIPMENT_PARAMETER_NAME': 'Invalid equipment parameter name', 'API.INVALID_EQUIPMENT_PARAMETER_TYPE': 'Invalid equipment parameter type', @@ -1360,14 +1366,17 @@ const resources = { 'API.INVALID_SESSION_PLEASE_RE_LOGIN': 'Invalid session please re-login', 'API.INVALID_SHOPFLOOR_ID': 'Invalid shopfloor id', 'API.INVALID_SHOPFLOOR_NAME': 'Invalid shopfloor name', + 'API.INVALID_SHOPFLOOR_UUID': 'Invalid shopfloor uuid', 'API.INVALID_SOURCE_NODE_ID': 'Invalid source node id', 'API.INVALID_SPACE_ID': 'Invalid space id', 'API.INVALID_SPACE_NAME': 'Invalid space name', + 'API.INVALID_SPACE_UUID': 'Invalid space uuid', 'API.INVALID_START_DATE_FORMAT': 'Invalid start date format', 'API.INVALID_START_DATETIME': 'Invalid start datetime', 'API.INVALID_STATUS': 'Invalid status', 'API.INVALID_STORE_ID': 'Invalid store id', 'API.INVALID_STORE_NAME': 'Invalid store name', + 'API.INVALID_STORE_UUID': 'Invalid store uuid', 'API.INVALID_STORE_TYPE_DESCRIPTION': 'Invalid store type description', 'API.INVALID_STORE_TYPE_ID': 'Invalid store type id', 'API.INVALID_STORE_TYPE_NAME': 'Invalid store type name', @@ -1381,6 +1390,7 @@ const resources = { 'API.INVALID_TARIFF_TYPE': 'Invalid tariff type', 'API.INVALID_TENANT_ID': 'Invalid tenant id', 'API.INVALID_TENANT_NAME': 'Invalid tenant name', + 'API.INVALID_TENANT_UUID': 'Invalid tenant uuid', 'API.INVALID_TENANT_TYPE_DESCRIPTION': 'Invalid tenant type description', 'API.INVALID_TENANT_TYPE_ID': 'Invalid tenant type id', 'API.INVALID_TENANT_TYPE_NAME': 'Invalid tenant type name', @@ -2006,6 +2016,7 @@ const resources = { 'API.INVALID_CHANNEL': 'Invalid channel', 'API.INVALID_COMBINED_EQUIPMENT_ID': 'Invalid combined equipment id', 'API.INVALID_COMBINED_EQUIPMENT_NAME': 'Invalid combined equipment name', + 'API.INVALID_COMBINED_EQUIPMENT_UUID': 'Invalid combined equipment uuid', 'API.INVALID_COMBINED_EQUIPMENT_PARAMETER_ID': 'Invalid combined equipment parameter id', 'API.INVALID_COMBINED_EQUIPMENT_PARAMETER_NAME': 'Invalid combined equipment parameter name', 'API.INVALID_COMBINED_EQUIPMENT_PARAMETER_TYPE': 'Invalid combined equipment parameter type', @@ -2042,8 +2053,8 @@ const resources = { 'API.INVALID_ENERGY_ITEM_NAME': 'Invalid energy item name', 'API.INVALID_EQUATION_IN_EXPRESSION': 'Invalid equation in expression', 'API.INVALID_EQUIPMENT_ID': 'Invalid equipment id', - 'API.INVALID_equipment_ID': 'Invalid equipment id', 'API.INVALID_EQUIPMENT_NAME': 'Invalid equipment name', + 'API.INVALID_EQUIPMENT_UUID': 'Invalid equipment uuid', 'API.INVALID_EQUIPMENT_PARAMETER_ID': 'Invalid equipment parameter id', 'API.INVALID_EQUIPMENT_PARAMETER_NAME': 'Invalid equipment parameter name', 'API.INVALID_EQUIPMENT_PARAMETER_TYPE': 'Invalid equipment parameter type', @@ -2116,14 +2127,17 @@ const resources = { 'API.INVALID_SESSION_PLEASE_RE_LOGIN': 'Invalid session please re-login', 'API.INVALID_SHOPFLOOR_ID': 'Invalid shopfloor id', 'API.INVALID_SHOPFLOOR_NAME': 'Invalid shopfloor name', + 'API.INVALID_SHOPFLOOR_UUID': 'Invalid shopfloor uuid', 'API.INVALID_SOURCE_NODE_ID': 'Invalid source node id', 'API.INVALID_SPACE_ID': 'Invalid space id', 'API.INVALID_SPACE_NAME': 'Invalid space name', + 'API.INVALID_SPACE_UUID': 'Invalid space uuid', 'API.INVALID_START_DATE_FORMAT': 'Invalid start date format', 'API.INVALID_START_DATETIME': 'Invalid start datetime', 'API.INVALID_STATUS': 'Invalid status', 'API.INVALID_STORE_ID': 'Invalid store id', 'API.INVALID_STORE_NAME': 'Invalid store name', + 'API.INVALID_STORE_UUID': 'Invalid store uuid', 'API.INVALID_STORE_TYPE_DESCRIPTION': 'Invalid store type description', 'API.INVALID_STORE_TYPE_ID': 'Invalid store type id', 'API.INVALID_STORE_TYPE_NAME': 'Invalid store type name', @@ -2137,6 +2151,7 @@ const resources = { 'API.INVALID_TARIFF_TYPE': 'Invalid tariff type', 'API.INVALID_TENANT_ID': 'Invalid tenant id', 'API.INVALID_TENANT_NAME': 'Invalid tenant name', + 'API.INVALID_TENANT_UUID': 'Invalid tenant uuid', 'API.INVALID_TENANT_TYPE_DESCRIPTION': 'Invalid tenant type description', 'API.INVALID_TENANT_TYPE_ID': 'Invalid tenant type id', 'API.INVALID_TENANT_TYPE_NAME': 'Invalid tenant type name',