|
@@ -241,6 +241,23 @@ INSERT INTO `dim_ems_facs_subtype` (`code`, `name`, `parent_code`, `desc`, `vers
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
+-- 电价计量分类
|
|
|
+-- ----------------------------
|
|
|
+drop table if exists dim_ems_electrovalency_type;
|
|
|
+create table dim_ems_electrovalency_type (
|
|
|
+ `id` bigint(20) not null auto_increment comment '序号',
|
|
|
+ `code` int not null comment '分类类型',
|
|
|
+ `name` varchar(16) not null comment '分类名称',
|
|
|
+ primary key (`id`),
|
|
|
+ unique key ux_electrovalency_type_code(`code`)
|
|
|
+) engine=innodb auto_increment=1 comment = '电价计量分类';
|
|
|
+
|
|
|
+INSERT INTO `dim_ems_electrovalency_type` (`code`, `name`) VALUES ('1', '居民生活用电');
|
|
|
+INSERT INTO `dim_ems_electrovalency_type` (`code`, `name`) VALUES ('2', '农业用电');
|
|
|
+INSERT INTO `dim_ems_electrovalency_type` (`code`, `name`) VALUES ('3', '单一制');
|
|
|
+INSERT INTO `dim_ems_electrovalency_type` (`code`, `name`) VALUES ('3', '两部制');
|
|
|
+
|
|
|
+-- ----------------------------
|
|
|
-- 排放因子维表
|
|
|
-- ----------------------------
|
|
|
drop table if exists dim_ems_emission_factor;
|
|
@@ -351,25 +368,15 @@ 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 ('321283124S300102', '配电泵房', '北区西北角', 1, 0, null, 300, '配电设施,水泵设施工作区', '321283124S3001');
|
|
|
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 ('321283124S300103', '维修间&货车之家', '北区东侧', 2, 0, null, 300, '提供车辆维修服务', '321283124S3001');
|
|
|
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 ('321283124S300104', '加油站', '北区西南角', 1, 0, null, 200, '提供加油服务', '321283124S3001');
|
|
|
-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 ('321283124S300105', '警务站', '北区东北角', 1, 0, null, 70, '警务办公场地', '321283124S3001');
|
|
|
-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 ('321283124S300106', '小客停车位', '北区前广场', 1, 0, null, null, '小客车停车位', '321283124S3001');
|
|
|
-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 ('321283124S300107', '充电车位', '北区前广场', 1, 0, null, null, '充电停车位', '321283124S3001');
|
|
|
-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 ('321283124S300108', '无障碍车位', '北区前广场', 1, 0, null, null, '无障碍车位', '321283124S3001');
|
|
|
-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 ('321283124S300109', '大客车停车位', '北区后广场', 1, 0, null, null, '大客车车位', '321283124S3001');
|
|
|
-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 ('321283124S300110', '货车车位', '北区后广场', 1, 0, null, null, '货车车位', '321283124S3001');
|
|
|
-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 ('321283124S300111', '危险品车位', '北区后广场', 1, 0, null, null, '危险品车位', '321283124S3001');
|
|
|
+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 ('321283124S300105', '警务站', '北区东北角', 1, 0, null, 50000, '警务办公场地', '321283124S3001');
|
|
|
+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 ('321283124S300106', '车位', '北区广场', 1, 0, null, 50000, '车位', '321283124S3001');
|
|
|
|
|
|
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 ('321283124S300201', '综合楼', '南区中部', 2, 1, 14.2, 4788.2, '一层提供商业、餐饮、卫生间、开水服务,二层为员工餐厅、展厅', '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 ('321283124S300202', '配电泵房', '南区东南角', 1, 0, null, 300, '配电设施,水泵设施工作区', '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 ('321283124S300203', '维修间&货车之家', '南区西侧', 2, 0, null, 300, '提供车辆维修服务', '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 ('321283124S300204', '加油站', '南区东北角', 1, 0, null, 200, '提供加油服务', '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 ('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, null, '小客车停车位', '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 ('321283124S300207', '充电车位', '南区前广场', 1, 0, null, null, '充电停车位', '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 ('321283124S300208', '无障碍车位', '南区前广场', 1, 0, null, null, '无障碍车位', '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 ('321283124S300209', '大客车停车位', '南区后广场', 1, 0, null, null, '大客车车位', '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 ('321283124S300210', '货车车位', '南区后广场', 1, 0, null, null, '货车车位', '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 ('321283124S300211', '危险品车位', '南区后广场', 1, 0, null, null, '危险品车位', '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');
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
@@ -379,8 +386,8 @@ drop table if exists adm_area_building_zoning;
|
|
|
create table adm_area_building_zoning (
|
|
|
`id` bigint(20) not null auto_increment comment '序号',
|
|
|
`bldg_code` varchar(64) not null comment '建筑编码',
|
|
|
- `zoning_code` varchar(64) not null comment '分区编码',
|
|
|
- `zoning_name` varchar(64) not null comment '分区名称',
|
|
|
+ `zoning_code` varchar(64) not null comment '分区编码',
|
|
|
+ `zoning_name` varchar(64) not null comment '分区名称',
|
|
|
`floor` int default null comment '楼层',
|
|
|
`room_no` varchar(16) default null comment '房间号',
|
|
|
`bldg_ld_area` double default null comment '建筑划分面积',
|
|
@@ -389,6 +396,40 @@ create table adm_area_building_zoning (
|
|
|
unique key ux_building_zoning_code(`bldg_code`, `zoning_code`)
|
|
|
) engine=innodb auto_increment=1 comment = '建筑区域划分表';
|
|
|
|
|
|
+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, '使用中');
|
|
|
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-102', '超市', 1, '102', 200, '使用中');
|
|
|
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-103', '中式糕点', 1, '103', 150, '使用中');
|
|
|
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-104', '特色产品市集', 1, '104', 200, '使用中');
|
|
|
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-105', '奶茶/咖啡', 1, '105', 100, '使用中');
|
|
|
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-106', '中式套餐', 1, '106', 200, '使用中');
|
|
|
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-107', '特色小吃', 1, '107', 100, '使用中');
|
|
|
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-108', '串串/卤味', 1, '108', 100, '使用中');
|
|
|
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-109', '糖葫芦/水果', 1, '109', 100, '使用中');
|
|
|
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-110', '美食广场', 1, '110', 300, '使用中');
|
|
|
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-111', '男卫', 1, '111', 200, '使用中');
|
|
|
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-112', '男盥洗室', 1, '112', 150, '使用中');
|
|
|
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-113', '女卫', 1, '113', 200, '使用中');
|
|
|
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-114', '女盥洗室', 1, '114', 150, '使用中');
|
|
|
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-115', '工具间1', 1, '115', 50, '使用中');
|
|
|
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-116', '工具间2', 1, '116', 50, '使用中');
|
|
|
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-117', '工具间3', 1, '117', 50, '使用中');
|
|
|
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-118', '工具间4', 1, '118', 50, '使用中');
|
|
|
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300101', 'B-119', '货车服务空间', 1, '119', 50, '使用中');
|
|
|
+
|
|
|
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300106', '321283124S3001_CW-XK', '小客停车位', 1, 'CW-XK', 100, '使用中');
|
|
|
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300106', '321283124S3001_CW-CD', '充电车位', 1, 'CW-CD', 100, '使用中');
|
|
|
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300106', '321283124S3001_CW-WZA', '无障碍车位', 1, 'CW-WZA', 100, '使用中');
|
|
|
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300106', '321283124S3001_CW-DKC', '大客车停车位', 1, 'CW-DKC', 100, '使用中');
|
|
|
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300106', '321283124S3001_CW-HC', '货车车位', 1, 'CW-HC', 100, '使用中');
|
|
|
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300106', '321283124S3001_CW-WXP', '危险品车位', 1, 'CW-WXP', 100, '使用中');
|
|
|
+
|
|
|
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300206', '321283124S3002_CW-XK', '小客停车位', 1, 'CW-XK', 100, '使用中');
|
|
|
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300206', '321283124S3002_CW-CD', '充电车位', 1, 'CW-XK', 100, '使用中');
|
|
|
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300206', '321283124S3002_CW-WZA', '无障碍车位', 1, 'CW-XK', 100, '使用中');
|
|
|
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300206', '321283124S3002_CW-DKC', '大客车停车位', 1, 'CW-XK', 100, '使用中');
|
|
|
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300206', '321283124S3002_CW-HC', '货车车位', 1, 'CW-XK', 100, '使用中');
|
|
|
+INSERT INTO adm_area_building_zoning (`bldg_code`, `zoning_code`, `zoning_name`, `floor`, `room_no`, `bldg_ld_area`, `usage_detail`) VALUES ('321283124S300206', '321283124S3002_CW-WXP','危险品车位', 1, 'CW-XK', 100, '使用中');
|
|
|
+
|
|
|
-- ----------------------------
|
|
|
-- 能源设施/系统表
|
|
|
-- ----------------------------
|
|
@@ -400,7 +441,7 @@ create table adm_ems_facs (
|
|
|
`facs_type` varchar(32) not null comment '设施分类',
|
|
|
`facs_subtype` varchar(32) not null comment '设施子类',
|
|
|
`enable` int default '0' comment '启用状态0-停用,1-启用',
|
|
|
- `ref_area` varchar(32) not null comment '归属区域代码',
|
|
|
+ `ref_area` varchar(32) not null comment '归属区域代码',
|
|
|
`manufacturer` varchar(64) default null comment '厂商',
|
|
|
`create_time` datetime default CURRENT_TIMESTAMP comment '创建时间',
|
|
|
`update_time` datetime default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP comment '更新时间',
|
|
@@ -474,8 +515,8 @@ create table adm_ems_device (
|
|
|
`device_name` varchar(32) not null comment '设备名称',
|
|
|
`device_type` int default null comment '设备类型',
|
|
|
`device_status` int default null comment '设备状态',
|
|
|
- `ref_area` varchar(8) default null comment '归属区域代码',
|
|
|
- `ref_facs` varchar(16) default null comment '归属设施代码',
|
|
|
+ `ref_area` varchar(64) default null comment '归属区域代码',
|
|
|
+ `ref_facs` varchar(64) default null comment '归属设施代码',
|
|
|
`create_time` datetime default CURRENT_TIMESTAMP comment '创建时间',
|
|
|
`update_time` datetime default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP comment '更新时间',
|
|
|
primary key (`id`),
|
|
@@ -645,79 +686,89 @@ create table adm_op_inspection_report (
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
+-- 服务区用电属性表
|
|
|
+-- ----------------------------
|
|
|
+drop table if exists sys_area_electricity_attr;
|
|
|
+create table sys_area_electricity_attr (
|
|
|
+ `id` bigint(20) not null auto_increment comment '序号',
|
|
|
+ `area_code` varchar(32) not null comment '园区代码',
|
|
|
+ `price_code` varchar(16) not null comment '价格编码',
|
|
|
+ `req_capacity_flag` int default 0 comment '容(需)量标识',
|
|
|
+ `trans_capacity` double default null comment '变压器容量(千伏安·月)',
|
|
|
+ `req_quantity` double default null comment '最大需量(千瓦·月)',
|
|
|
+ `create_time` datetime default CURRENT_TIMESTAMP comment '创建时间',
|
|
|
+ `update_time` datetime default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP comment '更新时间',
|
|
|
+ primary key (`id`),
|
|
|
+ unique key ux_area_electricity_attr(`area_code`)
|
|
|
+) engine=innodb auto_increment=1 comment = '服务区用电属性表';
|
|
|
+
|
|
|
+INSERT INTO sys_area_electricity_attr (`area_code`, `price_code`, `req_capacity_flag`, `trans_capacity`, `req_quantity`) VALUES ('321283124S3001', '4001', 1, 630, NULL);
|
|
|
+INSERT INTO sys_area_electricity_attr (`area_code`, `price_code`, `req_capacity_flag`, `trans_capacity`, `req_quantity`) VALUES ('321283124S3002', '4001', 1, 630, NULL);
|
|
|
+
|
|
|
+-- ----------------------------
|
|
|
-- 电价配置表
|
|
|
-- ----------------------------
|
|
|
drop table if exists sys_electrovalency_config;
|
|
|
create table sys_electrovalency_config (
|
|
|
- `id` bigint(20) not null auto_increment comment '序号',
|
|
|
- `cfg_code` varchar(4) not null comment '配置代码',
|
|
|
- `elec_class` int not null comment '用电分类',
|
|
|
- `price_type` int not null comment '价格类型',
|
|
|
- `quantity_lower_limit` int default null comment '年用电量下限',
|
|
|
- `quantity_upper_limit` int default null comment '年用电量上限',
|
|
|
- `price_less_1kv` double default null comment '不满1千伏(价格)',
|
|
|
- `price_1kv_10kv` double default null comment '不满10千伏(价格)',
|
|
|
- `price_20kv_35kv` double default null comment '20-30千伏(价格)',
|
|
|
- `price_35kv_110kv` double default null comment '35-110千伏(价格)',
|
|
|
- `price_110kv` double default null comment '110千伏(价格)',
|
|
|
- `price_220kv` double default null comment '220千伏(价格)',
|
|
|
+ `id` bigint(20) not null auto_increment comment '序号',
|
|
|
+ `cfg_code` varchar(4) not null comment '配置代码',
|
|
|
+ `elec_type` int not null comment '用电分类 1-居民 2-农业 3-工业单一制 4-工业两部制',
|
|
|
+ `voltage_level` varchar(32) not null comment '电压等级',
|
|
|
+ `degree_price` double not null comment '电度用电价格',
|
|
|
+ `fs_peak_degree_price` double default null comment '分时尖峰时段价格',
|
|
|
+ `fs_high_degree_price` double default null comment '分时高峰时段价格',
|
|
|
+ `fs_flat_degree_price` double default null comment '分时平峰时段价格',
|
|
|
+ `fs_low_degree_price` double default null comment '分时低谷时段价格',
|
|
|
+ `max_req_price` double default null comment '最大需量用电价格',
|
|
|
+ `trans_capacity_price` double default null comment '变压器容量用电价格',
|
|
|
primary key (`id`),
|
|
|
unique key ux_electrovalency_config(`cfg_code`)
|
|
|
) engine=innodb auto_increment=1 comment = '电价配置表';
|
|
|
|
|
|
--- 电价初始数据(江苏省电网销售电价表 2018年4.1日执行)
|
|
|
--- 1.居民生活用电
|
|
|
-INSERT INTO sys_electrovalency_config (`cfg_code`, `elec_class`, `price_type`, `quantity_lower_limit`, `quantity_upper_limit`, `price_less_1kv`, `price_1kv_10kv`, `price_20kv_35kv`, `price_35kv_110kv`, `price_110kv`, `price_220kv`) VALUES ('1001', 1, 1, 0, 2760, 0.5283, 0.5183, NULL, NULL, NULL, NULL);
|
|
|
-INSERT INTO sys_electrovalency_config (`cfg_code`, `elec_class`, `price_type`, `quantity_lower_limit`, `quantity_upper_limit`, `price_less_1kv`, `price_1kv_10kv`, `price_20kv_35kv`, `price_35kv_110kv`, `price_110kv`, `price_220kv`) VALUES ('1002', 1, 1, 2760, 4800, 0.5783, 0.5683, NULL, NULL, NULL, NULL);
|
|
|
-INSERT INTO sys_electrovalency_config (`cfg_code`, `elec_class`, `price_type`, `quantity_lower_limit`, `quantity_upper_limit`, `price_less_1kv`, `price_1kv_10kv`, `price_20kv_35kv`, `price_35kv_110kv`, `price_110kv`, `price_220kv`) VALUES ('1003', 1, 1, 4800, NULL, 0.8283, 0.8183, NULL, NULL, NULL, NULL);
|
|
|
-INSERT INTO sys_electrovalency_config (`cfg_code`, `elec_class`, `price_type`, `quantity_lower_limit`, `quantity_upper_limit`, `price_less_1kv`, `price_1kv_10kv`, `price_20kv_35kv`, `price_35kv_110kv`, `price_110kv`, `price_220kv`) VALUES ('1004', 1, 0, NULL, NULL, 0.5483, 0.5383, NULL, NULL, NULL, NULL);
|
|
|
--- 工商业、大工业、农业
|
|
|
-INSERT INTO sys_electrovalency_config (`cfg_code`, `elec_class`, `price_type`, `quantity_lower_limit`, `quantity_upper_limit`, `price_less_1kv`, `price_1kv_10kv`, `price_20kv_35kv`, `price_35kv_110kv`, `price_110kv`, `price_220kv`) VALUES ('2001', 2, 0, NULL, NULL, 0.7954, 0.7804, 0.7744, 0.7654, NULL, NULL);
|
|
|
-INSERT INTO sys_electrovalency_config (`cfg_code`, `elec_class`, `price_type`, `quantity_lower_limit`, `quantity_upper_limit`, `price_less_1kv`, `price_1kv_10kv`, `price_20kv_35kv`, `price_35kv_110kv`, `price_110kv`, `price_220kv`) VALUES ('3001', 3, 0, NULL, NULL, NULL, 0.6418, 0.6358, 0.6268, 0.6118, 0.5968);
|
|
|
-INSERT INTO sys_electrovalency_config (`cfg_code`, `elec_class`, `price_type`, `quantity_lower_limit`, `quantity_upper_limit`, `price_less_1kv`, `price_1kv_10kv`, `price_20kv_35kv`, `price_35kv_110kv`, `price_110kv`, `price_220kv`) VALUES ('4001', 4, 0, NULL, NULL, 0.5090, 0.4990, 0.4930, 0.4840, NULL, NULL);
|
|
|
+-- 单一制初始电价数据
|
|
|
+INSERT INTO sys_electrovalency_config (`cfg_code`, `elec_type`, `voltage_level`, `degree_price`, `fs_peak_degree_price`, `fs_high_degree_price`, `fs_flat_degree_price`, `fs_low_degree_price`, `max_req_price`, `trans_capacity_price`) VALUES ('3001', 3, '不满1千伏', 0.7624, 1.5296, 1.2747, 0.7624, 0.3445, NULL, NULL);
|
|
|
+INSERT INTO sys_electrovalency_config (`cfg_code`, `elec_type`, `voltage_level`, `degree_price`, `fs_peak_degree_price`, `fs_high_degree_price`, `fs_flat_degree_price`, `fs_low_degree_price`, `max_req_price`, `trans_capacity_price`) VALUES ('3002', 3, '1-10(20)千伏', 0.7364, 1.4774, 1.2312, 0.7364, 0.3327, NULL, NULL);
|
|
|
+INSERT INTO sys_electrovalency_config (`cfg_code`, `elec_type`, `voltage_level`, `degree_price`, `fs_peak_degree_price`, `fs_high_degree_price`, `fs_flat_degree_price`, `fs_low_degree_price`, `max_req_price`, `trans_capacity_price`) VALUES ('3003', 3, '35千伏', 0.7114, 1.4273, 1.1894, 0.7114, 0.3214, NULL, NULL);
|
|
|
+
|
|
|
+-- 两部制初始电价数据
|
|
|
+INSERT INTO sys_electrovalency_config (`cfg_code`, `elec_type`, `voltage_level`, `degree_price`, `fs_peak_degree_price`, `fs_high_degree_price`, `fs_flat_degree_price`, `fs_low_degree_price`, `max_req_price`, `trans_capacity_price`) VALUES ('4001', 4, '1-10(20)千伏', 0.6587, 1.3592, 1.1327, 0.6587, 0.2757, 51.2, 32);
|
|
|
+INSERT INTO sys_electrovalency_config (`cfg_code`, `elec_type`, `voltage_level`, `degree_price`, `fs_peak_degree_price`, `fs_high_degree_price`, `fs_flat_degree_price`, `fs_low_degree_price`, `max_req_price`, `trans_capacity_price`) VALUES ('4002', 4, '35千伏', 0.6337, 1.3076, 1.0897, 0.6337, 0.2652, 48, 30);
|
|
|
+INSERT INTO sys_electrovalency_config (`cfg_code`, `elec_type`, `voltage_level`, `degree_price`, `fs_peak_degree_price`, `fs_high_degree_price`, `fs_flat_degree_price`, `fs_low_degree_price`, `max_req_price`, `trans_capacity_price`) VALUES ('4003', 4, '110千伏', 0.6087, 1.256, 1.0467, 0.6087, 0.2547, 44.8, 28);
|
|
|
+INSERT INTO sys_electrovalency_config (`cfg_code`, `elec_type`, `voltage_level`, `degree_price`, `fs_peak_degree_price`, `fs_high_degree_price`, `fs_flat_degree_price`, `fs_low_degree_price`, `max_req_price`, `trans_capacity_price`) VALUES ('4004', 4, '220千伏及以上', 0.5827, 1.2024, 1.002, 0.5827, 0.2439, 41.6, 26);
|
|
|
+
|
|
|
+-- ----------------------------
|
|
|
+-- 电价策略表
|
|
|
+-- ----------------------------
|
|
|
+drop table if exists sys_electrovalency_strategy;
|
|
|
+create table sys_electrovalency_strategy (
|
|
|
+ `id` bigint(20) not null auto_increment comment '序号',
|
|
|
+ `strategy_code` varchar(32) not null comment '策略代码',
|
|
|
+ `strategy_name` varchar(16) not null comment '策略名称',
|
|
|
+ `date` date default null comment '执行日期',
|
|
|
+ `priority` int default 0 comment '优先级',
|
|
|
+ `create_time` datetime default CURRENT_TIMESTAMP comment '创建时间',
|
|
|
+ `update_time` datetime default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP comment '更新时间',
|
|
|
+ primary key (`id`),
|
|
|
+ unique key ux_electrovalency_strategy(`strategy_code`)
|
|
|
+) engine=innodb auto_increment=1 comment = '电价策略表';
|
|
|
|
|
|
+-- 默认策略
|
|
|
+INSERT INTO sys_electrovalency_strategy (`strategy_code`, `strategy_name`, `date`, `priority`) VALUES ('-1', '默认策略', NULL, 0);
|
|
|
|
|
|
-- ----------------------------
|
|
|
--- 电价峰谷表
|
|
|
+-- 电价策略小时表
|
|
|
-- ----------------------------
|
|
|
-drop table if exists sys_electrovalency_peak_valley;
|
|
|
-create table sys_electrovalency_peak_valley (
|
|
|
+drop table if exists sys_electrovalency_strategy_hour;
|
|
|
+create table sys_electrovalency_strategy_hour (
|
|
|
`id` bigint(20) not null auto_increment comment '序号',
|
|
|
- `time_key` varchar(2) not null comment '时间标识',
|
|
|
- `time_index` int not null comment '时间序列',
|
|
|
- `start_time` time not null comment '开始时间HH:mm:ss',
|
|
|
- `end_time` time not null comment '结束时间HH:mm:ss',
|
|
|
+ `strategy_code` varchar(16) not null comment '策略代码',
|
|
|
+ `start_time` time not null comment '开始时间',
|
|
|
+ `end_time` time not null comment '结束时间',
|
|
|
`type` int not null comment '计量类型',
|
|
|
- `floating_value` double default null comment '浮动值',
|
|
|
- primary key (`id`),
|
|
|
- unique key ux_electrovalency_config(`time_index`)
|
|
|
-) engine=innodb auto_increment=1 comment = '电价峰谷表';
|
|
|
-
|
|
|
-INSERT INTO sys_electrovalency_peak_valley (`time_key`, `time_index`, `start_time`, `end_time`, `type`, `floating_value`) VALUES ('00', 1, '00:00:00', '01:00:00', 2, -0.17);
|
|
|
-INSERT INTO sys_electrovalency_peak_valley (`time_key`, `time_index`, `start_time`, `end_time`, `type`, `floating_value`) VALUES ('01', 2, '01:00:00', '02:00:00', 2, -0.17);
|
|
|
-INSERT INTO sys_electrovalency_peak_valley (`time_key`, `time_index`, `start_time`, `end_time`, `type`, `floating_value`) VALUES ('02', 3, '02:00:00', '03:00:00', 2, -0.17);
|
|
|
-INSERT INTO sys_electrovalency_peak_valley (`time_key`, `time_index`, `start_time`, `end_time`, `type`, `floating_value`) VALUES ('03', 4, '03:00:00', '04:00:00', 2, -0.17);
|
|
|
-INSERT INTO sys_electrovalency_peak_valley (`time_key`, `time_index`, `start_time`, `end_time`, `type`, `floating_value`) VALUES ('04', 5, '04:00:00', '05:00:00', 2, -0.17);
|
|
|
-INSERT INTO sys_electrovalency_peak_valley (`time_key`, `time_index`, `start_time`, `end_time`, `type`, `floating_value`) VALUES ('05', 6, '05:00:00', '06:00:00', 2, -0.17);
|
|
|
-INSERT INTO sys_electrovalency_peak_valley (`time_key`, `time_index`, `start_time`, `end_time`, `type`, `floating_value`) VALUES ('06', 7, '06:00:00', '07:00:00', 2, -0.17);
|
|
|
-INSERT INTO sys_electrovalency_peak_valley (`time_key`, `time_index`, `start_time`, `end_time`, `type`, `floating_value`) VALUES ('07', 8, '07:00:00', '08:00:00', 1, 0.03);
|
|
|
-INSERT INTO sys_electrovalency_peak_valley (`time_key`, `time_index`, `start_time`, `end_time`, `type`, `floating_value`) VALUES ('08', 9, '08:00:00', '09:00:00', 1, 0.03);
|
|
|
-INSERT INTO sys_electrovalency_peak_valley (`time_key`, `time_index`, `start_time`, `end_time`, `type`, `floating_value`) VALUES ('09', 10, '09:00:00', '10:00:00', 1, 0.03);
|
|
|
-INSERT INTO sys_electrovalency_peak_valley (`time_key`, `time_index`, `start_time`, `end_time`, `type`, `floating_value`) VALUES ('10', 11, '10:00:00', '11:00:00', 1, 0.03);
|
|
|
-INSERT INTO sys_electrovalency_peak_valley (`time_key`, `time_index`, `start_time`, `end_time`, `type`, `floating_value`) VALUES ('11', 12, '11:00:00', '12:00:00', 2, -0.17);
|
|
|
-INSERT INTO sys_electrovalency_peak_valley (`time_key`, `time_index`, `start_time`, `end_time`, `type`, `floating_value`) VALUES ('12', 13, '12:00:00', '13:00:00', 2, -0.17);
|
|
|
-INSERT INTO sys_electrovalency_peak_valley (`time_key`, `time_index`, `start_time`, `end_time`, `type`, `floating_value`) VALUES ('13', 14, '13:00:00', '14:00:00', 1, 0.03);
|
|
|
-INSERT INTO sys_electrovalency_peak_valley (`time_key`, `time_index`, `start_time`, `end_time`, `type`, `floating_value`) VALUES ('14', 15, '14:00:00', '15:00:00', 1, 0.03);
|
|
|
-INSERT INTO sys_electrovalency_peak_valley (`time_key`, `time_index`, `start_time`, `end_time`, `type`, `floating_value`) VALUES ('15', 16, '15:00:00', '16:00:00', 1, 0.03);
|
|
|
-INSERT INTO sys_electrovalency_peak_valley (`time_key`, `time_index`, `start_time`, `end_time`, `type`, `floating_value`) VALUES ('16', 17, '16:00:00', '17:00:00', 1, 0.03);
|
|
|
-INSERT INTO sys_electrovalency_peak_valley (`time_key`, `time_index`, `start_time`, `end_time`, `type`, `floating_value`) VALUES ('17', 18, '17:00:00', '18:00:00', 1, 0.03);
|
|
|
-INSERT INTO sys_electrovalency_peak_valley (`time_key`, `time_index`, `start_time`, `end_time`, `type`, `floating_value`) VALUES ('18', 19, '18:00:00', '19:00:00', 1, 0.03);
|
|
|
-INSERT INTO sys_electrovalency_peak_valley (`time_key`, `time_index`, `start_time`, `end_time`, `type`, `floating_value`) VALUES ('19', 20, '19:00:00', '20:00:00', 1, 0.03);
|
|
|
-INSERT INTO sys_electrovalency_peak_valley (`time_key`, `time_index`, `start_time`, `end_time`, `type`, `floating_value`) VALUES ('20', 21, '20:00:00', '21:00:00', 1, 0.03);
|
|
|
-INSERT INTO sys_electrovalency_peak_valley (`time_key`, `time_index`, `start_time`, `end_time`, `type`, `floating_value`) VALUES ('21', 22, '21:00:00', '22:00:00', 1, 0.03);
|
|
|
-INSERT INTO sys_electrovalency_peak_valley (`time_key`, `time_index`, `start_time`, `end_time`, `type`, `floating_value`) VALUES ('22', 23, '22:00:00', '23:00:00', 2, -0.17);
|
|
|
-INSERT INTO sys_electrovalency_peak_valley (`time_key`, `time_index`, `start_time`, `end_time`, `type`, `floating_value`) VALUES ('23', 24, '23:00:00', '00:00:00', 2, -0.17);
|
|
|
+ primary key (`id`)
|
|
|
+) engine=innodb auto_increment=1 comment = '电价策略小时表';
|
|
|
|
|
|
+INSERT INTO sys_electrovalency_strategy_hour (`strategy_code`, `start_time`, `end_time`, `type`) VALUES (1, '-1', '00:00:00', '23:59:59', 0);
|
|
|
|
|
|
-- ----------------------------
|
|
|
-- 电网供应计量表
|