USE `clbs`;

CREATE TABLE VEHICLE_MILE_MONTH
(
   VEHICLE_ID VARCHAR(40) NOT NULL COMMENT '监控对象id',
   GROUP_ID VARCHAR(40) NOT NULL COMMENT '企业id',
   MONTH_DATE BIGINT NOT NULL COMMENT '当月1号0点秒值',
   DAY1 DOUBLE NULL,
   DAY2 DOUBLE NULL,
   DAY3 DOUBLE NULL,
   DAY4 DOUBLE NULL,
   DAY5 DOUBLE NULL,
   DAY6 DOUBLE NULL,
   DAY7 DOUBLE NULL,
   DAY8 DOUBLE NULL,
   DAY9 DOUBLE NULL,
   DAY10 DOUBLE NULL,
   DAY11 DOUBLE NULL,
   DAY12 DOUBLE NULL,
   DAY13 DOUBLE NULL,
   DAY14 DOUBLE NULL,
   DAY15 DOUBLE NULL,
   DAY16 DOUBLE NULL,
   DAY17 DOUBLE NULL,
   DAY18 DOUBLE NULL,
   DAY19 DOUBLE NULL,
   DAY20 DOUBLE NULL,
   DAY21 DOUBLE NULL,
   DAY22 DOUBLE NULL,
   DAY23 DOUBLE NULL,
   DAY24 DOUBLE NULL,
   DAY25 DOUBLE NULL,
   DAY26 DOUBLE NULL,
   DAY27 DOUBLE NULL,
   DAY28 DOUBLE NULL,
   DAY29 DOUBLE NULL,
   DAY30 DOUBLE NULL,
   DAY31 DOUBLE NULL,
   GROUP_NAME VARCHAR(32) COMMENT '企业名称',
   PLATE_COLOR VARCHAR(10) COMMENT '车牌颜色',
   VEHICLE_TYPE VARCHAR(20) COMMENT '车辆类型',
   MONITOR_NAME VARCHAR(32) COMMENT '监控对象名称',
   CONSTRAINT PK PRIMARY KEY (VEHICLE_ID,GROUP_ID,MONTH_DATE)
)
ENGINE = InnoDB
CHARACTER SET = utf8
COLLATE = utf8_general_ci
ROW_FORMAT = Dynamic
COMMENT '监控对象里程统计月表';

CREATE TABLE IF NOT EXISTS MONITOR_ONLINE_MONTH
(
   MONTH BIGINT NOT NULL COMMENT '当月1号0点秒值',
   MONITOR_ID VARCHAR(40) NOT NULL COMMENT '监控对象id',
   GROUP_NAME VARCHAR(32) COMMENT '企业名称',
   PLATE_COLOR VARCHAR(10) COMMENT '车牌颜色',
   VEHICLE_TYPE VARCHAR(20) COMMENT '车辆类型',
   MONITOR_NAME VARCHAR(32) COMMENT '监控对象名称',
   DAY1 INTEGER NULL,
   DAY2 INTEGER NULL,
   DAY3 INTEGER NULL,
   DAY4 INTEGER NULL,
   DAY5 INTEGER NULL,
   DAY6 INTEGER NULL,
   DAY7 INTEGER NULL,
   DAY8 INTEGER NULL,
   DAY9 INTEGER NULL,
   DAY10 INTEGER NULL,
   DAY11 INTEGER NULL,
   DAY12 INTEGER NULL,
   DAY13 INTEGER NULL,
   DAY14 INTEGER NULL,
   DAY15 INTEGER NULL,
   DAY16 INTEGER NULL,
   DAY17 INTEGER NULL,
   DAY18 INTEGER NULL,
   DAY19 INTEGER NULL,
   DAY20 INTEGER NULL,
   DAY21 INTEGER NULL,
   DAY22 INTEGER NULL,
   DAY23 INTEGER NULL,
   DAY24 INTEGER NULL,
   DAY25 INTEGER NULL,
   DAY26 INTEGER NULL,
   DAY27 INTEGER NULL,
   DAY28 INTEGER NULL,
   DAY29 INTEGER NULL,
   DAY30 INTEGER NULL,
   DAY31 INTEGER NULL,
   CONSTRAINT PK PRIMARY KEY (MONTH,MONITOR_ID)
)
ENGINE = InnoDB
CHARACTER SET = utf8
COLLATE = utf8_general_ci
ROW_FORMAT = Dynamic
COMMENT '监控对象在线时长统计月表';

CREATE TABLE IF NOT EXISTS GROUP_ONLINE_MONTH
(
   MONTH BIGINT NOT NULL COMMENT '当月1号0点秒值',
   GROUP_ID VARCHAR(40) NOT NULL COMMENT '企业id',
   GROUP_NAME VARCHAR(32) NULL COMMENT '企业名称',
   DAY1 INTEGER NULL,
   DAY2 INTEGER NULL,
   DAY3 INTEGER NULL,
   DAY4 INTEGER NULL,
   DAY5 INTEGER NULL,
   DAY6 INTEGER NULL,
   DAY7 INTEGER NULL,
   DAY8 INTEGER NULL,
   DAY9 INTEGER NULL,
   DAY10 INTEGER NULL,
   DAY11 INTEGER NULL,
   DAY12 INTEGER NULL,
   DAY13 INTEGER NULL,
   DAY14 INTEGER NULL,
   DAY15 INTEGER NULL,
   DAY16 INTEGER NULL,
   DAY17 INTEGER NULL,
   DAY18 INTEGER NULL,
   DAY19 INTEGER NULL,
   DAY20 INTEGER NULL,
   DAY21 INTEGER NULL,
   DAY22 INTEGER NULL,
   DAY23 INTEGER NULL,
   DAY24 INTEGER NULL,
   DAY25 INTEGER NULL,
   DAY26 INTEGER NULL,
   DAY27 INTEGER NULL,
   DAY28 INTEGER NULL,
   DAY29 INTEGER NULL,
   DAY30 INTEGER NULL,
   DAY31 INTEGER NULL,
   CONSTRAINT PK PRIMARY KEY (MONTH,GROUP_ID)
) 
ENGINE = InnoDB
CHARACTER SET = utf8
COLLATE = utf8_general_ci
ROW_FORMAT = Dynamic
COMMENT '企业在线时长统计月表';

