Pārlūkot izejas kodu

加场站相关功能

hekang 1 mēnesi atpakaļ
vecāks
revīzija
9bdb02dfda

+ 167 - 1
forecast-backend-server/src/main/resources/sql/electricity_init_new.sql

@@ -700,6 +700,42 @@ INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path"
 INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2032, '故障日志修改', 2024, 3, '#', '', '', '', 1, 0, 'F', '0', '0', 'alarm:faultProcessLog:edit', '#', 'admin', '2026-06-18 00:00:00', '', NULL, '');
 INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2033, '故障日志删除', 2024, 4, '#', '', '', '', 1, 0, 'F', '0', '0', 'alarm:faultProcessLog:remove', '#', 'admin', '2026-06-18 00:00:00', '', NULL, '');
 INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2034, '故障日志导出', 2024, 5, '#', '', '', '', 1, 0, 'F', '0', '0', 'alarm:faultProcessLog:export', '#', 'admin', '2026-06-18 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2035, '场站管理', 2019, 3, 'station', 'ufo/config/station/index', '', 'ConfigStation', 1, 0, 'C', '0', '0', 'config:station:list', 'control', 'admin', '2026-07-20 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2036, '场站查询', 2035, 1, '#', '', '', '', 1, 0, 'F', '0', '0', 'config:station:query', '#', 'admin', '2026-07-20 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2037, '场站新增', 2035, 2, '#', '', '', '', 1, 0, 'F', '0', '0', 'config:station:add', '#', 'admin', '2026-07-20 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2038, '场站修改', 2035, 3, '#', '', '', '', 1, 0, 'F', '0', '0', 'config:station:edit', '#', 'admin', '2026-07-20 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2039, '场站删除', 2035, 4, '#', '', '', '', 1, 0, 'F', '0', '0', 'config:station:remove', '#', 'admin', '2026-07-20 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2040, '场站导出', 2035, 5, '#', '', '', '', 1, 0, 'F', '0', '0', 'config:station:export', '#', 'admin', '2026-07-20 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2041, '光伏组件', 2019, 4, 'module', 'ufo/config/station/module/index', '', 'ConfigStationModule', 1, 0, 'C', '0', '0', 'config:stationModule:list', 'component', 'admin', '2026-07-21 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2042, '组件查询', 2041, 1, '#', '', '', '', 1, 0, 'F', '0', '0', 'config:stationModule:query', '#', 'admin', '2026-07-21 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2043, '组件新增', 2041, 2, '#', '', '', '', 1, 0, 'F', '0', '0', 'config:stationModule:add', '#', 'admin', '2026-07-21 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2044, '组件修改', 2041, 3, '#', '', '', '', 1, 0, 'F', '0', '0', 'config:stationModule:edit', '#', 'admin', '2026-07-21 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2045, '组件删除', 2041, 4, '#', '', '', '', 1, 0, 'F', '0', '0', 'config:stationModule:remove', '#', 'admin', '2026-07-21 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2046, '组件导出', 2041, 5, '#', '', '', '', 1, 0, 'F', '0', '0', 'config:stationModule:export', '#', 'admin', '2026-07-21 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2047, '限电配置', 2019, 5, 'power-limit', 'ufo/config/station/powerLimit/index', '', 'ConfigStationPowerLimit', 1, 0, 'C', '0', '0', 'config:stationPowerLimit:list', 'stop', 'admin', '2026-07-21 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2048, '限电查询', 2047, 1, '#', '', '', '', 1, 0, 'F', '0', '0', 'config:stationPowerLimit:query', '#', 'admin', '2026-07-21 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2049, '限电新增', 2047, 2, '#', '', '', '', 1, 0, 'F', '0', '0', 'config:stationPowerLimit:add', '#', 'admin', '2026-07-21 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2050, '限电修改', 2047, 3, '#', '', '', '', 1, 0, 'F', '0', '0', 'config:stationPowerLimit:edit', '#', 'admin', '2026-07-21 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2051, '限电删除', 2047, 4, '#', '', '', '', 1, 0, 'F', '0', '0', 'config:stationPowerLimit:remove', '#', 'admin', '2026-07-21 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2052, '限电导出', 2047, 5, '#', '', '', '', 1, 0, 'F', '0', '0', 'config:stationPowerLimit:export', '#', 'admin', '2026-07-21 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2053, '设备配置', 2019, 6, 'device', 'ufo/config/station/device/index', '', 'ConfigStationDevice', 1, 0, 'C', '0', '0', 'config:stationDevice:list', 'appstore', 'admin', '2026-07-21 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2054, '设备查询', 2053, 1, '#', '', '', '', 1, 0, 'F', '0', '0', 'config:stationDevice:query', '#', 'admin', '2026-07-21 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2055, '设备新增', 2053, 2, '#', '', '', '', 1, 0, 'F', '0', '0', 'config:stationDevice:add', '#', 'admin', '2026-07-21 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2056, '设备修改', 2053, 3, '#', '', '', '', 1, 0, 'F', '0', '0', 'config:stationDevice:edit', '#', 'admin', '2026-07-21 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2057, '设备删除', 2053, 4, '#', '', '', '', 1, 0, 'F', '0', '0', 'config:stationDevice:remove', '#', 'admin', '2026-07-21 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2058, '设备导出', 2053, 5, '#', '', '', '', 1, 0, 'F', '0', '0', 'config:stationDevice:export', '#', 'admin', '2026-07-21 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2059, '通道配置', 2019, 7, 'channel', 'ufo/config/station/channel/index', '', 'ConfigStationChannel', 1, 0, 'C', '0', '0', 'config:stationChannel:list', 'api', 'admin', '2026-07-21 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2060, '通道查询', 2059, 1, '#', '', '', '', 1, 0, 'F', '0', '0', 'config:stationChannel:query', '#', 'admin', '2026-07-21 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2061, '通道新增', 2059, 2, '#', '', '', '', 1, 0, 'F', '0', '0', 'config:stationChannel:add', '#', 'admin', '2026-07-21 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2062, '通道修改', 2059, 3, '#', '', '', '', 1, 0, 'F', '0', '0', 'config:stationChannel:edit', '#', 'admin', '2026-07-21 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2063, '通道删除', 2059, 4, '#', '', '', '', 1, 0, 'F', '0', '0', 'config:stationChannel:remove', '#', 'admin', '2026-07-21 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2064, '通道导出', 2059, 5, '#', '', '', '', 1, 0, 'F', '0', '0', 'config:stationChannel:export', '#', 'admin', '2026-07-21 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2065, '测点配置', 2019, 8, 'point', 'ufo/config/station/point/index', '', 'ConfigStationPoint', 1, 0, 'C', '0', '0', 'config:stationPoint:list', 'aim', 'admin', '2026-07-21 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2066, '测点查询', 2065, 1, '#', '', '', '', 1, 0, 'F', '0', '0', 'config:stationPoint:query', '#', 'admin', '2026-07-21 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2067, '测点新增', 2065, 2, '#', '', '', '', 1, 0, 'F', '0', '0', 'config:stationPoint:add', '#', 'admin', '2026-07-21 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2068, '测点修改', 2065, 3, '#', '', '', '', 1, 0, 'F', '0', '0', 'config:stationPoint:edit', '#', 'admin', '2026-07-21 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2069, '测点删除', 2065, 4, '#', '', '', '', 1, 0, 'F', '0', '0', 'config:stationPoint:remove', '#', 'admin', '2026-07-21 00:00:00', '', NULL, '');
