/*
SQLyog Ultimate v11.25 (64 bit)
MySQL - 8.0.13 : Database - phm_device
*********************************************************************
*/


/*!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*/`phm_device` /*!40100 DEFAULT CHARACTER SET utf8 */;

USE `phm_device`;

/*Table structure for table `data_model` */

DROP TABLE IF EXISTS `data_model`;

CREATE TABLE `data_model` (
  `id` CHAR(20) NOT NULL COMMENT '编号',
  `type_id` VARCHAR(20) NOT NULL COMMENT '设备类型id 设备类型\r\nid',
  `detail_id` VARCHAR(20) NOT NULL COMMENT '设备型号id 设备型号\r\nid',
  `name` VARCHAR(20) NOT NULL COMMENT '名称 名称',
  `show_name` VARCHAR(20) NOT NULL COMMENT '显示名称 显示名称',
  `description` VARCHAR(255) DEFAULT NULL COMMENT '描述 描述',
  `is_deleted` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否已被删除 是\r\n否已被删除',
  `create_person` VARCHAR(20) NOT NULL COMMENT '创建人 创建人',
  `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期 创建时间',
  `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间 修改时间',
  PRIMARY KEY (`id`)
) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='数据模型 数据模型';

/*Data for the table `data_model` */

INSERT  INTO `data_model`(`id`,`type_id`,`detail_id`,`name`,`show_name`,`description`,`is_deleted`,`create_person`,`gmt_create`,`gmt_modified`) VALUES ('1','1514199611785363458','1517333596900229121','data_model_14MW_1_4','data_model_14MW_1_4','14MW数据模型4',1,'ysl','2022-04-24 13:52:24','2022-04-24 17:57:00'),('1518138544122556417','1514199611785363458','1517768187079380994','data_model_20MW_1','data_model_20MW_1','20MW数据模型1',0,'ysl','2022-04-24 16:03:29','2022-04-24 16:03:29'),('1518142805212459009','1514199611785363458','1517768187079380994','20MW_2','20MW_2','20MW数据模型2',0,'ysl','2022-04-24 16:20:25','2022-04-24 16:20:25'),('1518146419012202497','1514199611785363458','1514200864187760641','data_model_8MW_3','data_model_8MW_3',NULL,0,'ysl','2022-04-24 16:34:47','2022-04-24 17:53:59'),('1518152188629614594','1514199611785363458','1517333596900229121','data_model_14MW_3','dataModel_14MW_3','14MW数据模型3',1,'ysl','2022-04-24 16:57:42','2022-04-24 16:57:42'),('1518167449613115393','1514199611785363458','1517333596900229121','data_model_14MW_1_5','data_model_14MW_1_5','14MW数据模型5',0,'ysl','2022-04-24 17:58:21','2022-04-24 17:58:47'),('1518948944908918786','undefined','1514200247667015681','data_model_1MW_1','data_model_1MW_1',NULL,0,'rmq','2022-04-26 21:43:44','2022-05-18 18:51:05'),('1519893513666375682','1514199611785363458','1514200247667015681','data_model_1MW_2','data_model_1MW_2',NULL,0,'冉茂淇','2022-04-29 12:17:07','2022-04-29 12:17:07'),('1519893601335717890','undefined','1514200247667015681','data_model_1MW_3','data_model_1MW_3',NULL,0,'冉茂淇','2022-04-29 12:17:27','2022-04-29 12:17:27'),('1526520423003561985','1514199611785363458','1514200341845917698','data_model_2MW_1','data_model_2MW_1',NULL,0,'rmq','2022-05-17 19:10:05','2022-05-17 19:10:05'),('1526520700259639298','1514199611785363458','1514200247667015681','data_model_1MW_4','data_model_1MW_4',NULL,0,'rmq','2022-05-17 19:11:11','2022-05-17 19:11:11'),('2','1514199611785363458','1517333596900229121','data_model_14MW_2_2','dataModel_14MW_2_2','14MW数据模型2',0,'ysl','2022-04-24 15:19:00','2022-04-24 17:39:58');

/*Table structure for table `device` */

DROP TABLE IF EXISTS `device`;

CREATE TABLE `device` (
  `id` CHAR(20) NOT NULL COMMENT '编号',
  `group_id` VARCHAR(20) NOT NULL COMMENT '设备组id 设备组id',
  `name` VARCHAR(20) NOT NULL COMMENT '设备标识 设备标识',
  `type_id` VARCHAR(20) NOT NULL COMMENT '设备类型 设备类型',
  `detail_id` VARCHAR(20) NOT NULL COMMENT '设备型号 设备型号',
  `device_code` VARCHAR(20) DEFAULT NULL COMMENT '设备编码 设备编码',
  `produce_time` DATETIME DEFAULT NULL COMMENT '出厂日期 出厂日期',
  `east_longitude` VARCHAR(4000) DEFAULT NULL COMMENT '东经 东经',
  `north_latitude` VARCHAR(20) DEFAULT NULL COMMENT '北纬 北纬',
  `description` VARCHAR(255) DEFAULT NULL COMMENT '描述 描述',
  `is_deleted` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否已被删除 是\r\n否已被删除',
  `create_person` VARCHAR(20) NOT NULL COMMENT '创建人 创建人',
  `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期 创建时间',
  `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间 修改时间',
  PRIMARY KEY (`id`)
) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='设备 设备';

/*Data for the table `device` */

/*Table structure for table `device_area` */

