瀏覽代碼

Merge branch 'master' of http://git.xt.wenhq.top:8083/hs/zhny_bg

hsshuxian 10 月之前
父節點
當前提交
ac3a9eb343
共有 2 個文件被更改,包括 10 次插入8 次删除
  1. 7 5
      ems-cloud/sql/ems_init_data.sql
  2. 3 3
      ems-cloud/sql/ems_server.sql

+ 7 - 5
ems-cloud/sql/ems_init_data.sql

@@ -1,7 +1,6 @@
 -- 服务区初始数据
 INSERT INTO `adm_service_area` (`area_code`, `area_name`, `short_name`, `service_star`, `city`, `highway`, `direction`, `address`, `attr_org`, `mgr_org`, `open_date`, `land_area`, `floor_area`, `longitude`, `latitude`) VALUES ('321283124S3001', '常泰高速服务区(北区)', '北区', 4, '泰州', 'S30如常高速', '常州方向', '江苏省泰州市泰兴市虹桥镇常泰高速常州方向', null, null, '2025-01-01', '72.5', '6000', '120.050937', '32.071956');
 INSERT INTO `adm_service_area` (`area_code`, `area_name`, `short_name`, `service_star`, `city`, `highway`, `direction`, `address`, `attr_org`, `mgr_org`, `open_date`, `land_area`, `floor_area`, `longitude`, `latitude`) VALUES ('321283124S3002', '常泰高速服务区(南区)', '南区', 4, '泰州', 'S30如常高速', '泰兴方向', '江苏省泰州市泰兴市虹桥镇常泰高速泰州方向', null, null, '2025-01-01', '72.5', '6000', '120.052389', '32.070408');
-INSERT INTO `adm_service_area` (`area_code`, `area_name`, `short_name`, `service_star`, `city`, `highway`, `direction`, `address`, `attr_org`, `mgr_org`, `open_date`, `land_area`, `floor_area`, `longitude`, `latitude`) VALUES ('321283124S3003', '主路沿线光伏', '主路', 4, '泰州', 'S30如常高速', null, '江苏省泰州市泰兴市虹桥镇常泰高速泰州方向', null, null, '2025-01-01', '72.5', '6000', '120.052389', '32.070408');
 
 -- 建筑初始数据
 INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`, `area_code`) VALUES ('321283124S300101', '综合楼', '北区中部', 2, 1, 13.7, 4700, '一层提供商业、餐饮、卫生间、开水服务,二层为办公区、会议区', '321283124S3001');
@@ -18,6 +17,9 @@ INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_f
 INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`, `area_code`) VALUES ('321283124S300205', '宿舍楼', '南区西南角', 2, 0, null, 920, '提供员工住宿服务', '321283124S3002');
 INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`, `area_code`) VALUES ('321283124S300206', '停车场', '南区广场', 1, 0, null, 50000, '车位', '321283124S3002');
 
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`, `area_code`) VALUES ('S30K140-S30K150', '桩号段S30K140-S30K150', 'S30K140+300-S30K150+200', 1, 0, NULL, NULL, NULL, '321283124S3003');
+INSERT INTO `adm_area_building` (`bldg_code`, `bldg_name`, `address`, `up_bldg_floor`, `down_bldg_floor`, `bldg_height`, `floor_area`, `bldg_usage`, `area_code`) VALUES ('S30K150-S30K180', '桩号段S30K150-S30K180', 'S30K150+300-S30K180+300', 1, 0, NULL, NULL, NULL, '321283124S3003');
+
 
 -- 建筑初始数据
 INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-101', '开水泡面间', 1, '101', 100, '使用中');
@@ -114,7 +116,7 @@ INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_type`, `facs_subtype
 INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_type`, `facs_subtype`, `enable`, `ref_area`) VALUES ('Z202', '南区-室外照明', 'Z', 'Z002', 1, '321283124S3002');
 INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_type`, `facs_subtype`, `enable`, `ref_area`) VALUES ('Z210', '南区-公共设施', 'Z', 'Z010', 1, '321283124S3002');
 INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_type`, `facs_subtype`, `enable`, `ref_area`) VALUES ('Z220', '南区-空调设施', 'Z', 'Z020', 1, '321283124S3002');
-
+INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_type`, `facs_subtype`, `enable`, `ref_area`) VALUES ('E503', '主路-光伏', 'E', 'E5', 1, '321283124S3003');
 
 -- 设施属性DEMO数据
 INSERT INTO `adm_ems_facs_attr` (`facs_code`, `attr_name`, `attr_desc`, `attr_value`, `attr_unit`) VALUES ('W201', 'input_load', '进线负荷', '293.55', 'kw/h');