+INSERT INTO "sys_menu" ("menu_id", "menu_name", "parent_id", "order_num", "path", "component", "query", "route_name", "is_frame", "is_cache", "menu_type", "visible", "status", "perms", "icon", "create_by", "create_time", "update_by", "update_time", "remark") VALUES (2070, '测点导出', 2065, 5, '#', '', '', '', 1, 0, 'F', '0', '0', 'config:stationPoint:export', '#', 'admin', '2026-07-21 00:00:00', '', NULL, '');
 
 -- ----------------------------
 -- Table structure for sys_notice
@@ -4114,6 +4150,136 @@ COMMENT ON COLUMN weather_warning_type.saved_field IS '保留字段';
 COMMENT ON COLUMN weather_warning_type.saved_field1 IS '保留字段1';
 COMMENT ON COLUMN weather_warning_type.saved_field2 IS '保留字段2';
 
+
+-- -----------------------------------------------------
+-- 7.78  config_station_pv_module  [光伏组件配置]
+-- -----------------------------------------------------
+DROP TABLE IF EXISTS config_station_pv_module CASCADE;
+CREATE TABLE config_station_pv_module (
+    id BIGSERIAL NOT NULL,
+    station_id BIGINT NOT NULL,
+    model VARCHAR(100),
+    brand VARCHAR(100),
+    rated_power NUMERIC(12,2),
+    module_type VARCHAR(50),
+    module_count BIGINT,
+    conversion_efficiency VARCHAR(50),
+    temperature_coefficient VARCHAR(50),
+    install_date VARCHAR(20),
+    create_by VARCHAR(64),
+    create_time TIMESTAMP,
+    update_by VARCHAR(64),
+    update_time TIMESTAMP,
+    remark VARCHAR(500)
+);
+ALTER TABLE config_station_pv_module ADD CONSTRAINT PK_config_station_pv_module PRIMARY KEY (id);
+CREATE INDEX idx_config_station_pv_module_station ON config_station_pv_module(station_id);
+COMMENT ON TABLE config_station_pv_module IS '光伏组件配置';
+COMMENT ON COLUMN config_station_pv_module.station_id IS '场站ID';
+
+-- -----------------------------------------------------
+-- 7.79  config_station_power_limit  [限电配置]
+-- -----------------------------------------------------
+DROP TABLE IF EXISTS config_station_power_limit CASCADE;
+CREATE TABLE config_station_power_limit (
+    id BIGSERIAL NOT NULL,
+    station_id BIGINT NOT NULL,
+    limit_type VARCHAR(50),
+    start_date VARCHAR(20),
+    end_date VARCHAR(20),
+    limit_percent VARCHAR(50),
+    reason VARCHAR(255),
+    approver VARCHAR(100),
+    status VARCHAR(50),
+    create_by VARCHAR(64),
+    create_time TIMESTAMP,
+    update_by VARCHAR(64),
+    update_time TIMESTAMP,
+    remark VARCHAR(500)
+);
+ALTER TABLE config_station_power_limit ADD CONSTRAINT PK_config_station_power_limit PRIMARY KEY (id);
+CREATE INDEX idx_config_station_power_limit_station ON config_station_power_limit(station_id);
+COMMENT ON TABLE config_station_power_limit IS '限电配置';
+COMMENT ON COLUMN config_station_power_limit.station_id IS '场站ID';
+
+-- -----------------------------------------------------
+-- 7.80  config_station_device  [设备配置]
+-- -----------------------------------------------------
+DROP TABLE IF EXISTS config_station_device CASCADE;
+CREATE TABLE config_station_device (
+    id BIGSERIAL NOT NULL,
+    station_id BIGINT NOT NULL,
+    device_name VARCHAR(100),
+    device_type VARCHAR(100),
+    brand VARCHAR(100),
+    model VARCHAR(100),
+    serial_number VARCHAR(100),
+    status VARCHAR(50),
+    install_date VARCHAR(20),
+    create_by VARCHAR(64),
+    create_time TIMESTAMP,
+    update_by VARCHAR(64),
+    update_time TIMESTAMP,
+    remark VARCHAR(500)
+);
+ALTER TABLE config_station_device ADD CONSTRAINT PK_config_station_device PRIMARY KEY (id);
+CREATE INDEX idx_config_station_device_station ON config_station_device(station_id);
+COMMENT ON TABLE config_station_device IS '设备配置';
+COMMENT ON COLUMN config_station_device.station_id IS '场站ID';
+
+-- -----------------------------------------------------
+-- 7.81  config_station_channel  [通道配置]
+-- -----------------------------------------------------
+DROP TABLE IF EXISTS config_station_channel CASCADE;
+CREATE TABLE config_station_channel (
+    id BIGSERIAL NOT NULL,
+    station_id BIGINT NOT NULL,
+    channel_name VARCHAR(100),
+    protocol VARCHAR(50),
+    host VARCHAR(255),
+    port BIGINT,
+    collect_interval VARCHAR(50),
+    data_type VARCHAR(100),
+    status VARCHAR(50),
+    last_sync_time VARCHAR(50),
+    create_by VARCHAR(64),
+    create_time TIMESTAMP,
+    update_by VARCHAR(64),
+    update_time TIMESTAMP,
+    remark VARCHAR(500)
+);
+ALTER TABLE config_station_channel ADD CONSTRAINT PK_config_station_channel PRIMARY KEY (id);
+CREATE INDEX idx_config_station_channel_station ON config_station_channel(station_id);
+COMMENT ON TABLE config_station_channel IS '通道配置';
+COMMENT ON COLUMN config_station_channel.station_id IS '场站ID';
+
+-- -----------------------------------------------------
+-- 7.82  config_station_point  [测点配置]
+-- -----------------------------------------------------
+DROP TABLE IF EXISTS config_station_point CASCADE;
+CREATE TABLE config_station_point (
+    id BIGSERIAL NOT NULL,
+    station_id BIGINT NOT NULL,
+    device_id BIGINT,
+    device_name VARCHAR(100),
+    point_name VARCHAR(100),
+    unit VARCHAR(50),
+    precision_value BIGINT,
+    measure_range VARCHAR(100),
+    protocol VARCHAR(50),
+    address VARCHAR(100),
+    collect_interval VARCHAR(50),
+    create_by VARCHAR(64),
+    create_time TIMESTAMP,
+    update_by VARCHAR(64),
+    update_time TIMESTAMP,
+    remark VARCHAR(500)
+);
+ALTER TABLE config_station_point ADD CONSTRAINT PK_config_station_point PRIMARY KEY (id);
+CREATE INDEX idx_config_station_point_station ON config_station_point(station_id);
+CREATE INDEX idx_config_station_point_device ON config_station_point(device_id);
+COMMENT ON TABLE config_station_point IS '测点配置';
+COMMENT ON COLUMN config_station_point.station_id IS '场站ID';
 -- 3) Grant to role 2
 INSERT INTO sys_role_menu (role_id, menu_id) VALUES (2, 2000);
 INSERT INTO sys_role_menu (role_id, menu_id) VALUES (2, 2001);