DROP TABLE IF EXISTS `device_area`;

CREATE TABLE `device_area` (
  `id` CHAR(20) NOT NULL COMMENT '编号',
  `show_name` VARCHAR(20) NOT NULL COMMENT '区域名称 区域名称',
  `description` VARCHAR(255) DEFAULT NULL COMMENT '描述 描述',
  `object_id` VARCHAR(20) NOT NULL DEFAULT '0' COMMENT '设备对象id 设备对象\r\nid',
  `is_deleted` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '是否已被删除 是\r\n否已被删除',
  `create_person` VARCHAR(20) NOT NULL COMMENT '创建人 创建人',
  `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期 创建时间',
  `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间 修改时间',
  PRIMARY KEY (`id`)
) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='设备区域 设备区域';

/*Data for the table `device_area` */

INSERT  INTO `device_area`(`id`,`show_name`,`description`,`object_id`,`is_deleted`,`create_person`,`gmt_create`,`gmt_modified`) VALUES ('1526879509901594233','华北区厂房','华北区厂房','0',0,'冉茂淇','2022-05-18 11:50:19','2022-05-18 20:49:35'),('1526879509901594432','西北区风场',NULL,'0',0,'冉茂淇','2022-05-18 13:58:15','2022-05-18 13:58:17'),('1526879509901594626','重庆大学测试','重庆大学测试','0',0,'冉茂淇','2022-05-18 18:56:58','2022-05-18 18:56:58'),('1526879817662844930','成都片区','成都片区','0',0,'冉茂淇','2022-05-18 18:58:11','2022-05-18 18:58:11'),('1526896051364085761','华南区厂房',NULL,'0',0,'冉茂淇','2022-05-18 20:02:42','2022-05-18 20:02:42');

/*Table structure for table `device_group` */

DROP TABLE IF EXISTS `device_group`;

CREATE TABLE `device_group` (
  `id` CHAR(20) NOT NULL COMMENT '编号',
  `name` VARCHAR(20) NOT NULL COMMENT '设备组标识 设备组标识\r\n',
  `show_name` VARCHAR(20) NOT NULL COMMENT '设备组名称 设备组名称\r\n',
  `object_id` CHAR(20) NOT NULL DEFAULT '0' COMMENT '设备对象id 设备对象\r\nid',
  `area_id` CHAR(20) NOT NULL DEFAULT '0' COMMENT '设备区域id 设备区域id',
  `group_code` VARCHAR(20) DEFAULT NULL COMMENT '设备组编码 设备组编码',
  `location` VARCHAR(20) DEFAULT NULL COMMENT '所在地 所在地',
  `east_longitude` VARCHAR(20) DEFAULT NULL COMMENT '东经 东经',
  `north_latitude` VARCHAR(20) DEFAULT NULL COMMENT '北纬 北纬',
  `description` VARCHAR(255) DEFAULT NULL COMMENT '描述 描述',
  `is_deleted` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否已被删除 是\r\n否已被删除',
  `create_person` VARCHAR(20) NOT NULL COMMENT '创建人 创建人',
  `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期 创建时间',
  `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间 修改时间',
  PRIMARY KEY (`id`)
) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='设备组 设备组';

/*Data for the table `device_group` */

INSERT  INTO `device_group`(`id`,`name`,`show_name`,`object_id`,`area_id`,`group_code`,`location`,`east_longitude`,`north_latitude`,`description`,`is_deleted`,`create_person`,`gmt_create`,`gmt_modified`) VALUES ('1527116169335664642','jichuangchangfang','机床厂房','0','1526879509901594233','asd','北京',NULL,NULL,NULL,0,'冉茂淇','2022-05-19 10:37:22','2022-05-19 11:10:17'),('1527116356133187586','lushangfengchang','陆上风场','0','1526879509901594432','asd',NULL,NULL,NULL,NULL,0,'冉茂淇','2022-05-19 10:38:06','2022-05-19 10:38:06'),('1527116597506994177','bearing','轴承耐久试验台','0','1526879509901594626','asdasd','重庆',NULL,NULL,NULL,0,'ranmaoqi','2022-05-19 10:39:04','2022-05-19 10:39:04'),('1527116876591788034','test','test设备组','0','0','asdasd','重庆大学',NULL,NULL,NULL,0,'冉茂淇','2022-05-19 10:40:10','2022-05-19 10:40:10');

/*Table structure for table `device_object` */

DROP TABLE IF EXISTS `device_object`;

CREATE TABLE `device_object` (
  `id` CHAR(20) NOT NULL COMMENT '编号',
  `is_deleted` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否已被删除 是\r\n否已被删除',
  `create_person` VARCHAR(20) NOT NULL COMMENT '创建人 创建人',
  `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期 创建时间',
  `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间 修改时间',
  PRIMARY KEY (`id`)
) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='设备对象 设备对象';

/*Data for the table `device_object` */

/*Table structure for table `device_type` */

DROP TABLE IF EXISTS `device_type`;

CREATE TABLE `device_type` (
  `id` CHAR(20) NOT NULL COMMENT '编号',
  `name` VARCHAR(20) NOT NULL COMMENT '设备类型名称 设备类型\r\n名称',
  `show_name` VARCHAR(20) NOT NULL COMMENT '显示名称 显示名称',
  `description` VARCHAR(255) DEFAULT NULL COMMENT '描述 描述',
  `is_deleted` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否被删除(0未删除、1已删除)',
  `create_person` VARCHAR(20) NOT NULL COMMENT '创建人 创建人',
  `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期 创建时间',
  `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间 修改时间',
  PRIMARY KEY (`id`)
) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='设备类型 设备类型';