CREATE TABLE IF NOT EXISTS AREA_ONLINE_MONTH
(
   MONTH BIGINT NOT NULL COMMENT '当月1号0点秒值',
   PROVINCE_ID VARCHAR(40) NOT NULL COMMENT '省域id',
   CITY_ID VARCHAR(40) NOT NULL COMMENT '市域id',
   COUNTY_ID VARCHAR(40) NOT NULL COMMENT '区县id',
   PROVINCE VARCHAR(32) NULL COMMENT '省域名称',
   CITY VARCHAR(32) NULL COMMENT '市域名称',
   COUNTY VARCHAR(32) NULL COMMENT '区县名称',
   DAY1 INTEGER NULL,
   DAY2 INTEGER NULL,
   DAY3 INTEGER NULL,
   DAY4 INTEGER NULL,
   DAY5 INTEGER NULL,
   DAY6 INTEGER NULL,
   DAY7 INTEGER NULL,
   DAY8 INTEGER NULL,
   DAY9 INTEGER NULL,
   DAY10 INTEGER NULL,
   DAY11 INTEGER NULL,
   DAY12 INTEGER NULL,
   DAY13 INTEGER NULL,
   DAY14 INTEGER NULL,
   DAY15 INTEGER NULL,
   DAY16 INTEGER NULL,
   DAY17 INTEGER NULL,
   DAY18 INTEGER NULL,
   DAY19 INTEGER NULL,
   DAY20 INTEGER NULL,
   DAY21 INTEGER NULL,
   DAY22 INTEGER NULL,
   DAY23 INTEGER NULL,
   DAY24 INTEGER NULL,
   DAY25 INTEGER NULL,
   DAY26 INTEGER NULL,
   DAY27 INTEGER NULL,
   DAY28 INTEGER NULL,
   DAY29 INTEGER NULL,
   DAY30 INTEGER NULL,
   DAY31 INTEGER NULL,
   CONSTRAINT PK PRIMARY KEY (MONTH,PROVINCE_ID,CITY_ID,COUNTY_ID)
) 
ENGINE = InnoDB
CHARACTER SET = utf8
COLLATE = utf8_general_ci
ROW_FORMAT = Dynamic
COMMENT '行政区划在线时长统计月表';

CREATE TABLE IF NOT EXISTS ACC_STATS_DETAIL
(
 MONITOR_ID VARCHAR(40) NOT NULL COMMENT '监控对象id',
 OPEN_TIME BIGINT NOT NULL COMMENT 'ACC开启时间（秒）',
 CLOSE_TIME BIGINT NULL COMMENT 'ACC关闭时间（秒）',
 MONITOR_NAME VARCHAR(32) NULL COMMENT '监控对象名称',
 DURATION BIGINT NULL COMMENT '持续时长（秒）',
 MILE DOUBLE NULL COMMENT '行驶公里数（km）',
 OPEN_LONGITUDE DOUBLE NULL COMMENT 'ACC开启经度',
 OPEN_LATITUDE DOUBLE NULL COMMENT 'ACC开启纬度',
 CLOSE_LONGITUDE DOUBLE NULL COMMENT 'ACC关闭经度',
 CLOSE_LATITUDE DOUBLE NULL COMMENT 'ACC关闭纬度',
 OPEN_LOCATION VARCHAR(100) NULL COMMENT 'ACC开启位置',
 CLOSE_LOCATION VARCHAR(100) NULL COMMENT 'ACC关闭位置',
 CONSTRAINT PK PRIMARY KEY (MONITOR_ID,OPEN_TIME)
)
ENGINE = InnoDB
CHARACTER SET = utf8
COLLATE = utf8_general_ci
ROW_FORMAT = Dynamic
COMMENT '监控对象ACC统计明细表';

CREATE TABLE IF NOT EXISTS GROUP_INFO_STATS_MONTH( 
 MONTH BIGINT NOT NULL COMMENT '当月1号0点秒值',
 GROUP_ID VARCHAR(40) NOT NULL COMMENT '企业id',
 MONITOR_NUM INTEGER COMMENT '监控对象数量',
 GROUP_NAME VARCHAR(32) COMMENT '企业名称',
 ACCESS_NUM INTEGER COMMENT '入网车辆数',
 UPLINE_NUM INTEGER COMMENT '上线车辆数',
 ACCESS_RATE DOUBLE COMMENT '入网率',
 UPLINE_RATE DOUBLE COMMENT '上线率',
 TRACK_FULL_RATE DOUBLE COMMENT '轨迹完整率',
 POSITIONAL_PASS_RATE DOUBLE COMMENT '数据合格率',
 DRIFT_RATE DOUBLE COMMENT '定位漂移率',
 OVER_SPEED_NUM INTEGER COMMENT '超速次数',
 FATIGUE_DURATION BIGINT COMMENT '疲劳驾驶时长（秒）',
 CONSTRAINT PK PRIMARY KEY (MONTH,GROUP_ID)
)
ENGINE = InnoDB
CHARACTER SET = utf8
COLLATE = utf8_general_ci
ROW_FORMAT = Dynamic
COMMENT '企业信息统计月表';

CREATE TABLE IF NOT EXISTS PLAT_CONNECT_STATS_MONTH
(
 MONTH BIGINT NOT NULL COMMENT '当月1号0点秒值',
 PLATFORM_ID VARCHAR(40) NOT NULL COMMENT '平台id',
 LINK_TYPE INTEGER NOT NULL COMMENT '链路连接类型 1：主链路 2：从链路',
 PLATFORM_NAME VARCHAR(32) NULL COMMENT '平台名称',
 CREATE_TIME BIGINT NULL COMMENT '平台创建时间',
 STATS_DAYS INTEGER NULL COMMENT '统计天数',
 ONLINE_DURATION INTEGER NULL COMMENT '在线时长',
 INTERRUPT_NUM INTEGER NULL COMMENT '中断次数',
 INTERRUPT_DURATION INTEGER NULL COMMENT '中断时长',
 ONLINE_RATE DOUBLE NULL COMMENT '在线率',
 CONSTRAINT PK PRIMARY KEY (MONTH,PLATFORM_ID,LINK_TYPE)
)
ENGINE = InnoDB
CHARACTER SET = utf8
COLLATE = utf8_general_ci
ROW_FORMAT = Dynamic
COMMENT '平台连接情况统计月表';

CREATE TABLE IF NOT EXISTS MONITOR_PASS_POINT_DETAIL
(
 MONITOR_ID VARCHAR(40) NOT NULL COMMENT '监控对象id',
 PASS_TIME BIGINT NOT NULL COMMENT '途经时间（毫秒值）',
 MONITOR_NAME VARCHAR(32) NULL COMMENT '监控对象名称',
 PASS_ID VARCHAR(40) NULL COMMENT '途经点id',
 PASS_NAME VARCHAR(32) NULL COMMENT '途经点名称',
 GROUP_ID VARCHAR(40) NULL COMMENT '企业id',
 GROUP_NAME VARCHAR(32) NULL COMMENT '企业名称',
 CONSTRAINT PK PRIMARY KEY (MONITOR_ID,PASS_TIME)
)
ENGINE = InnoDB
CHARACTER SET = utf8
COLLATE = utf8_general_ci
ROW_FORMAT = Dynamic
COMMENT '监控对象途经点明细表';

