| 
					
				 | 
			
			
				@@ -300,19 +300,19 @@ INSERT INTO `dim_box_eleceqpt_type` (`type_code`, `type_name`) VALUES ('K', '继 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 -- ---------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 -- 电价计量分类 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 -- ---------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-drop table if exists dim_ems_electrovalency_type; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-create table dim_ems_electrovalency_type ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+drop table if exists dim_ems_elecprice_type; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+create table dim_ems_elecprice_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`) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+   unique key ux_elecprice_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 ('4', '两部制'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+INSERT INTO `dim_ems_elecprice_type` (`code`, `name`) VALUES ('1', '居民生活用电'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+INSERT INTO `dim_ems_elecprice_type` (`code`, `name`) VALUES ('2', '农业用电'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+INSERT INTO `dim_ems_elecprice_type` (`code`, `name`) VALUES ('3', '单一制'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+INSERT INTO `dim_ems_elecprice_type` (`code`, `name`) VALUES ('4', '两部制'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 -- ---------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 -- 排放因子维表 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -523,7 +523,7 @@ INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_type`, `facs_subtype 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 -- ---------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				--- 能源设施/系统属性表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+-- 能源设施属性表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 -- ---------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 drop table if exists adm_ems_facs_attr; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 create table adm_ems_facs_attr  ( 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -533,8 +533,6 @@ create table adm_ems_facs_attr  ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   `attr_desc`       varchar(64)     default null                 comment '属性描述', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   `attr_value`      varchar(64)     default null                 comment '属性值', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   `attr_unit`       varchar(32)     default null                 comment '属性单位', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  `create_time`     datetime        default CURRENT_TIMESTAMP    comment '创建时间', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  `update_time`     datetime        default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP comment '更新时间', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    primary key (`id`), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    key ux_ems_facs_code(`facs_code`) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ) engine=innodb auto_increment=1 comment = '能源设施属性表'; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -545,6 +543,44 @@ INSERT INTO `adm_ems_facs_attr` (`facs_code`, `attr_name`, `attr_desc`, `attr_va 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 -- ---------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+-- 能源设施能力表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+-- ---------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+drop table if exists adm_ems_facs_ability; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+create table adm_ems_facs_ability  ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  `id`              bigint(20)      not null auto_increment      comment '序号', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  `facs_code`       varchar(16)     not null                     comment '设施代码', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  `ability_name`    varchar(32)     not null                     comment '能力名称', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  `ability_desc`    varchar(64)     default null                 comment '能力描述', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  `ability_param`   varchar(64)     default null                 comment '属性值', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  primary key (`id`), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  key ux_ems_facs_ability(`facs_code`) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+) engine=innodb auto_increment=1 comment = '能源设施能力表'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+-- 设施属性DEMO数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+INSERT INTO `adm_ems_facs_ability` (`facs_code`, `ability_name`, `ability_desc`, `ability_param`) VALUES ('Z020', '开启', '开启空调', '{\"enable\":1}'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+INSERT INTO `adm_ems_facs_ability` (`facs_code`, `ability_name`, `ability_desc`, `ability_param`) VALUES ('Z020', '关闭', '关闭空调', '{\"enable\":0}'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+-- ---------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+-- 能源设施事件表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+-- ---------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+drop table if exists adm_ems_facs_event; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+create table adm_ems_facs_event  ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  `id`              bigint(20)      not null auto_increment      comment '序号', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  `facs_code`       varchar(16)     not null                     comment '设施代码', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  `event_name`      varchar(32)     not null                     comment '事件名称', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  `event_type`      int             not null                     comment '事件类型', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  `event_desc`      varchar(64)     default null                 comment '事件描述', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  `event_code`      varchar(32)     default null                 comment '事件代码', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  `ext_event_code`  varchar(64)     default null                 comment '外系统事件代码', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  primary key (`id`), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  key ux_ems_facs_event(`facs_code`) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+) engine=innodb auto_increment=1 comment = '能源设施事件表'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+INSERT INTO `adm_ems_facs_event` (`facs_code`, `event_name`, `event_type`, `event_desc`, `event_code`, `ext_event_code`) VALUES ('Z101', '电压告警', '2', '电压过低告警', 'LOW_V',  '10001001'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+-- ---------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 -- 能源子系统表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 -- ---------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 drop table if exists adm_ems_subsystem; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -832,8 +868,8 @@ create table adm_op_inspection_report ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 -- ---------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 -- 服务区用电属性表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 -- ---------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-drop table if exists sys_area_electricity_attr; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-create table sys_area_electricity_attr ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+drop table if exists adm_area_elec_attr; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+create table adm_area_elec_attr ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   `id`                   bigint(20)      not null auto_increment       comment '序号', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   `area_code`            varchar(32)     not null                      comment '园区代码', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   `price_code`           varchar(16)     not null                      comment '价格编码', 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -843,17 +879,17 @@ create table sys_area_electricity_attr ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   `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`) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  unique key ux_area_elec_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); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+INSERT INTO adm_area_elec_attr (`area_code`, `price_code`, `req_capacity_flag`, `trans_capacity`, `req_quantity`) VALUES ('321283124S3001', '4001', 1, 630, NULL); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+INSERT INTO adm_area_elec_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 ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+drop table if exists adm_gw_elecprice_config; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+create table adm_gw_elecprice_config ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   `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-工业两部制', 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -866,41 +902,41 @@ create table sys_electrovalency_config ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   `max_req_price`         double          default null                 comment '最大需量用电价格', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   `trans_capacity_price`  double          default null                 comment '变压器容量用电价格', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   primary key (`id`), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  unique key ux_electrovalency_config(`cfg_code`) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  unique key ux_gw_elecprice_config(`cfg_code`) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ) engine=innodb auto_increment=1 comment = '电价配置表'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 -- 单一制初始电价数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-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 adm_gw_elecprice_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 adm_gw_elecprice_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 adm_gw_elecprice_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); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+INSERT INTO adm_gw_elecprice_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 adm_gw_elecprice_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 adm_gw_elecprice_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 adm_gw_elecprice_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_pv_price_config; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-create table sys_pv_price_config ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+drop table if exists adm_pv_elecprice_config; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+create table adm_pv_elecprice_config ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   `id`                    bigint(20)      not null auto_increment      comment '序号', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  `cfg_code`              varchar(4)      not null                     comment '配置代码', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  `cfg_code`              varchar(16)      not null                     comment '配置代码', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   `price_name`            varchar(32)     not null                     comment '价格名称', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   `obj_price`             double          default null                 comment '对象价格', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   `state_subsidy`         double          default null                 comment '国家补贴', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   `local_subsidy`         double          default null                 comment '地方补贴', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   primary key (`id`), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  unique key ux_electrovalency_config(`price_name`) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  unique key ux_pv_elecprice_config(`cfg_code`) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ) engine=innodb auto_increment=1 comment = '光伏电价配置表'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 -- ---------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 -- 电价策略表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 -- ---------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-drop table if exists sys_electrovalency_strategy; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-create table sys_electrovalency_strategy ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+drop table if exists adm_elecprice_strategy; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+create table adm_elecprice_strategy ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   `id`                   bigint(20)      not null auto_increment      comment '序号', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   `strategy_code`        varchar(32)     not null                     comment '策略代码', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   `strategy_name`        varchar(16)     not null                     comment '策略名称', 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -909,17 +945,17 @@ create table sys_electrovalency_strategy ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   `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`) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  unique key ux_elecprice_strategy(`strategy_code`) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ) engine=innodb auto_increment=1 comment = '电价策略表'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 -- 默认策略 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-INSERT INTO sys_electrovalency_strategy (`strategy_code`, `strategy_name`, `date`, `priority`) VALUES ('-1', '默认策略', NULL, 0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+INSERT INTO adm_elecprice_strategy (`strategy_code`, `strategy_name`, `date`, `priority`) VALUES ('-1', '默认策略', NULL, 0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 -- ---------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 -- 电价策略小时表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 -- ---------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-drop table if exists sys_electrovalency_strategy_hour; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-create table sys_electrovalency_strategy_hour ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+drop table if exists adm_elecprice_strategy_hour; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+create table adm_elecprice_strategy_hour ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   `id`                   bigint(20)      not null auto_increment      comment '序号', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   `strategy_code`        varchar(16)     not null                     comment '策略代码', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   `start_time`           time            not null                     comment '开始时间', 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -928,7 +964,7 @@ create table sys_electrovalency_strategy_hour ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   primary key (`id`) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ) engine=innodb auto_increment=1 comment = '电价策略小时表'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-INSERT INTO sys_electrovalency_strategy_hour (`strategy_code`, `start_time`, `end_time`, `type`) VALUES ('-1', '00:00:00', '23:59:59', 0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+INSERT INTO adm_elecprice_strategy_hour (`strategy_code`, `start_time`, `end_time`, `type`) VALUES ('-1', '00:00:00', '23:59:59', 0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 -- ---------------------------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 -- 电网供应计量表 
			 |