/*Data for the table `device_type` */

INSERT  INTO `device_type`(`id`,`name`,`show_name`,`description`,`is_deleted`,`create_person`,`gmt_create`,`gmt_modified`) VALUES ('1514199611785363458','wind-turbine','风电机组','风电机组设备类型',0,'冉茂淇','2022-04-13 19:11:35','2022-04-21 21:45:47'),('1514200004061839362','engine','发动机','发动机设备类型',0,'冉茂淇','2022-04-13 19:13:08','2022-04-13 19:13:08'),('1514202147363766274','gas-turbine','燃气轮机',NULL,0,'冉茂淇','2022-04-13 19:21:39','2022-04-13 19:21:39'),('1517772731326746626','CMS','海装',NULL,0,'海装','2022-04-23 15:49:53','2022-04-23 15:49:53');

/*Table structure for table `device_type_detail` */

DROP TABLE IF EXISTS `device_type_detail`;

CREATE TABLE `device_type_detail` (
  `id` CHAR(20) NOT NULL COMMENT '编号',
  `type_id` CHAR(20) NOT NULL COMMENT '设备类型id 设备类型\r\nid',
  `type_group_id` CHAR(20) NOT NULL DEFAULT '0' COMMENT '设备分组id 设备分组id',
  `name` VARCHAR(20) NOT NULL COMMENT '设备标识 设备标识',
  `show_name` VARCHAR(20) NOT NULL COMMENT '型号名称 型号名称',
  `specification_type` VARCHAR(255) DEFAULT NULL COMMENT '规格类型 规格类型',
  `manufacturer` VARCHAR(20) DEFAULT NULL COMMENT '生产厂商 生产厂商',
  `description` VARCHAR(255) DEFAULT NULL COMMENT '描述 描述',
  `is_deleted` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否已被删除 是\r\n否已被删除',
  `create_person` VARCHAR(20) NOT NULL COMMENT '创建人 创建人',
  `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期 创建时间',
  `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间 修改时间',
  PRIMARY KEY (`id`)
) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='设备型号 设备型号表';

/*Data for the table `device_type_detail` */