CREATE TABLE IF NOT EXISTS MONITOR_PASS_POINT_STATS
(
 MONITOR_ID VARCHAR(40) NOT NULL COMMENT '监控对象id',
 DAY BIGINT NOT NULL COMMENT '当天0点秒值',
 PASS_ID VARCHAR(40) NOT NULL COMMENT '途径点id',
 MONITOR_NAME VARCHAR(32) NULL COMMENT '监控对象名称',
 PASS_NAME VARCHAR(32) NULL COMMENT '途经点名称',
 PASS_NUM BIGINT NULL COMMENT '途经点数量',
 CONSTRAINT PK PRIMARY KEY (MONITOR_ID,DAY,PASS_ID)
)
ENGINE = InnoDB
CHARACTER SET = utf8
COLLATE = utf8_general_ci
ROW_FORMAT = Dynamic
COMMENT '监控对象途经点统计日表';

CREATE TABLE IF NOT EXISTS GROUP_PASS_POINT_STATS
(
 GROUP_ID VARCHAR(40) NOT NULL COMMENT '企业id',
 DAY BIGINT NOT NULL COMMENT '当天0点秒值',
 PASS_ID VARCHAR(40) NOT NULL COMMENT '途径点id',
 GROUP_NAME VARCHAR(32) NULL COMMENT '企业名称',
 PASS_NAME VARCHAR(32) NULL COMMENT '途经点名称',
 PASS_NUM BIGINT NULL COMMENT '途经点数量',
 CONSTRAINT PK PRIMARY KEY (GROUP_ID,DAY,PASS_ID)
)
ENGINE = InnoDB
CHARACTER SET = utf8
COLLATE = utf8_general_ci
ROW_FORMAT = Dynamic
COMMENT '企业途经点统计日表';

CREATE TABLE IF NOT EXISTS ALARM_FORWARD_INFO_MIDDLE
(
MONITOR_ID VARCHAR(40) NOT NULL COMMENT '监控对象id',
TIME BIGINT NOT NULL COMMENT '当前报警时间',
ALARM_TYPE INTEGER NOT NULL COMMENT '报警类型',
PLAT_ID VARCHAR(40) NOT NULL COMMENT '转发平台id',
STATUS TINYINT NULL COMMENT '报警处理状态',
MSG_SN BIGINT NULL COMMENT '报警流水号',
MSG_ID INTEGER NULL COMMENT '子业务类型',
ALARM_START_TIME BIGINT NULL COMMENT '报警开始时间',
RISK_EVENT_ID VARCHAR(64) NULL COMMENT '风险事件id',
PROTOCOL_TYPE INTEGER NULL COMMENT '转发平台协议类型',
ALARM_ID VARCHAR(50) NULL COMMENT '报警id',
REPORT_FLAG INTEGER NULL COMMENT '报警主动上报标识 0：未上报 1：已上报',
FAILURE_FLAG INTEGER NULL COMMENT '漏报标记 0漏报，1正常',
GROUP_ID VARCHAR(40) NULL COMMENT '企业id',
GROUP_NAME VARCHAR(32) NULL COMMENT '企业名称',
WARN_SRC INTEGER NULL COMMENT '报警来源 0x01:车载终端，0x02:企业监控平台，0x03:政府监管平台，0x09:其他',
CONSTRAINT PK PRIMARY KEY (MONITOR_ID,TIME,ALARM_TYPE,PLAT_ID)
)
ENGINE = InnoDB
CHARACTER SET = utf8
COLLATE = utf8_general_ci
ROW_FORMAT = Dynamic
COMMENT '报警转发中间表';

CREATE TABLE IF NOT EXISTS GROUP_FAILURE_ALARM_STATS
(
 DAY BIGINT NOT NULL COMMENT '当天0点秒值',
 GROUP_ID VARCHAR(40) NOT NULL COMMENT '企业id',
 GROUP_NAME VARCHAR(32) NULL COMMENT '企业名称',
 LINE_DEVIATE BIGINT NULL COMMENT '路线偏离报警数量',
 NOT_FOLLOW_LINE BIGINT NULL COMMENT '不按规定线路行驶报警数量',
 OUT_AREA BIGINT NULL COMMENT '出区域报警数量',
 ENTER_AREA BIGINT NULL COMMENT '进区域报警数量',
 OVER_SPEED BIGINT NULL COMMENT '超速报警数量',
 DRIVER_IDENTITY BIGINT NULL COMMENT '人证不符报警数量',
 FATIGUE BIGINT NULL COMMENT '疲劳驾驶报警数量',
 CONSTRAINT PK PRIMARY KEY (DAY,GROUP_ID)
)
ENGINE = InnoDB
CHARACTER SET = utf8
COLLATE = utf8_general_ci
ROW_FORMAT = Dynamic
COMMENT '企业漏报报警统计表';

DROP TABLE IF EXISTS TIRE_ORG_MONTH;
CREATE TABLE IF NOT EXISTS TIRE_ORG_MONTH(
 ORG_ID VARCHAR(40) NOT NULL COMMENT '企业id',
 DAY BIGINT NOT NULL COMMENT '当月1号0点秒值',
 ORG_NAME VARCHAR(32) COMMENT '企业名称',
 CNT_SUM INTEGER COMMENT '报警总数',
 CNT_DAY INTEGER COMMENT '白天报警总数',
 CNT_NIGHT INTEGER COMMENT '夜间报警总数',
 CNT_ACC INTEGER COMMENT '24小时累计报警总数',
 RANK INTEGER COMMENT '排名',
 CNT_MONITOR INTEGER COMMENT '监控对象总数',
 TIRE_TIME BIGINT COMMENT '疲劳驾驶时长（毫秒）',
 CONSTRAINT PK PRIMARY KEY (ORG_ID,DAY)
)
ENGINE = InnoDB
CHARACTER SET = utf8
COLLATE = utf8_general_ci
ROW_FORMAT = Dynamic
COMMENT '疲劳-企业-月统计';

