/*
Navicat MySQL Data Transfer

Source Server         : 192.168.0.22
Source Server Version : 50735
Source Host           : 192.168.0.22:3306
Source Database       : epp_2022

Target Server Type    : MYSQL
Target Server Version : 50735
File Encoding         : 65001

Date: 2022-01-20 13:58:35
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for anal_company_warn_counts
-- ----------------------------
DROP TABLE IF EXISTS `anal_company_warn_counts`;
CREATE TABLE `anal_company_warn_counts` (
  `company_id` int(11) NOT NULL COMMENT '企业唯一id',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间  yyyyMMdd',
  `industry` varchar(20) DEFAULT NULL COMMENT '所属行业id',
  `org_id` int(11) NOT NULL COMMENT '所属机构id',
  `zw_warn_cw_ids` text COMMENT '治污告警产污设备ids，以","分隔',
  `zw_warn_cw_monitor_numb` int(11) NOT NULL DEFAULT '0' COMMENT '治污告警产污设备数量',
  `zw_warn_counts` int(11) NOT NULL DEFAULT '0' COMMENT '治污设备告警总次数',
  `zw_warn_report_state` varchar(20) DEFAULT NULL COMMENT '治污告警的申报状态：0未申报，2已全部申报，1部分申报 ',
  `zw_warn_zw_ids` text COMMENT '治污告警治污设备ids，以","分隔',
  `zw_warn_zw_monitor_numb` int(11) NOT NULL DEFAULT '0' COMMENT '治污告警治污设备数量',
  `plan_excute_monitor_numb` int(11) NOT NULL DEFAULT '0' COMMENT '方案执行限产点数量（产污设备控制和分组都要包含），只计算限产中车间数量，去除重复车间',
  `plan_warn_monitor_numb` int(11) NOT NULL DEFAULT '0' COMMENT '方案告警异常限产点数量，只计算车间数量；',
  `plan_warn_cj_ids` text COMMENT '方案报警限产点ids(车间id)，以","分隔',
  `plan_warn_counts` int(11) NOT NULL DEFAULT '0' COMMENT '方案告警总次数',
  PRIMARY KEY (`company_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='企业告警数量按天数量统计';

-- ----------------------------
-- Table structure for anal_industry_warn_counts
-- ----------------------------
DROP TABLE IF EXISTS `anal_industry_warn_counts`;
CREATE TABLE `anal_industry_warn_counts` (
  `industry` varchar(20) NOT NULL COMMENT '机构id',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间  yyyyMMdd',
  `company_numb` int(11) NOT NULL COMMENT '行业下所有企业数量',
  `zw_warn_company_numb` int(11) NOT NULL DEFAULT '0' COMMENT '治污告警异常企业数量',
  `zw_warn_cw_monitor_numb` int(11) NOT NULL DEFAULT '0' COMMENT '治污告警产污设备数量',
  `zw_warn_counts` int(11) NOT NULL DEFAULT '0' COMMENT '治污设备告警总次数',
  `zw_warn_zw_monitor_numb` int(11) NOT NULL DEFAULT '0' COMMENT '治污告警治污设备数量',
  `zw_warn_declared_company_numb` int(11) NOT NULL DEFAULT '0' COMMENT '治污告警已申报的企业数量',
  `zw_warn_undeclared_company_numb` int(11) NOT NULL DEFAULT '0' COMMENT '治污告警未申报的企业数量',
  `plan_warn_counts` int(11) NOT NULL DEFAULT '0' COMMENT '方案告警总次数',
  `plan_excute_company_numb` int(11) NOT NULL DEFAULT '0' COMMENT '方案执行企业数量',
  `plan_warn_company_numb` int(11) NOT NULL DEFAULT '0' COMMENT '方案告警异常企业数量',
  `plan_warn_monitor_numb` int(11) NOT NULL DEFAULT '0' COMMENT '方案告警异常限产点数量，车间',
  `normal_company_numb` int(11) NOT NULL COMMENT '正常企业数量',
  PRIMARY KEY (`industry`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='行业告警数量按天数量统计';

-- ----------------------------
-- Table structure for anal_org_warn_counts
-- ----------------------------
DROP TABLE IF EXISTS `anal_org_warn_counts`;
CREATE TABLE `anal_org_warn_counts` (
  `org_id` int(11) NOT NULL COMMENT '机构id',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间  yyyyMMdd',
  `company_numb` int(11) NOT NULL COMMENT '机构下所有企业数量',
  `zw_warn_company_numb` int(11) NOT NULL DEFAULT '0' COMMENT '治污告警异常企业数量',
  `zw_warn_cw_monitor_numb` int(11) NOT NULL DEFAULT '0' COMMENT '治污告警产污设备数量',
  `zw_warn_counts` int(11) NOT NULL DEFAULT '0' COMMENT '治污设备告警总次数',
  `zw_warn_zw_monitor_numb` int(11) NOT NULL DEFAULT '0' COMMENT '治污告警治污设备数量',
  `zw_warn_declared_company_numb` int(11) NOT NULL DEFAULT '0' COMMENT '治污告警已申报的企业数量',
  `zw_warn_undeclared_company_numb` int(11) NOT NULL DEFAULT '0' COMMENT '治污告警未申报的企业数量',
  `plan_warn_counts` int(11) NOT NULL DEFAULT '0' COMMENT '方案告警总次数',
  `plan_excute_company_numb` int(11) NOT NULL DEFAULT '0' COMMENT '方案执行企业数量',
  `plan_warn_company_numb` int(11) NOT NULL DEFAULT '0' COMMENT '方案告警异常企业数量',
  `plan_warn_monitor_numb` int(11) NOT NULL DEFAULT '0' COMMENT '方案告警异常产污设备数量',
  `normal_company_numb` int(11) NOT NULL COMMENT '正常企业数量',
  `plan_control_level` varchar(100) DEFAULT NULL COMMENT '方案控制级别(多个）',
  `plan_control_level_counts` varchar(100) DEFAULT NULL COMMENT '方案控制级别数量(按控制级别从小到大）',
  `excute_plan_control_level_counts` varchar(100) DEFAULT NULL COMMENT '执行方案控制级别数量(按控制级别从小到大）',
  PRIMARY KEY (`org_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='机构告警数量按天数量统计';

-- ----------------------------
-- Table structure for company_cstate
-- ----------------------------
DROP TABLE IF EXISTS `company_cstate`;
CREATE TABLE `company_cstate` (
  `company_id` int(11) NOT NULL COMMENT '企业id',
  `upload_date` bigint(11) NOT NULL COMMENT '时间yyyyMMdd',
  `cstate` varchar(20) NOT NULL COMMENT '企业状态000040001',
  PRIMARY KEY (`company_id`,`upload_date`,`cstate`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='企业状态表';

-- ----------------------------
-- Table structure for company_running_24h_01
-- ----------------------------
DROP TABLE IF EXISTS `company_running_24h_01`;
CREATE TABLE `company_running_24h_01` (
  `company_id` int(11) NOT NULL COMMENT '企业id',
  `upload_date` bigint(11) NOT NULL COMMENT '上传时间yyyyMMdd',
  `hour` varchar(2) NOT NULL COMMENT '小时0-23',
  `cw_num` int(11) DEFAULT NULL COMMENT '产污设施运行数量',
  PRIMARY KEY (`company_id`,`upload_date`,`hour`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='企业产污设施每小时运行数量';

-- ----------------------------
-- Table structure for company_running_24h_02
-- ----------------------------
DROP TABLE IF EXISTS `company_running_24h_02`;
CREATE TABLE `company_running_24h_02` (
  `company_id` int(11) NOT NULL COMMENT '企业id',
  `upload_date` bigint(11) NOT NULL COMMENT '上传时间yyyyMMdd',
  `hour` varchar(2) NOT NULL COMMENT '小时0-23',
  `cw_num` int(11) DEFAULT NULL COMMENT '产污设施运行数量',
  PRIMARY KEY (`company_id`,`upload_date`,`hour`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='企业产污设施每小时运行数量';

-- ----------------------------
-- Table structure for company_running_24h_03
-- ----------------------------
DROP TABLE IF EXISTS `company_running_24h_03`;
CREATE TABLE `company_running_24h_03` (
  `company_id` int(11) NOT NULL COMMENT '企业id',
  `upload_date` bigint(11) NOT NULL COMMENT '上传时间yyyyMMdd',
  `hour` varchar(2) NOT NULL COMMENT '小时0-23',
  `cw_num` int(11) DEFAULT NULL COMMENT '产污设施运行数量',
  PRIMARY KEY (`company_id`,`upload_date`,`hour`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='企业产污设施每小时运行数量';

-- ----------------------------
-- Table structure for company_running_24h_04
-- ----------------------------
DROP TABLE IF EXISTS `company_running_24h_04`;
CREATE TABLE `company_running_24h_04` (
  `company_id` int(11) NOT NULL COMMENT '企业id',
  `upload_date` bigint(11) NOT NULL COMMENT '上传时间yyyyMMdd',
  `hour` varchar(2) NOT NULL COMMENT '小时0-23',
  `cw_num` int(11) DEFAULT NULL COMMENT '产污设施运行数量',
  PRIMARY KEY (`company_id`,`upload_date`,`hour`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='企业产污设施每小时运行数量';

-- ----------------------------
-- Table structure for company_running_24h_05
-- ----------------------------
DROP TABLE IF EXISTS `company_running_24h_05`;
CREATE TABLE `company_running_24h_05` (
  `company_id` int(11) NOT NULL COMMENT '企业id',
  `upload_date` bigint(11) NOT NULL COMMENT '上传时间yyyyMMdd',
  `hour` varchar(2) NOT NULL COMMENT '小时0-23',
  `cw_num` int(11) DEFAULT NULL COMMENT '产污设施运行数量',
  PRIMARY KEY (`company_id`,`upload_date`,`hour`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='企业产污设施每小时运行数量';

-- ----------------------------
-- Table structure for company_running_24h_06
-- ----------------------------
DROP TABLE IF EXISTS `company_running_24h_06`;
CREATE TABLE `company_running_24h_06` (
  `company_id` int(11) NOT NULL COMMENT '企业id',
  `upload_date` bigint(11) NOT NULL COMMENT '上传时间yyyyMMdd',
  `hour` varchar(2) NOT NULL COMMENT '小时0-23',
  `cw_num` int(11) DEFAULT NULL COMMENT '产污设施运行数量',
  PRIMARY KEY (`company_id`,`upload_date`,`hour`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='企业产污设施每小时运行数量';

-- ----------------------------
-- Table structure for company_running_24h_07
-- ----------------------------
DROP TABLE IF EXISTS `company_running_24h_07`;
CREATE TABLE `company_running_24h_07` (
  `company_id` int(11) NOT NULL COMMENT '企业id',
  `upload_date` bigint(11) NOT NULL COMMENT '上传时间yyyyMMdd',
  `hour` varchar(2) NOT NULL COMMENT '小时0-23',
  `cw_num` int(11) DEFAULT NULL COMMENT '产污设施运行数量',
  PRIMARY KEY (`company_id`,`upload_date`,`hour`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='企业产污设施每小时运行数量';

-- ----------------------------
-- Table structure for company_running_24h_08
-- ----------------------------
DROP TABLE IF EXISTS `company_running_24h_08`;
CREATE TABLE `company_running_24h_08` (
  `company_id` int(11) NOT NULL COMMENT '企业id',
  `upload_date` bigint(11) NOT NULL COMMENT '上传时间yyyyMMdd',
  `hour` varchar(2) NOT NULL COMMENT '小时0-23',
  `cw_num` int(11) DEFAULT NULL COMMENT '产污设施运行数量',
  PRIMARY KEY (`company_id`,`upload_date`,`hour`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='企业产污设施每小时运行数量';

-- ----------------------------
-- Table structure for company_running_24h_09
-- ----------------------------
DROP TABLE IF EXISTS `company_running_24h_09`;
CREATE TABLE `company_running_24h_09` (
  `company_id` int(11) NOT NULL COMMENT '企业id',
  `upload_date` bigint(11) NOT NULL COMMENT '上传时间yyyyMMdd',
  `hour` varchar(2) NOT NULL COMMENT '小时0-23',
  `cw_num` int(11) DEFAULT NULL COMMENT '产污设施运行数量',
  PRIMARY KEY (`company_id`,`upload_date`,`hour`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='企业产污设施每小时运行数量';

-- ----------------------------
-- Table structure for company_running_24h_10
-- ----------------------------
DROP TABLE IF EXISTS `company_running_24h_10`;
CREATE TABLE `company_running_24h_10` (
  `company_id` int(11) NOT NULL COMMENT '企业id',
  `upload_date` bigint(11) NOT NULL COMMENT '上传时间yyyyMMdd',
  `hour` varchar(2) NOT NULL COMMENT '小时0-23',
  `cw_num` int(11) DEFAULT NULL COMMENT '产污设施运行数量',
  PRIMARY KEY (`company_id`,`upload_date`,`hour`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='企业产污设施每小时运行数量';

-- ----------------------------
-- Table structure for company_running_24h_11
-- ----------------------------
DROP TABLE IF EXISTS `company_running_24h_11`;
CREATE TABLE `company_running_24h_11` (
  `company_id` int(11) NOT NULL COMMENT '企业id',
  `upload_date` bigint(11) NOT NULL COMMENT '上传时间yyyyMMdd',
  `hour` varchar(2) NOT NULL COMMENT '小时0-23',
  `cw_num` int(11) DEFAULT NULL COMMENT '产污设施运行数量',
  PRIMARY KEY (`company_id`,`upload_date`,`hour`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='企业产污设施每小时运行数量';

-- ----------------------------
-- Table structure for company_running_24h_12
-- ----------------------------
DROP TABLE IF EXISTS `company_running_24h_12`;
CREATE TABLE `company_running_24h_12` (
  `company_id` int(11) NOT NULL COMMENT '企业id',
  `upload_date` bigint(11) NOT NULL COMMENT '上传时间yyyyMMdd',
  `hour` varchar(2) NOT NULL COMMENT '小时0-23',
  `cw_num` int(11) DEFAULT NULL COMMENT '产污设施运行数量',
  PRIMARY KEY (`company_id`,`upload_date`,`hour`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='企业产污设施每小时运行数量';

-- ----------------------------
-- Table structure for company_transmission_rate
-- ----------------------------
DROP TABLE IF EXISTS `company_transmission_rate`;
CREATE TABLE `company_transmission_rate` (
  `company_id` int(11) NOT NULL COMMENT '企业id',
  `upload_date` bigint(20) NOT NULL COMMENT '时间 yyyyMMdd',
  `upload_success_num` int(11) NOT NULL COMMENT '传输次数',
  `need_upload_num` int(11) NOT NULL COMMENT '应该上传次数',
  `cw_upload_success_num` int(11) NOT NULL COMMENT '产污设备传输次数',
  `cw_need_upload_num` int(11) NOT NULL COMMENT '产污设备应该上传次数',
  `zw_upload_success_num` int(11) NOT NULL COMMENT '治污设备传输次数',
  `zw_need_upload_num` int(11) NOT NULL COMMENT '治污设备应该上传次数',
  PRIMARY KEY (`company_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='企业传输率表';

-- ----------------------------
-- Table structure for date_company
-- ----------------------------
DROP TABLE IF EXISTS `date_company`;
CREATE TABLE `date_company` (
  `company_id` int(11) NOT NULL COMMENT '企业编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMdd',
  `power` decimal(12,3) DEFAULT NULL COMMENT '负荷',
  `energy` decimal(12,3) DEFAULT NULL COMMENT '电量',
  PRIMARY KEY (`company_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='企业用电日表';

-- ----------------------------
-- Table structure for date_org
-- ----------------------------
DROP TABLE IF EXISTS `date_org`;
CREATE TABLE `date_org` (
  `org_id` int(11) NOT NULL COMMENT '机构编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMdd',
  `power` decimal(20,3) DEFAULT NULL COMMENT '负荷',
  `energy` decimal(20,3) DEFAULT NULL COMMENT '电量',
  PRIMARY KEY (`org_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='机构用电日表';

-- ----------------------------
-- Table structure for date_org_monitor_offline
-- ----------------------------
DROP TABLE IF EXISTS `date_org_monitor_offline`;
CREATE TABLE `date_org_monitor_offline` (
  `org_id` int(11) NOT NULL COMMENT '机构编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMdd',
  `zw_monitor_num` int(11) DEFAULT NULL COMMENT '治污离线设备数',
  `cw_monitor_num` int(11) DEFAULT NULL COMMENT '产污离线设备数',
  `total_gateway_num` int(11) DEFAULT NULL COMMENT '离线总关口数量',
  PRIMARY KEY (`org_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='机构日离线设备数统计';

-- ----------------------------
-- Table structure for day_monitor_offline
-- ----------------------------
DROP TABLE IF EXISTS `day_monitor_offline`;
CREATE TABLE `day_monitor_offline` (
  `company_id` int(11) NOT NULL COMMENT '企业id',
  `monitor_id` bigint(20) NOT NULL COMMENT '监测点id',
  `offline_num` int(11) NOT NULL COMMENT '日离线数',
  `offline_detail` text COMMENT '离线时间点，HH:mm,HH:mm',
  `upload_date` bigint(11) NOT NULL COMMENT '统计日期yyyyMMdd',
  PRIMARY KEY (`monitor_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='监测点离线日统计表，只统计实时上传监测点';

-- ----------------------------
-- Table structure for hour_company
-- ----------------------------
DROP TABLE IF EXISTS `hour_company`;
CREATE TABLE `hour_company` (
  `company_id` int(11) NOT NULL COMMENT '企业编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHH',
  `power` decimal(12,3) DEFAULT NULL COMMENT '负荷',
  `energy` decimal(12,3) DEFAULT NULL COMMENT '当前时间tps减去上一个时间点',
  PRIMARY KEY (`company_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for hour_org
-- ----------------------------
DROP TABLE IF EXISTS `hour_org`;
CREATE TABLE `hour_org` (
  `org_id` int(11) NOT NULL COMMENT '机构编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHH',
  `power` decimal(15,3) DEFAULT NULL COMMENT '负荷',
  `energy` decimal(15,3) DEFAULT NULL COMMENT '当前时间的tps减去上一个时间点的',
  PRIMARY KEY (`org_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for online_company
-- ----------------------------
DROP TABLE IF EXISTS `online_company`;
CREATE TABLE `online_company` (
  `company_id` int(11) NOT NULL COMMENT '企业编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `power` decimal(12,3) DEFAULT NULL COMMENT '负荷',
  `energy` decimal(12,3) DEFAULT NULL COMMENT '电量',
  `tpe` decimal(15,3) DEFAULT NULL COMMENT '正相有功电量，每天0时从0开始计算累计电量（乘以ct/pt变比后的值）',
  `tps` decimal(20,3) DEFAULT NULL COMMENT '正相有功电度示值（乘以ct/pt变比后的值）',
  PRIMARY KEY (`company_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='企业用电负荷实时表';

-- ----------------------------
-- Table structure for online_data_power_01
-- ----------------------------
DROP TABLE IF EXISTS `online_data_power_01`;
CREATE TABLE `online_data_power_01` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测仪编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `ia` decimal(12,3) DEFAULT NULL COMMENT 'A相电流，单位：A安[培]',
  `ib` decimal(12,3) DEFAULT NULL COMMENT 'B相电流，单位：A安[培]',
  `ic` decimal(12,3) DEFAULT NULL COMMENT 'C相电流，单位：A安[培]',
  `in` decimal(12,3) DEFAULT NULL COMMENT 'N相电流，单位：A安[培]',
  `ua` decimal(12,3) DEFAULT NULL COMMENT 'A相电压，单位：V伏[特]',
  `ub` decimal(12,3) DEFAULT NULL COMMENT 'B相电压，单位：V伏[特]',
  `uc` decimal(12,3) DEFAULT NULL COMMENT 'C相电压，单位：V伏[特]',
  `uab` decimal(12,3) DEFAULT NULL COMMENT 'Uab线电压，单位：V伏[特]',
  `ubc` decimal(12,3) DEFAULT NULL COMMENT 'Ubc线电压，单位：V伏[特]',
  `uac` decimal(12,3) DEFAULT NULL COMMENT 'Uac线电压，单位：V伏[特]',
  `pa` decimal(12,3) DEFAULT NULL COMMENT 'A相负荷，kW千瓦',
  `pb` decimal(12,3) DEFAULT NULL COMMENT 'B相负荷，kW千瓦',
  `pc` decimal(12,3) DEFAULT NULL COMMENT 'C相负荷，kW千瓦',
  `p` decimal(12,3) DEFAULT NULL COMMENT '有功功率，kW千瓦',
  `thea` decimal(12,3) DEFAULT NULL COMMENT 'A相功率因数，单位：无量纲',
  `theb` decimal(12,3) DEFAULT NULL COMMENT 'B相功率因数，单位：无量纲',
  `thec` decimal(12,3) DEFAULT NULL COMMENT 'C相功率因数，单位：无量纲',
  `the` decimal(12,3) DEFAULT NULL COMMENT '总功率因数，单位：无量纲',
  `pv` decimal(12,3) DEFAULT NULL COMMENT '总有功电量，单位：kWh千瓦时',
  `qv` decimal(12,3) DEFAULT NULL COMMENT '总无功电量，单位：kVarh千乏时',
  `q` decimal(12,3) DEFAULT NULL COMMENT '无功功率，单位：kVar千乏',
  `rs` tinyint(1) DEFAULT NULL COMMENT '设备运行状态，0为关闭，1为开启',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='电力实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20220101235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20220102235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20220103235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20220104235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20220105235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20220106235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20220107235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20220108235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20220109235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20220110235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20220111235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20220112235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20220113235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20220114235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20220115235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20220116235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20220117235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20220118235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20220119235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20220120235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20220121235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20220122235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20220123235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20220124235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20220125235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20220126235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20220127235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20220128235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20220129235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20220130235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_power_02
-- ----------------------------
DROP TABLE IF EXISTS `online_data_power_02`;
CREATE TABLE `online_data_power_02` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测仪编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `ia` decimal(12,3) DEFAULT NULL COMMENT 'A相电流，单位：A安[培]',
  `ib` decimal(12,3) DEFAULT NULL COMMENT 'B相电流，单位：A安[培]',
  `ic` decimal(12,3) DEFAULT NULL COMMENT 'C相电流，单位：A安[培]',
  `in` decimal(12,3) DEFAULT NULL COMMENT 'N相电流，单位：A安[培]',
  `ua` decimal(12,3) DEFAULT NULL COMMENT 'A相电压，单位：V伏[特]',
  `ub` decimal(12,3) DEFAULT NULL COMMENT 'B相电压，单位：V伏[特]',
  `uc` decimal(12,3) DEFAULT NULL COMMENT 'C相电压，单位：V伏[特]',
  `uab` decimal(12,3) DEFAULT NULL COMMENT 'Uab线电压，单位：V伏[特]',
  `ubc` decimal(12,3) DEFAULT NULL COMMENT 'Ubc线电压，单位：V伏[特]',
  `uac` decimal(12,3) DEFAULT NULL COMMENT 'Uac线电压，单位：V伏[特]',
  `pa` decimal(12,3) DEFAULT NULL COMMENT 'A相负荷，kW千瓦',
  `pb` decimal(12,3) DEFAULT NULL COMMENT 'B相负荷，kW千瓦',
  `pc` decimal(12,3) DEFAULT NULL COMMENT 'C相负荷，kW千瓦',
  `p` decimal(12,3) DEFAULT NULL COMMENT '有功功率，kW千瓦',
  `thea` decimal(12,3) DEFAULT NULL COMMENT 'A相功率因数，单位：无量纲',
  `theb` decimal(12,3) DEFAULT NULL COMMENT 'B相功率因数，单位：无量纲',
  `thec` decimal(12,3) DEFAULT NULL COMMENT 'C相功率因数，单位：无量纲',
  `the` decimal(12,3) DEFAULT NULL COMMENT '总功率因数，单位：无量纲',
  `pv` decimal(12,3) DEFAULT NULL COMMENT '总有功电量，单位：kWh千瓦时',
  `qv` decimal(12,3) DEFAULT NULL COMMENT '总无功电量，单位：kVarh千乏时',
  `q` decimal(12,3) DEFAULT NULL COMMENT '无功功率，单位：kVar千乏',
  `rs` tinyint(1) DEFAULT NULL COMMENT '设备运行状态，0为关闭，1为开启',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='电力实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20220201235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20220202235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20220203235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20220204235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20220205235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20220206235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20220207235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20220208235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20220209235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20220210235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20220211235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20220212235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20220213235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20220214235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20220215235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20220216235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20220217235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20220218235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20220219235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20220220235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20220221235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20220222235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20220223235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20220224235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20220225235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20220226235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20220227235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20220228235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20220229235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20220230235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_power_03
-- ----------------------------
DROP TABLE IF EXISTS `online_data_power_03`;
CREATE TABLE `online_data_power_03` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测仪编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `ia` decimal(12,3) DEFAULT NULL COMMENT 'A相电流，单位：A安[培]',
  `ib` decimal(12,3) DEFAULT NULL COMMENT 'B相电流，单位：A安[培]',
  `ic` decimal(12,3) DEFAULT NULL COMMENT 'C相电流，单位：A安[培]',
  `in` decimal(12,3) DEFAULT NULL COMMENT 'N相电流，单位：A安[培]',
  `ua` decimal(12,3) DEFAULT NULL COMMENT 'A相电压，单位：V伏[特]',
  `ub` decimal(12,3) DEFAULT NULL COMMENT 'B相电压，单位：V伏[特]',
  `uc` decimal(12,3) DEFAULT NULL COMMENT 'C相电压，单位：V伏[特]',
  `uab` decimal(12,3) DEFAULT NULL COMMENT 'Uab线电压，单位：V伏[特]',
  `ubc` decimal(12,3) DEFAULT NULL COMMENT 'Ubc线电压，单位：V伏[特]',
  `uac` decimal(12,3) DEFAULT NULL COMMENT 'Uac线电压，单位：V伏[特]',
  `pa` decimal(12,3) DEFAULT NULL COMMENT 'A相负荷，kW千瓦',
  `pb` decimal(12,3) DEFAULT NULL COMMENT 'B相负荷，kW千瓦',
  `pc` decimal(12,3) DEFAULT NULL COMMENT 'C相负荷，kW千瓦',
  `p` decimal(12,3) DEFAULT NULL COMMENT '有功功率，kW千瓦',
  `thea` decimal(12,3) DEFAULT NULL COMMENT 'A相功率因数，单位：无量纲',
  `theb` decimal(12,3) DEFAULT NULL COMMENT 'B相功率因数，单位：无量纲',
  `thec` decimal(12,3) DEFAULT NULL COMMENT 'C相功率因数，单位：无量纲',
  `the` decimal(12,3) DEFAULT NULL COMMENT '总功率因数，单位：无量纲',
  `pv` decimal(12,3) DEFAULT NULL COMMENT '总有功电量，单位：kWh千瓦时',
  `qv` decimal(12,3) DEFAULT NULL COMMENT '总无功电量，单位：kVarh千乏时',
  `q` decimal(12,3) DEFAULT NULL COMMENT '无功功率，单位：kVar千乏',
  `rs` tinyint(1) DEFAULT NULL COMMENT '设备运行状态，0为关闭，1为开启',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='电力实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20220301235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20220302235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20220303235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20220304235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20220305235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20220306235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20220307235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20220308235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20220309235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20220310235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20220311235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20220312235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20220313235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20220314235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20220315235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20220316235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20220317235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20220318235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20220319235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20220320235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20220321235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20220322235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20220323235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20220324235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20220325235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20220326235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20220327235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20220328235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20220329235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20220330235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_power_04
-- ----------------------------
DROP TABLE IF EXISTS `online_data_power_04`;
CREATE TABLE `online_data_power_04` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测仪编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `ia` decimal(12,3) DEFAULT NULL COMMENT 'A相电流，单位：A安[培]',
  `ib` decimal(12,3) DEFAULT NULL COMMENT 'B相电流，单位：A安[培]',
  `ic` decimal(12,3) DEFAULT NULL COMMENT 'C相电流，单位：A安[培]',
  `in` decimal(12,3) DEFAULT NULL COMMENT 'N相电流，单位：A安[培]',
  `ua` decimal(12,3) DEFAULT NULL COMMENT 'A相电压，单位：V伏[特]',
  `ub` decimal(12,3) DEFAULT NULL COMMENT 'B相电压，单位：V伏[特]',
  `uc` decimal(12,3) DEFAULT NULL COMMENT 'C相电压，单位：V伏[特]',
  `uab` decimal(12,3) DEFAULT NULL COMMENT 'Uab线电压，单位：V伏[特]',
  `ubc` decimal(12,3) DEFAULT NULL COMMENT 'Ubc线电压，单位：V伏[特]',
  `uac` decimal(12,3) DEFAULT NULL COMMENT 'Uac线电压，单位：V伏[特]',
  `pa` decimal(12,3) DEFAULT NULL COMMENT 'A相负荷，kW千瓦',
  `pb` decimal(12,3) DEFAULT NULL COMMENT 'B相负荷，kW千瓦',
  `pc` decimal(12,3) DEFAULT NULL COMMENT 'C相负荷，kW千瓦',
  `p` decimal(12,3) DEFAULT NULL COMMENT '有功功率，kW千瓦',
  `thea` decimal(12,3) DEFAULT NULL COMMENT 'A相功率因数，单位：无量纲',
  `theb` decimal(12,3) DEFAULT NULL COMMENT 'B相功率因数，单位：无量纲',
  `thec` decimal(12,3) DEFAULT NULL COMMENT 'C相功率因数，单位：无量纲',
  `the` decimal(12,3) DEFAULT NULL COMMENT '总功率因数，单位：无量纲',
  `pv` decimal(12,3) DEFAULT NULL COMMENT '总有功电量，单位：kWh千瓦时',
  `qv` decimal(12,3) DEFAULT NULL COMMENT '总无功电量，单位：kVarh千乏时',
  `q` decimal(12,3) DEFAULT NULL COMMENT '无功功率，单位：kVar千乏',
  `rs` tinyint(1) DEFAULT NULL COMMENT '设备运行状态，0为关闭，1为开启',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='电力实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20220401235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20220402235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20220403235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20220404235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20220405235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20220406235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20220407235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20220408235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20220409235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20220410235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20220411235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20220412235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20220413235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20220414235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20220415235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20220416235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20220417235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20220418235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20220419235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20220420235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20220421235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20220422235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20220423235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20220424235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20220425235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20220426235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20220427235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20220428235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20220429235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20220430235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_power_05
-- ----------------------------
DROP TABLE IF EXISTS `online_data_power_05`;
CREATE TABLE `online_data_power_05` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测仪编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `ia` decimal(12,3) DEFAULT NULL COMMENT 'A相电流，单位：A安[培]',
  `ib` decimal(12,3) DEFAULT NULL COMMENT 'B相电流，单位：A安[培]',
  `ic` decimal(12,3) DEFAULT NULL COMMENT 'C相电流，单位：A安[培]',
  `in` decimal(12,3) DEFAULT NULL COMMENT 'N相电流，单位：A安[培]',
  `ua` decimal(12,3) DEFAULT NULL COMMENT 'A相电压，单位：V伏[特]',
  `ub` decimal(12,3) DEFAULT NULL COMMENT 'B相电压，单位：V伏[特]',
  `uc` decimal(12,3) DEFAULT NULL COMMENT 'C相电压，单位：V伏[特]',
  `uab` decimal(12,3) DEFAULT NULL COMMENT 'Uab线电压，单位：V伏[特]',
  `ubc` decimal(12,3) DEFAULT NULL COMMENT 'Ubc线电压，单位：V伏[特]',
  `uac` decimal(12,3) DEFAULT NULL COMMENT 'Uac线电压，单位：V伏[特]',
  `pa` decimal(12,3) DEFAULT NULL COMMENT 'A相负荷，kW千瓦',
  `pb` decimal(12,3) DEFAULT NULL COMMENT 'B相负荷，kW千瓦',
  `pc` decimal(12,3) DEFAULT NULL COMMENT 'C相负荷，kW千瓦',
  `p` decimal(12,3) DEFAULT NULL COMMENT '有功功率，kW千瓦',
  `thea` decimal(12,3) DEFAULT NULL COMMENT 'A相功率因数，单位：无量纲',
  `theb` decimal(12,3) DEFAULT NULL COMMENT 'B相功率因数，单位：无量纲',
  `thec` decimal(12,3) DEFAULT NULL COMMENT 'C相功率因数，单位：无量纲',
  `the` decimal(12,3) DEFAULT NULL COMMENT '总功率因数，单位：无量纲',
  `pv` decimal(12,3) DEFAULT NULL COMMENT '总有功电量，单位：kWh千瓦时',
  `qv` decimal(12,3) DEFAULT NULL COMMENT '总无功电量，单位：kVarh千乏时',
  `q` decimal(12,3) DEFAULT NULL COMMENT '无功功率，单位：kVar千乏',
  `rs` tinyint(1) DEFAULT NULL COMMENT '设备运行状态，0为关闭，1为开启',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='电力实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20220501235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20220502235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20220503235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20220504235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20220505235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20220506235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20220507235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20220508235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20220509235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20220510235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20220511235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20220512235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20220513235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20220514235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20220515235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20220516235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20220517235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20220518235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20220519235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20220520235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20220521235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20220522235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20220523235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20220524235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20220525235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20220526235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20220527235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20220528235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20220529235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20220530235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_power_06
-- ----------------------------
DROP TABLE IF EXISTS `online_data_power_06`;
CREATE TABLE `online_data_power_06` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测仪编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `ia` decimal(12,3) DEFAULT NULL COMMENT 'A相电流，单位：A安[培]',
  `ib` decimal(12,3) DEFAULT NULL COMMENT 'B相电流，单位：A安[培]',
  `ic` decimal(12,3) DEFAULT NULL COMMENT 'C相电流，单位：A安[培]',
  `in` decimal(12,3) DEFAULT NULL COMMENT 'N相电流，单位：A安[培]',
  `ua` decimal(12,3) DEFAULT NULL COMMENT 'A相电压，单位：V伏[特]',
  `ub` decimal(12,3) DEFAULT NULL COMMENT 'B相电压，单位：V伏[特]',
  `uc` decimal(12,3) DEFAULT NULL COMMENT 'C相电压，单位：V伏[特]',
  `uab` decimal(12,3) DEFAULT NULL COMMENT 'Uab线电压，单位：V伏[特]',
  `ubc` decimal(12,3) DEFAULT NULL COMMENT 'Ubc线电压，单位：V伏[特]',
  `uac` decimal(12,3) DEFAULT NULL COMMENT 'Uac线电压，单位：V伏[特]',
  `pa` decimal(12,3) DEFAULT NULL COMMENT 'A相负荷，kW千瓦',
  `pb` decimal(12,3) DEFAULT NULL COMMENT 'B相负荷，kW千瓦',
  `pc` decimal(12,3) DEFAULT NULL COMMENT 'C相负荷，kW千瓦',
  `p` decimal(12,3) DEFAULT NULL COMMENT '有功功率，kW千瓦',
  `thea` decimal(12,3) DEFAULT NULL COMMENT 'A相功率因数，单位：无量纲',
  `theb` decimal(12,3) DEFAULT NULL COMMENT 'B相功率因数，单位：无量纲',
  `thec` decimal(12,3) DEFAULT NULL COMMENT 'C相功率因数，单位：无量纲',
  `the` decimal(12,3) DEFAULT NULL COMMENT '总功率因数，单位：无量纲',
  `pv` decimal(12,3) DEFAULT NULL COMMENT '总有功电量，单位：kWh千瓦时',
  `qv` decimal(12,3) DEFAULT NULL COMMENT '总无功电量，单位：kVarh千乏时',
  `q` decimal(12,3) DEFAULT NULL COMMENT '无功功率，单位：kVar千乏',
  `rs` tinyint(1) DEFAULT NULL COMMENT '设备运行状态，0为关闭，1为开启',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='电力实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20220601235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20220602235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20220603235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20220604235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20220605235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20220606235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20220607235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20220608235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20220609235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20220610235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20220611235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20220612235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20220613235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20220614235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20220615235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20220616235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20220617235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20220618235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20220619235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20220620235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20220621235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20220622235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20220623235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20220624235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20220625235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20220626235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20220627235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20220628235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20220629235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20220630235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_power_07
-- ----------------------------
DROP TABLE IF EXISTS `online_data_power_07`;
CREATE TABLE `online_data_power_07` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测仪编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `ia` decimal(12,3) DEFAULT NULL COMMENT 'A相电流，单位：A安[培]',
  `ib` decimal(12,3) DEFAULT NULL COMMENT 'B相电流，单位：A安[培]',
  `ic` decimal(12,3) DEFAULT NULL COMMENT 'C相电流，单位：A安[培]',
  `in` decimal(12,3) DEFAULT NULL COMMENT 'N相电流，单位：A安[培]',
  `ua` decimal(12,3) DEFAULT NULL COMMENT 'A相电压，单位：V伏[特]',
  `ub` decimal(12,3) DEFAULT NULL COMMENT 'B相电压，单位：V伏[特]',
  `uc` decimal(12,3) DEFAULT NULL COMMENT 'C相电压，单位：V伏[特]',
  `uab` decimal(12,3) DEFAULT NULL COMMENT 'Uab线电压，单位：V伏[特]',
  `ubc` decimal(12,3) DEFAULT NULL COMMENT 'Ubc线电压，单位：V伏[特]',
  `uac` decimal(12,3) DEFAULT NULL COMMENT 'Uac线电压，单位：V伏[特]',
  `pa` decimal(12,3) DEFAULT NULL COMMENT 'A相负荷，kW千瓦',
  `pb` decimal(12,3) DEFAULT NULL COMMENT 'B相负荷，kW千瓦',
  `pc` decimal(12,3) DEFAULT NULL COMMENT 'C相负荷，kW千瓦',
  `p` decimal(12,3) DEFAULT NULL COMMENT '有功功率，kW千瓦',
  `thea` decimal(12,3) DEFAULT NULL COMMENT 'A相功率因数，单位：无量纲',
  `theb` decimal(12,3) DEFAULT NULL COMMENT 'B相功率因数，单位：无量纲',
  `thec` decimal(12,3) DEFAULT NULL COMMENT 'C相功率因数，单位：无量纲',
  `the` decimal(12,3) DEFAULT NULL COMMENT '总功率因数，单位：无量纲',
  `pv` decimal(12,3) DEFAULT NULL COMMENT '总有功电量，单位：kWh千瓦时',
  `qv` decimal(12,3) DEFAULT NULL COMMENT '总无功电量，单位：kVarh千乏时',
  `q` decimal(12,3) DEFAULT NULL COMMENT '无功功率，单位：kVar千乏',
  `rs` tinyint(1) DEFAULT NULL COMMENT '设备运行状态，0为关闭，1为开启',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='电力实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20220701235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20220702235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20220703235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20220704235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20220705235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20220706235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20220707235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20220708235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20220709235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20220710235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20220711235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20220712235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20220713235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20220714235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20220715235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20220716235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20220717235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20220718235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20220719235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20220720235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20220721235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20220722235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20220723235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20220724235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20220725235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20220726235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20220727235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20220728235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20220729235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20220730235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_power_08
-- ----------------------------
DROP TABLE IF EXISTS `online_data_power_08`;
CREATE TABLE `online_data_power_08` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测仪编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `ia` decimal(12,3) DEFAULT NULL COMMENT 'A相电流，单位：A安[培]',
  `ib` decimal(12,3) DEFAULT NULL COMMENT 'B相电流，单位：A安[培]',
  `ic` decimal(12,3) DEFAULT NULL COMMENT 'C相电流，单位：A安[培]',
  `in` decimal(12,3) DEFAULT NULL COMMENT 'N相电流，单位：A安[培]',
  `ua` decimal(12,3) DEFAULT NULL COMMENT 'A相电压，单位：V伏[特]',
  `ub` decimal(12,3) DEFAULT NULL COMMENT 'B相电压，单位：V伏[特]',
  `uc` decimal(12,3) DEFAULT NULL COMMENT 'C相电压，单位：V伏[特]',
  `uab` decimal(12,3) DEFAULT NULL COMMENT 'Uab线电压，单位：V伏[特]',
  `ubc` decimal(12,3) DEFAULT NULL COMMENT 'Ubc线电压，单位：V伏[特]',
  `uac` decimal(12,3) DEFAULT NULL COMMENT 'Uac线电压，单位：V伏[特]',
  `pa` decimal(12,3) DEFAULT NULL COMMENT 'A相负荷，kW千瓦',
  `pb` decimal(12,3) DEFAULT NULL COMMENT 'B相负荷，kW千瓦',
  `pc` decimal(12,3) DEFAULT NULL COMMENT 'C相负荷，kW千瓦',
  `p` decimal(12,3) DEFAULT NULL COMMENT '有功功率，kW千瓦',
  `thea` decimal(12,3) DEFAULT NULL COMMENT 'A相功率因数，单位：无量纲',
  `theb` decimal(12,3) DEFAULT NULL COMMENT 'B相功率因数，单位：无量纲',
  `thec` decimal(12,3) DEFAULT NULL COMMENT 'C相功率因数，单位：无量纲',
  `the` decimal(12,3) DEFAULT NULL COMMENT '总功率因数，单位：无量纲',
  `pv` decimal(12,3) DEFAULT NULL COMMENT '总有功电量，单位：kWh千瓦时',
  `qv` decimal(12,3) DEFAULT NULL COMMENT '总无功电量，单位：kVarh千乏时',
  `q` decimal(12,3) DEFAULT NULL COMMENT '无功功率，单位：kVar千乏',
  `rs` tinyint(1) DEFAULT NULL COMMENT '设备运行状态，0为关闭，1为开启',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='电力实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20220801235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20220802235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20220803235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20220804235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20220805235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20220806235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20220807235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20220808235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20220809235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20220810235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20220811235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20220812235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20220813235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20220814235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20220815235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20220816235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20220817235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20220818235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20220819235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20220820235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20220821235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20220822235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20220823235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20220824235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20220825235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20220826235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20220827235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20220828235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20220829235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20220830235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_power_09
-- ----------------------------
DROP TABLE IF EXISTS `online_data_power_09`;
CREATE TABLE `online_data_power_09` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测仪编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `ia` decimal(12,3) DEFAULT NULL COMMENT 'A相电流，单位：A安[培]',
  `ib` decimal(12,3) DEFAULT NULL COMMENT 'B相电流，单位：A安[培]',
  `ic` decimal(12,3) DEFAULT NULL COMMENT 'C相电流，单位：A安[培]',
  `in` decimal(12,3) DEFAULT NULL COMMENT 'N相电流，单位：A安[培]',
  `ua` decimal(12,3) DEFAULT NULL COMMENT 'A相电压，单位：V伏[特]',
  `ub` decimal(12,3) DEFAULT NULL COMMENT 'B相电压，单位：V伏[特]',
  `uc` decimal(12,3) DEFAULT NULL COMMENT 'C相电压，单位：V伏[特]',
  `uab` decimal(12,3) DEFAULT NULL COMMENT 'Uab线电压，单位：V伏[特]',
  `ubc` decimal(12,3) DEFAULT NULL COMMENT 'Ubc线电压，单位：V伏[特]',
  `uac` decimal(12,3) DEFAULT NULL COMMENT 'Uac线电压，单位：V伏[特]',
  `pa` decimal(12,3) DEFAULT NULL COMMENT 'A相负荷，kW千瓦',
  `pb` decimal(12,3) DEFAULT NULL COMMENT 'B相负荷，kW千瓦',
  `pc` decimal(12,3) DEFAULT NULL COMMENT 'C相负荷，kW千瓦',
  `p` decimal(12,3) DEFAULT NULL COMMENT '有功功率，kW千瓦',
  `thea` decimal(12,3) DEFAULT NULL COMMENT 'A相功率因数，单位：无量纲',
  `theb` decimal(12,3) DEFAULT NULL COMMENT 'B相功率因数，单位：无量纲',
  `thec` decimal(12,3) DEFAULT NULL COMMENT 'C相功率因数，单位：无量纲',
  `the` decimal(12,3) DEFAULT NULL COMMENT '总功率因数，单位：无量纲',
  `pv` decimal(12,3) DEFAULT NULL COMMENT '总有功电量，单位：kWh千瓦时',
  `qv` decimal(12,3) DEFAULT NULL COMMENT '总无功电量，单位：kVarh千乏时',
  `q` decimal(12,3) DEFAULT NULL COMMENT '无功功率，单位：kVar千乏',
  `rs` tinyint(1) DEFAULT NULL COMMENT '设备运行状态，0为关闭，1为开启',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='电力实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20220901235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20220902235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20220903235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20220904235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20220905235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20220906235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20220907235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20220908235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20220909235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20220910235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20220911235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20220912235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20220913235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20220914235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20220915235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20220916235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20220917235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20220918235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20220919235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20220920235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20220921235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20220922235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20220923235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20220924235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20220925235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20220926235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20220927235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20220928235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20220929235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20220930235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_power_10
-- ----------------------------
DROP TABLE IF EXISTS `online_data_power_10`;
CREATE TABLE `online_data_power_10` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测仪编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `ia` decimal(12,3) DEFAULT NULL COMMENT 'A相电流，单位：A安[培]',
  `ib` decimal(12,3) DEFAULT NULL COMMENT 'B相电流，单位：A安[培]',
  `ic` decimal(12,3) DEFAULT NULL COMMENT 'C相电流，单位：A安[培]',
  `in` decimal(12,3) DEFAULT NULL COMMENT 'N相电流，单位：A安[培]',
  `ua` decimal(12,3) DEFAULT NULL COMMENT 'A相电压，单位：V伏[特]',
  `ub` decimal(12,3) DEFAULT NULL COMMENT 'B相电压，单位：V伏[特]',
  `uc` decimal(12,3) DEFAULT NULL COMMENT 'C相电压，单位：V伏[特]',
  `uab` decimal(12,3) DEFAULT NULL COMMENT 'Uab线电压，单位：V伏[特]',
  `ubc` decimal(12,3) DEFAULT NULL COMMENT 'Ubc线电压，单位：V伏[特]',
  `uac` decimal(12,3) DEFAULT NULL COMMENT 'Uac线电压，单位：V伏[特]',
  `pa` decimal(12,3) DEFAULT NULL COMMENT 'A相负荷，kW千瓦',
  `pb` decimal(12,3) DEFAULT NULL COMMENT 'B相负荷，kW千瓦',
  `pc` decimal(12,3) DEFAULT NULL COMMENT 'C相负荷，kW千瓦',
  `p` decimal(12,3) DEFAULT NULL COMMENT '有功功率，kW千瓦',
  `thea` decimal(12,3) DEFAULT NULL COMMENT 'A相功率因数，单位：无量纲',
  `theb` decimal(12,3) DEFAULT NULL COMMENT 'B相功率因数，单位：无量纲',
  `thec` decimal(12,3) DEFAULT NULL COMMENT 'C相功率因数，单位：无量纲',
  `the` decimal(12,3) DEFAULT NULL COMMENT '总功率因数，单位：无量纲',
  `pv` decimal(12,3) DEFAULT NULL COMMENT '总有功电量，单位：kWh千瓦时',
  `qv` decimal(12,3) DEFAULT NULL COMMENT '总无功电量，单位：kVarh千乏时',
  `q` decimal(12,3) DEFAULT NULL COMMENT '无功功率，单位：kVar千乏',
  `rs` tinyint(1) DEFAULT NULL COMMENT '设备运行状态，0为关闭，1为开启',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='电力实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20221001235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20221002235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20221003235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20221004235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20221005235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20221006235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20221007235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20221008235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20221009235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20221010235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20221011235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20221012235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20221013235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20221014235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20221015235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20221016235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20221017235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20221018235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20221019235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20221020235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20221021235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20221022235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20221023235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20221024235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20221025235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20221026235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20221027235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20221028235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20221029235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20221030235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_power_11
-- ----------------------------
DROP TABLE IF EXISTS `online_data_power_11`;
CREATE TABLE `online_data_power_11` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测仪编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `ia` decimal(12,3) DEFAULT NULL COMMENT 'A相电流，单位：A安[培]',
  `ib` decimal(12,3) DEFAULT NULL COMMENT 'B相电流，单位：A安[培]',
  `ic` decimal(12,3) DEFAULT NULL COMMENT 'C相电流，单位：A安[培]',
  `in` decimal(12,3) DEFAULT NULL COMMENT 'N相电流，单位：A安[培]',
  `ua` decimal(12,3) DEFAULT NULL COMMENT 'A相电压，单位：V伏[特]',
  `ub` decimal(12,3) DEFAULT NULL COMMENT 'B相电压，单位：V伏[特]',
  `uc` decimal(12,3) DEFAULT NULL COMMENT 'C相电压，单位：V伏[特]',
  `uab` decimal(12,3) DEFAULT NULL COMMENT 'Uab线电压，单位：V伏[特]',
  `ubc` decimal(12,3) DEFAULT NULL COMMENT 'Ubc线电压，单位：V伏[特]',
  `uac` decimal(12,3) DEFAULT NULL COMMENT 'Uac线电压，单位：V伏[特]',
  `pa` decimal(12,3) DEFAULT NULL COMMENT 'A相负荷，kW千瓦',
  `pb` decimal(12,3) DEFAULT NULL COMMENT 'B相负荷，kW千瓦',
  `pc` decimal(12,3) DEFAULT NULL COMMENT 'C相负荷，kW千瓦',
  `p` decimal(12,3) DEFAULT NULL COMMENT '有功功率，kW千瓦',
  `thea` decimal(12,3) DEFAULT NULL COMMENT 'A相功率因数，单位：无量纲',
  `theb` decimal(12,3) DEFAULT NULL COMMENT 'B相功率因数，单位：无量纲',
  `thec` decimal(12,3) DEFAULT NULL COMMENT 'C相功率因数，单位：无量纲',
  `the` decimal(12,3) DEFAULT NULL COMMENT '总功率因数，单位：无量纲',
  `pv` decimal(12,3) DEFAULT NULL COMMENT '总有功电量，单位：kWh千瓦时',
  `qv` decimal(12,3) DEFAULT NULL COMMENT '总无功电量，单位：kVarh千乏时',
  `q` decimal(12,3) DEFAULT NULL COMMENT '无功功率，单位：kVar千乏',
  `rs` tinyint(1) DEFAULT NULL COMMENT '设备运行状态，0为关闭，1为开启',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='电力实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20221101235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20221102235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20221103235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20221104235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20221105235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20221106235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20221107235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20221108235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20221109235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20221110235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20221111235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20221112235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20221113235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20221114235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20221115235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20221116235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20221117235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20221118235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20221119235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20221120235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20221121235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20221122235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20221123235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20221124235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20221125235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20221126235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20221127235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20221128235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20221129235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20221130235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_power_12
-- ----------------------------
DROP TABLE IF EXISTS `online_data_power_12`;
CREATE TABLE `online_data_power_12` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测仪编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `ia` decimal(12,3) DEFAULT NULL COMMENT 'A相电流，单位：A安[培]',
  `ib` decimal(12,3) DEFAULT NULL COMMENT 'B相电流，单位：A安[培]',
  `ic` decimal(12,3) DEFAULT NULL COMMENT 'C相电流，单位：A安[培]',
  `in` decimal(12,3) DEFAULT NULL COMMENT 'N相电流，单位：A安[培]',
  `ua` decimal(12,3) DEFAULT NULL COMMENT 'A相电压，单位：V伏[特]',
  `ub` decimal(12,3) DEFAULT NULL COMMENT 'B相电压，单位：V伏[特]',
  `uc` decimal(12,3) DEFAULT NULL COMMENT 'C相电压，单位：V伏[特]',
  `uab` decimal(12,3) DEFAULT NULL COMMENT 'Uab线电压，单位：V伏[特]',
  `ubc` decimal(12,3) DEFAULT NULL COMMENT 'Ubc线电压，单位：V伏[特]',
  `uac` decimal(12,3) DEFAULT NULL COMMENT 'Uac线电压，单位：V伏[特]',
  `pa` decimal(12,3) DEFAULT NULL COMMENT 'A相负荷，kW千瓦',
  `pb` decimal(12,3) DEFAULT NULL COMMENT 'B相负荷，kW千瓦',
  `pc` decimal(12,3) DEFAULT NULL COMMENT 'C相负荷，kW千瓦',
  `p` decimal(12,3) DEFAULT NULL COMMENT '有功功率，kW千瓦',
  `thea` decimal(12,3) DEFAULT NULL COMMENT 'A相功率因数，单位：无量纲',
  `theb` decimal(12,3) DEFAULT NULL COMMENT 'B相功率因数，单位：无量纲',
  `thec` decimal(12,3) DEFAULT NULL COMMENT 'C相功率因数，单位：无量纲',
  `the` decimal(12,3) DEFAULT NULL COMMENT '总功率因数，单位：无量纲',
  `pv` decimal(12,3) DEFAULT NULL COMMENT '总有功电量，单位：kWh千瓦时',
  `qv` decimal(12,3) DEFAULT NULL COMMENT '总无功电量，单位：kVarh千乏时',
  `q` decimal(12,3) DEFAULT NULL COMMENT '无功功率，单位：kVar千乏',
  `rs` tinyint(1) DEFAULT NULL COMMENT '设备运行状态，0为关闭，1为开启',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='电力实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20221201235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20221202235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20221203235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20221204235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20221205235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20221206235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20221207235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20221208235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20221209235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20221210235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20221211235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20221212235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20221213235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20221214235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20221215235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20221216235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20221217235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20221218235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20221219235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20221220235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20221221235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20221222235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20221223235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20221224235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20221225235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20221226235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20221227235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20221228235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20221229235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20221230235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_event
-- ----------------------------
DROP TABLE IF EXISTS `online_event`;
CREATE TABLE `online_event` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测仪编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `i12004` char(1) DEFAULT NULL COMMENT '设备停上电状态：0代表设备上电；1代表设备停电',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='停上电在线数据表';

-- ----------------------------
-- Table structure for online_org
-- ----------------------------
DROP TABLE IF EXISTS `online_org`;
CREATE TABLE `online_org` (
  `org_id` int(11) NOT NULL COMMENT '机构编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间',
  `power` decimal(15,3) DEFAULT NULL COMMENT '负荷',
  `energy` decimal(15,3) DEFAULT NULL COMMENT '电量',
  `tpe` decimal(15,3) DEFAULT NULL COMMENT '正相有功电量，每天0时从0开始计算累计电量（乘以ct/pt变比后的值）',
  `tps` decimal(20,3) DEFAULT NULL COMMENT '正相有功电度示值（乘以ct/pt变比后的值）',
  PRIMARY KEY (`org_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='机构用电负荷实时表';

-- ----------------------------
-- Table structure for online_pressure_01
-- ----------------------------
DROP TABLE IF EXISTS `online_pressure_01`;
CREATE TABLE `online_pressure_01` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测点编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `pressure` decimal(10,3) DEFAULT NULL COMMENT '压差数据'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for online_pressure_02
-- ----------------------------
DROP TABLE IF EXISTS `online_pressure_02`;
CREATE TABLE `online_pressure_02` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测点编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `pressure` decimal(10,3) DEFAULT NULL COMMENT '压差数据'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for online_pressure_03
-- ----------------------------
DROP TABLE IF EXISTS `online_pressure_03`;
CREATE TABLE `online_pressure_03` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测点编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `pressure` decimal(10,3) DEFAULT NULL COMMENT '压差数据'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for online_pressure_04
-- ----------------------------
DROP TABLE IF EXISTS `online_pressure_04`;
CREATE TABLE `online_pressure_04` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测点编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `pressure` decimal(10,3) DEFAULT NULL COMMENT '压差数据'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for online_pressure_05
-- ----------------------------
DROP TABLE IF EXISTS `online_pressure_05`;
CREATE TABLE `online_pressure_05` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测点编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `pressure` decimal(10,3) DEFAULT NULL COMMENT '压差数据'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for online_pressure_06
-- ----------------------------
DROP TABLE IF EXISTS `online_pressure_06`;
CREATE TABLE `online_pressure_06` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测点编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `pressure` decimal(10,3) DEFAULT NULL COMMENT '压差数据'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for online_pressure_07
-- ----------------------------
DROP TABLE IF EXISTS `online_pressure_07`;
CREATE TABLE `online_pressure_07` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测点编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `pressure` decimal(10,3) DEFAULT NULL COMMENT '压差数据'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for online_pressure_08
-- ----------------------------
DROP TABLE IF EXISTS `online_pressure_08`;
CREATE TABLE `online_pressure_08` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测点编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `pressure` decimal(10,3) DEFAULT NULL COMMENT '压差数据'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for online_pressure_09
-- ----------------------------
DROP TABLE IF EXISTS `online_pressure_09`;
CREATE TABLE `online_pressure_09` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测点编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `pressure` decimal(10,3) DEFAULT NULL COMMENT '压差数据'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for online_pressure_10
-- ----------------------------
DROP TABLE IF EXISTS `online_pressure_10`;
CREATE TABLE `online_pressure_10` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测点编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `pressure` decimal(10,3) DEFAULT NULL COMMENT '压差数据'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for online_pressure_11
-- ----------------------------
DROP TABLE IF EXISTS `online_pressure_11`;
CREATE TABLE `online_pressure_11` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测点编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `pressure` decimal(10,3) DEFAULT NULL COMMENT '压差数据'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for online_pressure_12
-- ----------------------------
DROP TABLE IF EXISTS `online_pressure_12`;
CREATE TABLE `online_pressure_12` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测点编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `pressure` decimal(10,3) DEFAULT NULL COMMENT '压差数据'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for online_terminal_01
-- ----------------------------
DROP TABLE IF EXISTS `online_terminal_01`;
CREATE TABLE `online_terminal_01` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测点编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间',
  `power` decimal(12,3) DEFAULT NULL COMMENT '负荷（乘以ct/pt变比后的值），kw',
  `energy` decimal(12,3) DEFAULT NULL COMMENT '电量，采集周期内的电量（乘以ct/pt变比后的值），kwh',
  `tpe` decimal(15,3) DEFAULT NULL COMMENT '正相有功电量，每天0时从0开始计算累计电量（乘以ct/pt变比后的值）',
  `tps` decimal(20,3) DEFAULT NULL COMMENT '正相有功电度示值（乘以ct/pt变比后的值）',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='监测点用电负荷实时表';

-- ----------------------------
-- Table structure for online_terminal_02
-- ----------------------------
DROP TABLE IF EXISTS `online_terminal_02`;
CREATE TABLE `online_terminal_02` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测点编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间',
  `power` decimal(12,3) DEFAULT NULL COMMENT '负荷（乘以ct/pt变比后的值），kw',
  `energy` decimal(12,3) DEFAULT NULL COMMENT '电量，采集周期内的电量（乘以ct/pt变比后的值），kwh',
  `tpe` decimal(15,3) DEFAULT NULL COMMENT '正相有功电量，每天0时从0开始计算累计电量（乘以ct/pt变比后的值）',
  `tps` decimal(20,3) DEFAULT NULL COMMENT '正相有功电度示值（乘以ct/pt变比后的值）',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='监测点用电负荷实时表';

-- ----------------------------
-- Table structure for online_terminal_03
-- ----------------------------
DROP TABLE IF EXISTS `online_terminal_03`;
CREATE TABLE `online_terminal_03` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测点编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间',
  `power` decimal(12,3) DEFAULT NULL COMMENT '负荷（乘以ct/pt变比后的值），kw',
  `energy` decimal(12,3) DEFAULT NULL COMMENT '电量，采集周期内的电量（乘以ct/pt变比后的值），kwh',
  `tpe` decimal(15,3) DEFAULT NULL COMMENT '正相有功电量，每天0时从0开始计算累计电量（乘以ct/pt变比后的值）',
  `tps` decimal(20,3) DEFAULT NULL COMMENT '正相有功电度示值（乘以ct/pt变比后的值）',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='监测点用电负荷实时表';

-- ----------------------------
-- Table structure for online_terminal_04
-- ----------------------------
DROP TABLE IF EXISTS `online_terminal_04`;
CREATE TABLE `online_terminal_04` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测点编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间',
  `power` decimal(12,3) DEFAULT NULL COMMENT '负荷（乘以ct/pt变比后的值），kw',
  `energy` decimal(12,3) DEFAULT NULL COMMENT '电量，采集周期内的电量（乘以ct/pt变比后的值），kwh',
  `tpe` decimal(15,3) DEFAULT NULL COMMENT '正相有功电量，每天0时从0开始计算累计电量（乘以ct/pt变比后的值）',
  `tps` decimal(20,3) DEFAULT NULL COMMENT '正相有功电度示值（乘以ct/pt变比后的值）',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='监测点用电负荷实时表';

-- ----------------------------
-- Table structure for online_terminal_05
-- ----------------------------
DROP TABLE IF EXISTS `online_terminal_05`;
CREATE TABLE `online_terminal_05` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测点编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间',
  `power` decimal(12,3) DEFAULT NULL COMMENT '负荷（乘以ct/pt变比后的值），kw',
  `energy` decimal(12,3) DEFAULT NULL COMMENT '电量，采集周期内的电量（乘以ct/pt变比后的值），kwh',
  `tpe` decimal(15,3) DEFAULT NULL COMMENT '正相有功电量，每天0时从0开始计算累计电量（乘以ct/pt变比后的值）',
  `tps` decimal(20,3) DEFAULT NULL COMMENT '正相有功电度示值（乘以ct/pt变比后的值）',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='监测点用电负荷实时表';

-- ----------------------------
-- Table structure for online_terminal_06
-- ----------------------------
DROP TABLE IF EXISTS `online_terminal_06`;
CREATE TABLE `online_terminal_06` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测点编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间',
  `power` decimal(12,3) DEFAULT NULL COMMENT '负荷（乘以ct/pt变比后的值），kw',
  `energy` decimal(12,3) DEFAULT NULL COMMENT '电量，采集周期内的电量（乘以ct/pt变比后的值），kwh',
  `tpe` decimal(15,3) DEFAULT NULL COMMENT '正相有功电量，每天0时从0开始计算累计电量（乘以ct/pt变比后的值）',
  `tps` decimal(20,3) DEFAULT NULL COMMENT '正相有功电度示值（乘以ct/pt变比后的值）',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='监测点用电负荷实时表';

-- ----------------------------
-- Table structure for online_terminal_07
-- ----------------------------
DROP TABLE IF EXISTS `online_terminal_07`;
CREATE TABLE `online_terminal_07` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测点编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间',
  `power` decimal(12,3) DEFAULT NULL COMMENT '负荷（乘以ct/pt变比后的值），kw',
  `energy` decimal(12,3) DEFAULT NULL COMMENT '电量，采集周期内的电量（乘以ct/pt变比后的值），kwh',
  `tpe` decimal(15,3) DEFAULT NULL COMMENT '正相有功电量，每天0时从0开始计算累计电量（乘以ct/pt变比后的值）',
  `tps` decimal(20,3) DEFAULT NULL COMMENT '正相有功电度示值（乘以ct/pt变比后的值）',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='监测点用电负荷实时表';

-- ----------------------------
-- Table structure for online_terminal_08
-- ----------------------------
DROP TABLE IF EXISTS `online_terminal_08`;
CREATE TABLE `online_terminal_08` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测点编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间',
  `power` decimal(12,3) DEFAULT NULL COMMENT '负荷（乘以ct/pt变比后的值），kw',
  `energy` decimal(12,3) DEFAULT NULL COMMENT '电量，采集周期内的电量（乘以ct/pt变比后的值），kwh',
  `tpe` decimal(15,3) DEFAULT NULL COMMENT '正相有功电量，每天0时从0开始计算累计电量（乘以ct/pt变比后的值）',
  `tps` decimal(20,3) DEFAULT NULL COMMENT '正相有功电度示值（乘以ct/pt变比后的值）',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='监测点用电负荷实时表';

-- ----------------------------
-- Table structure for online_terminal_09
-- ----------------------------
DROP TABLE IF EXISTS `online_terminal_09`;
CREATE TABLE `online_terminal_09` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测点编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间',
  `power` decimal(12,3) DEFAULT NULL COMMENT '负荷（乘以ct/pt变比后的值），kw',
  `energy` decimal(12,3) DEFAULT NULL COMMENT '电量，采集周期内的电量（乘以ct/pt变比后的值），kwh',
  `tpe` decimal(15,3) DEFAULT NULL COMMENT '正相有功电量，每天0时从0开始计算累计电量（乘以ct/pt变比后的值）',
  `tps` decimal(20,3) DEFAULT NULL COMMENT '正相有功电度示值（乘以ct/pt变比后的值）',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='监测点用电负荷实时表';

-- ----------------------------
-- Table structure for online_terminal_10
-- ----------------------------
DROP TABLE IF EXISTS `online_terminal_10`;
CREATE TABLE `online_terminal_10` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测点编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间',
  `power` decimal(12,3) DEFAULT NULL COMMENT '负荷（乘以ct/pt变比后的值），kw',
  `energy` decimal(12,3) DEFAULT NULL COMMENT '电量，采集周期内的电量（乘以ct/pt变比后的值），kwh',
  `tpe` decimal(15,3) DEFAULT NULL COMMENT '正相有功电量，每天0时从0开始计算累计电量（乘以ct/pt变比后的值）',
  `tps` decimal(20,3) DEFAULT NULL COMMENT '正相有功电度示值（乘以ct/pt变比后的值）',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='监测点用电负荷实时表';

-- ----------------------------
-- Table structure for online_terminal_11
-- ----------------------------
DROP TABLE IF EXISTS `online_terminal_11`;
CREATE TABLE `online_terminal_11` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测点编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间',
  `power` decimal(12,3) DEFAULT NULL COMMENT '负荷（乘以ct/pt变比后的值），kw',
  `energy` decimal(12,3) DEFAULT NULL COMMENT '电量，采集周期内的电量（乘以ct/pt变比后的值），kwh',
  `tpe` decimal(15,3) DEFAULT NULL COMMENT '正相有功电量，每天0时从0开始计算累计电量（乘以ct/pt变比后的值）',
  `tps` decimal(20,3) DEFAULT NULL COMMENT '正相有功电度示值（乘以ct/pt变比后的值）',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='监测点用电负荷实时表';

-- ----------------------------
-- Table structure for online_terminal_12
-- ----------------------------
DROP TABLE IF EXISTS `online_terminal_12`;
CREATE TABLE `online_terminal_12` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测点编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间',
  `power` decimal(12,3) DEFAULT NULL COMMENT '负荷（乘以ct/pt变比后的值），kw',
  `energy` decimal(12,3) DEFAULT NULL COMMENT '电量，采集周期内的电量（乘以ct/pt变比后的值），kwh',
  `tpe` decimal(15,3) DEFAULT NULL COMMENT '正相有功电量，每天0时从0开始计算累计电量（乘以ct/pt变比后的值）',
  `tps` decimal(20,3) DEFAULT NULL COMMENT '正相有功电度示值（乘以ct/pt变比后的值）',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='监测点用电负荷实时表';

-- ----------------------------
-- Table structure for online_working_condition
-- ----------------------------
DROP TABLE IF EXISTS `online_working_condition`;
CREATE TABLE `online_working_condition` (
  `monitor_id` bigint(20) NOT NULL COMMENT '监测点id',
  `date` int(8) NOT NULL COMMENT '当天时间yyyyMMdd',
  `start_time` varchar(6) NOT NULL COMMENT '起止时间HHmmss',
  `end_time` varchar(6) NOT NULL COMMENT '结束时间HHmmss',
  `type` int(1) NOT NULL COMMENT '工况类型; 0:生产; 1:未生产',
  PRIMARY KEY (`date`,`monitor_id`,`start_time`,`end_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='监测点工况实时表';

-- ----------------------------
-- Table structure for pm25_history
-- ----------------------------
DROP TABLE IF EXISTS `pm25_history`;
CREATE TABLE `pm25_history` (
  `area_code` int(11) NOT NULL COMMENT '区域code',
  `get_time` bigint(20) NOT NULL COMMENT '查询时间 yyyyMMdd',
  `content` text NOT NULL COMMENT '请求结果',
  PRIMARY KEY (`area_code`,`get_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='pm2.5历史记录表';

-- ----------------------------
-- Table structure for pm25_history_day
-- ----------------------------
DROP TABLE IF EXISTS `pm25_history_day`;
CREATE TABLE `pm25_history_day` (
  `area_code` int(11) NOT NULL COMMENT '区域code',
  `get_time` bigint(20) NOT NULL COMMENT '查询时间 yyyyMMdd',
  `content` text NOT NULL COMMENT '请求结果',
  PRIMARY KEY (`area_code`,`get_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='pm2.5历史记录表';

-- ----------------------------
-- Table structure for t_warn_event_offline
-- ----------------------------
DROP TABLE IF EXISTS `t_warn_event_offline`;
CREATE TABLE `t_warn_event_offline` (
  `id` bigint(20) NOT NULL COMMENT '主键',
  `org_id` int(11) DEFAULT NULL COMMENT '机构id',
  `company_id` int(20) NOT NULL COMMENT '企业id',
  `industry` varchar(20) DEFAULT NULL COMMENT '企业所属行业编码',
  `warn_type` varchar(20) NOT NULL,
  `warn_state` varchar(20) NOT NULL COMMENT '告警状态：0未恢复1 已恢复 ',
  `workshop_monitor_id` bigint(20) DEFAULT NULL COMMENT '车间监测点id',
  `cw_virtual_monitor_id` bigint(20) DEFAULT NULL COMMENT '产污虚拟监测点',
  `zw_virtual_monitor_id` bigint(20) DEFAULT NULL COMMENT '治污虚拟监测点',
  `cw_monitor_id` bigint(20) DEFAULT NULL COMMENT '产污监测点id',
  `zw_group_id` bigint(20) DEFAULT NULL COMMENT '治污分组id',
  `zw_monitor_ids` varchar(200) DEFAULT NULL COMMENT '治污监测点列表',
  `zw_monitor_id` bigint(20) DEFAULT NULL COMMENT '治污监测点id',
  `update_date` bigint(20) DEFAULT NULL COMMENT '告警时间（创建时间）',
  `create_time` bigint(20) DEFAULT NULL COMMENT '（如果告警持续，该时间会更新）',
  `plan_id` bigint(20) DEFAULT NULL COMMENT '方案id',
  `pfg_id` bigint(20) DEFAULT NULL COMMENT '产污设施分组ID',
  `plan_warn_type` varchar(20) DEFAULT NULL COMMENT '方案告警的异常类型',
  `plan_excute_id` bigint(20) DEFAULT NULL COMMENT '方案执行的id',
  `workshop_monitor_ids` varchar(200) DEFAULT NULL COMMENT '车间监测点列表',
  `cw_monitor_ids` varchar(200) DEFAULT NULL COMMENT '产污监测点列表',
  `process_info` text COMMENT '过程信息(记录配置信息，计算结果等重要过程信息){"cw":[["id:14","ptv:90.000","spt:5"]],"zw":[["id:16","ptv:100.000","plt:5","prt:20190116163500~20190116164000"]],"zwTerminalPower":90.883000,"zwg":[["id:3","ac:1","lrt:1"]]}cw:告警产污列表信息 id：编号 ptv：负荷阈值 spt：负荷告警最短持续时间;zw:告警治污列表信息 id：编号 ptv：负荷阈值 plt：负荷控制持续时间 prt：持续时间描述;zwg:告警治污列表信息 id：编号 ac：分组治污设备总数 lrt：分组至少开启治污设备数量;zwTerminalPower：告警发生时产污设备的负荷',
  `abnormal_id` bigint(20) DEFAULT NULL COMMENT '治污异常申报id',
  `abnormal_create_date` bigint(20) DEFAULT NULL COMMENT '治污异常申报时间',
  `abnormal_declare_state` tinyint(1) DEFAULT NULL COMMENT '逾期状态；0：正常申报；1：逾期申报；',
  `abnormal_state` varchar(15) DEFAULT '000170001' COMMENT '申报状态，000170001：未申报；000170002：未审核；000170003；审核通过；000170004：审核未通过',
  PRIMARY KEY (`id`),
  KEY `planMonitorIndex` (`company_id`,`plan_id`,`cw_monitor_id`) USING BTREE,
  KEY `planGroupIndex` (`company_id`,`plan_id`,`pfg_id`) USING BTREE,
  KEY `warnIndex` (`warn_type`,`update_date`,`warn_state`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='报警表，只存储事件类报警以及离线告警，000090002，000090004，000090014，000090008，000090009';

-- ----------------------------
-- Table structure for terminal_transmission_rate
-- ----------------------------
DROP TABLE IF EXISTS `terminal_transmission_rate`;
CREATE TABLE `terminal_transmission_rate` (
  `terminal_id` varchar(30) NOT NULL COMMENT '设备id',
  `company_id` int(11) DEFAULT NULL COMMENT '企业ID',
  `upload_date` bigint(20) NOT NULL COMMENT '时间 yyyyMMdd',
  `upload_success_num` int(11) NOT NULL COMMENT '传输次数',
  `need_upload_num` int(11) NOT NULL COMMENT '应该上传次数',
  PRIMARY KEY (`terminal_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='设备传输率表';