INSERT  INTO `device_type_detail`(`id`,`type_id`,`type_group_id`,`name`,`show_name`,`specification_type`,`manufacturer`,`description`,`is_deleted`,`create_person`,`gmt_create`,`gmt_modified`) VALUES ('1514200247667015681','1514199611785363458','1514199745759821826','1MW','1MW',NULL,'重庆大学','1MW',0,'冉茂淇','2022-04-13 19:14:06','2022-04-28 12:59:07'),('1514200341845917698','1514199611785363458','1514199745759821826','2MW','2MW',NULL,'重庆大学','2MW',0,'冉茂淇','2022-04-13 19:14:29','2022-04-13 19:14:29'),('1514200430551252993','1514199611785363458','1514199745759821826','3MW','3MW',NULL,'重庆大学','3MW',0,'rmq','2022-04-13 19:14:50','2022-04-15 16:45:25'),('1514200527808774146','1514199611785363458','1514199816282849282','4MW','4MW',NULL,NULL,NULL,0,'冉茂淇','2022-04-13 19:15:13','2022-04-13 19:15:13'),('1514200582095650817','1514199611785363458','1514199816282849282','5MW','5MW',NULL,NULL,'5MW',0,'rmq','2022-04-13 19:15:26','2022-04-13 19:15:26'),('1514200727679942657','1514199611785363458','1514200662278160386','6MW','6MW',NULL,NULL,NULL,0,'冉茂淇','2022-04-13 19:16:01','2022-04-13 19:16:01'),('1514200766858936321','1514199611785363458','1514200662278160386','7MW','7MW',NULL,NULL,NULL,0,'冉茂淇','2022-04-13 19:16:10','2022-04-13 19:16:10'),('1514200864187760641','1514199611785363458','0','8MW','8MW',NULL,NULL,'ysl',0,'rmq','2022-04-13 19:16:33','2022-04-26 21:32:19'),('1514200968571404290','1514199611785363458','0','10MW','10MW',NULL,NULL,NULL,0,'冉茂淇','2022-04-13 19:16:58','2022-04-13 19:16:58'),('1514201040143007745','1514199611785363458','0','12MW','12MW',NULL,NULL,NULL,0,'冉茂淇','2022-04-13 19:17:15','2022-04-13 19:17:52'),('1514201124658233346','1514199611785363458','0','13MW','13MW',NULL,NULL,NULL,0,'冉茂淇','2022-04-13 19:17:35','2022-04-13 19:17:35'),('1514201272062853121','1514199611785363458','0','15MW','15MW',NULL,NULL,NULL,0,'rmq','2022-04-13 19:18:10','2022-04-13 19:18:10'),('1514201499729674241','1514200004061839362','1514200074081550337','engine-1','发动机-1',NULL,NULL,NULL,0,'rmq','2022-04-13 19:19:05','2022-04-13 19:19:05'),('1514201560438030337','1514200004061839362','1514200074081550337','engine-2','发动机-2',NULL,NULL,NULL,0,'rmq','2022-04-13 19:19:19','2022-04-13 19:19:19'),('1514201649722179585','1514200004061839362','1514200110618132481','engine-3','发动机-3',NULL,NULL,NULL,0,'冉茂淇','2022-04-13 19:19:40','2022-04-13 19:19:40'),('1514201759004770306','1514200004061839362','1514200110618132481','engine-4','发动机-4',NULL,NULL,NULL,0,'冉茂淇','2022-04-13 19:20:07','2022-04-13 19:20:07'),('1514201883533656066','1514200004061839362','0','engine-5','发动机-5',NULL,NULL,NULL,1,'冉茂淇','2022-04-13 19:20:36','2022-04-13 19:20:36'),('1514203804227092481','1514202147363766274','1514202229777645569','gas-turbine-1','燃气轮机-1',NULL,NULL,NULL,1,'rmq','2022-04-13 19:28:14','2022-04-13 19:28:14'),('1514203925811576833','1514202147363766274','1514202229777645569','gas-turbine-4','燃气轮机-4',NULL,NULL,NULL,1,'冉茂淇','2022-04-13 19:28:43','2022-04-13 19:28:43'),('1514203997387374593','1514202147363766274','1514203282438897666','gas-turbine-2','燃气轮机-2',NULL,NULL,NULL,0,'冉茂淇','2022-04-13 19:29:00','2022-04-13 19:29:00'),('1514204060985606146','1514202147363766274','1514203282438897666','gas-turbine-3','燃气轮机-3',NULL,NULL,NULL,0,'冉茂淇','2022-04-13 19:29:15','2022-04-13 19:29:15'),('1514204785228660737','1514200004061839362','1514200110618132481','engine-6','发动机-6',NULL,NULL,NULL,1,'冉茂淇','2022-04-13 19:32:08','2022-04-13 19:32:08'),('1514205190952075266','1514202147363766274','1514203282438897666','gas-turbine-5','燃气轮机-5',NULL,NULL,NULL,1,'rmq','2022-04-13 19:33:45','2022-04-13 19:33:45'),('1514205266306940930','1514202147363766274','1514203282438897666','gas-turbine-6','燃气轮机-6',NULL,NULL,NULL,1,'冉茂淇','2022-04-13 19:34:03','2022-04-13 19:34:03'),('1514813583232344066','1514199611785363458','0','13MW','13MW',NULL,NULL,'13MW',1,'冉茂淇','2022-04-15 11:51:17','2022-04-15 11:51:17'),('1514879949167783937','1514199611785363458','1514199745759821826','1','1',NULL,NULL,NULL,1,'1','2022-04-15 16:15:00','2022-04-15 16:15:00'),('1514891143471476738','1514199611785363458','1514199745759821826','1','1',NULL,NULL,NULL,1,'1','2022-04-15 16:59:29','2022-04-15 16:59:29'),('1514891152900272129','1514199611785363458','1514199745759821826','1','1',NULL,NULL,NULL,1,'1','2022-04-15 16:59:31','2022-04-15 16:59:31'),('1514891163155345410','1514199611785363458','1514199745759821826','1','1',NULL,NULL,NULL,1,'1','2022-04-15 16:59:33','2022-04-15 16:59:33'),('1514891174194753538','1514199611785363458','1514199745759821826','1','1',NULL,NULL,NULL,1,'1','2022-04-15 16:59:36','2022-04-15 16:59:36'),('1514891183980064770','1514199611785363458','1514199745759821826','1','1',NULL,NULL,NULL,1,'1','2022-04-15 16:59:38','2022-04-15 16:59:38'),('1514891195107553282','1514199611785363458','1514199745759821826','1','1',NULL,NULL,NULL,1,'1','2022-04-15 16:59:41','2022-04-15 16:59:41'),('1514891206390231041','1514199611785363458','1514199745759821826','1','1',NULL,NULL,NULL,1,'1','2022-04-15 16:59:44','2022-04-15 16:59:44'),('1514891219979776001','1514199611785363458','1514199745759821826','1','1',NULL,NULL,NULL,1,'1','2022-04-15 16:59:47','2022-04-15 16:59:47'),('1517333035501027330','1514199611785363458','1514200662278160386','9MW','9MW',NULL,NULL,NULL,1,'冉茂淇','2022-04-22 10:42:41','2022-04-22 10:42:41'),('1517333136185294849','1514199611785363458','1514200662278160386','11MW','11MW',NULL,NULL,NULL,1,'冉茂淇','2022-04-22 10:43:05','2022-04-22 10:43:05'),('1517333596900229121','1514199611785363458','0','14MW','14MW',NULL,NULL,NULL,0,'冉茂淇','2022-04-22 10:44:55','2022-04-22 10:44:55'),('1517334920152809473','1514199611785363458','1514199816282849282','15MW','15MW',NULL,NULL,NULL,1,'冉茂淇','2022-04-22 10:50:10','2022-04-22 10:50:10'),('1517335114864984066','1514199611785363458','1514199816282849282','16MW','16MW',NULL,NULL,NULL,0,'rmq','2022-04-22 10:50:57','2022-04-22 10:50:57'),('1517336832927399938','1514199611785363458','0','17MW','17MW',NULL,NULL,NULL,0,'rmq','2022-04-22 10:57:46','2022-04-22 10:57:46'),('1517336892117417986','1514199611785363458','1514199745759821826','18MW','18MW',NULL,'',NULL,0,'rmq','2022-04-22 10:58:01','2022-04-22 10:58:01'),('1517337838599864321','1514199611785363458','1514199745759821826','19MW','19MW',NULL,NULL,NULL,1,'rmq','2022-04-22 11:01:46','2022-04-22 11:01:46'),('1517735975386697730','1514199611785363458','1517735704300441601','15Mw','15MW',NULL,NULL,NULL,1,'ysl','2022-04-23 13:23:49','2022-04-23 13:23:49'),('1517768187079380994','1514199611785363458','1517740478617964545','20MW','20MW',NULL,NULL,NULL,0,'ysl','2022-04-23 15:31:49','2022-04-23 15:31:49');