@@ -4139,7 +4305,7 @@ INSERT INTO sys_role_menu (role_id, menu_id) VALUES (2, 2020);
 INSERT INTO sys_role_menu (role_id, menu_id) VALUES (2, 2021);
 
 INSERT INTO sys_role_menu (role_id, menu_id)
-SELECT 2, menu_id FROM sys_menu WHERE menu_id BETWEEN 2022 AND 2034;
+SELECT 2, menu_id FROM sys_menu WHERE menu_id BETWEEN 2022 AND 2070;
 
 -- =============================================================================
 -- Section 4. Fault process schema, dictionaries and menus

+ 45 - 1
forecast-backend-server/src/main/resources/sql/electricity_mock_new.sql

@@ -60,6 +60,12 @@ DELETE FROM model_prediction_tasks WHERE station_id IN (SELECT id FROM config_st
 DELETE FROM monitoring_send_record      WHERE recipient_email = 'demo@electricity.local';
 DELETE FROM data_source_grab            WHERE pattern_name LIKE 'MOCK-%';
 
+DELETE FROM config_station_point WHERE station_id IN (SELECT id FROM config_station WHERE station_code IN ('BHWP01','HHWP02','YMPV03','GBPV04'));
+DELETE FROM config_station_channel WHERE station_id IN (SELECT id FROM config_station WHERE station_code IN ('BHWP01','HHWP02','YMPV03','GBPV04'));
+DELETE FROM config_station_device WHERE station_id IN (SELECT id FROM config_station WHERE station_code IN ('BHWP01','HHWP02','YMPV03','GBPV04'));
+DELETE FROM config_station_power_limit WHERE station_id IN (SELECT id FROM config_station WHERE station_code IN ('BHWP01','HHWP02','YMPV03','GBPV04'));
+DELETE FROM config_station_pv_module WHERE station_id IN (SELECT id FROM config_station WHERE station_code IN ('BHWP01','HHWP02','YMPV03','GBPV04'));
+
 DELETE FROM weather_alert_area          WHERE record_id IN (90001, 90002);
 DELETE FROM weather_alert_record        WHERE id IN (90001, 90002);
 DELETE FROM typhoon_warning_path        WHERE record_id = 90101;
@@ -739,6 +745,42 @@ BEGIN
   END LOOP;
 END $$;
 
+-- -----------------------------------------------------
+-- Station configuration mock data
+-- -----------------------------------------------------
+INSERT INTO config_station_pv_module (station_id, model, brand, rated_power, module_type, module_count, conversion_efficiency, temperature_coefficient, install_date, create_by, create_time)
+VALUES
+((SELECT id FROM config_station WHERE station_code='BHWP01'),'JKM580N-72HL4','晶科能源',580,'双面',240000,'22.5%','-0.30%/℃','2023-04-01','admin',now()),
+((SELECT id FROM config_station WHERE station_code='YMPV03'),'LR5-72HTH-590M','隆基绿能',590,'单面',180000,'22.8%','-0.29%/℃','2024-06-15','admin',now()),
+((SELECT id FROM config_station WHERE station_code='GBPV04'),'Hi-MO 7 620W','隆基绿能',620,'双面',192000,'23.0%','-0.28%/℃','2024-02-01','admin',now());
+
+INSERT INTO config_station_power_limit (station_id, limit_type, start_date, end_date, limit_percent, reason, approver, status, create_by, create_time)
+VALUES
+((SELECT id FROM config_station WHERE station_code='BHWP01'),'调度限电','2026-06-01','2026-09-30','20%','电网调峰','省调','生效中','admin',now()),
+((SELECT id FROM config_station WHERE station_code='HHWP02'),'检修限电','2026-07-15','2026-07-20','100%','年度检修','场站经理','待执行','admin',now()),
+((SELECT id FROM config_station WHERE station_code='GBPV04'),'调度限电','2026-05-01','2026-10-31','15%','新能源消纳','省调','生效中','admin',now());
+
+INSERT INTO config_station_device (station_id, device_name, device_type, brand, model, serial_number, status, install_date, create_by, create_time)
+VALUES
+((SELECT id FROM config_station WHERE station_code='BHWP01'),'逆变器A1-001','组串式逆变器','华为','SUN2000-300KTL','HWT202304001','在线','2023-04-01','admin',now()),
+((SELECT id FROM config_station WHERE station_code='BHWP01'),'箱变A-01','箱式变压器','特变电工','ZGS11-ZG-3150','TB202304001','在线','2023-04-01','admin',now()),
+((SELECT id FROM config_station WHERE station_code='HHWP02'),'风机WT-01','直驱永磁','金风科技','GW175-8.0MW','JF202209001','在线','2022-09-15','admin',now()),
+((SELECT id FROM config_station WHERE station_code='YMPV03'),'气象站-WS1','自动气象站','Campbell','CR1000X','CP202311001','在线','2023-11-15','admin',now());
+
+INSERT INTO config_station_channel (station_id, channel_name, protocol, host, port, collect_interval, data_type, status, last_sync_time, create_by, create_time)
+VALUES
+((SELECT id FROM config_station WHERE station_code='BHWP01'),'SCADA实时通道','Modbus TCP','192.168.100.10',502,'1s','时序','正常','2026-07-21 14:05','admin',now()),
+((SELECT id FROM config_station WHERE station_code='HHWP02'),'风机OPC通道','OPC UA','opc.internal',4840,'1s','时序','正常','2026-07-21 14:03','admin',now()),
+((SELECT id FROM config_station WHERE station_code='YMPV03'),'气象站数据通道','MQTT','mqtt-broker.internal',1883,'1min','JSON','正常','2026-07-21 14:05','admin',now()),
+((SELECT id FROM config_station WHERE station_code='GBPV04'),'NWP-GFS通道','FTP','nwp-server.internal',21,'6h','GRIB2','延迟','2026-07-21 13:30','admin',now());
+
+INSERT INTO config_station_point (station_id, device_id, device_name, point_name, unit, precision_value, measure_range, protocol, address, collect_interval, create_by, create_time)
+VALUES
+((SELECT id FROM config_station WHERE station_code='BHWP01'),(SELECT id FROM config_station_device WHERE serial_number='HWT202304001'),'逆变器A1-001','直流功率','kW',2,'0-300','Modbus','40001','1s','admin',now()),
+((SELECT id FROM config_station WHERE station_code='BHWP01'),(SELECT id FROM config_station_device WHERE serial_number='HWT202304001'),'逆变器A1-001','交流功率','kW',2,'0-300','Modbus','40003','1s','admin',now()),
+((SELECT id FROM config_station WHERE station_code='YMPV03'),(SELECT id FROM config_station_device WHERE serial_number='CP202311001'),'气象站-WS1','环境温度','℃',1,'-40~80','Modbus','40201','1min','admin',now()),
+((SELECT id FROM config_station WHERE station_code='HHWP02'),(SELECT id FROM config_station_device WHERE serial_number='JF202209001'),'风机WT-01','有功功率','kW',1,'0-8000','OPC UA','ns=2;s=WT.P','1s','admin',now());
+
 COMMIT;
 
 -- 完成提示
@@ -747,4 +789,6 @@ SELECT '=== Mock 数据写入完成 ===' AS status,
        (SELECT COUNT(*) FROM data_booster_station_real WHERE entity_id LIKE 'STA00%') AS booster_rows,
        (SELECT COUNT(*) FROM data_short_term_power_forecast_report WHERE entity_id LIKE 'STA00%') AS forecast_rows,
        (SELECT COUNT(*) FROM stats_assessment_indicator WHERE station_id IN (SELECT id FROM config_station WHERE station_code IN ('BHWP01','HHWP02','YMPV03','GBPV04'))) AS stats_rows,
-       (SELECT COUNT(*) FROM weather_alert_record WHERE id IN (90001,90002))         AS alert_rows;
+       (SELECT COUNT(*) FROM weather_alert_record WHERE id IN (90001,90002)) AS alert_rows,
+       (SELECT COUNT(*) FROM config_station_device WHERE station_id IN (SELECT id FROM config_station WHERE station_code IN ('BHWP01','HHWP02','YMPV03','GBPV04'))) AS station_devices,
+       (SELECT COUNT(*) FROM config_station_point WHERE station_id IN (SELECT id FROM config_station WHERE station_code IN ('BHWP01','HHWP02','YMPV03','GBPV04'))) AS station_points;

+ 16 - 3
forecast-backend-vue/src/views/ufo/electricity/components/MapPanel.vue

@@ -30,6 +30,10 @@ const props = defineProps({
       {name: '青海海南光伏站', lat: 36.28, lng: 100.62, type: 'solar', status: 'normal', power: 72.4},
       {name: '内蒙古鄂尔多斯风电场', lat: 39.61, lng: 109.78, type: 'wind', status: 'normal', power: 190.3}
     ]
+  },
+  useFallbackStations: {
+    type: Boolean,
+    default: true
   }
 });
 
