Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
nengyuanzhang committed Sep 15, 2024
2 parents 46de5db + 47f2691 commit 5eca0c6
Show file tree
Hide file tree
Showing 2 changed files with 155 additions and 54 deletions.
163 changes: 109 additions & 54 deletions database/install/myems_system_db.sql
Original file line number Diff line number Diff line change
Expand Up @@ -378,67 +378,26 @@ CREATE INDEX `tbl_energy_storage_containers_commands_index_1`
ON `myems_system_db`.`tbl_energy_storage_containers_commands` (`energy_storage_container_id`);

-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_system_db`.`tbl_energy_storage_containers_power_conversion_systems`
-- Table `myems_system_db`.`tbl_energy_storage_containers_firecontrols`
-- ---------------------------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `myems_system_db`.`tbl_energy_storage_containers_power_conversion_systems` ;
DROP TABLE IF EXISTS `myems_system_db`.`tbl_energy_storage_containers_firecontrols` ;

CREATE TABLE IF NOT EXISTS `myems_system_db`.`tbl_energy_storage_containers_power_conversion_systems` (
CREATE TABLE IF NOT EXISTS `myems_system_db`.`tbl_energy_storage_containers_firecontrols` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
`uuid` CHAR(36) NOT NULL,
`energy_storage_container_id` BIGINT NOT NULL,
`run_state_point_id` BIGINT NOT NULL,
`rated_output_power` DECIMAL(18, 3) NOT NULL,
`today_charge_energy_point_id` BIGINT NULL,
`today_discharge_energy_point_id` BIGINT NULL,
`total_charge_energy_point_id` BIGINT NULL,
`total_discharge_energy_point_id` BIGINT NULL,
`working_status_point_id` BIGINT NULL,
`grid_connection_status_point_id` BIGINT NULL,
`device_status_point_id` BIGINT NULL,
`control_mode_point_id` BIGINT NULL,
`total_ac_active_power_point_id` BIGINT NULL,
`total_ac_reactive_power_point_id` BIGINT NULL,
`total_ac_apparent_power_point_id` BIGINT NULL,
`total_ac_power_factor_point_id` BIGINT NULL,
`ac_frequency_point_id` BIGINT NULL,
`phase_a_active_power_point_id` BIGINT NULL,
`phase_b_active_power_point_id` BIGINT NULL,
`phase_c_active_power_point_id` BIGINT NULL,
`phase_a_reactive_power_point_id` BIGINT NULL,
`phase_b_reactive_power_point_id` BIGINT NULL,
`phase_c_reactive_power_point_id` BIGINT NULL,
`phase_a_apparent_power_point_id` BIGINT NULL,
`phase_b_apparent_power_point_id` BIGINT NULL,
`phase_c_apparent_power_point_id` BIGINT NULL,
`ab_voltage_point_id` BIGINT NULL,
`bc_voltage_point_id` BIGINT NULL,
`ca_voltage_point_id` BIGINT NULL,
`ab_current_point_id` BIGINT NULL,
`bc_current_point_id` BIGINT NULL,
`ca_current_point_id` BIGINT NULL,
`phase_a_voltage_point_id` BIGINT NULL,
`phase_b_voltage_point_id` BIGINT NULL,
`phase_c_voltage_point_id` BIGINT NULL,
`phase_a_current_point_id` BIGINT NULL,
`phase_b_current_point_id` BIGINT NULL,
`phase_c_current_point_id` BIGINT NULL,
`pcs_module_temperature_point_id` BIGINT NULL,
`pcs_ambient_temperature_point_id` BIGINT NULL,
`a1_module_temperature_point_id` BIGINT NULL,
`b1_module_temperature_point_id` BIGINT NULL,
`c1_module_temperature_point_id` BIGINT NULL,
`a2_module_temperature_point_id` BIGINT NULL,
`b2_module_temperature_point_id` BIGINT NULL,
`c2_module_temperature_point_id` BIGINT NULL,
`air_inlet_temperature_point_id` BIGINT NULL,
`air_outlet_temperature_point_id` BIGINT NULL,
`dc_power_point_id` BIGINT NULL,
`dc_voltage_point_id` BIGINT NULL,
`dc_current_point_id` BIGINT NULL,
`inside_temperature_point_id` BIGINT, -- 内置温度值
`outside_temperature_point_id` BIGINT, -- 外置温度值
`temperature_alarm_point_id` BIGINT, -- 温度报警状态
`smoke_sensor_value_point_id` BIGINT, -- 烟雾传感器值
`smoke_sensor_alarm_point_id` BIGINT, -- 烟雾传感器报警状态
`battery_safety_detection_sensor_value_point_id` BIGINT, -- 电池安全检测传感器值
`battery_safety_detection_sensor_alarm_point_id` BIGINT, -- 电池安全检测传感器报警状态
`fire_extinguishing_device_status_point_id` BIGINT, -- 灭火装置状态值
PRIMARY KEY (`id`));
CREATE INDEX `tbl_energy_storage_containers_pcs_index_1`
ON `myems_system_db`.`tbl_energy_storage_containers_power_conversion_systems` (`energy_storage_container_id`);
CREATE INDEX `tbl_energy_storage_containers_firecontrols_index_1`
ON `myems_system_db`.`tbl_energy_storage_containers_firecontrols` (`energy_storage_container_id`);

-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_system_db`.`tbl_energy_storage_containers_grids`
Expand Down Expand Up @@ -474,6 +433,39 @@ CREATE TABLE IF NOT EXISTS `myems_system_db`.`tbl_energy_storage_containers_grid
CREATE INDEX `tbl_energy_storage_containers_grids_index_1`
ON `myems_system_db`.`tbl_energy_storage_containers_grids` (`energy_storage_container_id`);

-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_system_db`.`tbl_energy_storage_containers_hvacs`
-- ---------------------------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `myems_system_db`.`tbl_energy_storage_containers_hvacs` ;