/*Table structure for table `device_type_group` */

DROP TABLE IF EXISTS `device_type_group`;

CREATE TABLE `device_type_group` (
  `id` CHAR(20) NOT NULL COMMENT '编号',
  `type_id` CHAR(20) NOT NULL COMMENT '设备类型id 设备类型\r\nid',
  `parent_group_id` CHAR(20) NOT NULL DEFAULT '0' COMMENT '父组id 父组id',
  `description` VARCHAR(20) DEFAULT NULL COMMENT '描述 描述',
  `show_name` VARCHAR(20) NOT NULL COMMENT '部件分组名称 部件分组\r\n名称',
  `is_deleted` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否已被删除 是\r\n否已被删除',
  `create_person` VARCHAR(20) NOT NULL COMMENT '创建人 创建人',
  `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期 创建时间',
  `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间 修改时间',
  PRIMARY KEY (`id`)
) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='设备分组 设备分组';

/*Data for the table `device_type_group` */

INSERT  INTO `device_type_group`(`id`,`type_id`,`parent_group_id`,`description`,`show_name`,`is_deleted`,`create_person`,`gmt_create`,`gmt_modified`) VALUES ('1514199745759821826','1514199611785363458','0','风电机组-1','风电机组-1',0,'冉茂淇','2022-04-13 19:12:07','2022-04-15 18:00:14'),('1514199816282849282','1514199611785363458','1514199745759821826',NULL,'风电机组-2',0,'冉茂淇','2022-04-13 19:12:23','2022-04-13 19:12:23'),('1514200074081550337','1514200004061839362','0',NULL,'发动机分组-1',0,'冉茂淇','2022-04-13 19:13:25','2022-04-13 19:13:25'),('1514200110618132481','1514200004061839362','0',NULL,'发动机分组-2',0,'冉茂淇','2022-04-13 19:13:34','2022-04-13 19:13:34'),('1514200662278160386','1514199611785363458','1514199816282849282',NULL,'风电机组-3',0,'冉茂淇','2022-04-13 19:15:45','2022-04-13 19:15:45'),('1514202229777645569','1514202147363766274','0',NULL,'燃气轮机分组-1',0,'冉茂淇','2022-04-13 19:21:59','2022-04-13 19:26:24'),('1514203282438897666','1514202147363766274','1514202229777645569',NULL,'燃气轮机分组-2',0,'冉茂淇','2022-04-13 19:26:10','2022-04-13 19:26:10'),('1517735704300441601','1514199611785363458','1514199816282849282','ysl','风电机组-4',1,'ysl','2022-04-23 13:22:45','2022-04-23 13:22:45'),('1517740478617964545','1514199611785363458','0',NULL,'风电机组-5',0,'ysl','2022-04-23 13:41:43','2022-04-23 13:41:43'),('1517768346576179201','1514199611785363458','1514199816282849282',NULL,'风电机组-6',1,'ysl','2022-04-23 15:32:27','2022-04-23 15:32:27'),('1519182845887660033','1514199611785363458','1514199816282849282',NULL,'风电机组-6',1,'冉茂淇','2022-04-27 13:13:10','2022-04-27 13:13:10'),('1519183158413639682','1514199611785363458','1514199816282849282',NULL,'风电机组-6',1,'rmq','2022-04-27 13:14:25','2022-04-27 13:14:25'),('1519183648375455746','1514202147363766274','0',NULL,'燃气轮机分组-3',1,'rmq','2022-04-27 13:16:22','2022-04-27 13:16:22'),('1519185345181138945','1514199611785363458','1514199816282849282',NULL,'风电机组-5',1,'rmq','2022-04-27 13:23:06','2022-04-27 13:23:06'),('1519185505047035905','1514199611785363458','1514199816282849282',NULL,'风电机组-6',1,'rmq','2022-04-27 13:23:44','2022-04-27 13:23:44');

/*Table structure for table `part` */

DROP TABLE IF EXISTS `part`;

CREATE TABLE `part` (
  `id` CHAR(20) NOT NULL COMMENT '编号',
  `device_detail_id` VARCHAR(20) NOT NULL COMMENT '设备类型id',
  `sub_system_id` VARCHAR(20) NOT NULL DEFAULT '0' COMMENT '子系统id',
  `part_type_id` VARCHAR(20) NOT NULL COMMENT '部件类型id',
  `description` VARCHAR(255) DEFAULT NULL COMMENT '描述',
  `is_deleted` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否已被删除',
  `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`)
) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='部件 部件';

/*Data for the table `part` */

