|
@@ -882,7 +882,7 @@ create table adm_ems_device_rbook (
|
|
`create_time` datetime default null comment '创建时间',
|
|
`create_time` datetime default null comment '创建时间',
|
|
`update_time` datetime default null comment '更新时间',
|
|
`update_time` datetime default null comment '更新时间',
|
|
primary key (`id`),
|
|
primary key (`id`),
|
|
- key inx_op_inspection_report(`record_code`)
|
|
|
|
|
|
+ key inx_ems_device_rbook(`record_code`)
|
|
) engine=innodb auto_increment=1 comment = '设备台账表';
|
|
) engine=innodb auto_increment=1 comment = '设备台账表';
|
|
|
|
|
|
|
|
|
|
@@ -986,7 +986,58 @@ create table adm_elecprice_strategy_hour (
|
|
primary key (`id`)
|
|
primary key (`id`)
|
|
) engine=innodb auto_increment=1 comment = '电价策略小时表';
|
|
) engine=innodb auto_increment=1 comment = '电价策略小时表';
|
|
|
|
|
|
-INSERT INTO adm_elecprice_strategy_hour (`strategy_code`, `start_time`, `end_time`, `type`) VALUES ('-1', '00:00:00', '24:00:00', 0);
|
|
|
|
|
|
+INSERT INTO adm_elecprice_strategy_hour (`strategy_code`, `start_time`, `end_time`, `type`) VALUES ('-1', '00:00:00', '23:59:59', 0);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+-- ----------------------------
|
|
|
|
+-- 商户能源计费配置
|
|
|
|
+-- ----------------------------
|
|
|
|
+drop table if exists adm_co_charging_config;
|
|
|
|
+create table adm_co_charging_config (
|
|
|
|
+ `id` bigint(20) not null auto_increment comment '序号',
|
|
|
|
+ `area_code` varchar(16) not null comment '服务区代码',
|
|
|
|
+ `elec_unit_price` double not null comment '电计量单价 1度',
|
|
|
|
+ `elec_gt_compute_type` int not null comment '电公摊计算类型',
|
|
|
|
+ `elec_compute_desc` varchar(200) default null comment '电费计算说明',
|
|
|
|
+ `water_unit_price` double not null comment '水计量单价 1吨',
|
|
|
|
+ `water_gt_compute_type` int not null comment '水公摊计算类型',
|
|
|
|
+ `water_compute_desc` varchar(200) default null comment '水费计算说明',
|
|
|
|
+ primary key (`id`),
|
|
|
|
+ unique key ux_co_charging_config(`area_code`)
|
|
|
|
+) engine=innodb auto_increment=1 comment = '商户能源计费配置';
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+-- ----------------------------
|
|
|
|
+-- 商户能源计费配置
|
|
|
|
+-- ----------------------------
|
|
|
|
+drop table if exists adm_co_charging_config;
|
|
|
|
+create table adm_co_charging_config (
|
|
|
|
+ `id` bigint(20) not null auto_increment comment '序号',
|
|
|
|
+ `area_code` varchar(16) not null comment '服务区代码',
|
|
|
|
+ `elec_unit_price` double not null comment '电计量单价 1度',
|
|
|
|
+ `elec_gt_compute_type` int not null comment '电公摊计算类型',
|
|
|
|
+ `elec_compute_desc` varchar(200) default null comment '电费计算说明',
|
|
|
|
+ `water_unit_price` double not null comment '水计量单价 1吨',
|
|
|
|
+ `water_gt_compute_type` int not null comment '水公摊计算类型',
|
|
|
|
+ `water_compute_desc` varchar(200) default null comment '水费计算说明',
|
|
|
|
+ primary key (`id`),
|
|
|
|
+ unique key ux_co_charging_config(`area_code`)
|
|
|
|
+) engine=innodb auto_increment=1 comment = '商户能源计费配置';
|
|
|
|
+
|
|
|
|
+INSERT INTO adm_co_charging_config (`area_code`, `elec_unit_price`, `elec_gt_compute_type`, `elec_compute_desc`, `water_unit_price`, `water_gt_compute_type`, `water_compute_desc`) VALUES ('321283124S3001', 0.6068, 1, '1.按户数均摊\n公摊电费每户收费 = 公摊电费 / 户数\n2、按面积分摊\n单户公摊电费 = 公摊电费 * (单户面积 / 总面积)', 3.04, 0, NULL);
|
|
|
|
+INSERT INTO adm_co_charging_config (`area_code`, `elec_unit_price`, `elec_gt_compute_type`, `elec_compute_desc`, `water_unit_price`, `water_gt_compute_type`, `water_compute_desc`) VALUES ('321283124S3002', 0.6068, 1, '1.按户数均摊\n公摊电费每户收费 = 公摊电费 / 户数\n2、按面积分摊\n单户公摊电费 = 公摊电费 * (单户面积 / 总面积)', 3.04, 0, NULL);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+-- ----------------------------
|
|
|
|
+-- 商户能源计费关系表
|
|
|
|
+-- ----------------------------
|
|
|
|
+drop table if exists adm_co_charging_config_rel;
|
|
|
|
+create table adm_co_charging_config_rel (
|
|
|
|
+ `price_cfg_id` bigint(20) not null auto_increment comment '计费序号',
|
|
|
|
+ `zoning_code` varchar(16) not null comment '区块编码',
|
|
|
|
+ unique key ux_co_emsprice_config_rel(`price_cfg_id`, `zoning_code`)
|
|
|
|
+) engine=innodb comment = '商户能源计费关系表';
|
|
|
|
+
|
|
|
|
|
|
-- ----------------------------
|
|
-- ----------------------------
|
|
-- 电网供应计量表
|
|
-- 电网供应计量表
|