DROP TABLE IF EXISTS TIRE_MONITOR_MONTH;
CREATE TABLE IF NOT EXISTS TIRE_MONITOR_MONTH(
 MONITOR_ID VARCHAR(40) NOT NULL COMMENT '监控对象id',
 DAY BIGINT NOT NULL COMMENT '当月1号0点秒值',
 MONITOR_NAME VARCHAR(32) COMMENT '监控对象名称',
 ORG_ID VARCHAR(40) COMMENT '企业id',
 ORG_NAME VARCHAR(32) COMMENT '企业名称',
 PLATE_COLOR INTEGER COMMENT '车牌颜色',
 VEHICLE_TYPE VARCHAR(20) COMMENT '车辆类型',
 CNT_SUM INTEGER COMMENT '报警总数',
 CNT_DAY INTEGER COMMENT '白天报警总数',
 CNT_NIGHT INTEGER COMMENT '夜间报警总数',
 CNT_ACC INTEGER COMMENT '24小时累计报警总数',
 RANK INTEGER COMMENT '排名',
 TIRE_TIME BIGINT COMMENT '疲劳驾驶时长（毫秒）',
 CONSTRAINT PK PRIMARY KEY (MONITOR_ID,DAY)
)
ENGINE = InnoDB
CHARACTER SET = utf8
COLLATE = utf8_general_ci
ROW_FORMAT = Dynamic
COMMENT '疲劳-车-月统计';

DROP TABLE IF EXISTS TIRE_MONITOR_MONTH_BY_ORG;
CREATE TABLE IF NOT EXISTS TIRE_MONITOR_MONTH_BY_ORG(
 ORG_ID VARCHAR(40) NOT NULL COMMENT '企业id',
 DAY BIGINT NOT NULL COMMENT '当月1号0点秒值',
 MONITOR_ID VARCHAR(40) NOT NULL COMMENT '监控对象id',
 MONITOR_NAME VARCHAR(32) COMMENT '监控对象名称',
 ORG_NAME VARCHAR(32) COMMENT '企业名称',
 PLATE_COLOR INTEGER COMMENT '车牌颜色',
 VEHICLE_TYPE VARCHAR(20) COMMENT '车辆类型',
 CNT_SUM INTEGER COMMENT '报警总数',
 CNT_DAY INTEGER COMMENT '白天报警总数',
 CNT_NIGHT INTEGER COMMENT '夜间报警总数',
 CNT_ACC INTEGER COMMENT '24小时累计报警总数',
 RANK INTEGER COMMENT '排名',
 TIRE_TIME BIGINT NULL COMMENT '疲劳驾驶时长（毫秒）',
 CONSTRAINT PK PRIMARY KEY (ORG_ID,DAY,MONITOR_ID)
)
ENGINE = InnoDB
CHARACTER SET = utf8
COLLATE = utf8_general_ci
ROW_FORMAT = Dynamic
COMMENT '疲劳-车-月统计(企业主键)';

DROP TABLE IF EXISTS OVERSPEED_ORG_MONTH;
CREATE TABLE IF NOT EXISTS OVERSPEED_ORG_MONTH(
 ORG_ID VARCHAR(40) NOT NULL,
 DAY BIGINT NOT NULL,
 ORG_NAME VARCHAR(32),
 CNT_SUM INTEGER,
 CNT_P_20_T_5 INTEGER,
 CNT_P_20_T_10 INTEGER,
 CNT_P_20_T_MAX INTEGER,
 CNT_P_50_T_5 INTEGER,
 CNT_P_50_T_10 INTEGER,
 CNT_P_50_T_MAX INTEGER,
 CNT_P_MAX_5 INTEGER,
 CNT_P_MAX_10 INTEGER,
 CNT_P_MAX_T_MAX INTEGER,
 RANK INTEGER ,
 CNT_MONITOR INTEGER,
 CONSTRAINT PK PRIMARY KEY (ORG_ID,DAY)
)
ENGINE = INNODB
CHARACTER SET = UTF8
COLLATE = UTF8_GENERAL_CI
ROW_FORMAT = DYNAMIC
COMMENT '超速-企业-月统计';

DROP TABLE IF EXISTS OVERSPEED_MONITOR_MONTH;
CREATE TABLE IF NOT EXISTS OVERSPEED_MONITOR_MONTH(
 MONITOR_ID VARCHAR(40) NOT NULL,
 DAY BIGINT NOT NULL,
 MONITOR_NAME VARCHAR(32),
 ORG_ID VARCHAR(40) ,
 ORG_NAME VARCHAR(32) ,
 PLATE_COLOR INTEGER,
 VEHICLE_TYPE VARCHAR(20),
 CNT_SUM INTEGER,
 CNT_P_20_T_5 INTEGER,
 CNT_P_20_T_10 INTEGER,
 CNT_P_20_T_MAX INTEGER,
 CNT_P_50_T_5 INTEGER,
 CNT_P_50_T_10 INTEGER,
 CNT_P_50_T_MAX INTEGER,
 CNT_P_MAX_5 INTEGER,
 CNT_P_MAX_10 INTEGER,
 CNT_P_MAX_T_MAX INTEGER,
 RANK INTEGER ,
 CONSTRAINT PK PRIMARY KEY (MONITOR_ID,DAY)
)
ENGINE = INNODB
CHARACTER SET = UTF8
COLLATE = UTF8_GENERAL_CI
ROW_FORMAT = DYNAMIC
COMMENT '超速-车-月统计';

DROP TABLE IF EXISTS OVERSPEED_MONITOR_MONTH_BY_ORG;
CREATE TABLE IF NOT EXISTS OVERSPEED_MONITOR_MONTH_BY_ORG(
 ORG_ID VARCHAR(40) NOT NULL ,
 DAY BIGINT NOT NULL,
 MONITOR_ID VARCHAR(40) NOT NULL,
 MONITOR_NAME VARCHAR(32),
 ORG_NAME VARCHAR(32),
 PLATE_COLOR INTEGER,
 VEHICLE_TYPE VARCHAR(20),
 CNT_SUM INTEGER,
 CNT_P_20_T_5 INTEGER,
 CNT_P_20_T_10 INTEGER,
 CNT_P_20_T_MAX INTEGER,
 CNT_P_50_T_5 INTEGER,
 CNT_P_50_T_10 INTEGER,
 CNT_P_50_T_MAX INTEGER,
 CNT_P_MAX_5 INTEGER,
 CNT_P_MAX_10 INTEGER,
 CNT_P_MAX_T_MAX INTEGER,
 RANK INTEGER,
 CONSTRAINT PK PRIMARY KEY (ORG_ID,DAY,MONITOR_ID)
)
ENGINE = INNODB
CHARACTER SET = UTF8
COLLATE = UTF8_GENERAL_CI
ROW_FORMAT = DYNAMIC
COMMENT '超速-车-月统计(企业主键)';