INSERT  INTO `part`(`id`,`device_detail_id`,`sub_system_id`,`part_type_id`,`description`,`is_deleted`,`gmt_create`,`gmt_modified`) VALUES ('1','1514200247667015681','1','1',NULL,0,'2022-04-21 15:01:04','2022-04-21 15:01:06'),('1519621520559702018','1514200247667015681','0','1514902289863712769',NULL,1,'2022-04-28 18:16:18','2022-04-28 18:16:18'),('1519627581454921729','1514200247667015681','1','1519561785961709570',NULL,0,'2022-04-28 18:40:23','2022-04-28 18:40:23'),('1519627926188961793','1514200247667015681','0','1519561785961709570',NULL,1,'2022-04-28 18:41:46','2022-04-28 18:41:46'),('1519627978147999745','1514200247667015681','1519550383037460481','1',NULL,0,'2022-04-28 18:41:58','2022-04-28 18:41:58'),('1519627978147999746','1514200247667015681','1519550383037460481','1514902289863712769',NULL,0,'2022-04-28 18:41:58','2022-04-28 18:41:58'),('1519627978147999747','1514200247667015681','1519550383037460481','1519561785961709570',NULL,0,'2022-04-28 18:41:58','2022-04-28 18:41:58'),('1519870816869756930','1514200864187760641','1519870776046596097','1',NULL,1,'2022-04-29 10:46:55','2022-04-29 10:46:55'),('1519870816869756931','1514200864187760641','1519870776046596097','1514902289863712769',NULL,1,'2022-04-29 10:46:55','2022-04-29 10:46:55'),('1522102782427959298','1514200247667015681','0','1514902289863712769',NULL,1,'2022-05-05 14:35:57','2022-05-05 14:35:57'),('1522102782427959299','1514200247667015681','0','1',NULL,1,'2022-05-05 14:35:57','2022-05-05 14:35:57'),('1522102806469709826','1514200247667015681','0','1514902289863712769',NULL,0,'2022-05-05 14:36:03','2022-05-05 14:36:03'),('1522102806469709827','1514200247667015681','0','1',NULL,0,'2022-05-05 14:36:03','2022-05-05 14:36:03'),('1522102806469709828','1514200247667015681','0','1519561785961709570',NULL,0,'2022-05-05 14:36:03','2022-05-05 14:36:03'),('1523612720891547649','1514200864187760641','1519870776046596097','1',NULL,1,'2022-05-09 18:35:55','2022-05-09 18:35:55'),('1523612720891547650','1514200864187760641','1519870776046596097','1514902289863712769',NULL,1,'2022-05-09 18:35:55','2022-05-09 18:35:55'),('1523612720891547651','1514200864187760641','1519870776046596097','1519561785961709570',NULL,1,'2022-05-09 18:35:55','2022-05-09 18:35:55'),('1523612749576392705','1514200864187760641','1519870776046596097','1',NULL,0,'2022-05-09 18:36:02','2022-05-09 18:36:02'),('2','1514200247667015681','0','1',NULL,1,'2022-04-21 17:05:32','2022-04-21 17:05:34');

/*Table structure for table `part_type` */

DROP TABLE IF EXISTS `part_type`;

CREATE TABLE `part_type` (
  `id` CHAR(20) NOT NULL COMMENT '编号',
  `name` VARCHAR(20) NOT NULL COMMENT '类型名称 设备部件类型\r\n名称',
  `show_name` VARCHAR(20) NOT NULL COMMENT '显示名称 显示名称',
  `description` VARCHAR(255) DEFAULT NULL COMMENT '描述 描述',
  `is_deleted` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否已被删除 是\r\n否已被删除',
  `create_person` VARCHAR(20) NOT NULL COMMENT '创建人 创建人',
  `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期 创建时间',
  `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间 修改时间',
  PRIMARY KEY (`id`)
) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='部件类型表 部件类型表';

/*Data for the table `part_type` */

INSERT  INTO `part_type`(`id`,`name`,`show_name`,`description`,`is_deleted`,`create_person`,`gmt_create`,`gmt_modified`) VALUES ('1','gearbox','主齿轮箱','主齿轮箱',0,'rmq','2022-04-15 14:23:14','2022-04-15 19:23:25'),('1514902289863712769','blade','叶片',NULL,0,'冉茂淇','2022-04-15 17:43:46','2022-04-15 17:43:46'),('1519561785961709570','bearing','轴承',NULL,0,'冉茂淇','2022-04-28 14:18:57','2022-04-28 14:18:57');

/*Table structure for table `part_type_detail` */

DROP TABLE IF EXISTS `part_type_detail`;

CREATE TABLE `part_type_detail` (
  `id` CHAR(20) NOT NULL COMMENT '编号',
  `type_id` CHAR(20) NOT NULL COMMENT '部件类型id 部件类型\r\nid',
  `type_group_id` CHAR(20) NOT NULL DEFAULT '0' COMMENT '部件分组id 部件分组id',
  `name` VARCHAR(20) NOT NULL COMMENT '设备标识 设备标识',
  `show_name` VARCHAR(20) NOT NULL COMMENT '型号名称 型号名称',
  `specification_type` VARCHAR(255) DEFAULT NULL COMMENT '规格类型 规格类型',
  `manufacturer` VARCHAR(20) DEFAULT NULL COMMENT '生产厂商 生产厂商',
  `description` VARCHAR(255) DEFAULT NULL COMMENT '描述 描述',
  `is_deleted` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否已被删除 是\r\n否已被删除',
  `create_person` VARCHAR(20) NOT NULL COMMENT '创建人 创建人',
  `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期 创建时间',
  `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间 修改时间',
  PRIMARY KEY (`id`)
) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='部件型号 部件型号表';

/*Data for the table `part_type_detail` */

