/*
SQLyog Ultimate v8.7 
MySQL - 5.5.68-MariaDB : Database - DataDashBoard
*********************************************************************
*/


/*!40101 SET NAMES utf8 */;

/*!40101 SET SQL_MODE=''*/;

/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`DataDashBoard` /*!40100 DEFAULT CHARACTER SET utf8 */;

USE `DataDashBoard`;

/*Table structure for table `yt_t_devices` */

DROP TABLE IF EXISTS `yt_t_devices`;

CREATE TABLE `yt_t_devices` (
  `UQ_DEVICE_ID` varchar(40) NOT NULL COMMENT '设备编码',
  `UQ_DEVICETYPE_ID` varchar(40) NOT NULL COMMENT '设备类型编码',
  `UQ_STATION_ID` varchar(40) NOT NULL COMMENT '站点编码',
  `V_DEVICENAME` varchar(240) NOT NULL COMMENT '设备名称',
  `V_LOCATION` varchar(240) DEFAULT NULL COMMENT '安装部署地址',
  `V_DEVICEPIC` varchar(240) DEFAULT NULL COMMENT '设备图片',
  `V_VIDEOURL` varchar(240) DEFAULT NULL COMMENT '设备图像预览地址',
  `D_STORETIME` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`UQ_DEVICE_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `yt_t_devices` */

insert  into `yt_t_devices`(`UQ_DEVICE_ID`,`UQ_DEVICETYPE_ID`,`UQ_STATION_ID`,`V_DEVICENAME`,`V_LOCATION`,`V_DEVICEPIC`,`V_VIDEOURL`,`D_STORETIME`) values ('0752bbcf-c8a1-480b-85fb-b817fb5dc823','528d7050-80bb-4b0e-b743-4d5ca77c8f2a','a5f41517-44be-4565-b27b-c9cc044c5061','2#可燃气体侦测装置',NULL,NULL,NULL,'2021-06-17 13:33:43'),('3ba40309-142e-4fc3-905a-4a638cb43311','528d7050-80bb-4b0e-b743-4d5ca77c8f2a','a5f41517-44be-4565-b27b-c9cc044c5061','1#可燃气体侦测装置',NULL,NULL,NULL,'2021-06-17 13:31:52'),('7c2fb0f7-328e-48a6-9bcf-5cc713993262','7bb16bc5-6998-4d75-a783-e404f5d62f4b','a5f41517-44be-4565-b27b-c9cc044c5061','2#电气火灾侦测装置',NULL,NULL,NULL,'2021-06-17 13:28:56'),('86a34a13-f468-4450-91fb-b55389d630c8','7bb16bc5-6998-4d75-a783-e404f5d62f4b','a5f41517-44be-4565-b27b-c9cc044c5061','3#电气火灾侦测装置',NULL,NULL,NULL,'2021-06-17 13:30:17'),('91c291ad-1b55-4d59-8aed-a496fa06534e','7bb16bc5-6998-4d75-a783-e404f5d62f4b','3b153d74-84f4-4441-902c-22960fb97aa5','1#电气火灾侦测装置',NULL,NULL,NULL,'2021-06-17 13:36:00'),('d76154aa-0a3a-4691-8d9b-d7960039cec8','7bb16bc5-6998-4d75-a783-e404f5d62f4b','3b153d74-84f4-4441-902c-22960fb97aa5','3#电气火灾侦测装置',NULL,NULL,NULL,'2021-06-17 13:38:29'),('f025af56-0fe9-4ce0-beb0-eeb5e3f08aa3','528d7050-80bb-4b0e-b743-4d5ca77c8f2a','a5f41517-44be-4565-b27b-c9cc044c5061','3#可燃气体侦测装置',NULL,NULL,NULL,'2021-06-17 13:34:32'),('f95220a7-1a79-4000-9fd9-f66a1476b38e','7bb16bc5-6998-4d75-a783-e404f5d62f4b','a5f41517-44be-4565-b27b-c9cc044c5061','1#电气火灾侦测装置',NULL,NULL,NULL,'2021-06-17 13:26:51'),('fc4d290f-afbc-4642-aee3-885dc63ac0dc','7bb16bc5-6998-4d75-a783-e404f5d62f4b','3b153d74-84f4-4441-902c-22960fb97aa5','2#电气火灾侦测装置',NULL,NULL,NULL,'2021-06-17 13:36:50');

/*Table structure for table `yt_t_devicetype` */

DROP TABLE IF EXISTS `yt_t_devicetype`;

CREATE TABLE `yt_t_devicetype` (
  `UQ_DEVICETYPE_ID` varchar(40) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000' COMMENT '类型编码',
  `V_DEVICETYPE` varchar(240) NOT NULL COMMENT '设备类型',
  `D_STORETIME` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '存储时间',
  PRIMARY KEY (`UQ_DEVICETYPE_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `yt_t_devicetype` */

insert  into `yt_t_devicetype`(`UQ_DEVICETYPE_ID`,`V_DEVICETYPE`,`D_STORETIME`) values ('00f97026-c053-410f-9f7c-9e8674f5439d','消防水泵探测装置','2021-06-17 09:54:32'),('01648860-89ef-4a80-8756-f7451ca15d35','火灾探测装置','2021-06-17 09:52:13'),('20913825-5cf0-4617-9e65-f93188a52025','消防喷淋管道压力探测装置','2021-06-17 09:54:18'),('2abfb073-336a-42d4-b1ad-8d6abc44dc48','消防占道探测装置','2021-06-17 09:53:19'),('2fea27d9-67cd-4ba1-9930-30c5aa64d2f9','水质监测残疾探测装置','2021-06-17 09:53:50'),('528d7050-80bb-4b0e-b743-4d5ca77c8f2a','可燃气体探测装置','2021-06-17 09:51:52'),('57afec3e-176e-481e-84c1-27e6cd4e0eb5','二次供水探测装置','2021-06-17 09:52:46'),('7bb16bc5-6998-4d75-a783-e404f5d62f4b','电气火灾监测装置','2021-06-17 09:50:57'),('8a71a986-aeb9-4af2-8b2a-9c10f82037a8','智慧用电监测装置','2021-06-17 09:51:24'),('9089dfe7-c6af-4030-905f-817b4363a69b','消防给水系统探测装置（消火栓）','2021-06-17 09:54:04'),('91bdd6be-2551-4279-afb0-f3dd3ad03dc3','电梯运行采集探测装置','2021-06-17 09:53:35'),('9d2d74d3-ead5-4eb4-8b0d-4f95bea965f2','紧急（求助）按钮','2021-06-17 09:50:24'),('b0224833-7a11-4602-a75a-79fa60852be4','窨井盖探测装置','2021-06-17 09:53:03'),('b1b9ba82-8458-42d0-bd5e-841e64358b44','门体开启状态探测装置','2021-06-17 09:52:30'),('fed54c5f-eadf-4bc7-bbbb-61c17871016f','视频告警探测装置','2021-06-17 09:54:47') ;

/*Table structure for table `yt_t_point` */

DROP TABLE IF EXISTS `yt_t_point`;

CREATE TABLE `yt_t_point` (
  `UQ_DEVICE_ID` varchar(40) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000' COMMENT '设备编码',
  `I_BUSADDR` int(11) NOT NULL DEFAULT '0' COMMENT '监测点位地址',
  `V_POINTNAME` varchar(240) NOT NULL COMMENT '监测点位名称',
  `E_POINTTYPE` enum('0','1','2','3','4') NOT NULL COMMENT '0为不监控，1为开关量输入，2为模拟量输入，3为开关量输出，4为模拟量输出',
  `E_ALARMTYPE` enum('0','1','2','3') NOT NULL COMMENT '当监测点位类型属于布尔量时，0为不告警，1为告警；当监测点位类型属于精度数据时，0为不告警，1为下限告警，2为上限告警，3为上下限均告警',
  `B_ISKEYPOINT` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否为关键点位',
  `D_STORETIME` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '存储时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `yt_t_point` */

insert  into `yt_t_point`(`UQ_DEVICE_ID`,`I_BUSADDR`,`V_POINTNAME`,`E_POINTTYPE`,`E_ALARMTYPE`,`B_ISKEYPOINT`,`D_STORETIME`) values ('f95220a7-1a79-4000-9fd9-f66a1476b38e',1,'供电过压告警','1','2',0,'2021-06-17 13:46:26'),('f95220a7-1a79-4000-9fd9-f66a1476b38e',2,'供电低压告警','1','1',0,'2021-06-17 13:47:16'),('f95220a7-1a79-4000-9fd9-f66a1476b38e',3,'供电过流告警','1','2',0,'2021-06-17 13:47:44'),('f95220a7-1a79-4000-9fd9-f66a1476b38e',4,'漏电告警','1','1',1,'2021-06-17 13:48:18'),('f95220a7-1a79-4000-9fd9-f66a1476b38e',5,'A相线缆温度超高','1','1',0,'2021-06-17 13:48:46'),('f95220a7-1a79-4000-9fd9-f66a1476b38e',6,'B相线缆温度超高','1','1',0,'2021-06-17 13:49:10'),('f95220a7-1a79-4000-9fd9-f66a1476b38e',7,'C相线缆温度超高','1','1',0,'2021-06-17 13:49:32'),('f95220a7-1a79-4000-9fd9-f66a1476b38e',65,'A相电压','2','3',0,'2021-06-17 13:56:32'),('f95220a7-1a79-4000-9fd9-f66a1476b38e',66,'B相电压','2','3',0,'2021-06-17 13:57:20'),('f95220a7-1a79-4000-9fd9-f66a1476b38e',67,'C相电压','2','3',0,'2021-06-17 13:57:36'),('f95220a7-1a79-4000-9fd9-f66a1476b38e',68,'A相电流','2','2',0,'2021-06-17 13:57:56'),('f95220a7-1a79-4000-9fd9-f66a1476b38e',69,'B向电流','2','2',0,'2021-06-17 14:14:28'),('f95220a7-1a79-4000-9fd9-f66a1476b38e',70,'C相电流','2','2',0,'2021-06-17 14:14:44'),('f95220a7-1a79-4000-9fd9-f66a1476b38e',71,'A相线缆温度','2','2',0,'2021-06-17 14:15:18'),('f95220a7-1a79-4000-9fd9-f66a1476b38e',72,'B相线缆温度','2','2',0,'2021-06-17 14:15:31'),('f95220a7-1a79-4000-9fd9-f66a1476b38e',73,'C相线缆温度','2','2',0,'2021-06-17 14:15:45'),('7c2fb0f7-328e-48a6-9bcf-5cc713993262',1,'供电过压告警','1','1',0,'2021-06-17 14:16:18'),('7c2fb0f7-328e-48a6-9bcf-5cc713993262',2,'供电低压告警','1','1',0,'2021-06-17 14:16:35'),('7c2fb0f7-328e-48a6-9bcf-5cc713993262',3,'供电过流告警','1','1',0,'2021-06-17 14:16:58'),('7c2fb0f7-328e-48a6-9bcf-5cc713993262',4,'漏电告警','1','1',1,'2021-06-17 14:18:06'),('7c2fb0f7-328e-48a6-9bcf-5cc713993262',5,'A相线缆温度超高','1','1',0,'2021-06-17 14:19:18'),('7c2fb0f7-328e-48a6-9bcf-5cc713993262',6,'B相线缆温度超高','1','1',0,'2021-06-17 14:19:41'),('7c2fb0f7-328e-48a6-9bcf-5cc713993262',7,'C相电缆温度超高','1','1',0,'2021-06-17 14:19:58'),('7c2fb0f7-328e-48a6-9bcf-5cc713993262',65,'A相电压','2','3',0,'2021-06-17 14:20:16'),('7c2fb0f7-328e-48a6-9bcf-5cc713993262',66,'B相电压','2','3',0,'2021-06-17 14:20:28'),('7c2fb0f7-328e-48a6-9bcf-5cc713993262',67,'C相电压','2','3',0,'2021-06-17 14:20:41'),('7c2fb0f7-328e-48a6-9bcf-5cc713993262',68,'A相电流','2','2',0,'2021-06-17 14:21:01'),('7c2fb0f7-328e-48a6-9bcf-5cc713993262',69,'B相电流','2','2',0,'2021-06-17 14:21:15'),('7c2fb0f7-328e-48a6-9bcf-5cc713993262',70,'C相电流','2','2',0,'2021-06-17 14:21:30'),('7c2fb0f7-328e-48a6-9bcf-5cc713993262',71,'A相线缆温度','2','2',0,'2021-06-17 14:21:46'),('7c2fb0f7-328e-48a6-9bcf-5cc713993262',72,'B相线缆温度','2','2',0,'2021-06-17 14:21:58'),('7c2fb0f7-328e-48a6-9bcf-5cc713993262',73,'C相线缆温度','2','2',0,'2021-06-17 14:22:13'),('86a34a13-f468-4450-91fb-b55389d630c8',1,'供电过压告警','1','1',0,'2021-06-17 14:22:51'),('86a34a13-f468-4450-91fb-b55389d630c8',2,'供电低压告警','1','1',0,'2021-06-17 14:23:05'),('86a34a13-f468-4450-91fb-b55389d630c8',3,'供电过流告警','1','1',0,'2021-06-17 14:23:20'),('86a34a13-f468-4450-91fb-b55389d630c8',4,'漏电告警','1','1',1,'2021-06-17 14:23:39'),('86a34a13-f468-4450-91fb-b55389d630c8',5,'A相线缆温度超高','1','1',0,'2021-06-17 14:23:56'),('86a34a13-f468-4450-91fb-b55389d630c8',6,'B相线缆温度超高','1','1',0,'2021-06-17 14:24:10'),('86a34a13-f468-4450-91fb-b55389d630c8',7,'C相线缆温度超高','1','1',0,'2021-06-17 14:24:25'),('86a34a13-f468-4450-91fb-b55389d630c8',65,'A相电压','2','3',0,'2021-06-17 14:24:44'),('86a34a13-f468-4450-91fb-b55389d630c8',66,'B相电压','2','3',0,'2021-06-17 14:24:57'),('86a34a13-f468-4450-91fb-b55389d630c8',67,'C相电压','2','3',0,'2021-06-17 14:25:11'),('86a34a13-f468-4450-91fb-b55389d630c8',68,'A相电流','2','2',0,'2021-06-17 14:25:25'),('86a34a13-f468-4450-91fb-b55389d630c8',69,'B相电流','2','2',0,'2021-06-17 14:29:57'),('86a34a13-f468-4450-91fb-b55389d630c8',70,'C相电流','2','2',0,'2021-06-17 14:30:22'),('86a34a13-f468-4450-91fb-b55389d630c8',71,'A相线缆温度','2','2',0,'2021-06-17 14:30:38'),('86a34a13-f468-4450-91fb-b55389d630c8',72,'B相线缆温度','2','2',0,'2021-06-17 14:30:51'),('86a34a13-f468-4450-91fb-b55389d630c8',73,'C相线缆温度','2','2',0,'2021-06-17 14:31:13'),('3ba40309-142e-4fc3-905a-4a638cb43311',1,'设备故障','1','1',0,'2021-06-17 14:35:23'),('3ba40309-142e-4fc3-905a-4a638cb43311',2,'可燃气体报警','1','1',0,'2021-06-17 14:35:47'),('3ba40309-142e-4fc3-905a-4a638cb43311',65,'可燃气体浓度','2','2',1,'2021-06-17 14:36:17'),('0752bbcf-c8a1-480b-85fb-b817fb5dc823',1,'设备故障','1','1',0,'2021-06-17 14:37:06'),('0752bbcf-c8a1-480b-85fb-b817fb5dc823',2,'可燃气体报警','1','1',0,'2021-06-17 14:37:21'),('0752bbcf-c8a1-480b-85fb-b817fb5dc823',65,'可燃气体浓度','2','2',1,'2021-06-17 14:37:41'),('f025af56-0fe9-4ce0-beb0-eeb5e3f08aa3',1,'设备故障','1','1',0,'2021-06-17 14:38:11'),('f025af56-0fe9-4ce0-beb0-eeb5e3f08aa3',2,'可燃气体报警','1','1',0,'2021-06-17 14:38:34'),('f025af56-0fe9-4ce0-beb0-eeb5e3f08aa3',65,'可燃气体浓度','2','2',1,'2021-06-17 14:38:55'),('91c291ad-1b55-4d59-8aed-a496fa06534e',1,'供电过压告警','1','1',0,'2021-06-17 15:42:30'),('91c291ad-1b55-4d59-8aed-a496fa06534e',2,'供电低压告警','1','1',0,'2021-06-17 15:43:01'),('91c291ad-1b55-4d59-8aed-a496fa06534e',3,'供电过流告警','1','1',0,'2021-06-17 15:43:16'),('91c291ad-1b55-4d59-8aed-a496fa06534e',4,'漏电告警','1','1',1,'2021-06-17 15:43:39'),('91c291ad-1b55-4d59-8aed-a496fa06534e',5,'A相线缆温度超高','1','1',0,'2021-06-17 15:43:57'),('91c291ad-1b55-4d59-8aed-a496fa06534e',6,'B相线缆温度超高','1','1',0,'2021-06-17 15:44:12'),('91c291ad-1b55-4d59-8aed-a496fa06534e',7,'C相线缆温度超高','1','1',0,'2021-06-17 15:44:34'),('91c291ad-1b55-4d59-8aed-a496fa06534e',65,'A相电压','2','3',0,'2021-06-17 15:44:54'),('91c291ad-1b55-4d59-8aed-a496fa06534e',66,'B相电压','2','3',0,'2021-06-17 15:45:05'),('91c291ad-1b55-4d59-8aed-a496fa06534e',67,'C相电压','2','3',0,'2021-06-17 15:45:19'),('91c291ad-1b55-4d59-8aed-a496fa06534e',68,'A相电流','2','2',0,'2021-06-17 15:45:37'),('91c291ad-1b55-4d59-8aed-a496fa06534e',69,'B相电流','2','2',0,'2021-06-17 15:45:50'),('91c291ad-1b55-4d59-8aed-a496fa06534e',70,'C相电流','2','2',0,'2021-06-17 15:46:02'),('91c291ad-1b55-4d59-8aed-a496fa06534e',71,'A相线缆温度','2','2',0,'2021-06-17 15:46:26'),('91c291ad-1b55-4d59-8aed-a496fa06534e',72,'B相线缆温度','2','2',0,'2021-06-17 15:46:46'),('91c291ad-1b55-4d59-8aed-a496fa06534e',73,'C相线缆温度','2','2',0,'2021-06-17 15:46:59'),('fc4d290f-afbc-4642-aee3-885dc63ac0dc',1,'供电过压告警','1','1',0,'2021-06-17 15:47:44'),('fc4d290f-afbc-4642-aee3-885dc63ac0dc',2,'供电低压告警','1','1',0,'2021-06-17 15:47:57'),('fc4d290f-afbc-4642-aee3-885dc63ac0dc',3,'供电过流告警','1','1',0,'2021-06-17 15:48:13'),('fc4d290f-afbc-4642-aee3-885dc63ac0dc',4,'漏电告警','1','1',1,'2021-06-17 15:48:33'),('fc4d290f-afbc-4642-aee3-885dc63ac0dc',5,'A相线缆温度超高','1','1',0,'2021-06-17 15:48:50'),('fc4d290f-afbc-4642-aee3-885dc63ac0dc',6,'B相线缆温度超高','1','1',0,'2021-06-17 15:49:10'),('fc4d290f-afbc-4642-aee3-885dc63ac0dc',7,'C相线缆温度超高','1','1',0,'2021-06-17 15:49:23'),('fc4d290f-afbc-4642-aee3-885dc63ac0dc',65,'A相电压','2','3',0,'2021-06-17 15:49:36'),('fc4d290f-afbc-4642-aee3-885dc63ac0dc',66,'B相电压','2','3',0,'2021-06-17 15:49:47'),('fc4d290f-afbc-4642-aee3-885dc63ac0dc',67,'C相电压','2','3',0,'2021-06-17 15:49:59'),('fc4d290f-afbc-4642-aee3-885dc63ac0dc',68,'A相电流','2','2',0,'2021-06-17 15:50:15'),('fc4d290f-afbc-4642-aee3-885dc63ac0dc',69,'B相电流','2','2',0,'2021-06-17 15:50:30'),('fc4d290f-afbc-4642-aee3-885dc63ac0dc',70,'C相电流','2','2',0,'2021-06-17 15:50:43'),('fc4d290f-afbc-4642-aee3-885dc63ac0dc',71,'A相线缆温度','2','2',0,'2021-06-17 15:51:00'),('fc4d290f-afbc-4642-aee3-885dc63ac0dc',72,'B相线缆温度','2','2',0,'2021-06-17 15:51:13'),('fc4d290f-afbc-4642-aee3-885dc63ac0dc',73,'C相线缆温度','2','2',0,'2021-06-17 15:51:31'),('d76154aa-0a3a-4691-8d9b-d7960039cec8',1,'供电过压告警','1','1',0,'2021-06-17 15:52:06'),('d76154aa-0a3a-4691-8d9b-d7960039cec8',2,'供电低压告警','1','1',0,'2021-06-17 15:52:18'),('d76154aa-0a3a-4691-8d9b-d7960039cec8',3,'供电过流告警','1','1',0,'2021-06-17 15:52:41'),('d76154aa-0a3a-4691-8d9b-d7960039cec8',4,'漏电告警','1','1',1,'2021-06-17 15:52:53'),('d76154aa-0a3a-4691-8d9b-d7960039cec8',5,'A相线缆温度超高','1','1',0,'2021-06-17 15:53:17'),('d76154aa-0a3a-4691-8d9b-d7960039cec8',6,'B相线缆温度超高','1','1',0,'2021-06-17 15:53:30'),('d76154aa-0a3a-4691-8d9b-d7960039cec8',7,'C相线缆温度超高','1','1',0,'2021-06-17 15:53:46'),('d76154aa-0a3a-4691-8d9b-d7960039cec8',65,'A相电压','2','3',0,'2021-06-17 15:54:02'),('d76154aa-0a3a-4691-8d9b-d7960039cec8',66,'B相电压','2','3',0,'2021-06-17 15:54:15'),('d76154aa-0a3a-4691-8d9b-d7960039cec8',67,'C相电压','2','3',0,'2021-06-17 15:54:27'),('d76154aa-0a3a-4691-8d9b-d7960039cec8',68,'A相电流','2','2',0,'2021-06-17 16:05:30'),('d76154aa-0a3a-4691-8d9b-d7960039cec8',69,'B相电流','2','2',0,'2021-06-17 16:05:53'),('d76154aa-0a3a-4691-8d9b-d7960039cec8',70,'C相电流','2','2',0,'2021-06-17 16:06:10'),('d76154aa-0a3a-4691-8d9b-d7960039cec8',71,'A相线缆温度','2','2',0,'2021-06-17 16:06:25'),('d76154aa-0a3a-4691-8d9b-d7960039cec8',72,'B相线缆温度','2','2',0,'2021-06-17 16:06:37'),('d76154aa-0a3a-4691-8d9b-d7960039cec8',73,'C相线缆温度','2','2',0,'2021-06-17 16:06:50'),('fde1ae96-02ac-4420-8835-49a90366fe57',1,'设备故障','1','1',0,'2021-06-17 16:07:23'),('fde1ae96-02ac-4420-8835-49a90366fe57',2,'可燃气体报警','1','1',0,'2021-06-17 16:07:38'),('fde1ae96-02ac-4420-8835-49a90366fe57',65,'可燃气体浓度','2','2',1,'2021-06-17 16:08:03'),('88120cc6-942f-42a2-b94b-c53e102cdff2',1,'设备故障','1','1',0,'2021-06-17 16:08:25'),('88120cc6-942f-42a2-b94b-c53e102cdff2',2,'可燃气体报警','1','1',0,'2021-06-17 16:08:51'),('88120cc6-942f-42a2-b94b-c53e102cdff2',65,'可燃气体浓度','2','2',1,'2021-06-17 16:09:13'),('fb46c5b2-cb15-4ccf-93c2-9eeaca4a6a41',1,'设备故障','1','1',0,'2021-06-17 16:09:39'),('fb46c5b2-cb15-4ccf-93c2-9eeaca4a6a41',2,'可燃气体报警','1','1',0,'2021-06-17 16:09:52'),('fb46c5b2-cb15-4ccf-93c2-9eeaca4a6a41',65,'可燃气体浓度','2','2',1,'2021-06-17 16:10:12');

/*Table structure for table `yt_t_rec` */

DROP TABLE IF EXISTS `yt_t_rec`;

CREATE TABLE `yt_t_rec` (
  `ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `V_DATATIME` datetime NOT NULL,
  `UQ_STATION_ID` varchar(40) NOT NULL,
  `T_VALUES` text NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=540 DEFAULT CHARSET=utf8

/*Data for the table `yt_t_rec` */

/*Table structure for table `yt_t_station` */

DROP TABLE IF EXISTS `yt_t_station`;

CREATE TABLE `yt_t_station` (
  `UQ_STATION_ID` varchar(40) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000' COMMENT '站点编码',
  `V_STATION_NAME` varchar(250) NOT NULL COMMENT '站点名称',
  `V_STATION_PIC` varchar(250) DEFAULT NULL COMMENT '站点图片',
  `V_CONTACT_PERSON` varchar(120) DEFAULT NULL COMMENT '联系人',
  `V_CONTACT_TELPHONE` varchar(40) DEFAULT NULL COMMENT '联系电话',
  `D_STORETIME` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '存储时间',
  PRIMARY KEY (`UQ_STATION_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `yt_t_station` */

insert  into `yt_t_station`(`UQ_STATION_ID`,`V_STATION_NAME`,`V_STATION_PIC`,`V_CONTACT_PERSON`,`V_CONTACT_TELPHONE`,`D_STORETIME`) values ('3b153d74-84f4-4441-902c-22960fb97aa5','上海觉大科技股份有限公司',NULL,NULL,NULL,'2021-06-17 13:08:17'),('a5f41517-44be-4565-b27b-c9cc044c5061','上海永天科技股份有限公司',NULL,NULL,NULL,'2021-06-17 13:07:45');

/*Table structure for table `yt_v_station_all_point` */

DROP TABLE IF EXISTS `yt_v_station_all_point`;

/*!50001 DROP VIEW IF EXISTS `yt_v_station_all_point` */;
/*!50001 DROP TABLE IF EXISTS `yt_v_station_all_point` */;

/*!50001 CREATE TABLE  `yt_v_station_all_point`(
 `UQ_STATION_ID` varchar(40) ,
 `V_STATION_NAME` varchar(250) ,
 `V_STATION_PIC` varchar(250) ,
 `V_CONTACT_PERSON` varchar(120) ,
 `V_CONTACT_TELPHONE` varchar(40) ,
 `UQ_DEVICE_ID` varchar(40) ,
 `UQ_DEVICETYPE_ID` varchar(40) ,
 `V_DEVICETYPE` varchar(240) ,
 `V_DEVICENAME` varchar(240) ,
 `V_DEVICELOCATION` varchar(240) ,
 `V_DEVICEPIC` varchar(240) ,
 `V_VIDEOURL` varchar(240) ,
 `I_BUSADDR` int(11) ,
 `V_POINTNAME` varchar(240) ,
 `E_POINTTYPE` enum('0','1','2','3','4') ,
 `E_ALARMTYPE` enum('0','1','2','3') 
)*/;

/*Table structure for table `yt_v_station_key_point` */

DROP TABLE IF EXISTS `yt_v_station_key_point`;

/*!50001 DROP VIEW IF EXISTS `yt_v_station_key_point` */;
/*!50001 DROP TABLE IF EXISTS `yt_v_station_key_point` */;

/*!50001 CREATE TABLE  `yt_v_station_key_point`(
 `UQ_STATION_ID` varchar(40) ,
 `V_STATION_NAME` varchar(250) ,
 `V_STATION_PIC` varchar(250) ,
 `V_CONTACT_PERSON` varchar(120) ,
 `V_CONTACT_TELPHONE` varchar(40) ,
 `UQ_DEVICE_ID` varchar(40) ,
 `UQ_DEVICETYPE_ID` varchar(40) ,
 `V_DEVICETYPE` varchar(240) ,
 `V_DEVICENAME` varchar(240) ,
 `V_DEVICELOCATION` varchar(240) ,
 `V_DEVICEPIC` varchar(240) ,
 `V_VIDEOURL` varchar(240) ,
 `I_BUSADDR` int(11) ,
 `V_POINTNAME` varchar(240) ,
 `E_POINTTYPE` enum('0','1','2','3','4') ,
 `E_ALARMTYPE` enum('0','1','2','3') 
)*/;

/*View structure for view yt_v_station_all_point */

/*!50001 DROP TABLE IF EXISTS `yt_v_station_all_point` */;
/*!50001 DROP VIEW IF EXISTS `yt_v_station_all_point` */;

/*!50001 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `yt_v_station_all_point` AS (select `s`.`UQ_STATION_ID` AS `UQ_STATION_ID`,`s`.`V_STATION_NAME` AS `V_STATION_NAME`,ifnull(`s`.`V_STATION_PIC`,'') AS `V_STATION_PIC`,ifnull(`s`.`V_CONTACT_PERSON`,'') AS `V_CONTACT_PERSON`,ifnull(`s`.`V_CONTACT_TELPHONE`,'') AS `V_CONTACT_TELPHONE`,`d`.`UQ_DEVICE_ID` AS `UQ_DEVICE_ID`,`d`.`UQ_DEVICETYPE_ID` AS `UQ_DEVICETYPE_ID`,`t`.`V_DEVICETYPE` AS `V_DEVICETYPE`,`d`.`V_DEVICENAME` AS `V_DEVICENAME`,ifnull(`d`.`V_LOCATION`,'') AS `V_DEVICELOCATION`,ifnull(`d`.`V_DEVICEPIC`,'') AS `V_DEVICEPIC`,ifnull(`d`.`V_VIDEOURL`,'') AS `V_VIDEOURL`,`p`.`I_BUSADDR` AS `I_BUSADDR`,`p`.`V_POINTNAME` AS `V_POINTNAME`,`p`.`E_POINTTYPE` AS `E_POINTTYPE`,`p`.`E_ALARMTYPE` AS `E_ALARMTYPE` from (((`yt_t_station` `s` join `yt_t_devices` `d`) join `yt_t_devicetype` `t`) join `yt_t_point` `p`) where ((`s`.`UQ_STATION_ID` = `d`.`UQ_STATION_ID`) and (`d`.`UQ_DEVICETYPE_ID` = `t`.`UQ_DEVICETYPE_ID`) and (`d`.`UQ_DEVICE_ID` = `p`.`UQ_DEVICE_ID`))) */;

/*View structure for view yt_v_station_key_point */

/*!50001 DROP TABLE IF EXISTS `yt_v_station_key_point` */;
/*!50001 DROP VIEW IF EXISTS `yt_v_station_key_point` */;

/*!50001 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `yt_v_station_key_point` AS (select `s`.`UQ_STATION_ID` AS `UQ_STATION_ID`,`s`.`V_STATION_NAME` AS `V_STATION_NAME`,ifnull(`s`.`V_STATION_PIC`,'') AS `V_STATION_PIC`,ifnull(`s`.`V_CONTACT_PERSON`,'') AS `V_CONTACT_PERSON`,ifnull(`s`.`V_CONTACT_TELPHONE`,'') AS `V_CONTACT_TELPHONE`,`d`.`UQ_DEVICE_ID` AS `UQ_DEVICE_ID`,`d`.`UQ_DEVICETYPE_ID` AS `UQ_DEVICETYPE_ID`,`t`.`V_DEVICETYPE` AS `V_DEVICETYPE`,`d`.`V_DEVICENAME` AS `V_DEVICENAME`,ifnull(`d`.`V_LOCATION`,'') AS `V_DEVICELOCATION`,ifnull(`d`.`V_DEVICEPIC`,'') AS `V_DEVICEPIC`,ifnull(`d`.`V_VIDEOURL`,'') AS `V_VIDEOURL`,`p`.`I_BUSADDR` AS `I_BUSADDR`,`p`.`V_POINTNAME` AS `V_POINTNAME`,`p`.`E_POINTTYPE` AS `E_POINTTYPE`,`p`.`E_ALARMTYPE` AS `E_ALARMTYPE` from (((`yt_t_station` `s` join `yt_t_devices` `d`) join `yt_t_devicetype` `t`) join `yt_t_point` `p`) where ((`s`.`UQ_STATION_ID` = `d`.`UQ_STATION_ID`) and (`d`.`UQ_DEVICETYPE_ID` = `t`.`UQ_DEVICETYPE_ID`) and (`d`.`UQ_DEVICE_ID` = `p`.`UQ_DEVICE_ID`) and (`p`.`B_ISKEYPOINT` = 1))) */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
