From 5967b22675f82f4f57fae72ea91ffaf65357533e Mon Sep 17 00:00:00 2001 From: nengyuanzhang <13011132526@163.com> Date: Fri, 31 May 2024 22:26:21 +0800 Subject: [PATCH] updated EnergyStoragePowerStationTable --- database/recalculate/batch-delete.sql | 24 +++++++++ database/recalculate/batch-truncate.sql | 8 +++ .../EnergyStoragePowerStationTable.js | 29 ++++++++++ myems-web/src/i18n.js | 53 +++++++++++++++++++ 4 files changed, 114 insertions(+) diff --git a/database/recalculate/batch-delete.sql b/database/recalculate/batch-delete.sql index 5080b7e20c..d938629861 100644 --- a/database/recalculate/batch-delete.sql +++ b/database/recalculate/batch-delete.sql @@ -12,6 +12,18 @@ WHERE start_datetime_utc >= '2020-12-31 16:00:00'; DELETE FROM `myems_energy_db`.`tbl_combined_equipment_output_category_hourly` WHERE start_datetime_utc >= '2020-12-31 16:00:00'; +DELETE FROM `myems_energy_db`.`tbl_energy_storage_container_charge_hourly` +WHERE start_datetime_utc >= '2020-12-31 16:00:00'; + +DELETE FROM `myems_energy_db`.`tbl_energy_storage_container_discharge_hourly` +WHERE start_datetime_utc >= '2020-12-31 16:00:00'; + +DELETE FROM `myems_energy_db`.`tbl_energy_storage_power_station_charge_hourly` +WHERE start_datetime_utc >= '2020-12-31 16:00:00'; + +DELETE FROM `myems_energy_db`.`tbl_energy_storage_power_station_discharge_hourly` +WHERE start_datetime_utc >= '2020-12-31 16:00:00'; + DELETE FROM `myems_energy_db`.`tbl_equipment_input_category_hourly` WHERE start_datetime_utc >= '2020-12-31 16:00:00'; @@ -67,6 +79,18 @@ WHERE start_datetime_utc >= '2020-12-31 16:00:00'; DELETE FROM `myems_billing_db`.`tbl_combined_equipment_output_category_hourly` WHERE start_datetime_utc >= '2020-12-31 16:00:00'; +DELETE FROM `myems_billing_db`.`tbl_energy_storage_container_charge_hourly` +WHERE start_datetime_utc >= '2020-12-31 16:00:00'; + +DELETE FROM `myems_billing_db`.`tbl_energy_storage_container_discharge_hourly` +WHERE start_datetime_utc >= '2020-12-31 16:00:00'; + +DELETE FROM `myems_billing_db`.`tbl_energy_storage_power_station_charge_hourly` +WHERE start_datetime_utc >= '2020-12-31 16:00:00'; + +DELETE FROM `myems_billing_db`.`tbl_energy_storage_power_station_discharge_hourly` +WHERE start_datetime_utc >= '2020-12-31 16:00:00'; + DELETE FROM `myems_billing_db`.`tbl_equipment_input_category_hourly` WHERE start_datetime_utc >= '2020-12-31 16:00:00'; diff --git a/database/recalculate/batch-truncate.sql b/database/recalculate/batch-truncate.sql index b7d2bd7d7c..8836bf037c 100644 --- a/database/recalculate/batch-truncate.sql +++ b/database/recalculate/batch-truncate.sql @@ -6,6 +6,10 @@ TRUNCATE TABLE myems_energy_db.tbl_combined_equipment_input_category_hourly; TRUNCATE TABLE myems_energy_db.tbl_combined_equipment_input_item_hourly; TRUNCATE TABLE myems_energy_db.tbl_combined_equipment_output_category_hourly; +TRUNCATE TABLE myems_energy_db.tbl_energy_storage_container_charge_hourly; +TRUNCATE TABLE myems_energy_db.tbl_energy_storage_container_discharge_hourly; +TRUNCATE TABLE myems_energy_db.tbl_energy_storage_power_station_charge_hourly; +TRUNCATE TABLE myems_energy_db.tbl_energy_storage_power_station_discharge_hourly; TRUNCATE TABLE myems_energy_db.tbl_equipment_input_category_hourly; TRUNCATE TABLE myems_energy_db.tbl_equipment_input_item_hourly; TRUNCATE TABLE myems_energy_db.tbl_equipment_output_category_hourly; @@ -26,6 +30,10 @@ TRUNCATE TABLE myems_energy_db.tbl_virtual_meter_hourly; TRUNCATE TABLE myems_billing_db.tbl_combined_equipment_input_category_hourly; TRUNCATE TABLE myems_billing_db.tbl_combined_equipment_input_item_hourly; TRUNCATE TABLE myems_billing_db.tbl_combined_equipment_output_category_hourly; +TRUNCATE TABLE myems_billing_db.tbl_energy_storage_container_charge_hourly; +TRUNCATE TABLE myems_billing_db.tbl_energy_storage_container_discharge_hourly; +TRUNCATE TABLE myems_billing_db.tbl_energy_storage_power_station_charge_hourly; +TRUNCATE TABLE myems_billing_db.tbl_energy_storage_power_station_discharge_hourly; TRUNCATE TABLE myems_billing_db.tbl_equipment_input_category_hourly; TRUNCATE TABLE myems_billing_db.tbl_equipment_input_item_hourly; TRUNCATE TABLE myems_billing_db.tbl_equipment_output_category_hourly; diff --git a/myems-web/src/components/MyEMS/EnergyStoragePowerStation/EnergyStoragePowerStationTable.js b/myems-web/src/components/MyEMS/EnergyStoragePowerStation/EnergyStoragePowerStationTable.js index 2deaa957b4..9101569d87 100644 --- a/myems-web/src/components/MyEMS/EnergyStoragePowerStation/EnergyStoragePowerStationTable.js +++ b/myems-web/src/components/MyEMS/EnergyStoragePowerStation/EnergyStoragePowerStationTable.js @@ -80,6 +80,27 @@ const selectRow = onSelect => ({ totalSize: energyStoragePowerStationList.length }; + + const phaseFormatter = phaseOfLifecycle => { + let text = ''; + switch (phaseOfLifecycle) { + case '1use': + text = t('Use Phase'); + break; + case '2commissioning': + text = t('Commissioning Phase') + break; + case '3construction': + text = t('Construction Phase') + break; + default: + text = t('Use Phase'); + } + return ( + {text} + ); + }; + const statusFormatter = status => { let color = ''; let icon = ''; @@ -181,6 +202,14 @@ const selectRow = onSelect => ({ headerClasses: 'border-0', sort: true, }, + { + dataField: 'phase_of_lifecycle', + text: t('Phase of Lifecycle'), + formatter: phaseFormatter, + classes: 'border-0 align-middle', + headerClasses: 'border-0', + sort: true, + }, { dataField: 'status', text: t('Communication Status'), diff --git a/myems-web/src/i18n.js b/myems-web/src/i18n.js index a70f280621..8f72f752ea 100644 --- a/myems-web/src/i18n.js +++ b/myems-web/src/i18n.js @@ -504,6 +504,10 @@ const resources = { 'Battery Prohibit DisCharging': 'Prohibit DisCharging', 'Battery Prohibit Charging': 'Prohibit Charging', 'Battery Normal': 'Normal', + 'Phase of Lifecycle': 'Phase of Lifecycle', + 'Use Phase': 'Use Phase', + 'Commissioning Phase': 'Commissioning Phase', + 'Construction Phase': 'Construction Phase', //Advanced Reporting & Knowledge base 'Created Datetime': 'Created Datetime', @@ -1612,6 +1616,10 @@ const resources = { 'Battery Prohibit DisCharging': '禁放', 'Battery Prohibit Charging': '禁充', 'Battery Normal': '正常', + 'Phase of Lifecycle': '阶段', + 'Use Phase': '投用', + 'Commissioning Phase': '调试', + 'Construction Phase': '在建', //Advanced Reporting & Knowledge Base 'Created Datetime': '生成时间', @@ -2745,6 +2753,10 @@ const resources = { 'Battery Prohibit DisCharging': 'Deaktivieren verbieten', 'Battery Prohibit Charging': 'Gebühren verbieten', 'Battery Normal': 'Normal', + 'Phase of Lifecycle': 'Phase of Lifecycle', + 'Use Phase': 'Use Phase', + 'Commissioning Phase': 'Commissioning Phase', + 'Construction Phase': 'Construction Phase', //Advanced Reporting & Knowledge Base 'Created Datetime': 'Datetime erstellt', @@ -3895,6 +3907,10 @@ const resources = { 'Battery Prohibit DisCharging': 'Interdiction de désinstaller', 'Battery Prohibit Charging': 'Interdiction de charger', 'Battery Normal': 'Typiquement', + 'Phase of Lifecycle': 'Phase of Lifecycle', + 'Use Phase': 'Use Phase', + 'Commissioning Phase': 'Commissioning Phase', + 'Construction Phase': 'Construction Phase', //Advanced Reporting & Knowledge base 'Created Datetime': 'Créé Datetime', @@ -5035,6 +5051,10 @@ const resources = { 'Battery Prohibit DisCharging': 'Prohibición de descargar', 'Battery Prohibit Charging': 'Está prohibido cargar', 'Battery Normal': 'Típico', + 'Phase of Lifecycle': 'Phase of Lifecycle', + 'Use Phase': 'Use Phase', + 'Commissioning Phase': 'Commissioning Phase', + 'Construction Phase': 'Construction Phase', //Advanced Reporting & Knowledge base 'Created Datetime': 'Fecha y hora creada', @@ -6174,6 +6194,10 @@ const resources = { 'Battery Prohibit DisCharging': 'Запрещается выгрузка', 'Battery Prohibit Charging': 'Зарядка запрещена.', 'Battery Normal': 'Типичный', + 'Phase of Lifecycle': 'Phase of Lifecycle', + 'Use Phase': 'Use Phase', + 'Commissioning Phase': 'Commissioning Phase', + 'Construction Phase': 'Construction Phase', //Advanced Reporting & Knowledge base 'Created Datetime': 'Дата и время создания', @@ -7303,6 +7327,10 @@ const resources = { 'Battery Prohibit DisCharging': 'تعطيل إلغاء', 'Battery Prohibit Charging': 'حظر شحن', 'Battery Normal': 'نموذجي', + 'Phase of Lifecycle': 'Phase of Lifecycle', + 'Use Phase': 'Use Phase', + 'Commissioning Phase': 'Commissioning Phase', + 'Construction Phase': 'Construction Phase', //Advanced Reporting & Knowledge base 'Created Datetime': 'تاريخ الإنشاء', @@ -8428,6 +8456,10 @@ const resources = { 'Battery Prohibit DisCharging': 'Không gỡ cài đặt', 'Battery Prohibit Charging': 'Không sạc', 'Battery Normal': 'Đặc trưng', + 'Phase of Lifecycle': 'Phase of Lifecycle', + 'Use Phase': 'Use Phase', + 'Commissioning Phase': 'Commissioning Phase', + 'Construction Phase': 'Construction Phase', //Advanced Reporting & Knowledge base 'Created Datetime': 'Đã tạo Datetime', @@ -9555,6 +9587,10 @@ const resources = { 'Battery Prohibit DisCharging': 'ห้ามขนถ่าย', 'Battery Prohibit Charging': 'ห้ามชาร์จ', 'Battery Normal': 'ทั่วไป', + 'Phase of Lifecycle': 'Phase of Lifecycle', + 'Use Phase': 'Use Phase', + 'Commissioning Phase': 'Commissioning Phase', + 'Construction Phase': 'Construction Phase', //Advanced Reporting & Knowledge base 'Created Datetime': 'วันที่สร้าง', @@ -10681,6 +10717,10 @@ const resources = { 'Battery Prohibit DisCharging': 'Yüklemeyi yasakla', 'Battery Prohibit Charging': 'Yüklemeyi yasakla', 'Battery Normal': 'Normal', + 'Phase of Lifecycle': 'Phase of Lifecycle', + 'Use Phase': 'Use Phase', + 'Commissioning Phase': 'Commissioning Phase', + 'Construction Phase': 'Construction Phase', //Advanced Reporting & Knowledge base 'Created Datetime': 'Oluşturulma Tarihi', @@ -11813,6 +11853,10 @@ const resources = { 'Battery Prohibit DisCharging': 'Melarangkan Nyahmuat', 'Battery Prohibit Charging': 'Melarang Memuatkan', 'Battery Normal': 'Normal', + 'Phase of Lifecycle': 'Phase of Lifecycle', + 'Use Phase': 'Use Phase', + 'Commissioning Phase': 'Commissioning Phase', + 'Construction Phase': 'Construction Phase', //Advanced Reporting & Knowledge base 'Created Datetime': 'Dicipta Datetime', @@ -12948,6 +12992,10 @@ const resources = { 'Battery Prohibit DisCharging': 'Melarangkan Memotong', 'Battery Prohibit Charging': 'Melarangkan Memuatkan', 'Battery Normal': 'Normal', + 'Phase of Lifecycle': 'Phase of Lifecycle', + 'Use Phase': 'Use Phase', + 'Commissioning Phase': 'Commissioning Phase', + 'Construction Phase': 'Construction Phase', //Advanced Reporting & Knowledge Base 'Created Datetime': 'Waktu Generasi', @@ -14070,6 +14118,11 @@ const resources = { 'Battery Prohibit DisCharging': '禁放', 'Battery Prohibit Charging': '禁充', 'Battery Normal': '正常', + 'Phase of Lifecycle': 'Phase of Lifecycle', + 'Use Phase': 'Use Phase', + 'Commissioning Phase': 'Commissioning Phase', + 'Construction Phase': 'Construction Phase', + //Advanced Reporting & Knowledge Base 'Created Datetime': '⽣成時間', 'File Format': '⽂件格式',