| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163 |
- /*
- Navicat MySQL Data Transfer
- Source Server : 192.168.0.22
- Source Server Version : 50735
- Source Host : 192.168.0.22:3306
- Source Database : epp
- Target Server Type : MYSQL
- Target Server Version : 50735
- File Encoding : 65001
- Date: 2022-01-26 10:29:41
- */
- SET FOREIGN_KEY_CHECKS=0;
- -- ----------------------------
- -- Table structure for notice_receive
- -- ----------------------------
- DROP TABLE IF EXISTS `notice_receive`;
- CREATE TABLE `notice_receive` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `receiver_id` varchar(20) NOT NULL COMMENT '收件人id',
- `notice_send_id` bigint(20) NOT NULL COMMENT '发件箱id',
- `title` varchar(255) NOT NULL COMMENT '主题',
- `content` text NOT NULL COMMENT '内容',
- `attachment` varchar(100) DEFAULT NULL COMMENT '附件',
- `is_look` tinyint(1) DEFAULT '0' COMMENT '是否查看;0:未查看 1:已查看',
- `is_del` tinyint(1) DEFAULT '0' COMMENT '是否删除,0:未删除;1:已删除。',
- `update_time` bigint(20) DEFAULT NULL COMMENT '更新时间;yyyyMMddHHmmss',
- `sender_id` varchar(20) NOT NULL COMMENT '发件人id',
- `receiver_ids` text COMMENT '接收人ids,id以","分隔',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='消息通知-收件箱';
- -- ----------------------------
- -- Records of notice_receive
- -- ----------------------------
- -- ----------------------------
- -- Table structure for notice_send
- -- ----------------------------
- DROP TABLE IF EXISTS `notice_send`;
- CREATE TABLE `notice_send` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `title` varchar(255) NOT NULL COMMENT '主题',
- `content` text NOT NULL COMMENT '内容',
- `attachment` varchar(100) DEFAULT NULL COMMENT '附件',
- `receiver_ids` text NOT NULL COMMENT '接收人ids,id以","分隔',
- `is_send` tinyint(1) DEFAULT '0' COMMENT '是否发送;0:草稿;1:已发送',
- `is_del` tinyint(1) DEFAULT '0' COMMENT '是否删除,0:未删除;1:已删除。',
- `update_time` bigint(20) DEFAULT NULL COMMENT '创建时间;yyyyMMddHHmmss',
- `sender_id` varchar(20) NOT NULL COMMENT '发件人id',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='消息通知-发件箱';
- -- ----------------------------
- -- Records of notice_send
- -- ----------------------------
- -- ----------------------------
- -- Table structure for push_events
- -- ----------------------------
- DROP TABLE IF EXISTS `push_events`;
- CREATE TABLE `push_events` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `user_id` int(11) NOT NULL COMMENT '用户id',
- `company_id` int(11) NOT NULL COMMENT '企业id',
- `monitor_id` bigint(20) NOT NULL COMMENT '设备id',
- `event_content` text NOT NULL COMMENT '发生异常企业id',
- `event_time` bigint(20) NOT NULL COMMENT '报警时间',
- `read_flag` tinyint(1) NOT NULL COMMENT '0:未读,1:已读',
- `type` int(1) NOT NULL COMMENT '0:web,1:app,2:wechat,3:message',
- `event_code` varchar(20) DEFAULT NULL COMMENT '报警类型,见epp_sysbase.t_sys_dictory',
- `first_search_time` bigint(20) DEFAULT NULL COMMENT '客户端首次查询的时间(列表接口)',
- `read_time` bigint(20) DEFAULT NULL COMMENT '客户端已读的时间(打开详情已读)',
- `warn_id` bigint(20) DEFAULT NULL,
- `create_time` bigint(20) DEFAULT NULL COMMENT '报警产生的时间',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='告警推送';
- -- ----------------------------
- -- Records of push_events
- -- ----------------------------
- -- ----------------------------
- -- Table structure for report_set
- -- ----------------------------
- DROP TABLE IF EXISTS `report_set`;
- CREATE TABLE `report_set` (
- `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '唯一id',
- `name` varchar(100) DEFAULT NULL COMMENT '报表名称',
- `org_id` int(11) DEFAULT NULL COMMENT '所属机构id',
- `display` varchar(200) DEFAULT NULL COMMENT '显示列',
- `createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `type` tinyint(4) DEFAULT NULL COMMENT '分类;0:异常告警;1:停限产',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='报表配置表';
- -- ----------------------------
- -- Records of report_set
- -- ----------------------------
- -- ----------------------------
- -- Table structure for t_warn
- -- ----------------------------
- DROP TABLE IF EXISTS `t_warn`;
- CREATE TABLE `t_warn` (
- `id` bigint(20) NOT NULL COMMENT '主键',
- `org_id` int(11) DEFAULT NULL COMMENT '机构id',
- `company_id` int(20) NOT NULL COMMENT '企业id',
- `industry` varchar(20) DEFAULT NULL COMMENT '企业所属行业编码',
- `warn_type` varchar(20) NOT NULL,
- `warn_state` varchar(20) NOT NULL COMMENT '告警状态:0未恢复1 已恢复 ',
- `workshop_monitor_id` bigint(20) DEFAULT NULL COMMENT '车间监测点id',
- `cw_virtual_monitor_id` bigint(20) DEFAULT NULL COMMENT '产污虚拟监测点',
- `zw_virtual_monitor_id` bigint(20) DEFAULT NULL COMMENT '治污虚拟监测点',
- `cw_group_id` bigint(20) DEFAULT NULL COMMENT '产污分组id',
- `cw_monitor_ids` varchar(200) DEFAULT NULL COMMENT '产污监测点列表',
- `cw_monitor_id` bigint(20) DEFAULT NULL COMMENT '产污监测点id',
- `zw_group_id` bigint(20) DEFAULT NULL COMMENT '治污分组id',
- `zw_monitor_ids` varchar(200) DEFAULT NULL COMMENT '治污监测点列表',
- `zw_monitor_id` bigint(20) DEFAULT NULL COMMENT '治污监测点id',
- `update_date` bigint(20) DEFAULT NULL COMMENT '告警时间(创建时间)',
- `create_time` bigint(20) DEFAULT NULL COMMENT '(如果告警持续,该时间会更新)',
- `plan_id` bigint(20) DEFAULT NULL COMMENT '方案id',
- `pfg_id` bigint(20) DEFAULT NULL COMMENT '产污设施分组ID',
- `plan_warn_type` varchar(20) DEFAULT NULL COMMENT '方案告警的异常类型',
- `plan_excute_id` bigint(20) DEFAULT NULL COMMENT '方案执行的id',
- `workshop_monitor_ids` varchar(200) DEFAULT NULL COMMENT '车间监测点列表',
- `process_info` text COMMENT '过程信息(记录配置信息,计算结果等重要过程信息){"cw":[["id:14","ptv:90.000","spt:5"]],"zw":[["id:16","ptv:100.000","plt:5","prt:20190116163500~20190116164000"]],"zwTerminalPower":90.883000,"zwg":[["id:3","ac:1","lrt:1"]]}cw:告警产污列表信息 id:编号 ptv:负荷阈值 spt:负荷告警最短持续时间;zw:告警治污列表信息 id:编号 ptv:负荷阈值 plt:负荷控制持续时间 prt:持续时间描述;zwg:告警治污列表信息 id:编号 ac:分组治污设备总数 lrt:分组至少开启治污设备数量;zwTerminalPower:告警发生时产污设备的负荷',
- `abnormal_id` bigint(20) DEFAULT NULL COMMENT '治污异常申报id',
- `abnormal_create_date` bigint(20) DEFAULT NULL COMMENT '治污异常申报时间',
- `abnormal_declare_state` tinyint(1) DEFAULT NULL COMMENT '逾期状态;0:正常申报;1:逾期申报;',
- `abnormal_state` varchar(15) DEFAULT '000170001' COMMENT '申报状态,000170001:未申报;000170002:未审核;000170003;审核通过;000170004:审核未通过',
- PRIMARY KEY (`id`),
- KEY `planMonitorIndex` (`company_id`,`plan_id`,`cw_monitor_id`) USING BTREE,
- KEY `planGroupIndex` (`company_id`,`plan_id`,`pfg_id`) USING BTREE,
- KEY `warnIndex` (`warn_type`,`update_date`,`warn_state`) USING BTREE
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='报警表,只存储治污报警、限产报警;000090007,000090010';
- -- ----------------------------
- -- Records of t_warn
- -- ----------------------------
- -- ----------------------------
- -- Table structure for warn_events_history
- -- ----------------------------
- DROP TABLE IF EXISTS `warn_events_history`;
- CREATE TABLE `warn_events_history` (
- `id` bigint(20) NOT NULL,
- `company_id` int(20) NOT NULL COMMENT '企业id',
- `monitor_id` bigint(20) NOT NULL COMMENT '设备id',
- `start_time` bigint(20) DEFAULT NULL COMMENT '开始时间',
- `end_time` bigint(20) DEFAULT NULL COMMENT '结束时间',
- `state` char(1) NOT NULL COMMENT '状态 0:小于等于阈值 1:大于阈值',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='设备上电、停机告警、设备停电事件历史记录';
- -- ----------------------------
- -- Records of warn_events_history
- -- ----------------------------
|