CREATE TABLE IF NOT EXISTS `myems_system_db`.`tbl_energy_storage_containers_hvacs` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
`uuid` CHAR(36) NOT NULL,
`energy_storage_container_id` BIGINT NOT NULL,
`working_status_point_id` BIGINT,
`indoor_fan_status_point_id` BIGINT,
`outdoor_fan_status_point_id` BIGINT,
`emergency_fan_status_point_id` BIGINT,
`compressor_status_point_id` BIGINT,
`electric_heating_status_point_id` BIGINT,
`coil_temperature_point_id` BIGINT,
`temperature_outside_point_id` BIGINT,
`temperature_inside_point_id` BIGINT,
`condensation_temperature_point_id` BIGINT,
`outlet_air_temperature_point_id` BIGINT,
`return_air_temperature_point_id` BIGINT,
`exhaust_temperature_point_id` BIGINT,
`heating_on_temperature_point_id` BIGINT,
`heating_off_temperature_point_id` BIGINT,
`cooling_on_temperature_point_id` BIGINT,
`cooling_off_temperature_point_id` BIGINT,
`high_temperature_alarm_set_point_id` BIGINT,
`low_temperature_alarm_set_point_id` BIGINT,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_energy_storage_containers_hvacs_index_1`
ON `myems_system_db`.`tbl_energy_storage_containers_hvacs` (`energy_storage_container_id`);

-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_system_db`.`tbl_energy_storage_containers_loads`
-- ---------------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -508,6 +500,69 @@ CREATE INDEX `tbl_energy_storage_containers_grids_index_1`
ON `myems_system_db`.`tbl_energy_storage_containers_loads` (`energy_storage_container_id`);


-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_system_db`.`tbl_energy_storage_containers_power_conversion_systems`
-- ---------------------------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `myems_system_db`.`tbl_energy_storage_containers_power_conversion_systems` ;

CREATE TABLE IF NOT EXISTS `myems_system_db`.`tbl_energy_storage_containers_power_conversion_systems` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
`uuid` CHAR(36) NOT NULL,
`energy_storage_container_id` BIGINT NOT NULL,
`run_state_point_id` BIGINT NOT NULL,
`rated_output_power` DECIMAL(18, 3) NOT NULL,
`today_charge_energy_point_id` BIGINT NULL,
`today_discharge_energy_point_id` BIGINT NULL,
`total_charge_energy_point_id` BIGINT NULL,
`total_discharge_energy_point_id` BIGINT NULL,
`working_status_point_id` BIGINT NULL,
`grid_connection_status_point_id` BIGINT NULL,
`device_status_point_id` BIGINT NULL,
`control_mode_point_id` BIGINT NULL,
`total_ac_active_power_point_id` BIGINT NULL,
`total_ac_reactive_power_point_id` BIGINT NULL,
`total_ac_apparent_power_point_id` BIGINT NULL,
`total_ac_power_factor_point_id` BIGINT NULL,
`ac_frequency_point_id` BIGINT NULL,
`phase_a_active_power_point_id` BIGINT NULL,
`phase_b_active_power_point_id` BIGINT NULL,
`phase_c_active_power_point_id` BIGINT NULL,
`phase_a_reactive_power_point_id` BIGINT NULL,
`phase_b_reactive_power_point_id` BIGINT NULL,
`phase_c_reactive_power_point_id` BIGINT NULL,
`phase_a_apparent_power_point_id` BIGINT NULL,
`phase_b_apparent_power_point_id` BIGINT NULL,
`phase_c_apparent_power_point_id` BIGINT NULL,
`ab_voltage_point_id` BIGINT NULL,
`bc_voltage_point_id` BIGINT NULL,
`ca_voltage_point_id` BIGINT NULL,
`ab_current_point_id` BIGINT NULL,
`bc_current_point_id` BIGINT NULL,
`ca_current_point_id` BIGINT NULL,
`phase_a_voltage_point_id` BIGINT NULL,
`phase_b_voltage_point_id` BIGINT NULL,
`phase_c_voltage_point_id` BIGINT NULL,
`phase_a_current_point_id` BIGINT NULL,
`phase_b_current_point_id` BIGINT NULL,
`phase_c_current_point_id` BIGINT NULL,
`pcs_module_temperature_point_id` BIGINT NULL,
`pcs_ambient_temperature_point_id` BIGINT NULL,
`a1_module_temperature_point_id` BIGINT NULL,
`b1_module_temperature_point_id` BIGINT NULL,
`c1_module_temperature_point_id` BIGINT NULL,
`a2_module_temperature_point_id` BIGINT NULL,
`b2_module_temperature_point_id` BIGINT NULL,
`c2_module_temperature_point_id` BIGINT NULL,
`air_inlet_temperature_point_id` BIGINT NULL,
`air_outlet_temperature_point_id` BIGINT NULL,
`dc_power_point_id` BIGINT NULL,
`dc_voltage_point_id` BIGINT NULL,
`dc_current_point_id` BIGINT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_energy_storage_containers_pcs_index_1`
ON `myems_system_db`.`tbl_energy_storage_containers_power_conversion_systems` (`energy_storage_container_id`);

