/*
Navicat MySQL Data Transfer

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

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

Date: 2022-01-26 10:31:16
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for anal_device_runtime
-- ----------------------------
DROP TABLE IF EXISTS `anal_device_runtime`;
CREATE TABLE `anal_device_runtime` (
  `device_id` int(11) NOT NULL COMMENT '设备id',
  `upload_date` bigint(20) NOT NULL COMMENT '统计时间yyyyMMdd',
  `company_id` int(11) NOT NULL COMMENT '所属企业id',
  `run_time` int(11) NOT NULL DEFAULT '0' COMMENT '运行时间(分钟)',
  PRIMARY KEY (`device_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='设备运行时间统计表';

-- ----------------------------
-- Table structure for anal_monitor_date
-- ----------------------------
DROP TABLE IF EXISTS `anal_monitor_date`;
CREATE TABLE `anal_monitor_date` (
  `mn` varchar(30) NOT NULL COMMENT '净化设施mn',
  `company_id` int(11) NOT NULL COMMENT '企业id',
  `upload_date` bigint(20) NOT NULL COMMENT '时间yyyyMMdd',
  `smoke_total` decimal(12,3) DEFAULT NULL COMMENT '烟雾浓度排放总量，单位克',
  `voc_total` decimal(12,3) DEFAULT NULL COMMENT 'VOC浓度排放总量，单位克',
  `pm25_total` decimal(12,3) DEFAULT NULL COMMENT 'pm25排放总量，单位克',
  PRIMARY KEY (`mn`,`company_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='油烟排放量日表';

-- ----------------------------
-- Table structure for anal_soot_company
-- ----------------------------
DROP TABLE IF EXISTS `anal_soot_company`;
CREATE TABLE `anal_soot_company` (
  `company_id` int(11) NOT NULL COMMENT '机构id',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMdd',
  `soot` decimal(8,3) NOT NULL COMMENT '油烟排放总量，单位：g',
  `run_time` decimal(8,3) NOT NULL COMMENT '运行时间',
  `run_total` int(11) NOT NULL COMMENT '运行总数',
  PRIMARY KEY (`company_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='公司油烟排放表';

-- ----------------------------
-- Table structure for anal_soot_org
-- ----------------------------
DROP TABLE IF EXISTS `anal_soot_org`;
CREATE TABLE `anal_soot_org` (
  `org_id` int(11) NOT NULL COMMENT '机构id',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMdd',
  `soot` decimal(8,3) DEFAULT NULL COMMENT '油烟排放总量单位：g',
  `run_total` int(11) DEFAULT NULL COMMENT '运行总数',
  PRIMARY KEY (`org_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='机构油烟排放表';

-- ----------------------------
-- Table structure for company_credit
-- ----------------------------
DROP TABLE IF EXISTS `company_credit`;
CREATE TABLE `company_credit` (
  `company_id` int(11) NOT NULL COMMENT '企业id',
  `org_id` int(11) NOT NULL COMMENT '组织机构id',
  `upload_date` bigint(20) NOT NULL COMMENT '时间yyyyMM',
  `score` int(11) NOT NULL DEFAULT '0' COMMENT '评分',
  PRIMARY KEY (`company_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='企业信用统计月表';

-- ----------------------------
-- Table structure for company_red_black
-- ----------------------------
DROP TABLE IF EXISTS `company_red_black`;
CREATE TABLE `company_red_black` (
  `company_id` int(11) NOT NULL COMMENT '企业id',
  `org_id` int(11) NOT NULL COMMENT '组织机构id',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMdd',
  `exceed_total` int(11) NOT NULL DEFAULT '0' COMMENT '超标总数（油烟、voc、pm25）',
  `smoke_density` decimal(8,3) NOT NULL COMMENT '烟雾浓度总数，单位：ppm',
  `voc_density` decimal(8,3) NOT NULL COMMENT 'VOC浓度总数，单位：ppm',
  `pm25` decimal(8,3) NOT NULL COMMENT 'pm25总数',
  `smoke_sum` int(11) NOT NULL DEFAULT '0' COMMENT '油烟上报总数',
  PRIMARY KEY (`company_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='企业红黑榜统计表';

-- ----------------------------
-- Table structure for company_warn_statistics
-- ----------------------------
DROP TABLE IF EXISTS `company_warn_statistics`;
CREATE TABLE `company_warn_statistics` (
  `company_id` int(11) NOT NULL COMMENT '企业id',
  `org_id` int(11) NOT NULL COMMENT '组织机构id',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMdd',
  `exceed_total` int(11) NOT NULL DEFAULT '0' COMMENT '超标总数（油烟、voc、pm25）',
  `exceed_declare_total` int(11) NOT NULL DEFAULT '0' COMMENT '超标已申报总数（油烟、voc、pm25）',
  `exceed_undeclare_total` int(11) NOT NULL DEFAULT '0' COMMENT '超标未申报总数（油烟、voc、pm25）',
  `exceed_smoke_num` int(11) NOT NULL DEFAULT '0' COMMENT '油烟超标总数',
  `exceed_voc_num` int(11) NOT NULL DEFAULT '0' COMMENT 'voc超标总数',
  `exceed_pm25_num` int(11) NOT NULL DEFAULT '0' COMMENT 'pm25超标总数',
  `exceed_device_num` int(11) NOT NULL DEFAULT '0' COMMENT '超标设备总数',
  `exceed_device_ids` varchar(200) DEFAULT NULL COMMENT '超标设备id，以","分隔',
  `offline_total` int(11) NOT NULL DEFAULT '0' COMMENT '设备异常总数（离线报警）',
  `offline_declare_total` int(11) NOT NULL DEFAULT '0' COMMENT '设备异常已申报总数（离线报警）',
  `offline_undeclare_total` int(11) NOT NULL DEFAULT '0' COMMENT '设备异常未申报总数（离线报警）',
  `overdue_total` int(11) NOT NULL DEFAULT '0' COMMENT '清洗逾期报警总数',
  `overdue_declare_total` int(11) NOT NULL DEFAULT '0' COMMENT '清洗逾期报警已申报总数',
  `overdue_undeclare_total` int(11) NOT NULL DEFAULT '0' COMMENT '清洗逾期报警未申报总数',
  `monitoring_type` int(1) NOT NULL DEFAULT '0' COMMENT '企业监测类型，0：油烟监测；1：配电工况',
  PRIMARY KEY (`company_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='企业报警情况统计表';

-- ----------------------------
-- Table structure for online_data_electric_01
-- ----------------------------
DROP TABLE IF EXISTS `online_data_electric_01`;
CREATE TABLE `online_data_electric_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安[培]',
  `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伏[特]',
  `pa` decimal(12,4) DEFAULT NULL COMMENT '瞬时A相有功功率，kW千瓦',
  `pb` decimal(12,4) DEFAULT NULL COMMENT '瞬时B相有功功率，kW千瓦',
  `pc` decimal(12,4) DEFAULT NULL COMMENT '瞬时C相有功功率，kW千瓦',
  `p` decimal(12,4) 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 '总功率因数，单位：无量纲',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='电力实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20230101235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20230102235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20230103235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20230104235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20230105235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20230106235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20230107235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20230108235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20230109235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20230110235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20230111235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20230112235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20230113235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20230114235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20230115235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20230116235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20230117235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20230118235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20230119235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20230120235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20230121235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20230122235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20230123235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20230124235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20230125235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20230126235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20230127235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20230128235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20230129235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20230130235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_electric_02
-- ----------------------------
DROP TABLE IF EXISTS `online_data_electric_02`;
CREATE TABLE `online_data_electric_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安[培]',
  `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伏[特]',
  `pa` decimal(12,4) DEFAULT NULL COMMENT '瞬时A相有功功率，kW千瓦',
  `pb` decimal(12,4) DEFAULT NULL COMMENT '瞬时B相有功功率，kW千瓦',
  `pc` decimal(12,4) DEFAULT NULL COMMENT '瞬时C相有功功率，kW千瓦',
  `p` decimal(12,4) 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 '总功率因数，单位：无量纲',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='电力实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20230201235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20230202335959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20230203235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20230204235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20230205235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20230206235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20230207235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20230208235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20230209235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20230210235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20230211235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20230212235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20230213235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20230214235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20230215235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20230216235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20230217235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20230218235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20230219235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20230220235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20230221235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20230222235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20230223235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20230224235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20230225235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20230226235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20230227235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20230228235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20230229235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20230230235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_electric_03
-- ----------------------------
DROP TABLE IF EXISTS `online_data_electric_03`;
CREATE TABLE `online_data_electric_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安[培]',
  `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伏[特]',
  `pa` decimal(12,4) DEFAULT NULL COMMENT '瞬时A相有功功率，kW千瓦',
  `pb` decimal(12,4) DEFAULT NULL COMMENT '瞬时B相有功功率，kW千瓦',
  `pc` decimal(12,4) DEFAULT NULL COMMENT '瞬时C相有功功率，kW千瓦',
  `p` decimal(12,4) 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 '总功率因数，单位：无量纲',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='电力实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20230301235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20230302235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20230303235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20230304235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20230305235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20230306235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20230307235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20230308235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20230309235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20230310235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20230311235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20230312235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20230313235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20230314235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20230315235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20230316235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20230317235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20230318235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20230319235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20230320235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20230321235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20230322235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20230323235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20230324235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20230325235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20230326235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20230327235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20230328235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20230329235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20230330235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_electric_04
-- ----------------------------
DROP TABLE IF EXISTS `online_data_electric_04`;
CREATE TABLE `online_data_electric_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安[培]',
  `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伏[特]',
  `pa` decimal(12,4) DEFAULT NULL COMMENT '瞬时A相有功功率，kW千瓦',
  `pb` decimal(12,4) DEFAULT NULL COMMENT '瞬时B相有功功率，kW千瓦',
  `pc` decimal(12,4) DEFAULT NULL COMMENT '瞬时C相有功功率，kW千瓦',
  `p` decimal(12,4) 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 '总功率因数，单位：无量纲',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='电力实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20230401235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20230402235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20230403235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20230404235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20230405235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20230406235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20230407235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20230408235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20230409235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20230410235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20230411235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20230412235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20230413235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20230414235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20230415235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20230416235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20230417235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20230418235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20230419235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20230420235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20230421235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20230422235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20230423235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20230424235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20230425235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20230426235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20230427235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20230428235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20230429235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20230430235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_electric_05
-- ----------------------------
DROP TABLE IF EXISTS `online_data_electric_05`;
CREATE TABLE `online_data_electric_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安[培]',
  `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伏[特]',
  `pa` decimal(12,4) DEFAULT NULL COMMENT '瞬时A相有功功率，kW千瓦',
  `pb` decimal(12,4) DEFAULT NULL COMMENT '瞬时B相有功功率，kW千瓦',
  `pc` decimal(12,4) DEFAULT NULL COMMENT '瞬时C相有功功率，kW千瓦',
  `p` decimal(12,4) 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 '总功率因数，单位：无量纲',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='电力实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20230501235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20230502235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20230503235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20230504235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20230505235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20230506235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20230507235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20230508235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20230509235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20230510235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20230511235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20230512235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20230513235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20230514235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20230515235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20230516235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20230517235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20230518235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20230519235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20230520235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20230521235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20230522235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20230523235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20230524235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20230525235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20230526235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20230527235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20230528235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20230529235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20230530235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_electric_06
-- ----------------------------
DROP TABLE IF EXISTS `online_data_electric_06`;
CREATE TABLE `online_data_electric_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安[培]',
  `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伏[特]',
  `pa` decimal(12,4) DEFAULT NULL COMMENT '瞬时A相有功功率，kW千瓦',
  `pb` decimal(12,4) DEFAULT NULL COMMENT '瞬时B相有功功率，kW千瓦',
  `pc` decimal(12,4) DEFAULT NULL COMMENT '瞬时C相有功功率，kW千瓦',
  `p` decimal(12,4) 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 '总功率因数，单位：无量纲',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='电力实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20230601235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20230602235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20230603235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20230604235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20230605235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20230606235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20230607235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20230608235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20230609235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20230610235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20230611235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20230612235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20230613235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20230614235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20230615235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20230616235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20230617235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20230618235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20230619235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20230620235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20230621235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20230622235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20230623235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20230624235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20230625235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20230626235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20230627235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20230628235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20230629235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20230630235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_electric_07
-- ----------------------------
DROP TABLE IF EXISTS `online_data_electric_07`;
CREATE TABLE `online_data_electric_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安[培]',
  `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伏[特]',
  `pa` decimal(12,4) DEFAULT NULL COMMENT '瞬时A相有功功率，kW千瓦',
  `pb` decimal(12,4) DEFAULT NULL COMMENT '瞬时B相有功功率，kW千瓦',
  `pc` decimal(12,4) DEFAULT NULL COMMENT '瞬时C相有功功率，kW千瓦',
  `p` decimal(12,4) 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 '总功率因数，单位：无量纲',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='电力实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20230701235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20230702235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20230703235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20230704235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20230705235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20230706235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20230707235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20230708235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20230709235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20230710235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20230711235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20230712235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20230713235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20230714235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20230715235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20230716235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20230717235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20230718235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20230719235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20230720235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20230721235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20230722235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20230723235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20230724235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20230725235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20230726235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20230727235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20230728235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20230729235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20230730235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_electric_08
-- ----------------------------
DROP TABLE IF EXISTS `online_data_electric_08`;
CREATE TABLE `online_data_electric_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安[培]',
  `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伏[特]',
  `pa` decimal(12,4) DEFAULT NULL COMMENT '瞬时A相有功功率，kW千瓦',
  `pb` decimal(12,4) DEFAULT NULL COMMENT '瞬时B相有功功率，kW千瓦',
  `pc` decimal(12,4) DEFAULT NULL COMMENT '瞬时C相有功功率，kW千瓦',
  `p` decimal(12,4) 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 '总功率因数，单位：无量纲',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='电力实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20230801235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20230802235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20230803235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20230804235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20230805235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20230806235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20230807235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20230808235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20230809235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20230810235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20230811235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20230812235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20230813235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20230814235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20230815235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20230816235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20230817235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20230818235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20230819235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20230820235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20230821235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20230822235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20230823235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20230824235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20230825235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20230826235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20230827235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20230828235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20230829235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20230830235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_electric_09
-- ----------------------------
DROP TABLE IF EXISTS `online_data_electric_09`;
CREATE TABLE `online_data_electric_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安[培]',
  `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伏[特]',
  `pa` decimal(12,4) DEFAULT NULL COMMENT '瞬时A相有功功率，kW千瓦',
  `pb` decimal(12,4) DEFAULT NULL COMMENT '瞬时B相有功功率，kW千瓦',
  `pc` decimal(12,4) DEFAULT NULL COMMENT '瞬时C相有功功率，kW千瓦',
  `p` decimal(12,4) 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 '总功率因数，单位：无量纲',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='电力实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20230901235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20230902235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20230903235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20230904235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20230905235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20230906235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20230907235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20230908235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20230909235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20230910235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20230911235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20230912235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20230913235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20230914235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20230915235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20230916235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20230917235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20230918235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20230919235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20230920235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20230921235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20230922235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20230923235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20230924235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20230925235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20230926235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20230927235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20230928235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20230929235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20230930235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_electric_10
-- ----------------------------
DROP TABLE IF EXISTS `online_data_electric_10`;
CREATE TABLE `online_data_electric_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安[培]',
  `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伏[特]',
  `pa` decimal(12,4) DEFAULT NULL COMMENT '瞬时A相有功功率，kW千瓦',
  `pb` decimal(12,4) DEFAULT NULL COMMENT '瞬时B相有功功率，kW千瓦',
  `pc` decimal(12,4) DEFAULT NULL COMMENT '瞬时C相有功功率，kW千瓦',
  `p` decimal(12,4) 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 '总功率因数，单位：无量纲',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='电力实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20231001235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20231002235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20231003235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20231004235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20231005235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20231006235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20231007235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20231008235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20231009235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20231010235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20231011235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20231012235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20231013235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20231014235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20231015235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20231016235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20231017235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20231018235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20231019235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20231020235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20231021235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20231022235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20231023235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20231024235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20231025235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20231026235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20231027235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20231028235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20231029235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20231030235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_electric_11
-- ----------------------------
DROP TABLE IF EXISTS `online_data_electric_11`;
CREATE TABLE `online_data_electric_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安[培]',
  `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伏[特]',
  `pa` decimal(12,4) DEFAULT NULL COMMENT '瞬时A相有功功率，kW千瓦',
  `pb` decimal(12,4) DEFAULT NULL COMMENT '瞬时B相有功功率，kW千瓦',
  `pc` decimal(12,4) DEFAULT NULL COMMENT '瞬时C相有功功率，kW千瓦',
  `p` decimal(12,4) 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 '总功率因数，单位：无量纲',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='电力实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20231101235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20231102235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20231103235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20231104235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20231105235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20231106235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20231107235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20231108235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20231109235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20231110235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20231111235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20231112235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20231113235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20231114235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20231115235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20231116235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20231117235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20231118235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20231119235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20231120235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20231121235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20231122235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20231123235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20231124235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20231125235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20231126235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20231127235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20231128235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20231129235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20231130235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_electric_12
-- ----------------------------
DROP TABLE IF EXISTS `online_data_electric_12`;
CREATE TABLE `online_data_electric_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安[培]',
  `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伏[特]',
  `pa` decimal(12,4) DEFAULT NULL COMMENT '瞬时A相有功功率，kW千瓦',
  `pb` decimal(12,4) DEFAULT NULL COMMENT '瞬时B相有功功率，kW千瓦',
  `pc` decimal(12,4) DEFAULT NULL COMMENT '瞬时C相有功功率，kW千瓦',
  `p` decimal(12,4) 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 '总功率因数，单位：无量纲',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='电力实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20231201235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20231202335959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20231203235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20231204235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20231205235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20231206235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20231207235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20231208235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20231209235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20231210235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20231211235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20231212235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20231213235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20231214235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20231215235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20231216235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20231217235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20231218235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20231219235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20231220235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20231221235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20231222235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20231223235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20231224235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20231225235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20231226235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20231227235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20231228235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20231229235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20231230235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_electric_company
-- ----------------------------
DROP TABLE IF EXISTS `online_data_electric_company`;
CREATE TABLE `online_data_electric_company` (
  `company_id` int(11) NOT NULL COMMENT '企业id',
  `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安[培]',
  `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伏[特]',
  `pa` decimal(12,4) DEFAULT NULL COMMENT '瞬时A相有功功率，kW千瓦',
  `pb` decimal(12,4) DEFAULT NULL COMMENT '瞬时B相有功功率，kW千瓦',
  `pc` decimal(12,4) DEFAULT NULL COMMENT '瞬时C相有功功率，kW千瓦',
  `p` decimal(12,4) 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 '总功率因数，单位：无量纲',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`company_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='电力实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20230131235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20230231235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20230331235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20230431235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20230531235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20230631235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20230731235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20230831235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20230931235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20231031235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20231131235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_electric_org
-- ----------------------------
DROP TABLE IF EXISTS `online_data_electric_org`;
CREATE TABLE `online_data_electric_org` (
  `org_id` int(11) NOT NULL COMMENT '机构id',
  `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安[培]',
  `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伏[特]',
  `pa` decimal(12,4) DEFAULT NULL COMMENT '瞬时A相有功功率，kW千瓦',
  `pb` decimal(12,4) DEFAULT NULL COMMENT '瞬时B相有功功率，kW千瓦',
  `pc` decimal(12,4) DEFAULT NULL COMMENT '瞬时C相有功功率，kW千瓦',
  `p` decimal(12,4) 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 '总功率因数，单位：无量纲',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`org_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='电力实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20230131235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20230231235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20230331235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20230431235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20230531235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20230631235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20230731235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20230831235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20230931235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20231031235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20231131235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_lampblack_01
-- ----------------------------
DROP TABLE IF EXISTS `online_data_lampblack_01`;
CREATE TABLE `online_data_lampblack_01` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测仪编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `flue_temp` decimal(8,3) DEFAULT NULL COMMENT '烟道温度(通道0)，单位：℃',
  `flue_humidity` decimal(8,3) DEFAULT NULL COMMENT '烟道湿度(通道0)，单位：RH',
  `smoke_density` decimal(8,3) DEFAULT NULL COMMENT '烟雾浓度(通道0)，单位：ppm',
  `voc_density` decimal(8,3) DEFAULT NULL COMMENT 'VOC浓度(通道0)，单位：ppm',
  `pm25` decimal(8,3) DEFAULT NULL COMMENT 'pm25',
  `latitude` varchar(20) DEFAULT NULL COMMENT '纬度，单位度',
  `longitude` varchar(20) DEFAULT NULL COMMENT '经度，单位度',
  `smoke_total` decimal(8,3) DEFAULT NULL COMMENT '烟雾浓度排放总量，单位克',
  `voc_total` decimal(8,3) DEFAULT NULL COMMENT 'VOC浓度排放总量，单位克',
  `pm25_total` decimal(8,3) DEFAULT NULL COMMENT 'pm25排放总量，单位克',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='油烟实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20230101235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20230102235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20230103235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20230104235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20230105235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20230106235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20230107235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20230108235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20230109235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20230110235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20230111235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20230112235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20230113235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20230114235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20230115235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20230116235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20230117235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20230118235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20230119235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20230120235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20230121235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20230122235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20230123235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20230124235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20230125235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20230126235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20230127235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20230128235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20230129235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20230130235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_lampblack_02
-- ----------------------------
DROP TABLE IF EXISTS `online_data_lampblack_02`;
CREATE TABLE `online_data_lampblack_02` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测仪编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `flue_temp` decimal(8,3) DEFAULT NULL COMMENT '烟道温度(通道0)，单位：℃',
  `flue_humidity` decimal(8,3) DEFAULT NULL COMMENT '烟道湿度(通道0)，单位：RH',
  `smoke_density` decimal(8,3) DEFAULT NULL COMMENT '烟雾浓度(通道0)，单位：ppm',
  `voc_density` decimal(8,3) DEFAULT NULL COMMENT 'VOC浓度(通道0)，单位：ppm',
  `pm25` decimal(8,3) DEFAULT NULL COMMENT 'pm25',
  `latitude` varchar(20) DEFAULT NULL COMMENT '纬度，单位度',
  `longitude` varchar(20) DEFAULT NULL COMMENT '经度，单位度',
  `smoke_total` decimal(8,3) DEFAULT NULL COMMENT '烟雾浓度排放总量，单位克',
  `voc_total` decimal(8,3) DEFAULT NULL COMMENT 'VOC浓度排放总量，单位克',
  `pm25_total` decimal(8,3) DEFAULT NULL COMMENT 'pm25排放总量，单位克',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='油烟实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20230201235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20230202335959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20230203235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20230204235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20230205235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20230206235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20230207235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20230208235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20230209235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20230210235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20230211235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20230212235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20230213235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20230214235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20230215235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20230216235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20230217235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20230218235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20230219235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20230220235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20230221235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20230222235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20230223235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20230224235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20230225235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20230226235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20230227235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20230228235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20230229235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20230230235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_lampblack_03
-- ----------------------------
DROP TABLE IF EXISTS `online_data_lampblack_03`;
CREATE TABLE `online_data_lampblack_03` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测仪编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `flue_temp` decimal(8,3) DEFAULT NULL COMMENT '烟道温度(通道0)，单位：℃',
  `flue_humidity` decimal(8,3) DEFAULT NULL COMMENT '烟道湿度(通道0)，单位：RH',
  `smoke_density` decimal(8,3) DEFAULT NULL COMMENT '烟雾浓度(通道0)，单位：ppm',
  `voc_density` decimal(8,3) DEFAULT NULL COMMENT 'VOC浓度(通道0)，单位：ppm',
  `pm25` decimal(8,3) DEFAULT NULL COMMENT 'pm25',
  `latitude` varchar(20) DEFAULT NULL COMMENT '纬度，单位度',
  `longitude` varchar(20) DEFAULT NULL COMMENT '经度，单位度',
  `smoke_total` decimal(8,3) DEFAULT NULL COMMENT '烟雾浓度排放总量，单位克',
  `voc_total` decimal(8,3) DEFAULT NULL COMMENT 'VOC浓度排放总量，单位克',
  `pm25_total` decimal(8,3) DEFAULT NULL COMMENT 'pm25排放总量，单位克',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='油烟实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20230301235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20230302235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20230303235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20230304235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20230305235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20230306235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20230307235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20230308235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20230309235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20230310235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20230311235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20230312235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20230313235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20230314235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20230315235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20230316235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20230317235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20230318235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20230319235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20230320235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20230321235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20230322235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20230323235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20230324235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20230325235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20230326235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20230327235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20230328235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20230329235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20230330235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_lampblack_04
-- ----------------------------
DROP TABLE IF EXISTS `online_data_lampblack_04`;
CREATE TABLE `online_data_lampblack_04` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测仪编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `flue_temp` decimal(8,3) DEFAULT NULL COMMENT '烟道温度(通道0)，单位：℃',
  `flue_humidity` decimal(8,3) DEFAULT NULL COMMENT '烟道湿度(通道0)，单位：RH',
  `smoke_density` decimal(8,3) DEFAULT NULL COMMENT '烟雾浓度(通道0)，单位：ppm',
  `voc_density` decimal(8,3) DEFAULT NULL COMMENT 'VOC浓度(通道0)，单位：ppm',
  `pm25` decimal(8,3) DEFAULT NULL COMMENT 'pm25',
  `latitude` varchar(20) DEFAULT NULL COMMENT '纬度，单位度',
  `longitude` varchar(20) DEFAULT NULL COMMENT '经度，单位度',
  `smoke_total` decimal(8,3) DEFAULT NULL COMMENT '烟雾浓度排放总量，单位克',
  `voc_total` decimal(8,3) DEFAULT NULL COMMENT 'VOC浓度排放总量，单位克',
  `pm25_total` decimal(8,3) DEFAULT NULL COMMENT 'pm25排放总量，单位克',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='油烟实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20230401235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20230402235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20230403235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20230404235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20230405235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20230406235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20230407235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20230408235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20230409235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20230410235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20230411235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20230412235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20230413235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20230414235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20230415235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20230416235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20230417235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20230418235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20230419235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20230420235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20230421235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20230422235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20230423235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20230424235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20230425235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20230426235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20230427235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20230428235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20230429235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20230430235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_lampblack_05
-- ----------------------------
DROP TABLE IF EXISTS `online_data_lampblack_05`;
CREATE TABLE `online_data_lampblack_05` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测仪编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `flue_temp` decimal(8,3) DEFAULT NULL COMMENT '烟道温度(通道0)，单位：℃',
  `flue_humidity` decimal(8,3) DEFAULT NULL COMMENT '烟道湿度(通道0)，单位：RH',
  `smoke_density` decimal(8,3) DEFAULT NULL COMMENT '烟雾浓度(通道0)，单位：ppm',
  `voc_density` decimal(8,3) DEFAULT NULL COMMENT 'VOC浓度(通道0)，单位：ppm',
  `pm25` decimal(8,3) DEFAULT NULL COMMENT 'pm25',
  `latitude` varchar(20) DEFAULT NULL COMMENT '纬度，单位度',
  `longitude` varchar(20) DEFAULT NULL COMMENT '经度，单位度',
  `smoke_total` decimal(8,3) DEFAULT NULL COMMENT '烟雾浓度排放总量，单位克',
  `voc_total` decimal(8,3) DEFAULT NULL COMMENT 'VOC浓度排放总量，单位克',
  `pm25_total` decimal(8,3) DEFAULT NULL COMMENT 'pm25排放总量，单位克',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='油烟实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20230501235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20230502235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20230503235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20230504235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20230505235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20230506235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20230507235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20230508235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20230509235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20230510235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20230511235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20230512235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20230513235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20230514235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20230515235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20230516235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20230517235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20230518235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20230519235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20230520235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20230521235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20230522235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20230523235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20230524235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20230525235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20230526235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20230527235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20230528235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20230529235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20230530235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_lampblack_06
-- ----------------------------
DROP TABLE IF EXISTS `online_data_lampblack_06`;
CREATE TABLE `online_data_lampblack_06` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测仪编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `flue_temp` decimal(8,3) DEFAULT NULL COMMENT '烟道温度(通道0)，单位：℃',
  `flue_humidity` decimal(8,3) DEFAULT NULL COMMENT '烟道湿度(通道0)，单位：RH',
  `smoke_density` decimal(8,3) DEFAULT NULL COMMENT '烟雾浓度(通道0)，单位：ppm',
  `voc_density` decimal(8,3) DEFAULT NULL COMMENT 'VOC浓度(通道0)，单位：ppm',
  `pm25` decimal(8,3) DEFAULT NULL COMMENT 'pm25',
  `latitude` varchar(20) DEFAULT NULL COMMENT '纬度，单位度',
  `longitude` varchar(20) DEFAULT NULL COMMENT '经度，单位度',
  `smoke_total` decimal(8,3) DEFAULT NULL COMMENT '烟雾浓度排放总量，单位克',
  `voc_total` decimal(8,3) DEFAULT NULL COMMENT 'VOC浓度排放总量，单位克',
  `pm25_total` decimal(8,3) DEFAULT NULL COMMENT 'pm25排放总量，单位克',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='油烟实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20230601235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20230602235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20230603235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20230604235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20230605235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20230606235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20230607235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20230608235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20230609235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20230610235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20230611235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20230612235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20230613235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20230614235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20230615235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20230616235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20230617235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20230618235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20230619235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20230620235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20230621235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20230622235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20230623235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20230624235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20230625235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20230626235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20230627235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20230628235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20230629235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20230630235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_lampblack_07
-- ----------------------------
DROP TABLE IF EXISTS `online_data_lampblack_07`;
CREATE TABLE `online_data_lampblack_07` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测仪编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `flue_temp` decimal(8,3) DEFAULT NULL COMMENT '烟道温度(通道0)，单位：℃',
  `flue_humidity` decimal(8,3) DEFAULT NULL COMMENT '烟道湿度(通道0)，单位：RH',
  `smoke_density` decimal(8,3) DEFAULT NULL COMMENT '烟雾浓度(通道0)，单位：ppm',
  `voc_density` decimal(8,3) DEFAULT NULL COMMENT 'VOC浓度(通道0)，单位：ppm',
  `pm25` decimal(8,3) DEFAULT NULL COMMENT 'pm25',
  `latitude` varchar(20) DEFAULT NULL COMMENT '纬度，单位度',
  `longitude` varchar(20) DEFAULT NULL COMMENT '经度，单位度',
  `smoke_total` decimal(8,3) DEFAULT NULL COMMENT '烟雾浓度排放总量，单位克',
  `voc_total` decimal(8,3) DEFAULT NULL COMMENT 'VOC浓度排放总量，单位克',
  `pm25_total` decimal(8,3) DEFAULT NULL COMMENT 'pm25排放总量，单位克',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='油烟实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20230701235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20230702235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20230703235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20230704235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20230705235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20230706235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20230707235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20230708235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20230709235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20230710235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20230711235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20230712235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20230713235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20230714235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20230715235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20230716235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20230717235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20230718235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20230719235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20230720235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20230721235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20230722235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20230723235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20230724235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20230725235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20230726235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20230727235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20230728235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20230729235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20230730235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_lampblack_08
-- ----------------------------
DROP TABLE IF EXISTS `online_data_lampblack_08`;
CREATE TABLE `online_data_lampblack_08` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测仪编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `flue_temp` decimal(8,3) DEFAULT NULL COMMENT '烟道温度(通道0)，单位：℃',
  `flue_humidity` decimal(8,3) DEFAULT NULL COMMENT '烟道湿度(通道0)，单位：RH',
  `smoke_density` decimal(8,3) DEFAULT NULL COMMENT '烟雾浓度(通道0)，单位：ppm',
  `voc_density` decimal(8,3) DEFAULT NULL COMMENT 'VOC浓度(通道0)，单位：ppm',
  `pm25` decimal(8,3) DEFAULT NULL COMMENT 'pm25',
  `latitude` varchar(20) DEFAULT NULL COMMENT '纬度，单位度',
  `longitude` varchar(20) DEFAULT NULL COMMENT '经度，单位度',
  `smoke_total` decimal(8,3) DEFAULT NULL COMMENT '烟雾浓度排放总量，单位克',
  `voc_total` decimal(8,3) DEFAULT NULL COMMENT 'VOC浓度排放总量，单位克',
  `pm25_total` decimal(8,3) DEFAULT NULL COMMENT 'pm25排放总量，单位克',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='油烟实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20230801235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20230802235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20230803235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20230804235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20230805235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20230806235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20230807235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20230808235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20230809235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20230810235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20230811235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20230812235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20230813235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20230814235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20230815235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20230816235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20230817235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20230818235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20230819235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20230820235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20230821235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20230822235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20230823235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20230824235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20230825235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20230826235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20230827235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20230828235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20230829235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20230830235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_lampblack_09
-- ----------------------------
DROP TABLE IF EXISTS `online_data_lampblack_09`;
CREATE TABLE `online_data_lampblack_09` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测仪编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `flue_temp` decimal(8,3) DEFAULT NULL COMMENT '烟道温度(通道0)，单位：℃',
  `flue_humidity` decimal(8,3) DEFAULT NULL COMMENT '烟道湿度(通道0)，单位：RH',
  `smoke_density` decimal(8,3) DEFAULT NULL COMMENT '烟雾浓度(通道0)，单位：ppm',
  `voc_density` decimal(8,3) DEFAULT NULL COMMENT 'VOC浓度(通道0)，单位：ppm',
  `pm25` decimal(8,3) DEFAULT NULL COMMENT 'pm25',
  `latitude` varchar(20) DEFAULT NULL COMMENT '纬度，单位度',
  `longitude` varchar(20) DEFAULT NULL COMMENT '经度，单位度',
  `smoke_total` decimal(8,3) DEFAULT NULL COMMENT '烟雾浓度排放总量，单位克',
  `voc_total` decimal(8,3) DEFAULT NULL COMMENT 'VOC浓度排放总量，单位克',
  `pm25_total` decimal(8,3) DEFAULT NULL COMMENT 'pm25排放总量，单位克',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='油烟实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20230901235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20230902235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20230903235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20230904235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20230905235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20230906235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20230907235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20230908235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20230909235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20230910235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20230911235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20230912235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20230913235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20230914235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20230915235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20230916235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20230917235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20230918235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20230919235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20230920235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20230921235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20230922235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20230923235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20230924235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20230925235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20230926235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20230927235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20230928235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20230929235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20230930235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_lampblack_10
-- ----------------------------
DROP TABLE IF EXISTS `online_data_lampblack_10`;
CREATE TABLE `online_data_lampblack_10` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测仪编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `flue_temp` decimal(8,3) DEFAULT NULL COMMENT '烟道温度(通道0)，单位：℃',
  `flue_humidity` decimal(8,3) DEFAULT NULL COMMENT '烟道湿度(通道0)，单位：RH',
  `smoke_density` decimal(8,3) DEFAULT NULL COMMENT '烟雾浓度(通道0)，单位：ppm',
  `voc_density` decimal(8,3) DEFAULT NULL COMMENT 'VOC浓度(通道0)，单位：ppm',
  `pm25` decimal(8,3) DEFAULT NULL COMMENT 'pm25',
  `latitude` varchar(20) DEFAULT NULL COMMENT '纬度，单位度',
  `longitude` varchar(20) DEFAULT NULL COMMENT '经度，单位度',
  `smoke_total` decimal(8,3) DEFAULT NULL COMMENT '烟雾浓度排放总量，单位克',
  `voc_total` decimal(8,3) DEFAULT NULL COMMENT 'VOC浓度排放总量，单位克',
  `pm25_total` decimal(8,3) DEFAULT NULL COMMENT 'pm25排放总量，单位克',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='油烟实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20231001235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20231002235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20231003235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20231004235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20231005235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20231006235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20231007235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20231008235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20231009235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20231010235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20231011235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20231012235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20231013235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20231014235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20231015235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20231016235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20231017235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20231018235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20231019235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20231020235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20231021235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20231022235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20231023235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20231024235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20231025235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20231026235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20231027235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20231028235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20231029235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20231030235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_lampblack_11
-- ----------------------------
DROP TABLE IF EXISTS `online_data_lampblack_11`;
CREATE TABLE `online_data_lampblack_11` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测仪编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `flue_temp` decimal(8,3) DEFAULT NULL COMMENT '烟道温度(通道0)，单位：℃',
  `flue_humidity` decimal(8,3) DEFAULT NULL COMMENT '烟道湿度(通道0)，单位：RH',
  `smoke_density` decimal(8,3) DEFAULT NULL COMMENT '烟雾浓度(通道0)，单位：ppm',
  `voc_density` decimal(8,3) DEFAULT NULL COMMENT 'VOC浓度(通道0)，单位：ppm',
  `pm25` decimal(8,3) DEFAULT NULL COMMENT 'pm25',
  `latitude` varchar(20) DEFAULT NULL COMMENT '纬度，单位度',
  `longitude` varchar(20) DEFAULT NULL COMMENT '经度，单位度',
  `smoke_total` decimal(8,3) DEFAULT NULL COMMENT '烟雾浓度排放总量，单位克',
  `voc_total` decimal(8,3) DEFAULT NULL COMMENT 'VOC浓度排放总量，单位克',
  `pm25_total` decimal(8,3) DEFAULT NULL COMMENT 'pm25排放总量，单位克',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='油烟实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20231101235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20231102235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20231103235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20231104235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20231105235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20231106235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20231107235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20231108235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20231109235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20231110235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20231111235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20231112235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20231113235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20231114235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20231115235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20231116235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20231117235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20231118235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20231119235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20231120235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20231121235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20231122235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20231123235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20231124235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20231125235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20231126235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20231127235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20231128235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20231129235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20231130235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_lampblack_12
-- ----------------------------
DROP TABLE IF EXISTS `online_data_lampblack_12`;
CREATE TABLE `online_data_lampblack_12` (
  `terminal_id` varchar(30) NOT NULL COMMENT '监测仪编号',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `flue_temp` decimal(8,3) DEFAULT NULL COMMENT '烟道温度(通道0)，单位：℃',
  `flue_humidity` decimal(8,3) DEFAULT NULL COMMENT '烟道湿度(通道0)，单位：RH',
  `smoke_density` decimal(8,3) DEFAULT NULL COMMENT '烟雾浓度(通道0)，单位：ppm',
  `voc_density` decimal(8,3) DEFAULT NULL COMMENT 'VOC浓度(通道0)，单位：ppm',
  `pm25` decimal(8,3) DEFAULT NULL COMMENT 'pm25',
  `latitude` varchar(20) DEFAULT NULL COMMENT '纬度，单位度',
  `longitude` varchar(20) DEFAULT NULL COMMENT '经度，单位度',
  `smoke_total` decimal(8,3) DEFAULT NULL COMMENT '烟雾浓度排放总量，单位克',
  `voc_total` decimal(8,3) DEFAULT NULL COMMENT 'VOC浓度排放总量，单位克',
  `pm25_total` decimal(8,3) DEFAULT NULL COMMENT 'pm25排放总量，单位克',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`terminal_id`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='油烟实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20231201235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20231202335959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20231203235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20231204235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20231205235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20231206235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20231207235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20231208235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20231209235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20231210235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20231211235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN (20231212235959) ENGINE = InnoDB,
 PARTITION part13 VALUES LESS THAN (20231213235959) ENGINE = InnoDB,
 PARTITION part14 VALUES LESS THAN (20231214235959) ENGINE = InnoDB,
 PARTITION part15 VALUES LESS THAN (20231215235959) ENGINE = InnoDB,
 PARTITION part16 VALUES LESS THAN (20231216235959) ENGINE = InnoDB,
 PARTITION part17 VALUES LESS THAN (20231217235959) ENGINE = InnoDB,
 PARTITION part18 VALUES LESS THAN (20231218235959) ENGINE = InnoDB,
 PARTITION part19 VALUES LESS THAN (20231219235959) ENGINE = InnoDB,
 PARTITION part20 VALUES LESS THAN (20231220235959) ENGINE = InnoDB,
 PARTITION part21 VALUES LESS THAN (20231221235959) ENGINE = InnoDB,
 PARTITION part22 VALUES LESS THAN (20231222235959) ENGINE = InnoDB,
 PARTITION part23 VALUES LESS THAN (20231223235959) ENGINE = InnoDB,
 PARTITION part24 VALUES LESS THAN (20231224235959) ENGINE = InnoDB,
 PARTITION part25 VALUES LESS THAN (20231225235959) ENGINE = InnoDB,
 PARTITION part26 VALUES LESS THAN (20231226235959) ENGINE = InnoDB,
 PARTITION part27 VALUES LESS THAN (20231227235959) ENGINE = InnoDB,
 PARTITION part28 VALUES LESS THAN (20231228235959) ENGINE = InnoDB,
 PARTITION part29 VALUES LESS THAN (20231229235959) ENGINE = InnoDB,
 PARTITION part30 VALUES LESS THAN (20231230235959) ENGINE = InnoDB,
 PARTITION part31 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_lampblack_company
-- ----------------------------
DROP TABLE IF EXISTS `online_data_lampblack_company`;
CREATE TABLE `online_data_lampblack_company` (
  `company_id` int(11) NOT NULL COMMENT '企业id',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `flue_temp` decimal(8,3) DEFAULT NULL COMMENT '烟道温度(通道0)，单位：℃',
  `flue_humidity` decimal(8,3) DEFAULT NULL COMMENT '烟道湿度(通道0)，单位：RH',
  `smoke_density` decimal(8,3) DEFAULT NULL COMMENT '烟雾浓度(通道0)，单位：ppm',
  `voc_density` decimal(8,3) DEFAULT NULL COMMENT 'VOC浓度(通道0)，单位：ppm',
  `pm25` decimal(8,3) DEFAULT NULL COMMENT 'pm25',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`company_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='油烟实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20230131235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20230231235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20230331235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20230431235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20230531235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20230631235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20230731235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20230831235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20230931235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20231031235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20231131235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_data_lampblack_org
-- ----------------------------
DROP TABLE IF EXISTS `online_data_lampblack_org`;
CREATE TABLE `online_data_lampblack_org` (
  `org_id` int(11) NOT NULL COMMENT '机构id',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `flue_temp` decimal(8,3) DEFAULT NULL COMMENT '烟道温度(通道0)，单位：℃',
  `flue_humidity` decimal(8,3) DEFAULT NULL COMMENT '烟道湿度(通道0)，单位：RH',
  `smoke_density` decimal(8,3) DEFAULT NULL COMMENT '烟雾浓度(通道0)，单位：ppm',
  `voc_density` decimal(8,3) DEFAULT NULL COMMENT 'VOC浓度(通道0)，单位：ppm',
  `pm25` decimal(8,3) DEFAULT NULL COMMENT 'pm25',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`org_id`,`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='油烟实时表'
/*!50100 PARTITION BY RANGE (upload_date)
(PARTITION part01 VALUES LESS THAN (20230131235959) ENGINE = InnoDB,
 PARTITION part02 VALUES LESS THAN (20230231235959) ENGINE = InnoDB,
 PARTITION part03 VALUES LESS THAN (20230331235959) ENGINE = InnoDB,
 PARTITION part04 VALUES LESS THAN (20230431235959) ENGINE = InnoDB,
 PARTITION part05 VALUES LESS THAN (20230531235959) ENGINE = InnoDB,
 PARTITION part06 VALUES LESS THAN (20230631235959) ENGINE = InnoDB,
 PARTITION part07 VALUES LESS THAN (20230731235959) ENGINE = InnoDB,
 PARTITION part08 VALUES LESS THAN (20230831235959) ENGINE = InnoDB,
 PARTITION part09 VALUES LESS THAN (20230931235959) ENGINE = InnoDB,
 PARTITION part10 VALUES LESS THAN (20231031235959) ENGINE = InnoDB,
 PARTITION part11 VALUES LESS THAN (20231131235959) ENGINE = InnoDB,
 PARTITION part12 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */;