CREATE TABLE IF NOT EXISTS LINE_DEVIATE_MONITOR_MONTH
(
 MONITOR_ID VARCHAR(40) NOT NULL,
 MONTH BIGINT NOT NULL,
 MONITOR_NAME VARCHAR(32) NULL,
 ORG_ID VARCHAR(40) NULL,
 ORG_NAME VARCHAR(32) NULL,
 PLATE_COLOR INTEGER NULL,
 VEHICLE_TYPE VARCHAR(20) NULL,
 CNT_DEVIATE INTEGER NULL,
 CNT_FOLLOW INTEGER NULL,
 CNT_SUM INTEGER NULL,
 RANK INTEGER NULL,
 CONSTRAINT PK PRIMARY KEY (MONITOR_ID,MONTH)
)
ENGINE = INNODB
CHARACTER SET = UTF8
COLLATE = UTF8_GENERAL_CI
ROW_FORMAT = DYNAMIC
COMMENT '监控对象路线偏离统计月表';

CREATE TABLE IF NOT EXISTS LINE_DEVIATE_ORG_MONITOR_MONTH
(
 ORG_ID VARCHAR(40) NOT NULL,
 MONTH BIGINT NOT NULL,
 MONITOR_ID VARCHAR(40) NOT NULL,
 MONITOR_NAME VARCHAR(32) NULL,
 ORG_NAME VARCHAR(32) NULL,
 PLATE_COLOR INTEGER NULL,
 VEHICLE_TYPE VARCHAR(20) NULL,
 CNT_DEVIATE INTEGER NULL,
 CNT_FOLLOW INTEGER NULL,
 CNT_SUM INTEGER NULL,
 RANK INTEGER NULL,
 CONSTRAINT PK PRIMARY KEY (ORG_ID,MONTH,MONITOR_ID)
)
ENGINE = INNODB
CHARACTER SET = UTF8
COLLATE = UTF8_GENERAL_CI
ROW_FORMAT = DYNAMIC
COMMENT '监控对象企业关联统计月表';

CREATE TABLE IF NOT EXISTS LINE_DEVIATE_ORG_MONTH
(
 ORG_ID VARCHAR(40) NOT NULL,
 MONTH BIGINT NOT NULL,
 ORG_NAME VARCHAR(32) NULL,
 CNT_MONITOR INTEGER NULL,
 CNT_DEVIATE INTEGER NULL,
 CNT_FOLLOW INTEGER NULL,
 CNT_SUM INTEGER NULL,
 RANK INTEGER NULL,
 CONSTRAINT PK PRIMARY KEY (ORG_ID,MONTH)
)
ENGINE = INNODB
CHARACTER SET = UTF8
COLLATE = UTF8_GENERAL_CI
ROW_FORMAT = DYNAMIC
COMMENT '企业路线偏离统计月表';

CREATE TABLE IF NOT EXISTS LAST_VALID_LOCATION_OFFLINE
(
 DAY BIGINT NOT NULL,
 MONITOR_ID VARCHAR(40) NOT NULL,
 MONITOR_NAME VARCHAR(32) NULL,
 PLATE_COLOR INTEGER NULL,
 MONITOR_TYPE VARCHAR(10) NULL,
 GROUP_NAME VARCHAR(32) NULL,
 LAST_LOCATION VARCHAR(100) NULL,
 LAST_TIME BIGINT NULL,
 LAST_SPEED VARCHAR(20) NULL,
 CONSTRAINT PK PRIMARY KEY (DAY,MONITOR_ID)
)
ENGINE = INNODB
CHARACTER SET = UTF8
COLLATE = UTF8_GENERAL_CI
ROW_FORMAT = DYNAMIC
COMMENT '最后一条有效定位表（离线统计用）';

CREATE TABLE IF NOT EXISTS LOCATION_INTERRUPT_DETAIL
(
 START_TIME BIGINT NOT NULL COMMENT '当日0点时间戳（秒值）',
 MONITOR_ID VARCHAR(40) NOT NULL COMMENT '监控对象id',
 MONITOR_NAME VARCHAR(32) NULL COMMENT '监控对象名称',
 PLATE_COLOR INTEGER NULL COMMENT '车牌颜色',
 MONITOR_TYPE VARCHAR(20) NULL COMMENT '监控对象类型',
 GROUP_NAME VARCHAR(32) NULL COMMENT '企业名称',
 INTERRUPT_TIME BIGINT NULL COMMENT '中断时长',
 END_TIME BIGINT NULL COMMENT '当前定位时间（秒值）',
 START_LOCATION VARCHAR(50) NULL COMMENT '中断开始位置',
 END_LOCATION VARCHAR(50) NULL COMMENT '中断结束位置',
 CONSTRAINT PK PRIMARY KEY (START_TIME,MONITOR_ID)
)
ENGINE = INNODB
CHARACTER SET = UTF8
COLLATE = UTF8_GENERAL_CI
ROW_FORMAT = DYNAMIC
COMMENT '定位中断明细表';

CREATE TABLE IF NOT EXISTS OFFLINE_DISPLACE_DETAIL
(
 END_TIME BIGINT NOT NULL COMMENT '位移结束时间（秒值）',
 MONITOR_ID VARCHAR(40) NOT NULL COMMENT '监控对象id',
 MONITOR_NAME VARCHAR(32) NULL COMMENT '监控对象名称',
 PLATE_COLOR INTEGER NULL COMMENT '车牌颜色',
 MONITOR_TYPE VARCHAR(20) NULL COMMENT '监控对象类型',
 GROUP_NAME VARCHAR(32) NULL COMMENT '企业名称',
 START_TIME BIGINT NULL COMMENT '位移开始时间（秒值）',
 DISPLACE_MILE DOUBLE NULL COMMENT '离线位移里程',
 SPEED VARCHAR(20) NULL COMMENT '速度',
 LEVEL VARCHAR(10) NULL COMMENT '等级',
 DATA_STATUS VARCHAR(20) NULL COMMENT '数据状态',
 MONITOR_PROCESS VARCHAR(20) NULL COMMENT '监控对象处理数',
 REMARK VARCHAR(20) NULL COMMENT '备注',
 END_LONLAT VARCHAR(50) NULL COMMENT '结束经纬度',
 START_LONLAT VARCHAR(50) NULL COMMENT '开始经纬度',
 CONSTRAINT PK PRIMARY KEY (END_TIME,MONITOR_ID)
)
ENGINE = INNODB
CHARACTER SET = UTF8
COLLATE = UTF8_GENERAL_CI
ROW_FORMAT = DYNAMIC
COMMENT '离线位移明细表';

