added alternative uuid parameter to reports of combined equipment, equipment, meter, shopfloor, store and tenant

pull/118/MERGE
13621160019@163.com 2022-01-21 19:09:35 +08:00
parent 98385b8900
commit 1c724816bb
54 changed files with 295 additions and 129 deletions

View File

@ -685,6 +685,7 @@ function config($translateProvider) {
INVALID_CHANNEL: 'Invalid Channel', INVALID_CHANNEL: 'Invalid Channel',
INVALID_COMBINED_EQUIPMENT_ID: 'Invalid Combined Equipment ID', INVALID_COMBINED_EQUIPMENT_ID: 'Invalid Combined Equipment ID',
INVALID_COMBINED_EQUIPMENT_NAME: 'Invalid Combined Equipment Name', 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_ID: 'Invalid Combined Equipment Parameter ID',
INVALID_COMBINED_EQUIPMENT_PARAMETER_NAME: 'Invalid Combined Equipment Parameter Name', INVALID_COMBINED_EQUIPMENT_PARAMETER_NAME: 'Invalid Combined Equipment Parameter Name',
INVALID_COMBINED_EQUIPMENT_PARAMETER_TYPE: 'Invalid Combined Equipment Parameter Type', 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_EQUATION_IN_EXPRESSION: 'Invalid Equation In Expression',
INVALID_EQUIPMENT_ID: 'Invalid Equipment ID', INVALID_EQUIPMENT_ID: 'Invalid Equipment ID',
INVALID_EQUIPMENT_NAME: 'Invalid Equipment Name', INVALID_EQUIPMENT_NAME: 'Invalid Equipment Name',
INVALID_EQUIPMENT_UUID: 'Invalid Equipment UUID',
INVALID_EQUIPMENT_PARAMETER_ID: 'Invalid Equipment Parameter ID', INVALID_EQUIPMENT_PARAMETER_ID: 'Invalid Equipment Parameter ID',
INVALID_EQUIPMENT_PARAMETER_NAME: 'Invalid Equipment Parameter Name', INVALID_EQUIPMENT_PARAMETER_NAME: 'Invalid Equipment Parameter Name',
INVALID_EQUIPMENT_PARAMETER_TYPE: 'Invalid Equipment Parameter Type', 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_SESSION_PLEASE_RE_LOGIN: 'Invalid Session Please Re-Login',
INVALID_SHOPFLOOR_ID: 'Invalid Shopfloor ID', INVALID_SHOPFLOOR_ID: 'Invalid Shopfloor ID',
INVALID_SHOPFLOOR_NAME: 'Invalid Shopfloor Name', INVALID_SHOPFLOOR_NAME: 'Invalid Shopfloor Name',
INVALID_SHOPFLOOR_UUID: 'Invalid Shopfloor UUID',
INVALID_SOURCE_NODE_ID: 'Invalid Source Node ID', INVALID_SOURCE_NODE_ID: 'Invalid Source Node ID',
INVALID_SPACE_ID: 'Invalid Space ID', INVALID_SPACE_ID: 'Invalid Space ID',
INVALID_SPACE_NAME: 'Invalid Space Name', INVALID_SPACE_NAME: 'Invalid Space Name',
INVALID_SPACE_UUID: 'Invalid Space UUID',
INVALID_START_DATE_FORMAT: 'Invalid Start Date Format', INVALID_START_DATE_FORMAT: 'Invalid Start Date Format',
INVALID_START_DATETIME: 'Invalid Start Datetime', INVALID_START_DATETIME: 'Invalid Start Datetime',
INVALID_STATUS: 'Invalid Status', INVALID_STATUS: 'Invalid Status',
INVALID_STORE_ID: 'Invalid Store ID', INVALID_STORE_ID: 'Invalid Store ID',
INVALID_STORE_NAME: 'Invalid Store Name', INVALID_STORE_NAME: 'Invalid Store Name',
INVALID_STORE_UUID: 'Invalid Store UUID',
INVALID_STORE_TYPE_DESCRIPTION: 'Invalid Store Type Description', INVALID_STORE_TYPE_DESCRIPTION: 'Invalid Store Type Description',
INVALID_STORE_TYPE_ID: 'Invalid Store Type ID', INVALID_STORE_TYPE_ID: 'Invalid Store Type ID',
INVALID_STORE_TYPE_NAME: 'Invalid Store Type Name', INVALID_STORE_TYPE_NAME: 'Invalid Store Type Name',
@ -815,6 +820,7 @@ function config($translateProvider) {
INVALID_TARIFF_TYPE: 'Invalid Tariff Type', INVALID_TARIFF_TYPE: 'Invalid Tariff Type',
INVALID_TENANT_ID: 'Invalid Tenant ID', INVALID_TENANT_ID: 'Invalid Tenant ID',
INVALID_TENANT_NAME: 'Invalid Tenant Name', INVALID_TENANT_NAME: 'Invalid Tenant Name',
INVALID_TENANT_UUID: 'Invalid Tenant UUID',
INVALID_TENANT_TYPE_DESCRIPTION: 'Invalid Tenant Type Description', INVALID_TENANT_TYPE_DESCRIPTION: 'Invalid Tenant Type Description',
INVALID_TENANT_TYPE_ID: 'Invalid Tenant Type ID', INVALID_TENANT_TYPE_ID: 'Invalid Tenant Type ID',
INVALID_TENANT_TYPE_NAME: 'Invalid Tenant Type Name', INVALID_TENANT_TYPE_NAME: 'Invalid Tenant Type Name',
@ -1678,6 +1684,7 @@ function config($translateProvider) {
INVALID_CHANNEL: 'Invalid Channel', INVALID_CHANNEL: 'Invalid Channel',
INVALID_COMBINED_EQUIPMENT_ID: 'Invalid Combined Equipment ID', INVALID_COMBINED_EQUIPMENT_ID: 'Invalid Combined Equipment ID',
INVALID_COMBINED_EQUIPMENT_NAME: 'Invalid Combined Equipment Name', 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_ID: 'Invalid Combined Equipment Parameter ID',
INVALID_COMBINED_EQUIPMENT_PARAMETER_NAME: 'Invalid Combined Equipment Parameter Name', INVALID_COMBINED_EQUIPMENT_PARAMETER_NAME: 'Invalid Combined Equipment Parameter Name',
INVALID_COMBINED_EQUIPMENT_PARAMETER_TYPE: 'Invalid Combined Equipment Parameter Type', 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_EQUATION_IN_EXPRESSION: 'Invalid Equation In Expression',
INVALID_EQUIPMENT_ID: 'Invalid Equipment ID', INVALID_EQUIPMENT_ID: 'Invalid Equipment ID',
INVALID_EQUIPMENT_NAME: 'Invalid Equipment Name', INVALID_EQUIPMENT_NAME: 'Invalid Equipment Name',
INVALID_EQUIPMENT_UUID: 'Invalid Equipment UUID',
INVALID_EQUIPMENT_PARAMETER_ID: 'Invalid Equipment Parameter ID', INVALID_EQUIPMENT_PARAMETER_ID: 'Invalid Equipment Parameter ID',
INVALID_EQUIPMENT_PARAMETER_NAME: 'Invalid Equipment Parameter Name', INVALID_EQUIPMENT_PARAMETER_NAME: 'Invalid Equipment Parameter Name',
INVALID_EQUIPMENT_PARAMETER_TYPE: 'Invalid Equipment Parameter Type', 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_SESSION_PLEASE_RE_LOGIN: 'Invalid Session Please Re-Login',
INVALID_SHOPFLOOR_ID: 'Invalid Shopfloor ID', INVALID_SHOPFLOOR_ID: 'Invalid Shopfloor ID',
INVALID_SHOPFLOOR_NAME: 'Invalid Shopfloor Name', INVALID_SHOPFLOOR_NAME: 'Invalid Shopfloor Name',
INVALID_SHOPFLOOR_UUID: 'Invalid Shopfloor UUID',
INVALID_SOURCE_NODE_ID: 'Invalid Source Node ID', INVALID_SOURCE_NODE_ID: 'Invalid Source Node ID',
INVALID_SPACE_ID: 'Invalid Space ID', INVALID_SPACE_ID: 'Invalid Space ID',
INVALID_SPACE_NAME: 'Invalid Space Name', INVALID_SPACE_NAME: 'Invalid Space Name',
INVALID_SPACE_UUID: 'Invalid Space UUID',
INVALID_START_DATE_FORMAT: 'Invalid Start Date Format', INVALID_START_DATE_FORMAT: 'Invalid Start Date Format',
INVALID_START_DATETIME: 'Invalid Start Datetime', INVALID_START_DATETIME: 'Invalid Start Datetime',
INVALID_STATUS: 'Invalid Status', INVALID_STATUS: 'Invalid Status',
INVALID_STORE_ID: 'Invalid Store ID', INVALID_STORE_ID: 'Invalid Store ID',
INVALID_STORE_NAME: 'Invalid Store Name', INVALID_STORE_NAME: 'Invalid Store Name',
INVALID_STORE_UUID: 'Invalid Store UUID',
INVALID_STORE_TYPE_DESCRIPTION: 'Invalid Store Type Description', INVALID_STORE_TYPE_DESCRIPTION: 'Invalid Store Type Description',
INVALID_STORE_TYPE_ID: 'Invalid Store Type ID', INVALID_STORE_TYPE_ID: 'Invalid Store Type ID',
INVALID_STORE_TYPE_NAME: 'Invalid Store Type Name', INVALID_STORE_TYPE_NAME: 'Invalid Store Type Name',
@ -1808,6 +1819,7 @@ function config($translateProvider) {
INVALID_TARIFF_TYPE: 'Invalid Tariff Type', INVALID_TARIFF_TYPE: 'Invalid Tariff Type',
INVALID_TENANT_ID: 'Invalid Tenant ID', INVALID_TENANT_ID: 'Invalid Tenant ID',
INVALID_TENANT_NAME: 'Invalid Tenant Name', INVALID_TENANT_NAME: 'Invalid Tenant Name',
INVALID_TENANT_UUID: 'Invalid Tenant UUID',
INVALID_TENANT_TYPE_DESCRIPTION: 'Invalid Tenant Type Description', INVALID_TENANT_TYPE_DESCRIPTION: 'Invalid Tenant Type Description',
INVALID_TENANT_TYPE_ID: 'Invalid Tenant Type ID', INVALID_TENANT_TYPE_ID: 'Invalid Tenant Type ID',
INVALID_TENANT_TYPE_NAME: 'Invalid Tenant Type Name', INVALID_TENANT_TYPE_NAME: 'Invalid Tenant Type Name',
@ -2669,6 +2681,7 @@ function config($translateProvider) {
INVALID_CHANNEL: 'Invalid Channel', INVALID_CHANNEL: 'Invalid Channel',
INVALID_COMBINED_EQUIPMENT_ID: 'Invalid Combined Equipment ID', INVALID_COMBINED_EQUIPMENT_ID: 'Invalid Combined Equipment ID',
INVALID_COMBINED_EQUIPMENT_NAME: 'Invalid Combined Equipment Name', 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_ID: 'Invalid Combined Equipment Parameter ID',
INVALID_COMBINED_EQUIPMENT_PARAMETER_NAME: 'Invalid Combined Equipment Parameter Name', INVALID_COMBINED_EQUIPMENT_PARAMETER_NAME: 'Invalid Combined Equipment Parameter Name',
INVALID_COMBINED_EQUIPMENT_PARAMETER_TYPE: 'Invalid Combined Equipment Parameter Type', 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_EQUATION_IN_EXPRESSION: 'Invalid Equation In Expression',
INVALID_EQUIPMENT_ID: 'Invalid Equipment ID', INVALID_EQUIPMENT_ID: 'Invalid Equipment ID',
INVALID_EQUIPMENT_NAME: 'Invalid Equipment Name', INVALID_EQUIPMENT_NAME: 'Invalid Equipment Name',
INVALID_EQUIPMENT_UUID: 'Invalid Equipment UUID',
INVALID_EQUIPMENT_PARAMETER_ID: 'Invalid Equipment Parameter ID', INVALID_EQUIPMENT_PARAMETER_ID: 'Invalid Equipment Parameter ID',
INVALID_EQUIPMENT_PARAMETER_NAME: 'Invalid Equipment Parameter Name', INVALID_EQUIPMENT_PARAMETER_NAME: 'Invalid Equipment Parameter Name',
INVALID_EQUIPMENT_PARAMETER_TYPE: 'Invalid Equipment Parameter Type', 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_SESSION_PLEASE_RE_LOGIN: 'Invalid Session Please Re-Login',
INVALID_SHOPFLOOR_ID: 'Invalid Shopfloor ID', INVALID_SHOPFLOOR_ID: 'Invalid Shopfloor ID',
INVALID_SHOPFLOOR_NAME: 'Invalid Shopfloor Name', INVALID_SHOPFLOOR_NAME: 'Invalid Shopfloor Name',
INVALID_SHOPFLOOR_UUID: 'Invalid Shopfloor UUID',
INVALID_SOURCE_NODE_ID: 'Invalid Source Node ID', INVALID_SOURCE_NODE_ID: 'Invalid Source Node ID',
INVALID_SPACE_ID: 'Invalid Space ID', INVALID_SPACE_ID: 'Invalid Space ID',
INVALID_SPACE_NAME: 'Invalid Space Name', INVALID_SPACE_NAME: 'Invalid Space Name',
INVALID_SPACE_UUID: 'Invalid Space UUID',
INVALID_START_DATE_FORMAT: 'Invalid Start Date Format', INVALID_START_DATE_FORMAT: 'Invalid Start Date Format',
INVALID_START_DATETIME: 'Invalid Start Datetime', INVALID_START_DATETIME: 'Invalid Start Datetime',
INVALID_STATUS: 'Invalid Status', INVALID_STATUS: 'Invalid Status',
INVALID_STORE_ID: 'Invalid Store ID', INVALID_STORE_ID: 'Invalid Store ID',
INVALID_STORE_NAME: 'Invalid Store Name', INVALID_STORE_NAME: 'Invalid Store Name',
INVALID_STORE_UUID: 'Invalid Store UUID',
INVALID_STORE_TYPE_DESCRIPTION: 'Invalid Store Type Description', INVALID_STORE_TYPE_DESCRIPTION: 'Invalid Store Type Description',
INVALID_STORE_TYPE_ID: 'Invalid Store Type ID', INVALID_STORE_TYPE_ID: 'Invalid Store Type ID',
INVALID_STORE_TYPE_NAME: 'Invalid Store Type Name', INVALID_STORE_TYPE_NAME: 'Invalid Store Type Name',
@ -2799,6 +2816,7 @@ function config($translateProvider) {
INVALID_TARIFF_TYPE: 'Invalid Tariff Type', INVALID_TARIFF_TYPE: 'Invalid Tariff Type',
INVALID_TENANT_ID: 'Invalid Tenant ID', INVALID_TENANT_ID: 'Invalid Tenant ID',
INVALID_TENANT_NAME: 'Invalid Tenant Name', INVALID_TENANT_NAME: 'Invalid Tenant Name',
INVALID_TENANT_UUID: 'Invalid Tenant UUID',
INVALID_TENANT_TYPE_DESCRIPTION: 'Invalid Tenant Type Description', INVALID_TENANT_TYPE_DESCRIPTION: 'Invalid Tenant Type Description',
INVALID_TENANT_TYPE_ID: 'Invalid Tenant Type ID', INVALID_TENANT_TYPE_ID: 'Invalid Tenant Type ID',
INVALID_TENANT_TYPE_NAME: 'Invalid Tenant Type Name', INVALID_TENANT_TYPE_NAME: 'Invalid Tenant Type Name',

View File

@ -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 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 * GET Combined Equipment Cost Report
(parameter combinedequipmentid can be replaced with combinedequipmentuuid)
```bash ```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 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 * GET Combined Equipment Efficiency Report
(parameter combinedequipmentid can be replaced with combinedequipmentuuid)
```bash ```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 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 * GET Combined Equipment Energy Category Report
(parameter combinedequipmentid can be replaced with combinedequipmentuuid)
```bash ```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 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 * GET Combined Equipment Energy Item Report
(parameter combinedequipmentid can be replaced with combinedequipmentuuid)
```bash ```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 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 * GET Combined Equipment Income Report
(parameter combinedequipmentid can be replaced with combinedequipmentuuid)
```bash ```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 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 * GET Combined Equipment Load Report
(parameter combinedequipmentid can be replaced with combinedequipmentuuid)
```bash ```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 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 * GET Combined Equipment Output Report
(parameter combinedequipmentid can be replaced with combinedequipmentuuid)
```bash ```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 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 * GET Combined Equipment Saving Report
(parameter combinedequipmentid can be replaced with combinedequipmentuuid)
```bash ```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 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 * GET Combined Equipment Statistics Report
(parameter combinedequipmentid can be replaced with combinedequipmentuuid)
```bash ```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 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 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 * GET Equipment Cost Report
(parameter equipmentid can be replaced with equipmentuuid)
```bash ```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 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 * GET Equipment Efficiency Report
(parameter equipmentid can be replaced with equipmentuuid)
```bash ```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 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 * GET Equipment Energy Category Report
(parameter equipmentid can be replaced with equipmentuuid)
```bash ```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 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 * GET Equipment Energy Item Report
(parameter equipmentid can be replaced with equipmentuuid)
```bash ```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 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 * GET Equipment Income Report
(parameter equipmentid can be replaced with equipmentuuid)
```bash ```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 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 * GET Equipment Load Report
(parameter equipmentid can be replaced with equipmentuuid)
```bash ```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 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 * GET Equipment Output Report
(parameter equipmentid can be replaced with equipmentuuid)
```bash ```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 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 * GET Equipment Saving Report
(parameter equipmentid can be replaced with equipmentuuid)
```bash ```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 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 * GET Equipment Statistics Report
(parameter equipmentid can be replaced with equipmentuuid)
```bash ```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 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 * GET Meter Cost Report
(use meterid or meteruuid to get meter report) (parameter meterid can be replaced with meteruuid)
```bash ```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 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 * GET Meter Energy Report
(use meterid or meteruuid to get meter report) (parameter meterid can be replaced with meteruuid)
```bash ```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 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 * GET Meter Realtime Report
(use meterid or meteruuid to get meter report) (parameter meterid can be replaced with meteruuid)
```bash ```bash
curl -i -X GET {{base_url}}/reports/meterrealtime?meterid=1 curl -i -X GET {{base_url}}/reports/meterrealtime?meterid=1
``` ```
* GET Meter Submeters Balance Report * GET Meter Submeters Balance Report
(use meterid or meteruuid to get meter report) (parameter meterid can be replaced with meteruuid)
```bash ```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 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 * GET Meter Trend Report
(use meterid or meteruuid to get meter report) (parameter meterid can be replaced with meteruuid)
```bash ```bash
curl -i -X GET {{base_url}}/reports/metertrend?meterid=6&reportingperiodstartdatetime=2020-09-10T00:00:00&reportingperiodenddatetime=2020-09-11T00:00:00 curl -i -X GET {{base_url}}/reports/metertrend?meterid=6&reportingperiodstartdatetime=2020-09-10T00:00:00&reportingperiodenddatetime=2020-09-11T00:00:00
@ -2358,62 +2412,107 @@ curl -i -X GET {{base_url}}/reports/offlinemetercost?offlinemeterid=1&periodtype
curl -i -X GET {{base_url}}/reports/shopfloorbatch?spaceid=1&reportingperiodstartdatetime=2021-05-01T00:00:00&reportingperiodenddatetime=2021-05-20T11:41:09 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 ```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 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 * GET Shopfloor Energy Category Report
(parameter shopfloorid can be replaced with shopflooruuid)
```bash ```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 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 * GET Shopfloor Energy Item Report
(parameter shopfloorid can be replaced with shopflooruuid)
```bash ```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 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 * GET Shopfloor Load Report
(parameter shopfloorid can be replaced with shopflooruuid)
```bash ```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 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 * GET Shopfloor Saving Report
(parameter shopfloorid can be replaced with shopflooruuid)
```bash ```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 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 * GET Shopfloor Statistics Report
(parameter shopfloorid can be replaced with shopflooruuid)
```bash ```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 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 * GET Space Cost Report
(parameter spaceid can be replaced with spaceuuid)
```bash ```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 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 * GET Space Efficiency Report
(parameter spaceid can be replaced with spaceuuid)
```bash ```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 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 * GET Space Energy Category Report
(parameter spaceid can be replaced with spaceuuid)
```bash ```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 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 * GET Space Energy Item Report
(parameter spaceid can be replaced with spaceuuid)
```bash ```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 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 * GET Space Income Report
(parameter spaceid can be replaced with spaceuuid)
```bash ```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 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 * GET Space Load Report
(parameter spaceid can be replaced with spaceuuid)
```bash ```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 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 * GET Space Output Report
(parameter spaceid can be replaced with spaceuuid)
```bash ```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 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 * GET Space Saving Report
(parameter spaceid can be replaced with spaceuuid)
```bash ```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 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 * GET Space Statistics Report
(parameter spaceid can be replaced with spaceuuid)
```bash ```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 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 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 * GET Store Cost Report
(parameter storeid can be replaced with storeuuid)
```bash ```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 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 * GET Store Energy Category Report
(parameter storeid can be replaced with storeuuid)
```bash ```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 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 * GET Store Energy Item Report
(parameter storeid can be replaced with storeuuid)
```bash ```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 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 * GET Store Load Report
(parameter storeid can be replaced with storeuuid)
```bash ```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 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 * GET Store Saving Report
(parameter storeid can be replaced with storeuuid)
```bash ```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 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 * GET Store Statistics Report
(parameter storeid can be replaced with storeuuid)
```bash ```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 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 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 * GET Tenant Bill Report
(parameter storeid can be replaced with storeuuid)
```bash ```bash
curl -i -X GET {{base_url}}/reports/tenantbill?tenantid=1&reportingperiodstartdatetime=2020-10-01T00:00:00&reportingperiodenddatetime=2020-11-01T00:00:00 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 * GET Tenant Cost Report
(parameter storeid can be replaced with storeuuid)
```bash ```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 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 * GET Tenant Energy Category Report
(parameter storeid can be replaced with storeuuid)
```bash ```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 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 * GET Tenant Energy Item Report
(parameter storeid can be replaced with storeuuid)
```bash ```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 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 * GET Tenant Load Report
(parameter storeid can be replaced with storeuuid)
```bash ```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 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 * GET Tenant Saving Report
(parameter storeid can be replaced with storeuuid)
```bash ```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 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 * GET Tenant Statistics Report
(parameter storeid can be replaced with storeuuid)
```bash ```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 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
``` ```

View File

@ -60,9 +60,8 @@ class Reporting:
description='API.INVALID_COMBINED_EQUIPMENT_ID') description='API.INVALID_COMBINED_EQUIPMENT_ID')
if combined_equipment_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -158,6 +157,7 @@ class Reporting:
" FROM tbl_combined_equipments " " FROM tbl_combined_equipments "
" WHERE uuid = %s ", (combined_equipment_uuid,)) " WHERE uuid = %s ", (combined_equipment_uuid,))
row_combined_equipment = cursor_system.fetchone() row_combined_equipment = cursor_system.fetchone()
if row_combined_equipment is None: if row_combined_equipment is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()
@ -582,8 +582,7 @@ class Reporting:
result['reporting_period']['total'] += reporting[energy_category_id]['subtotal'] result['reporting_period']['total'] += reporting[energy_category_id]['subtotal']
result['reporting_period']['total_increment_rate'] = \ result['reporting_period']['total_increment_rate'] = \
(result['reporting_period']['total'] - result['base_period']['total']) / \ (result['reporting_period']['total'] - result['base_period']['total']) / result['base_period']['total'] \
result['base_period']['total'] \
if result['base_period']['total'] > Decimal(0.0) else None if result['base_period']['total'] > Decimal(0.0) else None
result['parameters'] = { result['parameters'] = {

View File

@ -62,9 +62,8 @@ class Reporting:
description='API.INVALID_COMBINED_EQUIPMENT_ID') description='API.INVALID_COMBINED_EQUIPMENT_ID')
if combined_equipment_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -166,6 +165,7 @@ class Reporting:
" FROM tbl_combined_equipments " " FROM tbl_combined_equipments "
" WHERE uuid = %s ", (combined_equipment_uuid,)) " WHERE uuid = %s ", (combined_equipment_uuid,))
row_combined_equipment = cursor_system.fetchone() row_combined_equipment = cursor_system.fetchone()
if row_combined_equipment is None: if row_combined_equipment is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()
@ -850,13 +850,13 @@ class Reporting:
result['reporting_period_efficiency']['increment_rates_num'].append( result['reporting_period_efficiency']['increment_rates_num'].append(
(reporting[fraction['id']]['numerator_cumulation'] - base[fraction['id']]['numerator_cumulation']) / (reporting[fraction['id']]['numerator_cumulation'] - base[fraction['id']]['numerator_cumulation']) /
base[fraction['id']]['numerator_cumulation'] if base[fraction['id']]['numerator_cumulation'] > base[fraction['id']]['numerator_cumulation']
Decimal(0.0) else None) if base[fraction['id']]['numerator_cumulation'] > Decimal(0.0) else None)
result['reporting_period_efficiency']['increment_rates_den'].append( result['reporting_period_efficiency']['increment_rates_den'].append(
(reporting[fraction['id']]['denominator_cumulation'] - (reporting[fraction['id']]['denominator_cumulation'] -
base[fraction['id']]['denominator_cumulation']) / base[fraction['id']]['denominator_cumulation']) /
base[fraction['id']]['denominator_cumulation'] if base[fraction['id']]['denominator_cumulation'] > base[fraction['id']]['denominator_cumulation']
Decimal(0.0) else None) if base[fraction['id']]['denominator_cumulation'] > Decimal(0.0) else None)
result['parameters'] = { result['parameters'] = {
"names": parameters_data['names'], "names": parameters_data['names'],

View File

@ -60,9 +60,8 @@ class Reporting:
description='API.INVALID_COMBINED_EQUIPMENT_ID') description='API.INVALID_COMBINED_EQUIPMENT_ID')
if combined_equipment_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -158,6 +157,7 @@ class Reporting:
" FROM tbl_combined_equipments " " FROM tbl_combined_equipments "
" WHERE uuid = %s ", (combined_equipment_uuid,)) " WHERE uuid = %s ", (combined_equipment_uuid,))
row_combined_equipment = cursor_system.fetchone() row_combined_equipment = cursor_system.fetchone()
if row_combined_equipment is None: if row_combined_equipment is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -60,9 +60,8 @@ class Reporting:
description='API.INVALID_COMBINED_EQUIPMENT_ID') description='API.INVALID_COMBINED_EQUIPMENT_ID')
if combined_equipment_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -158,6 +157,7 @@ class Reporting:
" FROM tbl_combined_equipments " " FROM tbl_combined_equipments "
" WHERE uuid = %s ", (combined_equipment_uuid,)) " WHERE uuid = %s ", (combined_equipment_uuid,))
row_combined_equipment = cursor_system.fetchone() row_combined_equipment = cursor_system.fetchone()
if row_combined_equipment is None: if row_combined_equipment is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -60,9 +60,8 @@ class Reporting:
description='API.INVALID_COMBINED_EQUIPMENT_ID') description='API.INVALID_COMBINED_EQUIPMENT_ID')
if combined_equipment_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -158,6 +157,7 @@ class Reporting:
" FROM tbl_combined_equipments " " FROM tbl_combined_equipments "
" WHERE uuid = %s ", (combined_equipment_uuid,)) " WHERE uuid = %s ", (combined_equipment_uuid,))
row_combined_equipment = cursor_system.fetchone() row_combined_equipment = cursor_system.fetchone()
if row_combined_equipment is None: if row_combined_equipment is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -60,9 +60,8 @@ class Reporting:
description='API.INVALID_COMBINED_EQUIPMENT_ID') description='API.INVALID_COMBINED_EQUIPMENT_ID')
if combined_equipment_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -158,6 +157,7 @@ class Reporting:
" FROM tbl_combined_equipments " " FROM tbl_combined_equipments "
" WHERE uuid = %s ", (combined_equipment_uuid,)) " WHERE uuid = %s ", (combined_equipment_uuid,))
row_combined_equipment = cursor_system.fetchone() row_combined_equipment = cursor_system.fetchone()
if row_combined_equipment is None: if row_combined_equipment is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -60,9 +60,8 @@ class Reporting:
description='API.INVALID_COMBINED_EQUIPMENT_ID') description='API.INVALID_COMBINED_EQUIPMENT_ID')
if combined_equipment_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -158,6 +157,7 @@ class Reporting:
" FROM tbl_combined_equipments " " FROM tbl_combined_equipments "
" WHERE uuid = %s ", (combined_equipment_uuid,)) " WHERE uuid = %s ", (combined_equipment_uuid,))
row_combined_equipment = cursor_system.fetchone() row_combined_equipment = cursor_system.fetchone()
if row_combined_equipment is None: if row_combined_equipment is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -60,9 +60,8 @@ class Reporting:
description='API.INVALID_COMBINED_EQUIPMENT_ID') description='API.INVALID_COMBINED_EQUIPMENT_ID')
if combined_equipment_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -161,6 +160,7 @@ class Reporting:
" FROM tbl_combined_equipments " " FROM tbl_combined_equipments "
" WHERE uuid = %s ", (combined_equipment_uuid,)) " WHERE uuid = %s ", (combined_equipment_uuid,))
row_combined_equipment = cursor_system.fetchone() row_combined_equipment = cursor_system.fetchone()
if row_combined_equipment is None: if row_combined_equipment is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -60,9 +60,8 @@ class Reporting:
description='API.INVALID_COMBINED_EQUIPMENT_ID') description='API.INVALID_COMBINED_EQUIPMENT_ID')
if combined_equipment_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -158,6 +157,7 @@ class Reporting:
" FROM tbl_combined_equipments " " FROM tbl_combined_equipments "
" WHERE uuid = %s ", (combined_equipment_uuid,)) " WHERE uuid = %s ", (combined_equipment_uuid,))
row_combined_equipment = cursor_system.fetchone() row_combined_equipment = cursor_system.fetchone()
if row_combined_equipment is None: if row_combined_equipment is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -58,9 +58,8 @@ class Reporting:
description='API.INVALID_EQUIPMENT_ID') description='API.INVALID_EQUIPMENT_ID')
if equipment_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -156,6 +155,7 @@ class Reporting:
" FROM tbl_equipments " " FROM tbl_equipments "
" WHERE uuid = %s ", (equipment_uuid,)) " WHERE uuid = %s ", (equipment_uuid,))
row_equipment = cursor_system.fetchone() row_equipment = cursor_system.fetchone()
if row_equipment is None: if row_equipment is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -58,9 +58,8 @@ class Reporting:
description='API.INVALID_EQUIPMENT_ID') description='API.INVALID_EQUIPMENT_ID')
if equipment_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -156,6 +155,7 @@ class Reporting:
" FROM tbl_equipments " " FROM tbl_equipments "
" WHERE uuid = %s ", (equipment_uuid,)) " WHERE uuid = %s ", (equipment_uuid,))
row_equipment = cursor_system.fetchone() row_equipment = cursor_system.fetchone()
if row_equipment is None: if row_equipment is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()
@ -722,13 +722,12 @@ class Reporting:
base[fraction['id']]['cumulation'] if base[fraction['id']]['cumulation'] > Decimal(0.0) else None) base[fraction['id']]['cumulation'] if base[fraction['id']]['cumulation'] > Decimal(0.0) else None)
result['reporting_period_efficiency']['increment_rates_num'].append( result['reporting_period_efficiency']['increment_rates_num'].append(
(reporting[fraction['id']]['numerator_cumulation'] - base[fraction['id']]['numerator_cumulation']) / (reporting[fraction['id']]['numerator_cumulation'] - base[fraction['id']]['numerator_cumulation']) /
base[fraction['id']]['numerator_cumulation'] if base[fraction['id']]['numerator_cumulation'] > base[fraction['id']]['numerator_cumulation']
Decimal(0.0) else None) if base[fraction['id']]['numerator_cumulation'] > Decimal(0.0) else None)
result['reporting_period_efficiency']['increment_rates_den'].append( result['reporting_period_efficiency']['increment_rates_den'].append(
(reporting[fraction['id']]['denominator_cumulation'] - (reporting[fraction['id']]['denominator_cumulation'] -
base[fraction['id']]['denominator_cumulation']) / base[fraction['id']]['denominator_cumulation']) / base[fraction['id']]['denominator_cumulation']
base[fraction['id']]['denominator_cumulation'] if base[fraction['id']]['denominator_cumulation'] > if base[fraction['id']]['denominator_cumulation'] > Decimal(0.0) else None)
Decimal(0.0) else None)
result['parameters'] = { result['parameters'] = {
"names": parameters_data['names'], "names": parameters_data['names'],

View File

@ -58,9 +58,8 @@ class Reporting:
description='API.INVALID_EQUIPMENT_ID') description='API.INVALID_EQUIPMENT_ID')
if equipment_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -156,6 +155,7 @@ class Reporting:
" FROM tbl_equipments " " FROM tbl_equipments "
" WHERE uuid = %s ", (equipment_uuid,)) " WHERE uuid = %s ", (equipment_uuid,))
row_equipment = cursor_system.fetchone() row_equipment = cursor_system.fetchone()
if row_equipment is None: if row_equipment is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -58,9 +58,8 @@ class Reporting:
description='API.INVALID_EQUIPMENT_ID') description='API.INVALID_EQUIPMENT_ID')
if equipment_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -156,6 +155,7 @@ class Reporting:
" FROM tbl_equipments " " FROM tbl_equipments "
" WHERE uuid = %s ", (equipment_uuid,)) " WHERE uuid = %s ", (equipment_uuid,))
row_equipment = cursor_system.fetchone() row_equipment = cursor_system.fetchone()
if row_equipment is None: if row_equipment is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -58,9 +58,8 @@ class Reporting:
description='API.INVALID_EQUIPMENT_ID') description='API.INVALID_EQUIPMENT_ID')
if equipment_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -156,6 +155,7 @@ class Reporting:
" FROM tbl_equipments " " FROM tbl_equipments "
" WHERE uuid = %s ", (equipment_uuid,)) " WHERE uuid = %s ", (equipment_uuid,))
row_equipment = cursor_system.fetchone() row_equipment = cursor_system.fetchone()
if row_equipment is None: if row_equipment is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -58,9 +58,8 @@ class Reporting:
description='API.INVALID_EQUIPMENT_ID') description='API.INVALID_EQUIPMENT_ID')
if equipment_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -156,6 +155,7 @@ class Reporting:
" FROM tbl_equipments " " FROM tbl_equipments "
" WHERE uuid = %s ", (equipment_uuid,)) " WHERE uuid = %s ", (equipment_uuid,))
row_equipment = cursor_system.fetchone() row_equipment = cursor_system.fetchone()
if row_equipment is None: if row_equipment is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -58,9 +58,8 @@ class Reporting:
description='API.INVALID_EQUIPMENT_ID') description='API.INVALID_EQUIPMENT_ID')
if equipment_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -156,6 +155,7 @@ class Reporting:
" FROM tbl_equipments " " FROM tbl_equipments "
" WHERE uuid = %s ", (equipment_uuid,)) " WHERE uuid = %s ", (equipment_uuid,))
row_equipment = cursor_system.fetchone() row_equipment = cursor_system.fetchone()
if row_equipment is None: if row_equipment is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -58,9 +58,8 @@ class Reporting:
description='API.INVALID_EQUIPMENT_ID') description='API.INVALID_EQUIPMENT_ID')
if equipment_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -159,6 +158,7 @@ class Reporting:
" FROM tbl_equipments " " FROM tbl_equipments "
" WHERE uuid = %s ", (equipment_uuid,)) " WHERE uuid = %s ", (equipment_uuid,))
row_equipment = cursor_system.fetchone() row_equipment = cursor_system.fetchone()
if row_equipment is None: if row_equipment is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -58,9 +58,8 @@ class Reporting:
description='API.INVALID_EQUIPMENT_ID') description='API.INVALID_EQUIPMENT_ID')
if equipment_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -156,6 +155,7 @@ class Reporting:
" FROM tbl_equipments " " FROM tbl_equipments "
" WHERE uuid = %s ", (equipment_uuid,)) " WHERE uuid = %s ", (equipment_uuid,))
row_equipment = cursor_system.fetchone() row_equipment = cursor_system.fetchone()
if row_equipment is None: if row_equipment is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -55,9 +55,8 @@ class Reporting:
raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', description='API.INVALID_METER_ID') raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', description='API.INVALID_METER_ID')
if meter_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', description='API.INVALID_METER_UUID') 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 " " FROM tbl_meters m, tbl_energy_categories ec "
" WHERE m.uuid = %s AND m.energy_category_id = ec.id ", (meter_uuid,)) " WHERE m.uuid = %s AND m.energy_category_id = ec.id ", (meter_uuid,))
row_meter = cursor_system.fetchone() row_meter = cursor_system.fetchone()
if row_meter is None: if row_meter is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -54,9 +54,8 @@ class Reporting:
raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', description='API.INVALID_METER_ID') raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', description='API.INVALID_METER_ID')
if meter_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', description='API.INVALID_METER_UUID') 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 " " FROM tbl_meters m, tbl_energy_categories ec "
" WHERE m.uuid = %s AND m.energy_category_id = ec.id ", (meter_uuid,)) " WHERE m.uuid = %s AND m.energy_category_id = ec.id ", (meter_uuid,))
row_meter = cursor_system.fetchone() row_meter = cursor_system.fetchone()
if row_meter is None: if row_meter is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -43,9 +43,8 @@ class Reporting:
raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', description='API.INVALID_METER_ID') raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', description='API.INVALID_METER_ID')
if meter_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', description='API.INVALID_METER_UUID') 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 " " FROM tbl_meters m, tbl_energy_categories ec "
" WHERE m.uuid = %s AND m.energy_category_id = ec.id ", (meter_uuid,)) " WHERE m.uuid = %s AND m.energy_category_id = ec.id ", (meter_uuid,))
row_meter = cursor_system.fetchone() row_meter = cursor_system.fetchone()
if row_meter is None: if row_meter is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -1,5 +1,4 @@
import re import re
import falcon import falcon
import simplejson as json import simplejson as json
import mysql.connector import mysql.connector
@ -52,9 +51,8 @@ class Reporting:
raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', description='API.INVALID_METER_ID') raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', description='API.INVALID_METER_ID')
if meter_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', description='API.INVALID_METER_UUID') 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 " " FROM tbl_meters m, tbl_energy_categories ec "
" WHERE m.uuid = %s AND m.energy_category_id = ec.id ", (meter_uuid,)) " WHERE m.uuid = %s AND m.energy_category_id = ec.id ", (meter_uuid,))
row_meter = cursor_system.fetchone() row_meter = cursor_system.fetchone()
if row_meter is None: if row_meter is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -1,5 +1,4 @@
import re import re
import falcon import falcon
import simplejson as json import simplejson as json
import mysql.connector import mysql.connector
@ -49,9 +48,8 @@ class Reporting:
raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', description='API.INVALID_METER_ID') raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', description='API.INVALID_METER_ID')
if meter_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', description='API.INVALID_METER_UUID') 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 " " FROM tbl_meters m, tbl_energy_categories ec "
" WHERE m.uuid = %s AND m.energy_category_id = ec.id ", (meter_uuid,)) " WHERE m.uuid = %s AND m.energy_category_id = ec.id ", (meter_uuid,))
row_meter = cursor_system.fetchone() row_meter = cursor_system.fetchone()
if row_meter is None: if row_meter is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -59,9 +59,8 @@ class Reporting:
description='API.INVALID_SHOPFLOOR_ID') description='API.INVALID_SHOPFLOOR_ID')
if shopfloor_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -157,6 +156,7 @@ class Reporting:
" FROM tbl_shopfloors " " FROM tbl_shopfloors "
" WHERE uuid = %s ", (shopfloor_uuid,)) " WHERE uuid = %s ", (shopfloor_uuid,))
row_shopfloor = cursor_system.fetchone() row_shopfloor = cursor_system.fetchone()
if row_shopfloor is None: if row_shopfloor is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -59,9 +59,8 @@ class Reporting:
description='API.INVALID_SHOPFLOOR_ID') description='API.INVALID_SHOPFLOOR_ID')
if shopfloor_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -157,6 +156,7 @@ class Reporting:
" FROM tbl_shopfloors " " FROM tbl_shopfloors "
" WHERE uuid = %s ", (shopfloor_uuid,)) " WHERE uuid = %s ", (shopfloor_uuid,))
row_shopfloor = cursor_system.fetchone() row_shopfloor = cursor_system.fetchone()
if row_shopfloor is None: if row_shopfloor is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -59,9 +59,8 @@ class Reporting:
description='API.INVALID_EQUIPMENT_ID') description='API.INVALID_EQUIPMENT_ID')
if shopfloor_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -157,6 +156,7 @@ class Reporting:
" FROM tbl_shopfloors " " FROM tbl_shopfloors "
" WHERE uuid = %s ", (shopfloor_uuid,)) " WHERE uuid = %s ", (shopfloor_uuid,))
row_shopfloor = cursor_system.fetchone() row_shopfloor = cursor_system.fetchone()
if row_shopfloor is None: if row_shopfloor is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -49,23 +49,22 @@ class Reporting:
if shopfloor_id is None and shopfloor_uuid is None: if shopfloor_id is None and shopfloor_uuid is None:
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
description='API.INVALID_EQUIPMENT_ID') description='API.INVALID_SHOPFLOOR_ID')
if shopfloor_id is not None: if shopfloor_id is not None:
shopfloor_id = str.strip(shopfloor_id) shopfloor_id = str.strip(shopfloor_id)
if not shopfloor_id.isdigit() or int(shopfloor_id) <= 0: if not shopfloor_id.isdigit() or int(shopfloor_id) <= 0:
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
description='API.INVALID_EQUIPMENT_ID') description='API.INVALID_SHOPFLOOR_ID')
if shopfloor_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
description='API.INVALID_EQUIPMENT_UUID') description='API.INVALID_SHOPFLOOR_UUID')
if period_type is None: if period_type is None:
raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', description='API.INVALID_PERIOD_TYPE') raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', description='API.INVALID_PERIOD_TYPE')
@ -157,6 +156,7 @@ class Reporting:
" FROM tbl_shopfloors " " FROM tbl_shopfloors "
" WHERE uuid = %s ", (shopfloor_uuid,)) " WHERE uuid = %s ", (shopfloor_uuid,))
row_shopfloor = cursor_system.fetchone() row_shopfloor = cursor_system.fetchone()
if row_shopfloor is None: if row_shopfloor is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -59,9 +59,8 @@ class Reporting:
description='API.INVALID_SHOPFLOOR_ID') description='API.INVALID_SHOPFLOOR_ID')
if shopfloor_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -160,6 +159,7 @@ class Reporting:
" FROM tbl_shopfloors " " FROM tbl_shopfloors "
" WHERE uuid = %s ", (shopfloor_uuid,)) " WHERE uuid = %s ", (shopfloor_uuid,))
row_shopfloor = cursor_system.fetchone() row_shopfloor = cursor_system.fetchone()
if row_shopfloor is None: if row_shopfloor is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -59,9 +59,8 @@ class Reporting:
description='API.INVALID_SHOPFLOOR_ID') description='API.INVALID_SHOPFLOOR_ID')
if shopfloor_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -156,6 +155,7 @@ class Reporting:
" FROM tbl_shopfloors " " FROM tbl_shopfloors "
" WHERE uuid = %s ", (shopfloor_uuid,)) " WHERE uuid = %s ", (shopfloor_uuid,))
row_shopfloor = cursor_system.fetchone() row_shopfloor = cursor_system.fetchone()
if row_shopfloor is None: if row_shopfloor is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -61,9 +61,8 @@ class Reporting:
description='API.INVALID_SPACE_ID') description='API.INVALID_SPACE_ID')
if space_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -159,6 +158,7 @@ class Reporting:
" FROM tbl_spaces " " FROM tbl_spaces "
" WHERE uuid = %s ", (space_uuid,)) " WHERE uuid = %s ", (space_uuid,))
row_space = cursor_system.fetchone() row_space = cursor_system.fetchone()
if row_space is None: if row_space is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -61,9 +61,8 @@ class Reporting:
description='API.INVALID_SPACE_ID') description='API.INVALID_SPACE_ID')
if space_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -158,6 +157,7 @@ class Reporting:
" FROM tbl_spaces " " FROM tbl_spaces "
" WHERE uuid = %s ", (space_uuid,)) " WHERE uuid = %s ", (space_uuid,))
row_space = cursor_system.fetchone() row_space = cursor_system.fetchone()
if row_space is None: if row_space is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -61,9 +61,8 @@ class Reporting:
description='API.INVALID_SPACE_ID') description='API.INVALID_SPACE_ID')
if space_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -159,6 +158,7 @@ class Reporting:
" FROM tbl_spaces " " FROM tbl_spaces "
" WHERE uuid = %s ", (space_uuid,)) " WHERE uuid = %s ", (space_uuid,))
row_space = cursor_system.fetchone() row_space = cursor_system.fetchone()
if row_space is None: if row_space is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -61,9 +61,8 @@ class Reporting:
description='API.INVALID_SPACE_ID') description='API.INVALID_SPACE_ID')
if space_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -159,6 +158,7 @@ class Reporting:
" FROM tbl_spaces " " FROM tbl_spaces "
" WHERE uuid = %s ", (space_uuid,)) " WHERE uuid = %s ", (space_uuid,))
row_space = cursor_system.fetchone() row_space = cursor_system.fetchone()
if row_space is None: if row_space is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -61,9 +61,8 @@ class Reporting:
description='API.INVALID_SPACE_ID') description='API.INVALID_SPACE_ID')
if space_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -159,6 +158,7 @@ class Reporting:
" FROM tbl_spaces " " FROM tbl_spaces "
" WHERE uuid = %s ", (space_uuid,)) " WHERE uuid = %s ", (space_uuid,))
row_space = cursor_system.fetchone() row_space = cursor_system.fetchone()
if row_space is None: if row_space is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -59,9 +59,8 @@ class Reporting:
description='API.INVALID_SPACE_ID') description='API.INVALID_SPACE_ID')
if space_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -157,6 +156,7 @@ class Reporting:
" FROM tbl_spaces " " FROM tbl_spaces "
" WHERE uuid = %s ", (space_uuid,)) " WHERE uuid = %s ", (space_uuid,))
row_space = cursor_system.fetchone() row_space = cursor_system.fetchone()
if row_space is None: if row_space is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -61,9 +61,8 @@ class Reporting:
description='API.INVALID_SPACE_ID') description='API.INVALID_SPACE_ID')
if space_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -159,6 +158,7 @@ class Reporting:
" FROM tbl_spaces " " FROM tbl_spaces "
" WHERE uuid = %s ", (space_uuid,)) " WHERE uuid = %s ", (space_uuid,))
row_space = cursor_system.fetchone() row_space = cursor_system.fetchone()
if row_space is None: if row_space is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -61,9 +61,8 @@ class Reporting:
description='API.INVALID_SPACE_ID') description='API.INVALID_SPACE_ID')
if space_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -162,6 +161,7 @@ class Reporting:
" FROM tbl_spaces " " FROM tbl_spaces "
" WHERE uuid = %s ", (space_uuid,)) " WHERE uuid = %s ", (space_uuid,))
row_space = cursor_system.fetchone() row_space = cursor_system.fetchone()
if row_space is None: if row_space is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -59,9 +59,8 @@ class Reporting:
description='API.INVALID_SPACE_ID') description='API.INVALID_SPACE_ID')
if space_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -157,6 +156,7 @@ class Reporting:
" FROM tbl_spaces " " FROM tbl_spaces "
" WHERE uuid = %s ", (space_uuid,)) " WHERE uuid = %s ", (space_uuid,))
row_space = cursor_system.fetchone() row_space = cursor_system.fetchone()
if row_space is None: if row_space is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -59,9 +59,8 @@ class Reporting:
description='API.INVALID_STORE_ID') description='API.INVALID_STORE_ID')
if store_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -157,6 +156,7 @@ class Reporting:
" FROM tbl_stores " " FROM tbl_stores "
" WHERE uuid = %s ", (store_uuid,)) " WHERE uuid = %s ", (store_uuid,))
row_store = cursor_system.fetchone() row_store = cursor_system.fetchone()
if row_store is None: if row_store is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -59,9 +59,8 @@ class Reporting:
description='API.INVALID_STORE_ID') description='API.INVALID_STORE_ID')
if store_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -157,6 +156,7 @@ class Reporting:
" FROM tbl_stores " " FROM tbl_stores "
" WHERE uuid = %s ", (store_uuid,)) " WHERE uuid = %s ", (store_uuid,))
row_store = cursor_system.fetchone() row_store = cursor_system.fetchone()
if row_store is None: if row_store is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -59,9 +59,8 @@ class Reporting:
description='API.INVALID_STORE_ID') description='API.INVALID_STORE_ID')
if store_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -157,6 +156,7 @@ class Reporting:
" FROM tbl_stores " " FROM tbl_stores "
" WHERE uuid = %s ", (store_uuid,)) " WHERE uuid = %s ", (store_uuid,))
row_store = cursor_system.fetchone() row_store = cursor_system.fetchone()
if row_store is None: if row_store is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -59,9 +59,8 @@ class Reporting:
description='API.INVALID_STORE_ID') description='API.INVALID_STORE_ID')
if store_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -157,6 +156,7 @@ class Reporting:
" FROM tbl_stores " " FROM tbl_stores "
" WHERE uuid = %s ", (store_uuid,)) " WHERE uuid = %s ", (store_uuid,))
row_store = cursor_system.fetchone() row_store = cursor_system.fetchone()
if row_store is None: if row_store is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -59,9 +59,8 @@ class Reporting:
description='API.INVALID_STORE_ID') description='API.INVALID_STORE_ID')
if store_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -160,6 +159,7 @@ class Reporting:
" FROM tbl_stores " " FROM tbl_stores "
" WHERE uuid = %s ", (store_uuid,)) " WHERE uuid = %s ", (store_uuid,))
row_store = cursor_system.fetchone() row_store = cursor_system.fetchone()
if row_store is None: if row_store is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -4,7 +4,6 @@ import simplejson as json
import mysql.connector import mysql.connector
import config import config
from datetime import datetime, timedelta, timezone from datetime import datetime, timedelta, timezone
import excelexporters.storestatistics import excelexporters.storestatistics
from core import utilities from core import utilities
from decimal import Decimal from decimal import Decimal
@ -60,9 +59,8 @@ class Reporting:
description='API.INVALID_STORE_ID') description='API.INVALID_STORE_ID')
if store_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -158,6 +156,7 @@ class Reporting:
" FROM tbl_stores " " FROM tbl_stores "
" WHERE uuid = %s ", (store_uuid,)) " WHERE uuid = %s ", (store_uuid,))
row_store = cursor_system.fetchone() row_store = cursor_system.fetchone()
if row_store is None: if row_store is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -55,9 +55,8 @@ class Reporting:
description='API.INVALID_TENANT_ID') description='API.INVALID_TENANT_ID')
if tenant_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -121,6 +120,7 @@ class Reporting:
" FROM tbl_tenants t, tbl_contacts c " " FROM tbl_tenants t, tbl_contacts c "
" WHERE t.uuid = %s AND t.contact_id = c.id ", (tenant_uuid,)) " WHERE t.uuid = %s AND t.contact_id = c.id ", (tenant_uuid,))
row_tenant = cursor_system.fetchone() row_tenant = cursor_system.fetchone()
if row_tenant is None: if row_tenant is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -59,9 +59,8 @@ class Reporting:
description='API.INVALID_TENANT_ID') description='API.INVALID_TENANT_ID')
if tenant_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -159,6 +158,7 @@ class Reporting:
" FROM tbl_tenants t, tbl_contacts c " " FROM tbl_tenants t, tbl_contacts c "
" WHERE t.uuid = %s AND t.contact_id = c.id ", (tenant_uuid,)) " WHERE t.uuid = %s AND t.contact_id = c.id ", (tenant_uuid,))
row_tenant = cursor_system.fetchone() row_tenant = cursor_system.fetchone()
if row_tenant is None: if row_tenant is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -59,9 +59,8 @@ class Reporting:
description='API.INVALID_TENANT_ID') description='API.INVALID_TENANT_ID')
if tenant_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -159,6 +158,7 @@ class Reporting:
" FROM tbl_tenants t, tbl_contacts c " " FROM tbl_tenants t, tbl_contacts c "
" WHERE t.uuid = %s AND t.contact_id = c.id ", (tenant_uuid,)) " WHERE t.uuid = %s AND t.contact_id = c.id ", (tenant_uuid,))
row_tenant = cursor_system.fetchone() row_tenant = cursor_system.fetchone()
if row_tenant is None: if row_tenant is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -59,9 +59,8 @@ class Reporting:
description='API.INVALID_TENANT_ID') description='API.INVALID_TENANT_ID')
if tenant_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -159,6 +158,7 @@ class Reporting:
" FROM tbl_tenants t, tbl_contacts c " " FROM tbl_tenants t, tbl_contacts c "
" WHERE t.uuid = %s AND t.contact_id = c.id ", (tenant_uuid,)) " WHERE t.uuid = %s AND t.contact_id = c.id ", (tenant_uuid,))
row_tenant = cursor_system.fetchone() row_tenant = cursor_system.fetchone()
if row_tenant is None: if row_tenant is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -59,9 +59,8 @@ class Reporting:
description='API.INVALID_TENANT_ID') description='API.INVALID_TENANT_ID')
if tenant_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -159,6 +158,7 @@ class Reporting:
" FROM tbl_tenants t, tbl_contacts c " " FROM tbl_tenants t, tbl_contacts c "
" WHERE t.uuid = %s AND t.contact_id = c.id ", (tenant_uuid,)) " WHERE t.uuid = %s AND t.contact_id = c.id ", (tenant_uuid,))
row_tenant = cursor_system.fetchone() row_tenant = cursor_system.fetchone()
if row_tenant is None: if row_tenant is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -59,9 +59,8 @@ class Reporting:
description='API.INVALID_TENANT_ID') description='API.INVALID_TENANT_ID')
if tenant_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -162,6 +161,7 @@ class Reporting:
" FROM tbl_tenants t, tbl_contacts c " " FROM tbl_tenants t, tbl_contacts c "
" WHERE t.uuid = %s AND t.contact_id = c.id ", (tenant_uuid,)) " WHERE t.uuid = %s AND t.contact_id = c.id ", (tenant_uuid,))
row_tenant = cursor_system.fetchone() row_tenant = cursor_system.fetchone()
if row_tenant is None: if row_tenant is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -59,9 +59,8 @@ class Reporting:
description='API.INVALID_TENANT_ID') description='API.INVALID_TENANT_ID')
if tenant_uuid is not None: 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) 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): if not bool(match):
raise falcon.HTTPError(falcon.HTTP_400, raise falcon.HTTPError(falcon.HTTP_400,
title='API.BAD_REQUEST', title='API.BAD_REQUEST',
@ -159,6 +158,7 @@ class Reporting:
" FROM tbl_tenants t, tbl_contacts c " " FROM tbl_tenants t, tbl_contacts c "
" WHERE t.uuid = %s AND t.contact_id = c.id ", (tenant_uuid,)) " WHERE t.uuid = %s AND t.contact_id = c.id ", (tenant_uuid,))
row_tenant = cursor_system.fetchone() row_tenant = cursor_system.fetchone()
if row_tenant is None: if row_tenant is None:
if cursor_system: if cursor_system:
cursor_system.close() cursor_system.close()

View File

@ -466,6 +466,7 @@ const resources = {
'API.INVALID_CHANNEL': 'Invalid channel', 'API.INVALID_CHANNEL': 'Invalid channel',
'API.INVALID_COMBINED_EQUIPMENT_ID': 'Invalid combined equipment id', 'API.INVALID_COMBINED_EQUIPMENT_ID': 'Invalid combined equipment id',
'API.INVALID_COMBINED_EQUIPMENT_NAME': 'Invalid combined equipment name', '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_ID': 'Invalid combined equipment parameter id',
'API.INVALID_COMBINED_EQUIPMENT_PARAMETER_NAME': 'Invalid combined equipment parameter name', 'API.INVALID_COMBINED_EQUIPMENT_PARAMETER_NAME': 'Invalid combined equipment parameter name',
'API.INVALID_COMBINED_EQUIPMENT_PARAMETER_TYPE': 'Invalid combined equipment parameter type', '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_ENERGY_ITEM_NAME': 'Invalid energy item name',
'API.INVALID_EQUATION_IN_EXPRESSION': 'Invalid equation in expression', '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_ID': 'Invalid equipment id',
'API.INVALID_EQUIPMENT_NAME': 'Invalid equipment name', '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_ID': 'Invalid equipment parameter id',
'API.INVALID_EQUIPMENT_PARAMETER_NAME': 'Invalid equipment parameter name', 'API.INVALID_EQUIPMENT_PARAMETER_NAME': 'Invalid equipment parameter name',
'API.INVALID_EQUIPMENT_PARAMETER_TYPE': 'Invalid equipment parameter type', '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_SESSION_PLEASE_RE_LOGIN': 'Invalid session please re-login',
'API.INVALID_SHOPFLOOR_ID': 'Invalid shopfloor id', 'API.INVALID_SHOPFLOOR_ID': 'Invalid shopfloor id',
'API.INVALID_SHOPFLOOR_NAME': 'Invalid shopfloor name', '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_SOURCE_NODE_ID': 'Invalid source node id',
'API.INVALID_SPACE_ID': 'Invalid space id', 'API.INVALID_SPACE_ID': 'Invalid space id',
'API.INVALID_SPACE_NAME': 'Invalid space name', '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_DATE_FORMAT': 'Invalid start date format',
'API.INVALID_START_DATETIME': 'Invalid start datetime', 'API.INVALID_START_DATETIME': 'Invalid start datetime',
'API.INVALID_STATUS': 'Invalid status', 'API.INVALID_STATUS': 'Invalid status',
'API.INVALID_STORE_ID': 'Invalid store id', 'API.INVALID_STORE_ID': 'Invalid store id',
'API.INVALID_STORE_NAME': 'Invalid store name', '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_DESCRIPTION': 'Invalid store type description',
'API.INVALID_STORE_TYPE_ID': 'Invalid store type id', 'API.INVALID_STORE_TYPE_ID': 'Invalid store type id',
'API.INVALID_STORE_TYPE_NAME': 'Invalid store type name', 'API.INVALID_STORE_TYPE_NAME': 'Invalid store type name',
@ -597,6 +601,7 @@ const resources = {
'API.INVALID_TARIFF_TYPE': 'Invalid tariff type', 'API.INVALID_TARIFF_TYPE': 'Invalid tariff type',
'API.INVALID_TENANT_ID': 'Invalid tenant id', 'API.INVALID_TENANT_ID': 'Invalid tenant id',
'API.INVALID_TENANT_NAME': 'Invalid tenant name', '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_DESCRIPTION': 'Invalid tenant type description',
'API.INVALID_TENANT_TYPE_ID': 'Invalid tenant type id', 'API.INVALID_TENANT_TYPE_ID': 'Invalid tenant type id',
'API.INVALID_TENANT_TYPE_NAME': 'Invalid tenant type name', 'API.INVALID_TENANT_TYPE_NAME': 'Invalid tenant type name',
@ -1250,6 +1255,7 @@ const resources = {
'API.INVALID_CHANNEL': 'Invalid channel', 'API.INVALID_CHANNEL': 'Invalid channel',
'API.INVALID_COMBINED_EQUIPMENT_ID': 'Invalid combined equipment id', 'API.INVALID_COMBINED_EQUIPMENT_ID': 'Invalid combined equipment id',
'API.INVALID_COMBINED_EQUIPMENT_NAME': 'Invalid combined equipment name', '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_ID': 'Invalid combined equipment parameter id',
'API.INVALID_COMBINED_EQUIPMENT_PARAMETER_NAME': 'Invalid combined equipment parameter name', 'API.INVALID_COMBINED_EQUIPMENT_PARAMETER_NAME': 'Invalid combined equipment parameter name',
'API.INVALID_COMBINED_EQUIPMENT_PARAMETER_TYPE': 'Invalid combined equipment parameter type', '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_ENERGY_ITEM_NAME': 'Invalid energy item name',
'API.INVALID_EQUATION_IN_EXPRESSION': 'Invalid equation in expression', '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_ID': 'Invalid equipment id',
'API.INVALID_EQUIPMENT_NAME': 'Invalid equipment name', '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_ID': 'Invalid equipment parameter id',
'API.INVALID_EQUIPMENT_PARAMETER_NAME': 'Invalid equipment parameter name', 'API.INVALID_EQUIPMENT_PARAMETER_NAME': 'Invalid equipment parameter name',
'API.INVALID_EQUIPMENT_PARAMETER_TYPE': 'Invalid equipment parameter type', '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_SESSION_PLEASE_RE_LOGIN': 'Invalid session please re-login',
'API.INVALID_SHOPFLOOR_ID': 'Invalid shopfloor id', 'API.INVALID_SHOPFLOOR_ID': 'Invalid shopfloor id',
'API.INVALID_SHOPFLOOR_NAME': 'Invalid shopfloor name', '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_SOURCE_NODE_ID': 'Invalid source node id',
'API.INVALID_SPACE_ID': 'Invalid space id', 'API.INVALID_SPACE_ID': 'Invalid space id',
'API.INVALID_SPACE_NAME': 'Invalid space name', '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_DATE_FORMAT': 'Invalid start date format',
'API.INVALID_START_DATETIME': 'Invalid start datetime', 'API.INVALID_START_DATETIME': 'Invalid start datetime',
'API.INVALID_STATUS': 'Invalid status', 'API.INVALID_STATUS': 'Invalid status',
'API.INVALID_STORE_ID': 'Invalid store id', 'API.INVALID_STORE_ID': 'Invalid store id',
'API.INVALID_STORE_NAME': 'Invalid store name', '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_DESCRIPTION': 'Invalid store type description',
'API.INVALID_STORE_TYPE_ID': 'Invalid store type id', 'API.INVALID_STORE_TYPE_ID': 'Invalid store type id',
'API.INVALID_STORE_TYPE_NAME': 'Invalid store type name', 'API.INVALID_STORE_TYPE_NAME': 'Invalid store type name',
@ -1381,6 +1390,7 @@ const resources = {
'API.INVALID_TARIFF_TYPE': 'Invalid tariff type', 'API.INVALID_TARIFF_TYPE': 'Invalid tariff type',
'API.INVALID_TENANT_ID': 'Invalid tenant id', 'API.INVALID_TENANT_ID': 'Invalid tenant id',
'API.INVALID_TENANT_NAME': 'Invalid tenant name', '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_DESCRIPTION': 'Invalid tenant type description',
'API.INVALID_TENANT_TYPE_ID': 'Invalid tenant type id', 'API.INVALID_TENANT_TYPE_ID': 'Invalid tenant type id',
'API.INVALID_TENANT_TYPE_NAME': 'Invalid tenant type name', 'API.INVALID_TENANT_TYPE_NAME': 'Invalid tenant type name',
@ -2006,6 +2016,7 @@ const resources = {
'API.INVALID_CHANNEL': 'Invalid channel', 'API.INVALID_CHANNEL': 'Invalid channel',
'API.INVALID_COMBINED_EQUIPMENT_ID': 'Invalid combined equipment id', 'API.INVALID_COMBINED_EQUIPMENT_ID': 'Invalid combined equipment id',
'API.INVALID_COMBINED_EQUIPMENT_NAME': 'Invalid combined equipment name', '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_ID': 'Invalid combined equipment parameter id',
'API.INVALID_COMBINED_EQUIPMENT_PARAMETER_NAME': 'Invalid combined equipment parameter name', 'API.INVALID_COMBINED_EQUIPMENT_PARAMETER_NAME': 'Invalid combined equipment parameter name',
'API.INVALID_COMBINED_EQUIPMENT_PARAMETER_TYPE': 'Invalid combined equipment parameter type', '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_ENERGY_ITEM_NAME': 'Invalid energy item name',
'API.INVALID_EQUATION_IN_EXPRESSION': 'Invalid equation in expression', '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_ID': 'Invalid equipment id',
'API.INVALID_EQUIPMENT_NAME': 'Invalid equipment name', '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_ID': 'Invalid equipment parameter id',
'API.INVALID_EQUIPMENT_PARAMETER_NAME': 'Invalid equipment parameter name', 'API.INVALID_EQUIPMENT_PARAMETER_NAME': 'Invalid equipment parameter name',
'API.INVALID_EQUIPMENT_PARAMETER_TYPE': 'Invalid equipment parameter type', '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_SESSION_PLEASE_RE_LOGIN': 'Invalid session please re-login',
'API.INVALID_SHOPFLOOR_ID': 'Invalid shopfloor id', 'API.INVALID_SHOPFLOOR_ID': 'Invalid shopfloor id',
'API.INVALID_SHOPFLOOR_NAME': 'Invalid shopfloor name', '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_SOURCE_NODE_ID': 'Invalid source node id',
'API.INVALID_SPACE_ID': 'Invalid space id', 'API.INVALID_SPACE_ID': 'Invalid space id',
'API.INVALID_SPACE_NAME': 'Invalid space name', '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_DATE_FORMAT': 'Invalid start date format',
'API.INVALID_START_DATETIME': 'Invalid start datetime', 'API.INVALID_START_DATETIME': 'Invalid start datetime',
'API.INVALID_STATUS': 'Invalid status', 'API.INVALID_STATUS': 'Invalid status',
'API.INVALID_STORE_ID': 'Invalid store id', 'API.INVALID_STORE_ID': 'Invalid store id',
'API.INVALID_STORE_NAME': 'Invalid store name', '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_DESCRIPTION': 'Invalid store type description',
'API.INVALID_STORE_TYPE_ID': 'Invalid store type id', 'API.INVALID_STORE_TYPE_ID': 'Invalid store type id',
'API.INVALID_STORE_TYPE_NAME': 'Invalid store type name', 'API.INVALID_STORE_TYPE_NAME': 'Invalid store type name',
@ -2137,6 +2151,7 @@ const resources = {
'API.INVALID_TARIFF_TYPE': 'Invalid tariff type', 'API.INVALID_TARIFF_TYPE': 'Invalid tariff type',
'API.INVALID_TENANT_ID': 'Invalid tenant id', 'API.INVALID_TENANT_ID': 'Invalid tenant id',
'API.INVALID_TENANT_NAME': 'Invalid tenant name', '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_DESCRIPTION': 'Invalid tenant type description',
'API.INVALID_TENANT_TYPE_ID': 'Invalid tenant type id', 'API.INVALID_TENANT_TYPE_ID': 'Invalid tenant type id',
'API.INVALID_TENANT_TYPE_NAME': 'Invalid tenant type name', 'API.INVALID_TENANT_TYPE_NAME': 'Invalid tenant type name',