|
@@ -548,9 +548,9 @@ INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_name`, `devi
|
|
|
INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_name`, `device_location`, `meter_cls`, `obj_tag`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'J-D-N-G001', '南区/广场照明', '南区广场1#配电柜', 45, 0, 4, 0, 1, '智能断路器表');
|
|
|
|
|
|
-- 水表
|
|
|
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_name`, `device_location`, `meter_cls`, `obj_tag`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'J-S-B-01', '北区/综合楼B-102', '北区综合楼后院1号井', 70, 0, 4, 1, 1, '直采表');
|
|
|
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_name`, `device_location`, `meter_cls`, `obj_tag`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'J-S-N-02', '北区/综合楼盥洗室', '北区综合楼后院1号井', 70, 0, 4, 0, 1, '直采表');
|
|
|
-INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_name`, `device_location`, `meter_cls`, `obj_tag`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'J-S-N-03', '南区/综合楼盥洗室', '南区综合楼后院1号井', 70, 0, 4, 0, 1, '直采表');
|
|
|
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_name`, `device_location`, `meter_cls`, `obj_tag`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'J-S-B-02', '北区/综合楼B-102', '北区综合楼后院1号井', 70, 0, 4, 1, 1, '直采表');
|
|
|
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_name`, `device_location`, `meter_cls`, `obj_tag`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3001', 'J-S-B-01', '北区/综合楼盥洗室', '北区综合楼后院1号井', 70, 0, 4, 0, 1, '直采表');
|
|
|
+INSERT INTO `adm_meter_device` (`area_code`, `device_code`, `device_name`, `device_location`, `meter_cls`, `obj_tag`, `col_cycle`, `col_mode`, `magnification`, `spec_desc`) VALUES ('321283124S3002', 'J-S-N-01', '南区/综合楼盥洗室', '南区综合楼后院1号井', 70, 0, 4, 0, 1, '直采表');
|
|
|
|
|
|
-- 表计绑定关系
|
|
|
INSERT INTO `adm_meter_boundary_rel` (`obj_type`, `boundary_obj`, `meter_cls`, `meter_device`) VALUES (1, 'B-102', 45, 'J-D-B-102');
|
|
@@ -567,6 +567,7 @@ INSERT INTO `adm_meter_boundary_rel` (`obj_type`, `boundary_obj`, `meter_cls`, `
|
|
|
INSERT INTO `adm_meter_boundary_rel` (`obj_type`, `boundary_obj`, `meter_cls`, `meter_device`) VALUES (2, 'Z101', 45, 'J-D-B-Z110');
|
|
|
INSERT INTO `adm_meter_boundary_rel` (`obj_type`, `boundary_obj`, `meter_cls`, `meter_device`) VALUES (2, 'Z120', 45, 'J-D-B-Z120');
|
|
|
INSERT INTO `adm_meter_boundary_rel` (`obj_type`, `boundary_obj`, `meter_cls`, `meter_device`) VALUES (2, 'Z102', 45, 'J-D-B-G001');
|
|
|
+INSERT INTO `adm_meter_boundary_rel` (`obj_type`, `boundary_obj`, `meter_cls`, `meter_device`) VALUES (2, 'Z110', 70, 'J-S-B-01');
|
|
|
|
|
|
INSERT INTO `adm_meter_boundary_rel` (`obj_type`, `boundary_obj`, `meter_cls`, `meter_device`) VALUES (1, 'N-101', 45, 'J-D-N-101');
|
|
|
INSERT INTO `adm_meter_boundary_rel` (`obj_type`, `boundary_obj`, `meter_cls`, `meter_device`) VALUES (1, 'N-102', 45, 'J-D-N-102');
|
|
@@ -583,7 +584,7 @@ INSERT INTO `adm_meter_boundary_rel` (`obj_type`, `boundary_obj`, `meter_cls`, `
|
|
|
INSERT INTO `adm_meter_boundary_rel` (`obj_type`, `boundary_obj`, `meter_cls`, `meter_device`) VALUES (2, 'Z210', 45, 'J-D-N-Z210');
|
|
|
INSERT INTO `adm_meter_boundary_rel` (`obj_type`, `boundary_obj`, `meter_cls`, `meter_device`) VALUES (2, 'Z220', 45, 'J-D-N-Z220');
|
|
|
INSERT INTO `adm_meter_boundary_rel` (`obj_type`, `boundary_obj`, `meter_cls`, `meter_device`) VALUES (2, 'Z202', 45, 'J-D-N-G001');
|
|
|
-
|
|
|
+INSERT INTO `adm_meter_boundary_rel` (`obj_type`, `boundary_obj`, `meter_cls`, `meter_device`) VALUES (2, 'Z110', 70, 'J-S-N-01');
|
|
|
|
|
|
-- 抄表demo数据
|
|
|
INSERT INTO adm_meter_reading (`device_code`, `area_code`, `year`, `meter_month`, `last_reading`, `last_time`, `meter_reading`, `meter_time`, `increase`, `create_time`, `update_time`) VALUES ('J-D-B-102', '321283124S3001', '2024', '202401', 0, '2024-02-29', 100, '2024-01-31', 100, NULL, NULL);
|
|
@@ -722,9 +723,18 @@ INSERT INTO adm_meter_reading (`device_code`, `area_code`, `year`, `meter_month`
|
|
|
-- INSERT INTO `adm_elec_meter_h` (`area_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`, `meter_type`, `meter_unit_price`, `use_elec_cost`) VALUES ('321283124S3001', 'J-D-B-G001', CONCAT(CURDATE(), ' ', LPAD(HOUR(NOW()), 2, '0'), ':00:00'), CURDATE(), CONCAT(LPAD(HOUR(NOW()), 2, '0'), ':00:00'), HOUR(NOW()) + 1, FLOOR(50 + (RAND() * (150 - 50 + 1))), 0, 0.538, FLOOR(100 + (RAND() * (150 - 50 + 1))))
|
|
|
-- INSERT INTO `adm_elec_meter_h` (`area_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`, `meter_type`, `meter_unit_price`, `use_elec_cost`) VALUES ('321283124S3002', 'J-D-N-G001', CONCAT(CURDATE(), ' ', LPAD(HOUR(NOW()), 2, '0'), ':00:00'), CURDATE(), CONCAT(LPAD(HOUR(NOW()), 2, '0'), ':00:00'), HOUR(NOW()) + 1, FLOOR(50 + (RAND() * (150 - 50 + 1))), 0, 0.538, FLOOR(100 + (RAND() * (150 - 50 + 1))))
|
|
|
|
|
|
--- INSERT INTO `adm_water_meter_h` (`area_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `water_quantity`, `meter_unit_price`, `use_water_cost`) VALUES ('321283124S3001', 'J-D-N-02', CONCAT(CURDATE(), ' ', LPAD(HOUR(NOW()), 2, '0'), ':00:00'), CURDATE(), CONCAT(LPAD(HOUR(NOW()), 2, '0'), ':00:00'), HOUR(NOW()) + 1, FLOOR(RAND() * 100), 3.2, FLOOR(RAND() * 300))
|
|
|
--- INSERT INTO `adm_water_meter_h` (`area_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `water_quantity`, `meter_unit_price`, `use_water_cost`) VALUES ('321283124S3002', 'J-D-N-03', CONCAT(CURDATE(), ' ', LPAD(HOUR(NOW()), 2, '0'), ':00:00'), CURDATE(), CONCAT(LPAD(HOUR(NOW()), 2, '0'), ':00:00'), HOUR(NOW()) + 1, FLOOR(RAND() * 100), 3.2, FLOOR(RAND() * 300))
|
|
|
+-- INSERT INTO `adm_water_meter_h` (`area_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `water_quantity`, `meter_unit_price`, `use_water_cost`) VALUES ('321283124S3001', 'J-S-B-01', CONCAT(CURDATE(), ' ', LPAD(HOUR(NOW()), 2, '0'), ':00:00'), CURDATE(), CONCAT(LPAD(HOUR(NOW()), 2, '0'), ':00:00'), HOUR(NOW()) + 1, FLOOR(RAND() * 100), 3.2, FLOOR(RAND() * 300))
|
|
|
+-- INSERT INTO `adm_water_meter_h` (`area_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `water_quantity`, `meter_unit_price`, `use_water_cost`) VALUES ('321283124S3002', 'J-S-N-01', CONCAT(CURDATE(), ' ', LPAD(HOUR(NOW()), 2, '0'), ':00:00'), CURDATE(), CONCAT(LPAD(HOUR(NOW()), 2, '0'), ':00:00'), HOUR(NOW()) + 1, FLOOR(RAND() * 100), 3.2, FLOOR(RAND() * 300))
|
|
|
+
|
|
|
+-- INSERT INTO `adm_elec_meter_h` (`area_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`, `meter_type`, `meter_unit_price`, `use_elec_cost`) VALUES ('321283124S3001', 'J-D-B-Z101', CONCAT(CURDATE(), ' ', LPAD(HOUR(NOW()), 2, '0'), ':00:00'), CURDATE(), CONCAT(LPAD(HOUR(NOW()), 2, '0'), ':00:00'), HOUR(NOW()) + 1, FLOOR(50 + (RAND() * (150 - 50 + 1))), 0, 0.538, FLOOR(100 + (RAND() * (150 - 50 + 1))))
|
|
|
+-- INSERT INTO `adm_elec_meter_h` (`area_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`, `meter_type`, `meter_unit_price`, `use_elec_cost`) VALUES ('321283124S3001', 'J-D-B-Z102', CONCAT(CURDATE(), ' ', LPAD(HOUR(NOW()), 2, '0'), ':00:00'), CURDATE(), CONCAT(LPAD(HOUR(NOW()), 2, '0'), ':00:00'), HOUR(NOW()) + 1, FLOOR(50 + (RAND() * (150 - 50 + 1))), 0, 0.538, FLOOR(100 + (RAND() * (150 - 50 + 1))))
|
|
|
+-- INSERT INTO `adm_elec_meter_h` (`area_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`, `meter_type`, `meter_unit_price`, `use_elec_cost`) VALUES ('321283124S3001', 'J-D-B-Z110', CONCAT(CURDATE(), ' ', LPAD(HOUR(NOW()), 2, '0'), ':00:00'), CURDATE(), CONCAT(LPAD(HOUR(NOW()), 2, '0'), ':00:00'), HOUR(NOW()) + 1, FLOOR(50 + (RAND() * (150 - 50 + 1))), 0, 0.538, FLOOR(100 + (RAND() * (150 - 50 + 1))))
|
|
|
+-- INSERT INTO `adm_elec_meter_h` (`area_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`, `meter_type`, `meter_unit_price`, `use_elec_cost`) VALUES ('321283124S3001', 'J-D-B-Z120', CONCAT(CURDATE(), ' ', LPAD(HOUR(NOW()), 2, '0'), ':00:00'), CURDATE(), CONCAT(LPAD(HOUR(NOW()), 2, '0'), ':00:00'), HOUR(NOW()) + 1, FLOOR(50 + (RAND() * (150 - 50 + 1))), 0, 0.538, FLOOR(100 + (RAND() * (150 - 50 + 1))))
|
|
|
|
|
|
+-- INSERT INTO `adm_elec_meter_h` (`area_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`, `meter_type`, `meter_unit_price`, `use_elec_cost`) VALUES ('321283124S3002', 'J-D-N-Z201', CONCAT(CURDATE(), ' ', LPAD(HOUR(NOW()), 2, '0'), ':00:00'), CURDATE(), CONCAT(LPAD(HOUR(NOW()), 2, '0'), ':00:00'), HOUR(NOW()) + 1, FLOOR(50 + (RAND() * (150 - 50 + 1))), 0, 0.538, FLOOR(100 + (RAND() * (150 - 50 + 1))))
|
|
|
+-- INSERT INTO `adm_elec_meter_h` (`area_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`, `meter_type`, `meter_unit_price`, `use_elec_cost`) VALUES ('321283124S3002', 'J-D-N-Z202', CONCAT(CURDATE(), ' ', LPAD(HOUR(NOW()), 2, '0'), ':00:00'), CURDATE(), CONCAT(LPAD(HOUR(NOW()), 2, '0'), ':00:00'), HOUR(NOW()) + 1, FLOOR(50 + (RAND() * (150 - 50 + 1))), 0, 0.538, FLOOR(100 + (RAND() * (150 - 50 + 1))))
|
|
|
+-- INSERT INTO `adm_elec_meter_h` (`area_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`, `meter_type`, `meter_unit_price`, `use_elec_cost`) VALUES ('321283124S3002', 'J-D-N-Z210', CONCAT(CURDATE(), ' ', LPAD(HOUR(NOW()), 2, '0'), ':00:00'), CURDATE(), CONCAT(LPAD(HOUR(NOW()), 2, '0'), ':00:00'), HOUR(NOW()) + 1, FLOOR(50 + (RAND() * (150 - 50 + 1))), 0, 0.538, FLOOR(100 + (RAND() * (150 - 50 + 1))))
|
|
|
+-- INSERT INTO `adm_elec_meter_h` (`area_code`, `device_code`, `record_time`, `date`, `time`, `time_index`, `elec_quantity`, `meter_type`, `meter_unit_price`, `use_elec_cost`) VALUES ('321283124S3002', 'J-D-N-Z220', CONCAT(CURDATE(), ' ', LPAD(HOUR(NOW()), 2, '0'), ':00:00'), CURDATE(), CONCAT(LPAD(HOUR(NOW()), 2, '0'), ':00:00'), HOUR(NOW()) + 1, FLOOR(50 + (RAND() * (150 - 50 + 1))), 0, 0.538, FLOOR(100 + (RAND() * (150 - 50 + 1))))
|
|
|
|
|
|
-- 电网计量指标数据 Mock
|
|
|
-- INSERT INTO adm_ems_pg_supply_h (area_code, facs_code, record_time, `date`, `time`, time_index, meter_type, meter_unit_price, use_elec_quantity, use_elec_cost) VALUES ('321283124S3001', 'W201', CONCAT(CURDATE(), ' ', LPAD(HOUR(NOW()), 2, '0'), ':00:00'), CURDATE(), CONCAT(LPAD(HOUR(NOW()), 2, '0'), ':00:00'), HOUR(NOW()) + 1, 0, 0.75, FLOOR(50 + (RAND() * (150 - 50 + 1))), FLOOR(RAND() * (100 - 1 + 1)) + 1);
|
|
@@ -740,10 +750,10 @@ INSERT INTO adm_meter_reading (`device_code`, `area_code`, `year`, `meter_month`
|
|
|
-- INSERT INTO adm_ems_pv_supply_h (area_code, facs_code, record_time, `date`, `time`, time_index, up_unit_price, gen_elec_quantity, use_elec_quantity, up_elec_quantity, up_elec_earn) VALUES ('321283124S3003', 'E503', CONCAT(CURDATE(), ' ', LPAD(HOUR(NOW()), 2, '0'), ':00:00'), CURDATE(), CONCAT(LPAD(HOUR(NOW()), 2, '0'), ':00:00'), HOUR(NOW()) + 1, 0.45, 0, 0, 0, 0);
|
|
|
|
|
|
-- 储能计量demo数据 Mock
|
|
|
--- 0-9点执行(储能)
|
|
|
+-- 0 to 9点执行 储能
|
|
|
-- INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', CONCAT(CURDATE(), ' ', LPAD(HOUR(NOW()), 2, '0'), ':00:00'), CURDATE(), CONCAT(LPAD(HOUR(NOW()), 2, '0'), ':00:00'), HOUR(NOW()) + 1, FLOOR(30 + (RAND() * (60 - 30 + 1))), 0);
|
|
|
-- INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', CONCAT(CURDATE(), ' ', LPAD(HOUR(NOW()), 2, '0'), ':00:00'), CURDATE(), CONCAT(LPAD(HOUR(NOW()), 2, '0'), ':00:00'), HOUR(NOW()) + 1, FLOOR(30 + (RAND() * (60 - 30 + 1))), 0);
|
|
|
--- 10-23点执行(不储能)
|
|
|
+-- 10 to 23点执行不储能
|
|
|
-- INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3001', 'C101', CONCAT(CURDATE(), ' ', LPAD(HOUR(NOW()), 2, '0'), ':00:00'), CURDATE(), CONCAT(LPAD(HOUR(NOW()), 2, '0'), ':00:00'), HOUR(NOW()) + 1, 0, FLOOR(30 + (RAND() * (60 - 30 + 1))));
|
|
|
-- INSERT INTO `adm_ems_elec_store_h` (`area_code`, `facs_code`, `record_time`, `date`, `time`, `time_index`, `charge_elec_quantity`, `discharge_elec_quantity`) VALUES ('321283124S3002', 'C102', CONCAT(CURDATE(), ' ', LPAD(HOUR(NOW()), 2, '0'), ':00:00'), CURDATE(), CONCAT(LPAD(HOUR(NOW()), 2, '0'), ':00:00'), HOUR(NOW()) + 1, 0, FLOOR(30 + (RAND() * (60 - 30 + 1))));
|
|
|
|
|
@@ -784,4 +794,5 @@ INSERT INTO `adm_op_alarm` (`area_code`, `system_code`, `obj_type`, `obj_code`,
|
|
|
INSERT INTO `adm_op_alarm` (`area_code`, `system_code`, `obj_type`, `obj_code`, `obj_name`, `alarm_date`, `alarm_time`, `alarm_code`, `alarm_msg`, `alarm_type`, `alarm_state`) VALUES ('321283124S3001', 'SYS_CN', 2, 'E501', '北区-光伏', '2024-11-15', '2024-11-15 15:02:00', 'E003', '未知告警', 2, 2);
|
|
|
INSERT INTO `adm_op_alarm` (`area_code`, `system_code`, `obj_type`, `obj_code`, `obj_name`, `alarm_date`, `alarm_time`, `alarm_code`, `alarm_msg`, `alarm_type`, `alarm_state`) VALUES ('321283124S3002', 'SYS_CN', 2, 'E502', '南区-光伏', '2024-11-15', '2024-11-15 15:03:00', 'Ecc01', '未知告警', 3, 3);
|
|
|
INSERT INTO `adm_op_alarm` (`area_code`, `system_code`, `obj_type`, `obj_code`, `obj_name`, `alarm_date`, `alarm_time`, `alarm_code`, `alarm_msg`, `alarm_type`, `alarm_state`) VALUES ('321283124S3001', 'SYS_BA', 4, 'D-B-1001', '综合楼配电间(常泰高速服务区(北区))', '2024-11-15', '2024-11-15 09:33:00', 'E0003', '电流阈值告警', 2, 2);
|
|
|
-INSERT INTO `adm_op_alarm` (`area_code`, `system_code`, `obj_type`, `obj_code`, `obj_name`, `alarm_date`, `alarm_time`, `alarm_code`, `alarm_msg`, `alarm_type`, `alarm_state`) VALUES ('321283124S3001', 'SYS_BA', 4, 'D-B-1001', '综合楼配电间(常泰高速服务区(北区))', '2024-11-15', '2024-11-15 15:21:00', 'E003', '配电柜温度告警', 1, 2);
|
|
|
+INSERT INTO `adm_op_alarm` (`area_code`, `system_code`, `obj_type`, `obj_code`, `obj_name`, `alarm_date`, `alarm_time`, `alarm_code`, `alarm_msg`, `alarm_type`, `alarm_state`) VALUES ('321283124S3001', 'SYS_BA', 4, 'D-B-1001', '综合楼配电间(常泰高速服务区(北区))', '2024-11-15', '2024-11-15 15:21:00', 'E003', '配电柜温度告警', 1, 2);
|
|
|
+
|