CREATE TABLE IF NOT EXISTS LOCATION_STATS_DETAIL
(
 DAY BIGINT NOT NULL COMMENT '当日0点时间戳（秒值）',
 MONITOR_ID VARCHAR(40) NOT NULL COMMENT '监控对象id',
 MONITOR_NAME VARCHAR(32) NULL COMMENT '监控对象名称',
 PLATE_COLOR INTEGER NULL COMMENT '车牌颜色',
 MONITOR_TYPE VARCHAR(10) NULL COMMENT '监控对象类型',
 GROUP_NAME VARCHAR(32) NULL COMMENT '企业名称',
 TOTAL INTEGER NULL COMMENT '累计定位总数',
 INVALID INTEGER NULL COMMENT '累计无效数',
 INTERRUPT INTEGER NULL COMMENT '累计中断数',
 OFFLINE_DISPLACE INTEGER NULL COMMENT '累计离线位移数',
 POS_VALID INTEGER NULL COMMENT '位置有效数',
 POS_INVALID INTEGER NULL COMMENT '位置无效数',
 POS_TOTAL INTEGER NULL COMMENT '累计位置数量',
 CONSTRAINT PK PRIMARY KEY (DAY,MONITOR_ID)
)
ENGINE = INNODB
CHARACTER SET = UTF8
COLLATE = UTF8_GENERAL_CI
ROW_FORMAT = DYNAMIC
COMMENT '定位统计明细表';

CREATE TABLE IF NOT EXISTS VEHICLE_DEVICE_RUNNING_STATUS( 
 GROUP_ID VARCHAR(40) NOT NULL COMMENT '企业id',
 TIME BIGINT NOT NULL COMMENT '数据时间（秒值）',
 DATA_SOURCE INTEGER NOT NULL COMMENT '0:0x0200 1:0x0712',
 MONITOR_ID VARCHAR(40) NOT NULL COMMENT '监控对象id',
 MONITOR_NAME VARCHAR(32) COMMENT '监控对象名称',
 ASSIGNMENT_NAME VARCHAR(1000) COMMENT '分组名称',
 GROUP_NAME VARCHAR(1000) COMMENT '企业名称',
 PLATE_COLOR INTEGER COMMENT '车牌颜色 1:蓝色 2:黄色 3:黑色 4:白色 5:绿色 9:其他 93:黄绿色 94:渐变绿色',
 VEHICLE_TYPE VARCHAR(20) COMMENT '车辆类型',
 ORIGINAL_LONGITUDE VARCHAR(20) COMMENT '经度',
 ORIGINAL_LATITUDE VARCHAR(20) COMMENT '纬度',
 ALTITUDE INTEGER COMMENT '海拔高度(单位:米)',
 SPEED DOUBLE COMMENT 'gps速度(单位:1km/h)',
 DIRECTION INTEGER COMMENT '方向(0-359),正北为0,顺时针',
 VEHICLE_SPEED DOUBLE COMMENT '原车速度(单位:1km/h)',
 AXIS_ACCELERATION_X DOUBLE COMMENT 'X轴加速度(单位:g)',
 AXIS_ACCELERATION_Y DOUBLE COMMENT 'Y轴加速度(单位:g)',
 AXIS_ACCELERATION_Z DOUBLE COMMENT 'Z轴加速度(单位:g)',
 AXIS_ANGULAR_X DOUBLE COMMENT 'X轴角速度(单位:rad/s)',
 AXIS_ANGULAR_Y DOUBLE COMMENT 'Y轴角速度(单位:rad/s)',
 AXIS_ANGULAR_Z DOUBLE COMMENT 'Z轴角速度(单位:rad/s)',
 BRAKING_STATUS INTEGER COMMENT '制定状态(0:无制定 1:制定)',
 TURN_SIGNAL_STATUS INTEGER COMMENT '转向灯状态(0:未开方向灯 1:左转方向灯 2:右转方向灯)',
 HIGH_BEAM_STATUS INTEGER COMMENT '远光状态 0:关 1:开',
 LOW_BEAM_STATUS INTEGER COMMENT '近光状态 0:关 1:开',
 OBD_SPEED DOUBLE COMMENT 'OBD速度(单位:1km/h)',
 GEAR_STATUS INTEGER COMMENT '档位状态 0:空挡 1-9:档位 10:倒挡 11:驻车档',
 ACCELERATOR_PEDAL_VALUE INTEGER COMMENT '加速踏板行程值',
 BRAKE_PEDAL_VALUE INTEGER COMMENT '制动踏板行程值',
 ENGINE_SPEED INTEGER COMMENT '发动机转速(单位:RPM)',
 STEERING_WHEEL_ANGLE INTEGER COMMENT '方向盘角度(顺时针为正，逆时针为负)',
 AIR_STATUS INTEGER COMMENT '空调状态 0:关 1:开',
 HEATER_STATUS INTEGER COMMENT '加热器状态 0:关 1:开',
 CLUTCH_STATUS INTEGER COMMENT '离合器状态 0:关 1:开',
 ABS_STATUS INTEGER COMMENT 'ABS状态 0:关 1:开',
 CLEARANCE_LAMP_STATUS INTEGER COMMENT '示廓灯状态 0:关 1:开',
 POWER_STATUS INTEGER COMMENT '主电源状态 0:正常 1:欠压 2:掉电',
 SPARE_BATTERY_STATUS INTEGER COMMENT '备用电源状态 0:正常 1:欠压 2:掉电',
 GPS_STATUS INTEGER COMMENT '卫星定位模块状态 0:正常 1:故障',
 TTS_STATUS INTEGER COMMENT 'TTS模块状态 0:正常 1:故障',
 MEMORY_STATUS INTEGER COMMENT '存储器状态 0:正常 1:故障',
 SPARE_MEMORY_STATUS INTEGER COMMENT '备用存储器状态 0:正常 1:故障',
 CONSTRAINT PK PRIMARY KEY (GROUP_ID,TIME,DATA_SOURCE,MONITOR_ID)
)
ENGINE = INNODB
CHARACTER SET = UTF8
COLLATE = UTF8_GENERAL_CI
ROW_FORMAT = DYNAMIC
COMMENT '车辆与终端运行状态信息表';

