Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
nengyuanzhang committed May 31, 2024
2 parents 8e6be3d + 5967b22 commit fedcc1b
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 0 deletions.
24 changes: 24 additions & 0 deletions database/recalculate/batch-delete.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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';

Expand Down
8 changes: 8 additions & 0 deletions database/recalculate/batch-truncate.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<Fragment>{text}</Fragment>
);
};

const statusFormatter = status => {
let color = '';
let icon = '';
Expand Down Expand Up @@ -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'),
Expand Down
53 changes: 53 additions & 0 deletions myems-web/src/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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': '生成时间',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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': 'Дата и время создания',
Expand Down Expand Up @@ -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': 'تاريخ الإنشاء',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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': 'วันที่สร้าง',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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': '⽂件格式',
Expand Down

0 comments on commit fedcc1b

Please sign in to comment.