@@ -204,6 +208,10 @@ const renderStations = (L = window.L) => {
       `);
       marker.addTo(stationLayer);
     });
+    if (stations.length) {
+      const bounds = stations.map((station) => [station.lat, station.lng]);
+      map.fitBounds(bounds, {padding: [32, 32], maxZoom: 8});
+    }
   }
 
   stationLayer.addTo(map);
@@ -219,15 +227,20 @@ const getStationIcon = (type) => {
 };
 
 const getVisibleStations = () => {
-  const sourceStations = isLegacyDefaultStations(props.stations) ? jiangmenStations : props.stations;
+  const sourceStations = props.useFallbackStations && isLegacyDefaultStations(props.stations) ? jiangmenStations : props.stations;
   const validStations = sourceStations
     .filter((station) => Number.isFinite(Number(station.lat)) && Number.isFinite(Number(station.lng)))
     .map((station, index) => ({
       ...station,
-      type: 'solar',
+      lat: Number(station.lat),
+      lng: Number(station.lng),
+      type: station.type || 'hybrid',
       name: station.name || station.stationName || station.entityName || (index === 0 ? '江门站' : `江门站-${index + 1}`)
     }));
-  return validStations.length ? validStations : jiangmenStations;
+  if (validStations.length) {
+    return validStations;
+  }
+  return props.useFallbackStations ? jiangmenStations : [];
 };
 
 const isLegacyDefaultStations = (stations) => {

+ 32 - 3
forecast-backend-vue/src/views/ufo/electricity/weather/DisasterWarningMap.vue

@@ -18,7 +18,7 @@
             </a-col>
           </a-row>
           <div class="map-wrap">
-            <MapPanel />
+            <MapPanel :stations="mapStations" :use-fallback-stations="false" />
           </div>
         </a-card>
       </a-col>
@@ -45,14 +45,16 @@
 
 <script setup name="ElectricityDisasterWarningMap">
 import {onMounted, reactive, ref} from 'vue';
+import {listStation} from '@/api/config/station';
 import {listTyphoonWarningRecord} from '@/api/weather/typhoonWarningRecord';
 import {listWeatherAlertRecord} from '@/api/weather/weatherAlertRecord';
 import MapPanel from '../components/MapPanel.vue';
 import MetricCards from '../components/MetricCards.vue';
 import TimeRangeBar from '../components/TimeRangeBar.vue';
-import {normalizeRows, pick} from '../components/dataAdapter';
+import {normalizeRows, pick, toNumber} from '../components/dataAdapter';
 
 const loading = ref(false);
+const mapStations = ref([]);
 const warningCards = ref([
   {label: '预警总数', value: 0, unit: '条'},
   {label: '影响场站', value: 0, unit: '座'},
@@ -88,6 +90,30 @@ const resolveLevelColor = (level) => {
   return 'blue';
 };
 
+const toMapStationType = (stationType) => {
+  const type = Number(stationType);
+  if (type === 0) return 'wind';
+  if (type === 1) return 'solar';
+  return 'hybrid';
+};
+
+const toMapStations = (stations) => stations
+  .map((item, index) => ({
+    id: item.id || item.stationId || `station-${index + 1}`,
+    name: item.stationName || item.name || item.entityName || `场站-${index + 1}`,
+    lat: Number(item.latitude),
+    lng: Number(item.longitude),
+    type: toMapStationType(item.stationType),
+    status: String(item.isEnable ?? item.status ?? '1') === '0' ? 'warning' : 'normal',
+    power: toNumber(item.installedCapacity, 0) / 1000 || undefined
+  }))
+  .filter((item) => Number.isFinite(item.lat) && Number.isFinite(item.lng));
+
+const loadStations = async () => {
+  const res = await listStation({pageNum: 1, pageSize: 500});
+  mapStations.value = toMapStations(normalizeRows(res));
+};
+
 const handleQuery = async () => {
   loading.value = true;
   try {
@@ -132,7 +158,10 @@ const handleQuery = async () => {
   }
 };
 
-onMounted(handleQuery);
+onMounted(async () => {
+  await loadStations();
+  await handleQuery();
+});
 </script>
 
 <style lang="less" scoped>

+ 22 - 1
forecast-backend-vue/src/views/ufo/electricity/weather/WeatherMap.vue

@@ -14,7 +14,7 @@
               <a-button type="primary" :loading="loading" @click="handleQuery">查询</a-button>
             </a-space>
           </div>
-          <MapPanel />
+          <MapPanel :stations="mapStations" :use-fallback-stations="false" />
         </a-card>
       </a-col>
       <a-col :xs="24" :lg="7">
@@ -55,6 +55,7 @@ const loading = ref(false);
 const areaOptions = ref([]);
 const stationOptions = ref([]);
 const stationWeatherList = ref([]);
+const mapStations = ref([]);
 
 const query = reactive({
   scope: 'station',
@@ -74,6 +75,25 @@ const metricLayerOptions = [
 
 const timeLabel = computed(() => `2026-05-11 ${String(query.timeIndex).padStart(2, '0')}:00`);
 
+const toMapStationType = (stationType) => {
+  const type = Number(stationType);
+  if (type === 0) return 'wind';
+  if (type === 1) return 'solar';
+  return 'hybrid';
+};
+
+const toMapStations = (stations) => stations
+  .map((item, index) => ({
+    id: item.id || item.stationId || `station-${index + 1}`,
+    name: item.stationName || item.name || item.entityName || `场站-${index + 1}`,
+    lat: Number(item.latitude),
+    lng: Number(item.longitude),
+    type: toMapStationType(item.stationType),
+    status: String(item.isEnable ?? item.status ?? '1') === '0' ? 'warning' : 'normal',
+    power: toNumber(item.installedCapacity, 0) / 1000 || undefined
+  }))
+  .filter((item) => Number.isFinite(item.lat) && Number.isFinite(item.lng));
+
 const loadOptions = async () => {
   const [areaRes, stationRes] = await Promise.all([
     listWeatherArea({pageNum: 1, pageSize: 500}),
@@ -90,6 +110,7 @@ const loadOptions = async () => {
     label: item.stationName || item.name || item.entityName || item.stationId || '江门站',
     value: item.stationId || item.id || item.name || `station-${index + 1}`
   }));
+  mapStations.value = toMapStations(stations);
 
   if (!query.area && areaOptions.value.length) query.area = areaOptions.value[0].value;
   if (!query.stationId && stationOptions.value.length) query.stationId = stationOptions.value[0].value;