CREATE TABLE IF NOT EXISTS DEVICE_REQUEST_REPAIR( 
 GROUP_ID VARCHAR(40) NOT NULL COMMENT '企业id',
 TIME BIGINT NOT NULL COMMENT '报修时间(秒)',
 TYPE INTEGER NOT NULL COMMENT '故障类型 （主键）0:主存储器异常 1:备用存储器异常 2:卫星信号异常 3:通信信息号异常 4:备用电池欠压 5: 备用电池失效 6:IC卡从业资格证模块故障',
 MONITOR_ID VARCHAR(40) NOT NULL COMMENT '监控对象id',
 MONITOR_NAME VARCHAR(32) COMMENT '监控对象名称',
 ASSIGNMENT_NAME VARCHAR(1000) COMMENT '分组名称',
 GROUP_NAME VARCHAR(32) COMMENT '企业名称',
 PLATE_COLOR INTEGER COMMENT '车牌颜色 1:蓝色 2:黄色 3:黑色 4:白色 5:绿色 9:其他 93:黄绿色 94:渐变绿色',
 VEHICLE_TYPE VARCHAR(20) COMMENT '车辆类型',
 DEVICE_ID VARCHAR(40) COMMENT '终端id',
 TERMINAL_VENDOR VARCHAR(40) COMMENT '终端厂商',
 TERMINAL_TYPE VARCHAR(100) COMMENT '终端型号',
 DEVICE_NUMBER VARCHAR(100) COMMENT '终端编号',
 HANDLE_STATUS INTEGER COMMENT '故障处理状态  0:未确认 1:已确认 2:已完成 3:误报',
 REPAIR_DATE BIGINT COMMENT '维修日期 (秒)',
 CONFIRM_REMARK VARCHAR(500) COMMENT '确认报修备注',
 FINISH_REMARK VARCHAR(500) COMMENT '完成维修备注',
 CONSTRAINT PK PRIMARY KEY (GROUP_ID,TIME,TYPE,MONITOR_ID)
)
ENGINE = INNODB
CHARACTER SET = UTF8
COLLATE = UTF8_GENERAL_CI
ROW_FORMAT = DYNAMIC
COMMENT '设备报修表';

CREATE TABLE IF NOT EXISTS PLAT_CONNECT_INFO
(
 LINK_TIME BIGINT NOT NULL COMMENT '上传时间(毫秒)',
 PLATFORM_ID VARCHAR(40) NOT NULL COMMENT '平台id',
 PLATFORM_NAME VARCHAR(32) NULL COMMENT '平台名称',
 LINK_TYPE INTEGER NULL COMMENT '链路连接类型 1：主链路 2：从链路',
 LINK_STATUS INTEGER NULL COMMENT '链路连接状态 0：连接失败/断开连接 1：连接成功 9：心跳',
 SOURCE_TYPE INTEGER NULL COMMENT '平台链路类型 1：转入 2：转出',
 CONSTRAINT PK PRIMARY KEY (LINK_TIME,PLATFORM_ID)
)
ENGINE = INNODB
CHARACTER SET = UTF8
COLLATE = UTF8_GENERAL_CI
ROW_FORMAT = DYNAMIC
COMMENT '平台连接信息表';

CREATE TABLE GROUP_VEH_ONLINE (
  GROUP_ID VARCHAR(40) NOT NULL COMMENT '企业id',
  TIME BIGINT NOT NULL COMMENT 'yyyyMMddHH（毫秒）',
  VEHICLE_ID VARCHAR(40) NOT NULL COMMENT '车辆id',
  FLAG INTEGER COMMENT '在线标识 1表示在线',
  CONSTRAINT PK PRIMARY KEY (GROUP_ID,TIME,VEHICLE_ID)
)
ENGINE = INNODB
CHARACTER SET = UTF8
COLLATE = UTF8_GENERAL_CI
ROW_FORMAT = DYNAMIC
COMMENT '企业上线排行表';

CREATE TABLE DRIVER_STATISTICS
(
 CARD_NUMBER VARCHAR(62) NOT NULL COMMENT '从业资格证号唯一标识',
 INSERT_CARD_TIME BIGINT NOT NULL COMMENT '插卡时间',
 MONITOR_ID VARCHAR(40) NULL COMMENT '监控对象id',
 TRAVEL_START_TIME VARCHAR(5000) NULL COMMENT '每段行驶开始时间',
 TRAVEL_END_TIME VARCHAR(5000) NULL COMMENT '每段行驶结束时间',
 TRAVEL_START_MILE VARCHAR(500) NULL COMMENT '每段行驶开始里程',
 TRAVEL_END_MILE VARCHAR(500) NULL COMMENT '每段行驶结束里程',
 ZERO_TIME_MILE DOUBLE NULL COMMENT '接近0点里程',
 REST_START_TIME VARCHAR(5000) NULL COMMENT '每段休息开始时间',
 REST_END_TIME VARCHAR(5000) NULL COMMENT '每段休息结束时间',
 DRIVER_NAME VARCHAR(32) NULL COMMENT '驾驶员姓名',
 MONITOR_NAME VARCHAR(32) NULL COMMENT '监控对象名称',
 GROUP_ID VARCHAR(40) NULL COMMENT '所属企业id',
 REMOVE_CARD_TIME BIGINT NULL COMMENT '拔卡时间',
 CONSTRAINT PK PRIMARY KEY (CARD_NUMBER,INSERT_CARD_TIME)
)
ENGINE = INNODB
CHARACTER SET = UTF8
COLLATE = UTF8_GENERAL_CI
ROW_FORMAT = DYNAMIC
COMMENT '驾驶员统计信息表';

CREATE TABLE IF NOT EXISTS LAST_VALID_LOCATION
(
 MONITOR_ID VARCHAR(40) NOT NULL COMMENT '监控对象id',
 MONITOR_NAME VARCHAR(32) NULL COMMENT '监控对象名称',
 PLATE_COLOR INTEGER NULL COMMENT '车牌颜色',
 MONITOR_TYPE VARCHAR(20) NULL COMMENT '监控对象类型',
 GROUP_NAME VARCHAR(32) NULL COMMENT '企业名称',
 LAST_LOCATION VARCHAR(50) NULL COMMENT '最后一条有效位置',
 LAST_TIME BIGINT NULL COMMENT '最后一条有效位置时间（秒值）',
 CONSTRAINT PK PRIMARY KEY (MONITOR_ID)
)
ENGINE = INNODB
CHARACTER SET = UTF8
COLLATE = UTF8_GENERAL_CI
ROW_FORMAT = DYNAMIC
COMMENT '最后一条有效定位表';