@@ -231,9 +233,9 @@ INSERT INTO `adm_ems_device` ( `device_code`, `device_name`, `device_type`, `dev
 INSERT INTO `adm_ems_device` ( `device_code`, `device_name`, `device_type`, `device_status`, `area_type`, `ref_area`, `area_ancestors`, `ref_facs`, `subsystem_code`) VALUES ( 'Car-106', '停车场照明灯', '1', NULL, 'Zoning', '321283124S3002_CW-WXP', '321283124S3002,321283124S300206,321283124S3002_CW-WXP', 'Z102','SYS_BA');
 INSERT INTO `adm_ems_device` ( `device_code`, `device_name`, `device_type`, `device_status`, `area_type`, `ref_area`, `area_ancestors`, `ref_facs`, `subsystem_code`) VALUES ( 'Car-107', '智能监控系统', '1', NULL, 'Zoning', '321283124S3002_CW-WXP', '321283124S3002,321283124S300206,321283124S3002_CW-WXP', 'Z110','SYS_BA');
 
-INSERT INTO `adm_ems_device` ( `device_code`, `device_name`, `device_type`, `device_status`, `area_type`, `ref_area`, `area_ancestors`, `ref_facs`, `subsystem_code`) VALUES ( 'Road_001', '主板1', '2', '1', 'Area', '321283124S3003', '321283124S3003', 'Z110', 'SYS_BA');
-INSERT INTO `adm_ems_device` ( `device_code`, `device_name`, `device_type`, `device_status`, `area_type`, `ref_area`, `area_ancestors`, `ref_facs`, `subsystem_code`) VALUES ( 'Road_002', '主板2', '2', '1', 'Area', '321283124S3003', '321283124S3003', 'Z110', 'SYS_BA');
-INSERT INTO `adm_ems_device` ( `device_code`, `device_name`, `device_type`, `device_status`, `area_type`, `ref_area`, `area_ancestors`, `ref_facs`, `subsystem_code`) VALUES ( 'Road_003', '主板3', '2', '1', 'Area', '321283124S3003', '321283124S3003', 'Z110', 'SYS_BA');
+INSERT INTO `adm_ems_device` ( `device_code`, `device_name`, `device_type`, `device_status`, `area_type`, `ref_area`, `area_ancestors`, `ref_facs`, `subsystem_code`) VALUES ( 'E503-K140-K150-001', '光伏板1', '2', '1', 'Building', 'S30K140-S30K150', '321283124S3003,S30K140-S30K150', 'E503', 'SYS_GF');
+INSERT INTO `adm_ems_device` ( `device_code`, `device_name`, `device_type`, `device_status`, `area_type`, `ref_area`, `area_ancestors`, `ref_facs`, `subsystem_code`) VALUES ( 'E503-K140-K150-002', '光伏板2', '2', '1', 'Building', 'S30K140-S30K150', '321283124S3003,S30K140-S30K150', 'E503', 'SYS_GF');
+INSERT INTO `adm_ems_device` ( `device_code`, `device_name`, `device_type`, `device_status`, `area_type`, `ref_area`, `area_ancestors`, `ref_facs`, `subsystem_code`) VALUES ( 'E503-K140-K150-003', '光伏板3', '2', '1', 'Building', 'S30K150-S30K180', '321283124S3003,S30K150-S30K180', 'E503', 'SYS_GF');
 
 
 -- 配电柜DEMO数据

+ 3 - 3
ems-cloud/sql/ems_server.sql

@@ -549,7 +549,7 @@ create table adm_ems_facs_flow_rel  (
 drop table if exists adm_ems_device;
 create table adm_ems_device  (
   `id`              bigint(20)      not null auto_increment      comment '序号',
-  `device_code`     varchar(16)     not null                     comment '设备代码',
+  `device_code`     varchar(64)     not null                     comment '设备代码',
   `device_name`     varchar(32)     not null                     comment '设备名称',
   `device_type`     int             default null                 comment '设备类型',
   `device_status`   int             default null                 comment '设备状态',
@@ -829,7 +829,7 @@ create table adm_obj_tag_rel (
 drop table if exists adm_meter_reading;
 create table adm_meter_reading (
   `id`               bigint(20)      not null auto_increment      comment '序号',
-  `device_code`      varchar(16)     not null                     comment '计量设备code',
+  `device_code`      varchar(64)     not null                     comment '计量设备code',
   `area_code`        varchar(16)     not null                     comment '服务区代码',
   `year`             varchar(4)      not null                     comment '年份yyyy',
   `meter_month`      varchar(6)      not null                     comment '计量月yyyyMM',
@@ -1024,7 +1024,7 @@ create table adm_ems_facs_use_h (
   `id`                 bigint(20)      not null auto_increment      comment '序号',
   `area_code`          varchar(16)     not null                     comment '园区代码',
   `facs_code`          varchar(16)     not null                     comment '设施代码',
-  `device_code`        varchar(16)     default null                 comment '设施代码',
+  `device_code`        varchar(64)     default null                 comment '设备代码',
   `date`               date            not null                     comment '日期 yyyy-MM-dd',
   `time`               time            not null                     comment '时间 HH:mm:ss',
   `time_index`         int             not null                     comment '时间序列',