|
@@ -527,6 +527,7 @@ 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 ('321283124S3001', 'J-D-B-110', '北区/综合楼B-110', '北区综合楼一楼设备间', 45, 1, 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-D-B-Z101', '北区/综合楼照明(Z101)', '北区综合楼一楼设备间', 45, 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-D-B-Z120', '北区/综合楼空调(Z120)', '北区综合楼一楼设备间', 45, 0, 4, 1, 50, '互感器表');
|
|
|
+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-D-B-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 ('321283124S3002', 'J-D-N-101', '南区/综合楼N-101', '南区综合楼一楼设备间', 45, 1, 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 ('321283124S3002', 'J-D-N-102', '南区/综合楼N-103', '南区综合楼一楼设备间', 45, 1, 4, 1, 1, '直采表');
|
|
@@ -538,9 +539,12 @@ 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-108', '南区/综合楼N-113', '南区综合楼一楼设备间', 45, 1, 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 ('321283124S3002', 'J-D-N-109', '南区/综合楼N-114', '南区综合楼一楼设备间', 45, 1, 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 ('321283124S3002', 'J-D-N-110', '南区/综合楼N-115', '南区综合楼一楼设备间', 45, 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 ('321283124S3002', 'J-D-N-G001', '南区/广场照明', '南区广场1#配电柜', 45, 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-D-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-D-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-D-N-03', '南区/综合楼盥洗室', '南区综合楼后院1号井', 70, 0, 4, 0, 1, '直采表');
|
|
|
|
|
|
-- 表计绑定关系
|
|
|
INSERT INTO `adm_meter_boundary_rel` (`meter_device`, `boundary_obj`, `obj_type`) VALUES ('J-D-B-102', 'B-102', 1);
|
|
@@ -700,6 +704,14 @@ INSERT INTO adm_meter_reading (`device_code`, `area_code`, `year`, `meter_month`
|
|
|
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-Z120', '321283124S3001', '2024', '202410', 612, '2024-08-31', 758, '2024-09-30', 7300, NULL, NULL);
|
|
|
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-Z120', '321283124S3001', '2024', '202411', 758, '2024-10-31', 948, '2024-11-30', 9500, NULL, NULL);
|
|
|
|
|
|
+-- 自动抄表数据
|
|
|
+-- 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))
|
|
|
+
|
|
|
+
|
|
|
-- 电网计量指标数据 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);
|
|
|
|