-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_system_db`.`tbl_energy_storage_containers_schedules`
-- ---------------------------------------------------------------------------------------------------------------------
Expand Down
46 changes: 46 additions & 0 deletions database/upgrade/upgrade4.9.0RC.sql
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,52 @@ ADD `active_power_a_point_id` BIGINT NULL AFTER `rated_input_power`;
ALTER TABLE myems_system_db.tbl_energy_storage_containers_loads
ADD `total_active_power_point_id` BIGINT NULL AFTER `rated_input_power`;

CREATE TABLE IF NOT EXISTS `myems_system_db`.`tbl_energy_storage_containers_firecontrols` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
`uuid` CHAR(36) NOT NULL,
`energy_storage_container_id` BIGINT NOT NULL,
`inside_temperature_point_id` BIGINT, -- 内置温度值
`outside_temperature_point_id` BIGINT, -- 外置温度值
`temperature_alarm_point_id` BIGINT, -- 温度报警状态
`smoke_sensor_value_point_id` BIGINT, -- 烟雾传感器值
`smoke_sensor_alarm_point_id` BIGINT, -- 烟雾传感器报警状态
`battery_safety_detection_sensor_value_point_id` BIGINT, -- 电池安全检测传感器值
`battery_safety_detection_sensor_alarm_point_id` BIGINT, -- 电池安全检测传感器报警状态
`fire_extinguishing_device_status_point_id` BIGINT, -- 灭火装置状态值
PRIMARY KEY (`id`));
CREATE INDEX `tbl_energy_storage_containers_firecontrols_index_1`
ON `myems_system_db`.`tbl_energy_storage_containers_firecontrols` (`energy_storage_container_id`);


CREATE TABLE IF NOT EXISTS `myems_system_db`.`tbl_energy_storage_containers_hvacs` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
`uuid` CHAR(36) NOT NULL,
`energy_storage_container_id` BIGINT NOT NULL,
`working_status_point_id` BIGINT,
`indoor_fan_status_point_id` BIGINT,
`outdoor_fan_status_point_id` BIGINT,
`emergency_fan_status_point_id` BIGINT,
`compressor_status_point_id` BIGINT,
`electric_heating_status_point_id` BIGINT,
`coil_temperature_point_id` BIGINT,
`temperature_outside_point_id` BIGINT,
`temperature_inside_point_id` BIGINT,
`condensation_temperature_point_id` BIGINT,
`outlet_air_temperature_point_id` BIGINT,
`return_air_temperature_point_id` BIGINT,
`exhaust_temperature_point_id` BIGINT,
`heating_on_temperature_point_id` BIGINT,
`heating_off_temperature_point_id` BIGINT,
`cooling_on_temperature_point_id` BIGINT,
`cooling_off_temperature_point_id` BIGINT,
`high_temperature_alarm_set_point_id` BIGINT,
`low_temperature_alarm_set_point_id` BIGINT,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_energy_storage_containers_hvacs_index_1`
ON `myems_system_db`.`tbl_energy_storage_containers_hvacs` (`energy_storage_container_id`);

-- UPDATE VERSION NUMBER
UPDATE `myems_system_db`.`tbl_versions` SET version='4.9.0RC', release_date='2024-09-09' WHERE id=1;

Expand Down

0 comments on commit 5eca0c6

Please sign in to comment.