INSERT  INTO `part_type_detail`(`id`,`type_id`,`type_group_id`,`name`,`show_name`,`specification_type`,`manufacturer`,`description`,`is_deleted`,`create_person`,`gmt_create`,`gmt_modified`) VALUES ('1','1','1','gearbox-1','齿轮箱-1',NULL,NULL,'齿轮箱1',1,'rmq','2022-04-15 14:25:08','2022-04-15 16:46:18'),('1514880293847298050','1','0','1','1',NULL,NULL,NULL,1,'1','2022-04-15 16:16:22','2022-04-15 16:16:22'),('1514881323234344961','1','1','2','2',NULL,NULL,NULL,1,'2','2022-04-15 16:20:27','2022-04-15 16:20:27'),('1514883490519236609','1','0','12','12',NULL,NULL,NULL,1,'12','2022-04-15 16:29:04','2022-04-15 16:46:25'),('1514883502112292865','1','0','2','2',NULL,NULL,NULL,1,'2','2022-04-15 16:29:07','2022-04-15 16:29:07'),('1514883523469688834','1','1','3','3',NULL,NULL,NULL,1,'3','2022-04-15 16:29:12','2022-04-15 16:29:12'),('1514883593447456769','1','1','123','123',NULL,NULL,NULL,1,'123','2022-04-15 16:29:29','2022-04-15 16:29:29'),('1514883611285831681','1','1','123','123',NULL,NULL,NULL,1,'123','2022-04-15 16:29:33','2022-04-15 16:29:33'),('1514883650871672833','1','0','22','22',NULL,NULL,NULL,1,'22','2022-04-15 16:29:42','2022-04-15 16:29:42'),('1514890235438215169','1','0','1','1',NULL,NULL,NULL,1,'1','2022-04-15 16:55:52','2022-04-15 16:55:52'),('1514890248922902529','1','0','2','2',NULL,NULL,NULL,1,'2','2022-04-15 16:55:55','2022-04-15 16:55:55'),('1514890260310437890','1','0','3','3',NULL,NULL,NULL,1,'3','2022-04-15 16:55:58','2022-04-15 16:55:58'),('1514890315893354498','1','1','1','1',NULL,NULL,NULL,1,'1','2022-04-15 16:56:11','2022-04-15 16:56:11'),('1514890333048057858','1','0','1','1',NULL,NULL,NULL,1,'2','2022-04-15 16:56:15','2022-04-15 19:48:31'),('1514891880121282561','1','0','1','1',NULL,NULL,NULL,1,'1','2022-04-15 17:02:24','2022-04-15 17:02:24'),('1514891891060027394','1','0','2','2',NULL,NULL,NULL,1,'2','2022-04-15 17:02:27','2022-04-15 17:02:27'),('1514891900090363905','1','0','3','3',NULL,NULL,NULL,1,'3','2022-04-15 17:02:29','2022-04-15 17:02:29'),('1514891911050080257','1','0','2','2',NULL,NULL,NULL,1,'2','2022-04-15 17:02:32','2022-04-15 17:02:32'),('1514891922861240322','1','0','2','2',NULL,NULL,NULL,1,'2','2022-04-15 17:02:34','2022-04-15 17:02:34'),('1514891932726243329','1','0','1','1',NULL,NULL,NULL,1,'1','2022-04-15 17:02:37','2022-04-15 17:02:37'),('1514891942964539394','1','0','1','1',NULL,NULL,NULL,1,'1','2022-04-15 17:02:39','2022-04-15 17:02:39'),('1514891956877045762','1','0','1','1',NULL,NULL,NULL,1,'1','2022-04-15 17:02:43','2022-04-15 17:02:43'),('1514891966746243074','1','0','1','1',NULL,NULL,NULL,1,'1','2022-04-15 17:02:45','2022-04-15 17:02:45'),('1514906914125787137','1','0','1','1',NULL,NULL,NULL,1,'1','2022-04-15 18:02:09','2022-04-15 18:02:09'),('1514934149721362433','1','1514933457480847361','1','1',NULL,NULL,NULL,1,'1','2022-04-15 19:50:22','2022-04-15 19:50:22'),('1514934165273841665','1','1514933457480847361','1','2',NULL,NULL,NULL,1,'3','2022-04-15 19:50:26','2022-04-15 19:50:26'),('1517125499908808706','1514902289863712769','1','gearbox-1','齿轮箱-1',NULL,NULL,NULL,1,'冉茂淇','2022-04-21 20:58:01','2022-04-21 20:58:01'),('1517129944252047362','1','0','1','1',NULL,NULL,NULL,1,'1','2022-04-21 21:15:40','2022-04-21 21:15:40'),('1517130017501372418','1','1','2','2',NULL,NULL,NULL,1,'2','2022-04-21 21:15:58','2022-04-21 21:15:58'),('1517130114326880258','1','1','gearbox-1','齿轮箱-1',NULL,NULL,NULL,0,'冉茂淇','2022-04-21 21:16:21','2022-05-18 18:51:11'),('1517335938773090306','1','1','gearbox-2','齿轮箱-2',NULL,NULL,NULL,0,'冉茂淇','2022-04-22 10:54:13','2022-04-22 10:54:13'),('1517341262368227330','1','1','gearbox-3','齿轮箱-3',NULL,NULL,NULL,1,'冉茂淇','2022-04-22 11:15:22','2022-04-22 11:15:22'),('1517342679137009666','1','1517342601617883137','gearbox-4','齿轮箱-4',NULL,NULL,NULL,0,'冉茂淇','2022-04-22 11:21:00','2022-04-22 11:21:00'),('1517342812918530050','1514902289863712769','1517342760011579393','blade-1','叶片-1',NULL,NULL,NULL,0,'冉茂淇','2022-04-22 11:21:32','2022-04-22 11:21:32'),('1517342869789097986','1514902289863712769','1517342760011579393','blade-2','叶片-2',NULL,NULL,NULL,1,'冉茂淇','2022-04-22 11:21:46','2022-04-22 11:21:46'),('1517343016505851905','1514902289863712769','1517342978941665282','blade-3','叶片-3',NULL,NULL,NULL,0,'冉茂淇','2022-04-22 11:22:21','2022-04-22 11:22:21');