-- ----------------------------
-- Table structure for online_monitor_event
-- ----------------------------
DROP TABLE IF EXISTS `online_monitor_event`;
CREATE TABLE `online_monitor_event` (
  `mn` varchar(30) NOT NULL COMMENT '监测仪mn',
  `upload_date` bigint(20) NOT NULL COMMENT '上传时间yyyyMMddHHmmss',
  `power_off` int(1) DEFAULT '0' COMMENT '1停电，0上电',
  `insert_time` bigint(20) DEFAULT NULL COMMENT '数据插入时间yyyyMMddHHmmss',
  PRIMARY KEY (`mn`,`upload_date`),
  KEY `indexes_upload_date` (`upload_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='油烟设备停上电事件';

-- ----------------------------
-- Table structure for warn
-- ----------------------------
DROP TABLE IF EXISTS `warn`;
CREATE TABLE `warn` (
  `id` bigint(20) NOT NULL,
  `org_id` int(11) NOT NULL COMMENT '机构id',
  `company_id` int(11) NOT NULL COMMENT '企业id',
  `catering_style` varchar(20) NOT NULL COMMENT '餐饮风格，菜系，000010001',
  `warn_type` varchar(20) NOT NULL COMMENT '报警类型，000100001',
  `warn_state` tinyint(1) NOT NULL DEFAULT '0' COMMENT '告警状态：0未恢复：1已恢复',
  `facilities_id` int(11) DEFAULT NULL COMMENT '净化设施id',
  `device_id` int(11) NOT NULL COMMENT '设备id，净化器/风机',
  `warn_starttime` bigint(20) NOT NULL COMMENT '报警开始时间yyyyMMddHHmmss',
  `warn_endtime` bigint(20) DEFAULT NULL COMMENT '报警结束时间yyyyMMddHHmmss',
  `process_info` text COMMENT '报警过程信息',
  `abnormal_id` int(11) DEFAULT NULL COMMENT '异常申报id',
  `abnormal_date` bigint(20) DEFAULT NULL COMMENT '申报时间yyyyMMddHHmmss',
  `abnormal_state` varchar(255) DEFAULT '000170001' COMMENT '处理状态，000170001：未申报；000170002：未审核；000170003；审核通过；000170004：审核未通过',
  `work_order_id` int(11) DEFAULT NULL COMMENT '工单id',
  `work_order_time` bigint(20) DEFAULT NULL COMMENT '工单创建时间yyyyMMddHHmmss',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='报警表';

-- ----------------------------
-- Table structure for warn_early
-- ----------------------------
DROP TABLE IF EXISTS `warn_early`;
CREATE TABLE `warn_early` (
  `id` bigint(20) NOT NULL,
  `org_id` int(11) NOT NULL COMMENT '机构id',
  `company_id` int(11) NOT NULL COMMENT '企业id',
  `catering_style` varchar(20) NOT NULL COMMENT '餐饮风格，菜系，000010001',
  `warn_type` varchar(20) NOT NULL COMMENT '预警类型，000100001',
  `warn_state` tinyint(1) NOT NULL DEFAULT '0' COMMENT '预警状态：0未恢复：1已恢复',
  `facilities_id` int(11) DEFAULT NULL COMMENT '净化设施id',
  `device_id` int(11) NOT NULL COMMENT '设备id，净化器/风机',
  `warn_starttime` bigint(20) NOT NULL COMMENT '预警开始时间yyyyMMddHHmmss',
  `warn_endtime` bigint(20) DEFAULT NULL COMMENT '预警结束时间yyyyMMddHHmmss',
  `process_info` text COMMENT '预警过程信息',
  `abnormal_id` int(11) DEFAULT NULL COMMENT '异常申报id',
  `abnormal_date` bigint(20) DEFAULT NULL COMMENT '申报时间yyyyMMddHHmmss',
  `abnormal_state` varchar(255) DEFAULT '000170001' COMMENT '处理状态，000170001：未申报；000170002：未审核；000170003；审核通过；000170004：审核未通过',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='预警表';