CREATE TABLE POSITION_INFO
(
   LONGITUDE DOUBLE NOT NULL COMMENT '经度',
   LATITUDE DOUBLE NOT NULL COMMENT '纬度',
   ADCODE VARCHAR(20) NULL COMMENT '区域编码',
   BUILDING VARCHAR(30) NULL COMMENT '所在楼/大厦',
   BUILDING_TYPE VARCHAR(20) NULL COMMENT '楼类型',
   CITY VARCHAR(20) NULL COMMENT '城市名',
   CITY_CODE VARCHAR(10) NULL COMMENT '城市编码',
   DISTRICT VARCHAR(20) NULL COMMENT '所在区',
   NEIGHBORHOOD VARCHAR(30) NULL COMMENT '所在社区',
   NEIGHBORHOOD_TYPE VARCHAR(20) NULL COMMENT '社区类型',
   PROVINCE VARCHAR(20) NULL COMMENT '省份名',
   STREET VARCHAR(20) NULL COMMENT '所在街道',
   STREET_NUMBER VARCHAR(20) NULL COMMENT '门牌号',
   TOWNSHIP VARCHAR(20) NULL COMMENT '所在乡镇',
   CROSSES VARCHAR(30) NULL COMMENT '道路路口',
   FORMATTED_ADDRESS VARCHAR(200) NULL COMMENT '格式化地址',
   POIS VARCHAR(30) NULL COMMENT '兴趣点基本信息',
   ROADS VARCHAR(30) NULL COMMENT '道路信息',
   CONSTRAINT PK PRIMARY KEY (LONGITUDE,LATITUDE)
)
ENGINE = INNODB
CHARACTER SET = UTF8
COLLATE = UTF8_GENERAL_CI
ROW_FORMAT = DYNAMIC
COMMENT '逆地址信息表';

CREATE TABLE IF NOT EXISTS VIDEO_POLLING_DETAIL
(
    START_TIME BIGINT NOT NULL,
    STATUS INTEGER NOT NULL,
    CHANNEL_NUM INTEGER NOT NULL,
    MONITOR_ID VARCHAR(40) NOT NULL,
    MONITOR_NAME VARCHAR(32) NULL,
    PLATE_COLOR INTEGER NULL,
    MONITOR_TYPE VARCHAR(10) NULL,
    GROUP_NAME VARCHAR(32) NULL,
    FAIL_REASON VARCHAR(100) NULL,
    CONSTRAINT PK PRIMARY KEY (START_TIME,STATUS,CHANNEL_NUM,MONITOR_ID)
)
ENGINE = INNODB
CHARACTER SET = UTF8
COLLATE = UTF8_GENERAL_CI
ROW_FORMAT = DYNAMIC
COMMENT '视频巡检明细表';

CREATE TABLE IF NOT EXISTS ISSUE_MESSAGE_DETAIL
(
    ISSUE_TIME BIGINT NOT NULL,
    ISSUE_TYPE INTEGER NOT NULL,
    ISSUE_STATUS INTEGER NOT NULL,
    MONITOR_ID VARCHAR(40) NOT NULL,
    PLAY_TYPE VARCHAR(20) NULL,
    MONITOR_NAME VARCHAR(32) NULL,
    PLATE_COLOR INTEGER(10) NULL,
    MONITOR_TYPE VARCHAR(10) NULL,
    GROUP_NAME VARCHAR(32) NULL,
    ISSUE_PEOPLE VARCHAR(30) NULL,
    MESSAGE_INFO VARCHAR(200) NULL,
    MSG_ID INTEGER NULL,
    FAIL_REASON VARCHAR(20) NULL,
    CONSTRAINT PK PRIMARY KEY (ISSUE_TIME,ISSUE_TYPE,ISSUE_STATUS,MONITOR_ID)
)
ENGINE = INNODB
CHARACTER SET = UTF8
COLLATE = UTF8_GENERAL_CI
ROW_FORMAT = DYNAMIC
COMMENT '下发消息统计明细表';

CREATE TABLE LAST_ALARM_HANDLE
(
    MONITOR_ID VARCHAR(40) NOT NULL COMMENT '监控对象id',
    ALARM_START_TIME BIGINT NULL COMMENT '报警开始时间',
    MONITOR_NAME VARCHAR(32) NULL COMMENT '监控对象名称',
    ALARM_START_LOCATION VARCHAR(50) NULL COMMENT '报警开始位置',
    MONITOR_TYPE INTEGER NULL COMMENT '监控对象类型',
    CONSTRAINT PK PRIMARY KEY (MONITOR_ID)
)
ENGINE = INNODB
CHARACTER SET = UTF8
COLLATE = UTF8_GENERAL_CI
ROW_FORMAT = DYNAMIC
COMMENT 'APP最后一次报警表';

CREATE TABLE IF NOT EXISTS VEHICLE_ONLINE_MONTH
(
   MONITOR_ID VARCHAR(40) NOT NULL,
   GROUP_ID VARCHAR(40) NOT NULL,
   MONTH_DATE BIGINT NOT NULL,
   DAY1 INTEGER NULL,
   DAY2 INTEGER NULL,
   DAY3 INTEGER NULL,
   DAY4 INTEGER NULL,
   DAY5 INTEGER NULL,
   DAY6 INTEGER NULL,
   DAY7 INTEGER NULL,
   DAY8 INTEGER NULL,
   DAY9 INTEGER NULL,
   DAY10 INTEGER NULL,
   DAY11 INTEGER NULL,
   DAY12 INTEGER NULL,
   DAY13 INTEGER NULL,
   DAY14 INTEGER NULL,
   DAY15 INTEGER NULL,
   DAY16 INTEGER NULL,
   DAY17 INTEGER NULL,
   DAY18 INTEGER NULL,
   DAY19 INTEGER NULL,
   DAY20 INTEGER NULL,
   DAY21 INTEGER NULL,
   DAY22 INTEGER NULL,
   DAY23 INTEGER NULL,
   DAY24 INTEGER NULL,
   DAY25 INTEGER NULL,
   DAY26 INTEGER NULL,
   DAY27 INTEGER NULL,
   DAY28 INTEGER NULL,
   DAY29 INTEGER NULL,
   DAY30 INTEGER NULL,
   DAY31 INTEGER NULL,
   GROUP_NAME VARCHAR(32),
   PLATE_COLOR VARCHAR(20),
   VEHICLE_TYPE VARCHAR(20),
   MONITOR_NAME VARCHAR(32),
   CONSTRAINT PK PRIMARY KEY (MONITOR_ID,GROUP_ID,MONTH_DATE)
)
ENGINE = INNODB
CHARACTER SET = UTF8
COLLATE = UTF8_GENERAL_CI
ROW_FORMAT = DYNAMIC
COMMENT '车辆在线月表';