/*Table structure for table `part_type_group` */

DROP TABLE IF EXISTS `part_type_group`;

CREATE TABLE `part_type_group` (
  `id` CHAR(20) NOT NULL COMMENT '编号',
  `parent_group_id` CHAR(20) NOT NULL DEFAULT '0' COMMENT '父组id 父组id',
  `type_id` CHAR(20) NOT NULL COMMENT '部件类型id 部件类型\r\nid',
  `show_name` VARCHAR(20) NOT NULL COMMENT '部件分组名称 部件分组\r\n名称',
  `description` VARCHAR(20) DEFAULT NULL COMMENT '描述 描述',
  `is_deleted` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否已被删除 是\r\n否已被删除',
  `create_person` VARCHAR(20) NOT NULL COMMENT '创建人 创建人',
  `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期 创建时间',
  `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间 修改时间',
  PRIMARY KEY (`id`)
) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='部件分组 部件分组';

/*Data for the table `part_type_group` */

INSERT  INTO `part_type_group`(`id`,`parent_group_id`,`type_id`,`show_name`,`description`,`is_deleted`,`create_person`,`gmt_create`,`gmt_modified`) VALUES ('1','0','1','主齿轮箱分组1','主齿轮箱分组1',0,'rmq','2022-04-15 14:23:48','2022-04-15 19:47:55'),('1514929672884887554','0','1','主齿轮箱分组2','主齿轮箱分组2',1,'rmq','2022-04-15 19:32:35','2022-04-15 19:32:35'),('1514933457480847361','0','1','主齿轮箱分组2',NULL,1,'冉茂淇','2022-04-15 19:47:37','2022-04-15 19:47:37'),('1517342601617883137','0','1','主齿轮箱分组2',NULL,0,'冉茂淇','2022-04-22 11:20:42','2022-04-22 11:20:42'),('1517342760011579393','0','1514902289863712769','叶片分组1',NULL,0,'冉茂淇','2022-04-22 11:21:20','2022-04-22 11:21:20'),('1517342978941665282','0','1514902289863712769','叶片分组3',NULL,0,'冉茂淇','2022-04-22 11:22:12','2022-04-27 13:35:09'),('1519184458601742338','0','1514902289863712769','叶片分组-3',NULL,1,'rmq','2022-04-27 13:19:35','2022-04-27 13:19:35'),('1519184694535536641','0','1514902289863712769','叶片分组3',NULL,1,'冉茂淇','2022-04-27 13:20:31','2022-04-27 13:20:31'),('1519185083863416834','1517342760011579393','1514902289863712769','叶片分组1-1',NULL,1,'冉茂淇','2022-04-27 13:22:04','2022-04-27 13:22:04'),('1519188342200090625','0','1514902289863712769','叶片分组3',NULL,1,'rmq','2022-04-27 13:35:01','2022-04-27 13:35:01'),('1519281293781704706','1','1','主齿轮箱分组3',NULL,1,'rmq','2022-04-27 19:44:22','2022-04-27 19:44:22');

/*Table structure for table `sub_system` */

DROP TABLE IF EXISTS `sub_system`;

CREATE TABLE `sub_system` (
  `id` CHAR(20) NOT NULL COMMENT '编号',
  `device_detail_id` VARCHAR(20) NOT NULL COMMENT '设备型号id',
  `name` VARCHAR(20) NOT NULL COMMENT '名称',
  `show_name` VARCHAR(20) NOT NULL COMMENT '显示名称',
  `description` VARCHAR(255) DEFAULT NULL COMMENT '描述',
  `is_deleted` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否已被删除',
  `create_person` VARCHAR(20) NOT NULL COMMENT '创建人',
  `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`)
) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='子系统 子系统';

/*Data for the table `sub_system` */

INSERT  INTO `sub_system`(`id`,`device_detail_id`,`name`,`show_name`,`description`,`is_deleted`,`create_person`,`gmt_create`,`gmt_modified`) VALUES ('1','1514200247667015681','sub_system_1','子系统-1',NULL,0,'冉茂淇','2022-04-21 14:58:54','2022-04-27 20:42:08'),('1519291225528643586','1514200247667015681','sub_system_2','子系统-2',NULL,1,'冉茂淇','2022-04-27 20:23:50','2022-04-27 20:23:50'),('1519300177591119873','1514200247667015681','sub_system_2','子系统-2',NULL,1,'rmq','2022-04-27 20:59:24','2022-04-27 20:59:24'),('1519550383037460481','1514200247667015681','sub_system_2','子系统-2',NULL,0,'rmq','2022-04-28 13:33:38','2022-04-28 13:33:38'),('1519870776046596097','1514200864187760641','8MWSubSystem-1','8MW子系统-1',NULL,0,'冉茂淇','2022-04-29 10:46:46','2022-04-29 10:46:46');

/*!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 */;
