/*
SQLyog Ultimate v13.1.1 (64 bit)
MySQL - 5.7.32-log : Database - lims_laboratory
*********************************************************************
*/

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

USE `lims_laboratory`;

/*Table structure for table `classify` */

DROP TABLE IF EXISTS `classify`;

CREATE TABLE `classify` (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '分类主键',
  `father_name` varchar(25) NOT NULL COMMENT '分类父名称',
  `son_name` varchar(25) DEFAULT NULL COMMENT '分类子名称',
  `state` int(1) NOT NULL DEFAULT '1' COMMENT '逻辑删除',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '更新时间',
  `version` int(1) NOT NULL DEFAULT '1' COMMENT '乐观锁',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4;

/*Data for the table `classify` */

insert  into `classify`(`id`,`father_name`,`son_name`,`state`,`create_time`,`update_time`,`version`) values 
(1,'温度测量仪表','体温计',1,'2023-07-21 10:42:26','2023-07-21 14:14:54',1),
(3,'体温计',NULL,1,'2023-07-21 10:48:51','2023-07-21 10:48:51',1),
(5,'体温',NULL,1,'2023-07-21 10:53:32','2023-07-21 10:53:32',1),
(10,'体温','体温',0,'2023-07-21 11:16:51','2023-07-21 13:45:52',1),
(12,'体温','体温计',1,'2023-07-21 11:16:51','2023-07-21 11:16:51',1),
(13,'体温','体温',1,'2023-07-21 13:50:52','2023-07-21 13:50:52',1);

/*Table structure for table `enterprise` */

DROP TABLE IF EXISTS `enterprise`;

CREATE TABLE `enterprise` (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '企业编号',
  `name` varchar(20) NOT NULL COMMENT '企业名字',
  `byname` varchar(20) NOT NULL COMMENT '企业简称',
  `link_name` varchar(10) NOT NULL COMMENT '联系人名字',
  `link_phone` varchar(11) NOT NULL COMMENT '联系人电话',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '更新时间',
  `version` int(1) NOT NULL DEFAULT '1' COMMENT '锁',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;

/*Data for the table `enterprise` */

insert  into `enterprise`(`id`,`name`,`byname`,`link_name`,`link_phone`,`create_time`,`update_time`,`version`) values 
(1,'中天科技网络有限公司','中天科技','李林','18400000000','2023-07-07 10:51:38','2023-07-07 10:51:41',1);

/*Table structure for table `equipment_point` */

DROP TABLE IF EXISTS `equipment_point`;

CREATE TABLE `equipment_point` (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `instrument_id` int(10) NOT NULL COMMENT '仪器Id 关联',
  `user_id` int(10) NOT NULL COMMENT '用户Id 关联',
  `equipment_point` varchar(25) NOT NULL COMMENT '码点编号',
  `equipment_point_name` varchar(25) NOT NULL COMMENT '码点名称',
  `unit` varchar(20) NOT NULL COMMENT '单位',
  `descriptiveness` varchar(100) DEFAULT '--' COMMENT '描述',
  `create_time` datetime NOT NULL COMMENT '创建日期',
  `update_time` datetime NOT NULL COMMENT '更新日期',
  `state` int(11) NOT NULL DEFAULT '1' COMMENT '逻辑删除',
  `version` int(11) DEFAULT '1' COMMENT '乐观锁',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;

/*Data for the table `equipment_point` */

insert  into `equipment_point`(`id`,`instrument_id`,`user_id`,`equipment_point`,`equipment_point_name`,`unit`,`descriptiveness`,`create_time`,`update_time`,`state`,`version`) values 
(1,1,7,'Area-1','导体屏蔽（壁厚面积）','mm','疯了，做不了','2023-07-24 14:40:01','2023-07-24 17:23:15',1,1),
(2,1,7,'Area-2','导体屏蔽（壁厚面积）','mm','太困了','2023-07-24 14:40:01','2023-07-24 15:03:44',1,1);

/*Table structure for table `inspection` */

DROP TABLE IF EXISTS `inspection`;

CREATE TABLE `inspection` (
  `id` varchar(25) NOT NULL COMMENT '报检编号',
  `type` int(1) NOT NULL COMMENT '0：原材料；1：产品；2：半成品；',
  `inspection_status` int(1) NOT NULL DEFAULT '0' COMMENT '报检状态 1：已检验；0未检验',
  `qualified_state` int(1) DEFAULT NULL COMMENT '是否合格 1：是；0否',
  `state` int(1) NOT NULL DEFAULT '1' COMMENT '1：待提交；2：已提交；0：已作废',
  `create_time` datetime NOT NULL COMMENT '报检时间',
  `update_time` datetime NOT NULL,
  `version` int(1) DEFAULT '1',
  `user_name` varchar(25) NOT NULL COMMENT '报检人',
  `inspect_user_id` int(10) DEFAULT NULL COMMENT '关联 检验人（用户id）',
  `inspect_start_time` datetime DEFAULT NULL COMMENT '检验开始日期',
  `inspect_end_time` datetime DEFAULT NULL COMMENT '检验结束日期',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

/*Data for the table `inspection` */

insert  into `inspection`(`id`,`type`,`inspection_status`,`qualified_state`,`state`,`create_time`,`update_time`,`version`,`user_name`,`inspect_user_id`,`inspect_start_time`,`inspect_end_time`) values 
('1680929494813868034',0,0,NULL,1,'2023-07-17 21:16:36','2023-07-17 21:16:36',1,'测试人员',NULL,NULL,NULL),
('1680929899014750210',0,0,NULL,1,'2023-07-17 21:18:13','2023-07-17 21:18:13',1,'测试人员',NULL,NULL,NULL),
('1681215775833042945',0,0,NULL,1,'2023-07-18 16:14:11','2023-07-18 16:14:11',1,'测试人员',NULL,NULL,NULL);

/*Table structure for table `inspection_material_list` */

DROP TABLE IF EXISTS `inspection_material_list`;

CREATE TABLE `inspection_material_list` (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `material_id` varchar(25) NOT NULL COMMENT '物料id',
  `material_num` int(10) NOT NULL COMMENT '报检数量-物料数量',
  `material_supplier` varchar(25) NOT NULL COMMENT '供应商',
  `material_name` varchar(25) NOT NULL COMMENT '物料名称',
  `material_location` varchar(25) NOT NULL COMMENT '物料存放地',
  `material_batch` varchar(25) NOT NULL COMMENT '物料批次',
  `material_reel_number` varchar(25) NOT NULL COMMENT '物料盘号',
  `specifications_serial_number` varchar(50) NOT NULL COMMENT '规格名称/型号名称',
  `specifications_voltage_level` varchar(30) DEFAULT NULL COMMENT '电压等级',
  `specifications_cross_section` varchar(30) DEFAULT NULL COMMENT '主线心截面',
  `specifications_number_of_cores` varchar(30) DEFAULT NULL COMMENT '主线芯芯数',
  `specifications_instruct` varchar(30) DEFAULT NULL COMMENT '生产指令号',
  `notes` varchar(100) DEFAULT NULL COMMENT '备注',
  `state` int(1) NOT NULL DEFAULT '1',
  `create_time` datetime NOT NULL COMMENT '报检时间',
  `update_time` datetime NOT NULL,
  `version` int(1) DEFAULT '1',
  `inspection_id` varchar(25) NOT NULL COMMENT '关联 报检单id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4;

/*Data for the table `inspection_material_list` */

insert  into `inspection_material_list`(`id`,`material_id`,`material_num`,`material_supplier`,`material_name`,`material_location`,`material_batch`,`material_reel_number`,`specifications_serial_number`,`specifications_voltage_level`,`specifications_cross_section`,`specifications_number_of_cores`,`specifications_instruct`,`notes`,`state`,`create_time`,`update_time`,`version`,`inspection_id`) values 
(1,'1680929494813868034',100,'中天','电线电缆','地下一层','1','123','测试规格/dsahj1','1','1','1','1',NULL,1,'2023-07-17 21:16:36','2023-07-17 21:16:36',1,'1681215775833042945'),
(2,'1680929899014750210',100,'中天','电线电缆','地下一层','1','123','测试规格/dsahj1','1','1','1','1',NULL,1,'2023-07-17 21:18:13','2023-07-17 21:18:13',1,'1681215775833042945'),
(3,'1681499095783407618',100,'中天','电线电缆','地下一层','1','123','23123','3424','2131','2','123','312',1,'2023-07-19 11:00:00','2023-07-19 11:00:00',1,'1681215775833042945'),
(4,'1',10,'中天','电线电缆','地下一层','1','123','','','规格/型号','','','',1,'2023-07-19 13:59:46','2023-07-19 13:59:46',1,'1681215775833042945'),
(5,'1',10,'中天','电线电缆','地下一层','1','123','','','规格/型号','','','',1,'2023-07-19 14:00:51','2023-07-19 14:00:51',1,'1681215775833042945'),
(6,'1',10,'中天','电线电缆','地下一层','1','123','','','规格/型号','','','',0,'2023-07-19 14:01:46','2023-07-19 14:01:46',1,'1681215775833042945'),
(7,'1',10,'中天','电线电缆','地下一层','1','123','','','规格/型号','','','',0,'2023-07-19 14:02:47','2023-07-19 14:02:47',1,'1681215775833042945'),
(8,'1',10,'中天','电线电缆','地下一层','1','123','规格/型号','5','2','4','3','1',1,'2023-07-19 14:25:56','2023-07-19 14:39:23',1,'1681215775833042945'),
(9,'1',10,'中天','电线电缆','地下一层','1','123','规格/型号','5','2','4','3','1',1,'2023-07-19 15:17:56','2023-07-19 15:17:56',1,'1681215775833042945'),
(13,'1',10,'中天','电线电缆','地下一层','1','123','规格/型号','5','2','4','3','1',0,'2023-07-19 15:44:51','2023-07-20 11:07:27',1,'1681215775833042945');

/*Table structure for table `inspection_product_list` */

DROP TABLE IF EXISTS `inspection_product_list`;

CREATE TABLE `inspection_product_list` (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '项目id',
  `name` varchar(25) NOT NULL COMMENT '项目名称',
  `method` varchar(25) NOT NULL COMMENT '试验方法',
  `ask` varchar(30) DEFAULT NULL COMMENT '试验要求',
  `unit` varchar(20) NOT NULL COMMENT '单位',
  `required` varchar(20) NOT NULL COMMENT '招标人要求值',
  `internal` varchar(20) NOT NULL COMMENT '内控值',
  `start_time` datetime DEFAULT NULL COMMENT '开始日期',
  `end_time` datetime DEFAULT NULL COMMENT '结束日期',
  `state` int(1) NOT NULL DEFAULT '1',
  `create_time` datetime NOT NULL,
  `update_time` datetime NOT NULL,
  `version` int(1) DEFAULT '1',
  `inspection_material_list_id` int(10) NOT NULL COMMENT '关联 报检物料id',
  `user_id` int(10) NOT NULL COMMENT '关联 用户id 试验员',
  `instrument_id` int(10) DEFAULT NULL COMMENT '关联 设备id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4;

/*Data for the table `inspection_product_list` */

insert  into `inspection_product_list`(`id`,`name`,`method`,`ask`,`unit`,`required`,`internal`,`start_time`,`end_time`,`state`,`create_time`,`update_time`,`version`,`inspection_material_list_id`,`user_id`,`instrument_id`) values 
(2,'项目一','尺表测量',NULL,'米','>=1','>1',NULL,NULL,1,'2023-07-17 21:16:36','2023-07-17 21:16:36',1,1,1,NULL),
(3,'项目一','尺表测量',NULL,'米','>=1','>1',NULL,NULL,1,'2023-07-17 21:18:13','2023-07-17 21:18:13',1,2,1,NULL),
(4,'项目二','测试方法',NULL,'人民币','>1','>2',NULL,NULL,1,'2023-07-17 21:18:13','2023-07-17 21:18:13',1,3,1,NULL),
(5,'项目一','尺表测量',NULL,'米','>=1','>1',NULL,NULL,0,'2023-07-19 15:44:51','2023-07-20 11:07:27',1,0,1,NULL),
(6,'项目二','测试方法',NULL,'人民币','>1','>2',NULL,NULL,0,'2023-07-19 15:44:51','2023-07-20 11:07:27',1,0,1,NULL);

/*Table structure for table `inspection_records` */

DROP TABLE IF EXISTS `inspection_records`;

CREATE TABLE `inspection_records` (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '记录id',
  `method` varchar(25) NOT NULL COMMENT '检测方法',
  `num` int(10) NOT NULL COMMENT '检测的样品数量',
  `value` varchar(25) NOT NULL COMMENT '检测值',
  `submit_state` int(1) NOT NULL DEFAULT '0' COMMENT '提交状态 0：待提交；1：待审核；2：已通过',
  `state` int(1) NOT NULL DEFAULT '1',
  `create_time` datetime NOT NULL COMMENT '检测日期',
  `update_time` datetime NOT NULL,
  `version` int(1) DEFAULT NULL,
  `inspection_product_list_id` int(10) NOT NULL COMMENT '关联 样品下的项目id',
  `user_name` int(10) DEFAULT NULL COMMENT '关联 审批人（用户名称）',
  `approval_time` datetime DEFAULT NULL COMMENT '审批日期',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

/*Data for the table `inspection_records` */

/*Table structure for table `instrument` */

DROP TABLE IF EXISTS `instrument`;

CREATE TABLE `instrument` (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `classify_id` int(10) NOT NULL COMMENT '分类ID 关联',
  `user_id` int(10) NOT NULL COMMENT '用户关联 保管人',
  `equipment_code` varchar(25) NOT NULL COMMENT '仪器设备编号',
  `equipment_name` varchar(25) NOT NULL COMMENT '仪器设备名称',
  `conditions` int(1) NOT NULL COMMENT '默认1；1：运行、2：故障、3：报修、4：检修、5：待机',
  `specifications_models` varchar(25) NOT NULL COMMENT '规格型号',
  `measuring_range` varchar(25) DEFAULT '--' COMMENT '测量范围',
  `error_rate` varchar(10) DEFAULT '--' COMMENT '误差',
  `manufacturer` varchar(50) DEFAULT '--' COMMENT '生产厂家',
  `arrival_date` datetime DEFAULT NULL COMMENT '到货日期',
  `acceptance_date` datetime DEFAULT NULL COMMENT '验收日期',
  `storage_place` varchar(100) DEFAULT '--' COMMENT '存放地',
  `whether_data_acquisition` int(1) NOT NULL COMMENT '是否支持数采',
  `equipment_measurement` int(1) NOT NULL COMMENT '是否需要仪器设备计量：如果需要计量周期必填；如果不需要计量周期不必填',
  `term_validity` int(11) NOT NULL COMMENT '计量截止有效期',
  `descriptiveness` varchar(100) DEFAULT '--' COMMENT '描述',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '更新时间',
  `state` int(1) NOT NULL DEFAULT '1' COMMENT '逻辑删除',
  `version` int(1) DEFAULT '1' COMMENT '乐观锁',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4;

/*Data for the table `instrument` */

insert  into `instrument`(`id`,`classify_id`,`user_id`,`equipment_code`,`equipment_name`,`conditions`,`specifications_models`,`measuring_range`,`error_rate`,`manufacturer`,`arrival_date`,`acceptance_date`,`storage_place`,`whether_data_acquisition`,`equipment_measurement`,`term_validity`,`descriptiveness`,`create_time`,`update_time`,`state`,`version`) values 
(1,1,9,'JSTC-W1-00001','数字电桥',1,'WCDMS-1','12毫米','0.000001微米','江苏鵷雏','2001-07-06 00:00:00','2060-07-06 00:00:00','地球亚洲中国江苏南通',1,0,12,'疯狂星期五！！！','2023-07-21 15:15:23','2023-07-24 17:10:17',1,1),
(2,1,9,'JSTC-W1-00002','数字电桥',1,'WCDMS-1','12毫米','0.000001微米','江苏鵷雏','2001-07-06 00:00:00','2060-07-06 00:00:00','地球亚洲中国江苏南通',1,0,12,'疯狂星期五！！！','2023-07-21 15:17:56','2023-07-21 15:58:35',1,1),
(3,1,10,'JSTC-W1-00003','数字电桥',3,'WCDMS-1','12毫米','0.000001微米','江苏鵷雏','2001-07-06 00:00:00','2060-07-06 00:00:00','地球亚洲中国江苏南通',1,0,12,'疯狂星期五！！！','2020-01-09 15:18:02','2023-07-21 15:18:02',1,1),
(4,1,11,'JSTC-W1-00004','数字电桥',2,'WCDMS-1','12毫米','0.000001微米','江苏鵷雏','2001-07-06 00:00:00','2060-07-06 00:00:00','地球亚洲中国江苏南通',1,0,12,'疯狂星期五！！！','2023-07-21 15:18:10','2023-07-21 15:18:10',1,1),
(5,1,12,'JSTC-W1-00005','数字电桥',4,'WCDMS-1','12毫米','0.000001微米','江苏鵷雏','2001-07-06 00:00:00','2060-07-06 00:00:00','地球亚洲中国江苏南通',1,0,12,'疯狂星期五！！！','2023-07-21 15:18:15','2023-07-21 15:18:15',1,1),
(6,1,13,'JSTC-W1-00006','A数字电桥',1,'WCDMS-1','12毫米','0.000001微米','江苏鵷雏','2001-07-06 00:00:00','2060-07-06 00:00:00','地球亚洲中国江苏南通',1,0,12,'疯狂星期五！！！','2023-07-21 15:18:19','2023-07-21 15:18:19',1,1),
(7,1,14,'JSTC-W1-00007','数字电桥',5,'WCDMS-1','12毫米','0.000001微米','江苏鵷雏','2001-07-06 00:00:00','2060-07-06 00:00:00','地球亚洲中国江苏南通',1,0,12,'疯狂星期五！！！','2023-07-21 15:18:23','2023-07-21 15:18:23',1,1),
(8,1,9,'JSTC-W1-00008','数字电桥',1,'WCDMS-1','12毫米','0.000001微米','江苏鵷雏','2001-07-06 00:00:00','2060-07-06 00:00:00','地球亚洲中国江苏南通',1,0,12,'疯狂星期五！！！','2023-07-24 14:16:07','2023-07-24 14:16:07',1,1);

/*Table structure for table `material` */

DROP TABLE IF EXISTS `material`;

CREATE TABLE `material` (
  `id` varchar(25) NOT NULL COMMENT '物料id',
  `name` varchar(25) NOT NULL COMMENT '物料名称',
  `supplier` varchar(25) NOT NULL COMMENT '供应商',
  `location` varchar(25) NOT NULL COMMENT '物料存放地',
  `num` int(10) NOT NULL COMMENT '物料数量',
  `batch` varchar(25) NOT NULL COMMENT '批次',
  `reel_number` varchar(25) NOT NULL COMMENT '盘号',
  `state` int(1) NOT NULL DEFAULT '1',
  `create_time` datetime NOT NULL,
  `update_time` datetime NOT NULL,
  `version` int(1) NOT NULL DEFAULT '1',
  `specifications_id` int(10) NOT NULL COMMENT '关联 规格id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

/*Data for the table `material` */

insert  into `material`(`id`,`name`,`supplier`,`location`,`num`,`batch`,`reel_number`,`state`,`create_time`,`update_time`,`version`,`specifications_id`) values 
('11111111111111','22222222222','1111111111','1111111',1111111,'111111','1111111',0,'2023-07-20 15:19:11','2023-07-21 13:04:12',1,1),
('112233445566','手机','test','test',1,'2','3',1,'2023-07-21 13:29:57','2023-07-21 13:29:57',1,1),
('11223456','test','腾讯','仓库一，二号架',200,'2','152453211563232',1,'2023-07-21 13:51:21','2023-07-21 13:51:21',1,1),
('12345','testmaterial','test','test',1,'123','1',0,'2023-07-21 13:08:44','2023-07-21 13:13:54',1,1),
('123456','test','test','test',1,'1','1',0,'2023-07-21 13:14:49','2023-07-21 13:20:20',1,1),
('152423211563212','手机','百度','仓库一，二号架',200,'1','152453211563212',0,'2023-07-17 14:22:57','2023-07-21 13:28:54',1,1),
('152453211563211','石头','百度','仓库一，三号架',200,'1','152453211563212',0,'2023-07-17 14:14:03','2023-07-21 13:42:15',1,1),
('152453211563212','石头','百度','仓库一，二号架',200,'1','152453211563212',1,'2023-07-21 13:41:49','2023-07-21 13:41:49',1,1),
('152453211563222','石头','百度','仓库一，三号架',200,'1','152453211563212',1,'2023-07-17 14:14:03','2023-07-20 11:09:36',1,4),
('152453211563233','石头','百度','仓库一，三号架',200,'1','152453211563212',1,'2023-07-17 14:14:03','2023-07-20 11:00:29',1,4),
('218469124614','1122333','test','test',1,'1','1',1,'2023-07-21 13:31:00','2023-07-21 13:31:00',1,1),
('22222222','2222222','22222222','22222222',22222222,'2222222222','2222222',0,'2023-07-20 15:20:20','2023-07-21 13:21:25',1,1);

/*Table structure for table `metrical_information` */

DROP TABLE IF EXISTS `metrical_information`;

CREATE TABLE `metrical_information` (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `user_id` int(10) NOT NULL COMMENT '用户关联Id',
  `measurement_unit` varchar(15) NOT NULL COMMENT '计量单位',
  `begin_date` datetime NOT NULL COMMENT '开始日期',
  `end_date` datetime NOT NULL COMMENT '结束日期',
  `uncertainty` varchar(20) NOT NULL COMMENT '不确定度',
  `result` int(1) NOT NULL COMMENT '结果 1：合格；2：矫正后可用；3：不合格',
  `performance_index` varchar(100) DEFAULT NULL COMMENT '性能指标',
  `remarks` varchar(100) DEFAULT NULL COMMENT '备注',
  `file_path` varchar(50) DEFAULT NULL COMMENT '文件路径',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '更新时间',
  `state` int(1) NOT NULL DEFAULT '1' COMMENT '逻辑删除',
  `version` int(1) DEFAULT '1' COMMENT '乐观锁',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;

/*Data for the table `metrical_information` */

insert  into `metrical_information`(`id`,`user_id`,`measurement_unit`,`begin_date`,`end_date`,`uncertainty`,`result`,`performance_index`,`remarks`,`file_path`,`create_time`,`update_time`,`state`,`version`) values 
(1,7,'1','2023-07-25 00:00:00','2023-07-25 00:00:00','1',1,'1','1','1690255123954_131493.png','2023-07-25 10:43:30','2023-07-25 13:50:24',1,1),
(2,7,'2','2023-07-25 00:00:00','2023-07-25 00:00:00','2',2,'2','2','1690264656523_540845.png','2023-07-25 11:18:44','2023-07-25 13:57:37',1,1);

/*Table structure for table `plan` */

DROP TABLE IF EXISTS `plan`;

CREATE TABLE `plan` (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '计划编号',
  `results` int(10) DEFAULT NULL COMMENT '检验结果 0：未完成；1：已完成；',
  `thing` varchar(50) DEFAULT NULL COMMENT '试验说明',
  `state` int(1) NOT NULL DEFAULT '1' COMMENT '1：待认领；2：待分配；3：已分配；4：超期待分配；5：已完成；0：已作废',
  `create_time` datetime NOT NULL COMMENT '任务登记时间',
  `update_time` datetime NOT NULL,
  `version` int(1) DEFAULT '1',
  `inspection_id` varchar(25) NOT NULL COMMENT '关联 报检id(申请单编号)',
  `user_id` int(10) DEFAULT NULL COMMENT '关联 用户id(负责人id)',
  `device_id` int(10) DEFAULT NULL COMMENT '关联 设备id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

/*Data for the table `plan` */

/*Table structure for table `product` */

DROP TABLE IF EXISTS `product`;

CREATE TABLE `product` (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '测试标准id',
  `name` varchar(25) NOT NULL COMMENT '测试标准名称',
  `method` varchar(25) NOT NULL COMMENT '试验方法',
  `father` varchar(20) DEFAULT NULL COMMENT '测试标准父类',
  `unit` varchar(20) NOT NULL COMMENT '单位',
  `required` varchar(20) NOT NULL COMMENT '招标人要求值',
  `internal` varchar(20) NOT NULL COMMENT '内控值',
  `state` int(1) NOT NULL DEFAULT '1',
  `create_time` datetime NOT NULL,
  `update_time` datetime NOT NULL,
  `version` int(1) NOT NULL DEFAULT '1',
  `user_id` int(10) NOT NULL COMMENT '关联 用户id',
  `material_id` varchar(25) NOT NULL COMMENT '关联 物料id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4;

/*Data for the table `product` */

insert  into `product`(`id`,`name`,`method`,`father`,`unit`,`required`,`internal`,`state`,`create_time`,`update_time`,`version`,`user_id`,`material_id`) values 
(1,'单位长度质量','--','铝包钢芯铝绞线','km','<=0.3458','<=0.3458',0,'2023-07-17 14:56:22','2023-07-21 13:28:54',1,7,'152423211563212'),
(2,'单位宽度质量','--','铝包钢芯铝绞线','km','<=0.3458','<=0.3458',1,'2023-07-17 14:56:22','2023-07-20 11:09:36',1,7,'152453211563222'),
(3,'单位宽度质量','--',NULL,'km','<=0.3458','<=0.3458',1,'2023-07-17 14:56:22','2023-07-20 11:09:36',1,7,'152453211563222'),
(4,'好多1','控制变量法','1111111','好多1','2000','100',0,'2023-07-20 16:05:38','2023-07-21 13:04:12',1,7,'11111111111111'),
(5,'好多好多','---','新的父项目','好多好多','200','100',0,'2023-07-20 16:10:19','2023-07-21 13:04:12',1,7,'11111111111111'),
(6,'好多好多','---','新的父项目','好多好多','200','100',0,'2023-07-20 16:11:39','2023-07-21 13:04:12',1,7,'11111111111111'),
(7,'1111111','test',NULL,'test','12','123',1,'2023-07-21 13:31:34','2023-07-21 13:31:34',1,7,'112233445566'),
(8,'111111','1',NULL,'11','1','1',1,'2023-07-21 13:33:06','2023-07-21 13:33:06',1,7,'112233445566'),
(9,'单位长度质量','--','铝包钢芯铝绞线','km','<=0.3458','<=0.3458',1,'2023-07-21 13:39:28','2023-07-21 13:39:28',1,7,'152453211563212'),
(10,'单位长度质量','--','铝包钢芯铝绞线','km','<=0.3458','<=0.3458',0,'2023-07-21 13:42:01','2023-07-21 14:19:34',1,7,'152453211563212'),
(11,'1111111111','1111','铝包钢芯铝绞线','cm','11','111',0,'2023-07-21 13:48:25','2023-07-21 14:20:50',1,7,'152453211563212'),
(12,'11111111','1','铝包钢芯铝绞线','1111','1','1',0,'2023-07-21 13:48:59','2023-07-21 14:19:04',1,7,'112233445566'),
(13,'11111','--','11111111','km','<=0.3458','<=0.3458',1,'2023-07-21 13:52:21','2023-07-21 13:52:21',1,7,'11223456'),
(14,'12345','--','11111111','km','<=0.3458','<=0.3458',0,'2023-07-21 13:53:58','2023-07-21 13:56:17',1,7,'11223456'),
(15,'11111111111111','1','铝包钢芯铝绞线','111','11','1',0,'2023-07-21 14:23:10','2023-07-21 14:23:22',1,7,'152453211563212');

/*Table structure for table `role` */

DROP TABLE IF EXISTS `role`;

CREATE TABLE `role` (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '角色id',
  `name` varchar(30) NOT NULL COMMENT '角色名',
  `power` int(1) NOT NULL COMMENT '0：无权限；1：有权限',
  `state` int(1) NOT NULL DEFAULT '1' COMMENT '逻辑删除 正常>=1,删除<=0',
  `create_time` datetime NOT NULL,
  `update_time` datetime NOT NULL,
  `version` int(10) NOT NULL COMMENT '乐观锁',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;

/*Data for the table `role` */

insert  into `role`(`id`,`name`,`power`,`state`,`create_time`,`update_time`,`version`) values 
(1,'普通人员',1,1,'2023-07-07 11:30:06','2023-07-07 11:30:11',1);

/*Table structure for table `serial_number` */

DROP TABLE IF EXISTS `serial_number`;

CREATE TABLE `serial_number` (
  `id` varchar(25) NOT NULL COMMENT '型号编号',
  `name` varchar(25) NOT NULL COMMENT '型号名称',
  `state` int(1) NOT NULL DEFAULT '1',
  `create_time` datetime NOT NULL,
  `update_time` datetime NOT NULL,
  `version` int(1) NOT NULL DEFAULT '1',
  `standards_id` varchar(15) NOT NULL COMMENT '关联字段 标准id',
  `user_id` int(10) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

/*Data for the table `serial_number` */

insert  into `serial_number`(`id`,`name`,`state`,`create_time`,`update_time`,`version`,`standards_id`,`user_id`) values 
('111222','型号1',0,'2023-07-20 15:01:08','2023-07-20 15:20:09',1,'111',7),
('230711000002','光纤2.0.1',1,'2023-07-11 22:34:11','2023-07-20 09:28:19',1,'230711000001',7),
('ModelNumber001','光纤2.0.1',1,'2023-07-20 10:51:01','2023-07-20 10:51:01',1,'230711000002',7),
('ModelNumber002','光纤2.0.2',1,'2023-07-18 13:36:13','2023-07-20 09:28:19',1,'230711000001',7),
('ModelNumber003','光纤2.0.3',1,'2023-07-18 13:36:23','2023-07-20 10:54:11',1,'230711000002',7),
('num1','光纤2.0.3',1,'2023-07-20 14:18:24','2023-07-20 14:18:24',1,'230711000002',7),
('num2','光纤2.0.4',1,'2023-07-20 14:19:34','2023-07-20 14:19:34',1,'230711000002',7),
('PleasantGoat','1345',1,'2023-07-18 13:46:49','2023-07-20 10:22:42',1,'230711000002',7),
('spiritless','78915',1,'2023-07-18 13:46:24','2023-07-18 13:46:24',1,'230711000004',7);

/*Table structure for table `specifications` */

DROP TABLE IF EXISTS `specifications`;

CREATE TABLE `specifications` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '规格id',
  `number` varchar(25) NOT NULL COMMENT '规格编号',
  `name` varchar(25) NOT NULL COMMENT '产品规格',
  `instruct` varchar(25) DEFAULT NULL COMMENT '生产指令号',
  `voltage_level` varchar(30) DEFAULT NULL COMMENT '电压等级',
  `cross_section` varchar(30) DEFAULT NULL COMMENT '主线心截面',
  `number_of_cores` varchar(30) DEFAULT NULL COMMENT '主线芯芯数',
  `spe_state` int(1) NOT NULL DEFAULT '-1' COMMENT '规格状态 0：停用；1：正常；-1：草稿',
  `state` int(1) NOT NULL DEFAULT '1' COMMENT '逻辑删除 正常>=1,删除<=0',
  `create_time` datetime NOT NULL,
  `update_time` datetime NOT NULL COMMENT '更新时间',
  `version` int(1) NOT NULL DEFAULT '1',
  `vel` varchar(15) NOT NULL DEFAULT 'V1.0' COMMENT '规格版本',
  `serial_id` varchar(25) NOT NULL COMMENT '关联字段 型号id',
  `user_id` int(10) NOT NULL COMMENT '关联字段 用户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4;

/*Data for the table `specifications` */

insert  into `specifications`(`id`,`number`,`name`,`instruct`,`voltage_level`,`cross_section`,`number_of_cores`,`spe_state`,`state`,`create_time`,`update_time`,`version`,`vel`,`serial_id`,`user_id`) values 
(1,'111','ab','test','1','test','test',0,1,'2023-07-12 00:00:12','2023-07-21 09:52:22',1,'V1.0','230711000002',7),
(2,'abc','AB','abc','abc','abc','abc',0,1,'2023-07-12 00:00:12','2023-07-20 16:34:38',1,'V1.0','230711000002',7),
(4,'abc','AB','abc','abc','abc','abc',1,1,'2023-07-12 00:00:12','2023-07-20 11:00:29',1,'V1.0','ModelNumber003',7),
(5,'abc','AB','abc','abc','abc','abc',1,1,'2023-07-12 00:00:12','2023-07-20 10:22:42',1,'V1.0','PleasantGoat',7),
(6,'modelId','AB','test','test','test','test',-1,1,'2023-07-20 13:42:40','2023-07-20 13:42:40',1,'V1.0','230711000002',7),
(7,'modelID1','test','test','test','test','test',-1,1,'2023-07-20 14:02:26','2023-07-20 14:02:26',1,'V1.0','230711000002',7),
(8,'modelId2','test11','test','test','test','test',-1,1,'2023-07-20 14:03:54','2023-07-20 14:03:54',1,'V1.0','230711000002',7),
(9,'111222','光纤2.0.3','test','test','test','test',-1,1,'2023-07-20 14:55:12','2023-07-20 14:55:12',1,'V1.0','230711000002',7);

/*Table structure for table `standards` */

DROP TABLE IF EXISTS `standards`;

CREATE TABLE `standards` (
  `id` varchar(15) NOT NULL COMMENT '标准编号 yyMMdd000001(000001++)',
  `name` varchar(25) NOT NULL COMMENT '标准名称',
  `eng_name` varchar(25) NOT NULL COMMENT '英文名称',
  `type` int(1) NOT NULL COMMENT '0：原材料；1：电线电缆',
  `state` int(1) NOT NULL DEFAULT '1' COMMENT '逻辑字段 0：删除；1：正常',
  `create_time` datetime NOT NULL COMMENT '生效日期',
  `update_time` datetime NOT NULL COMMENT '更新日期',
  `version` int(1) NOT NULL DEFAULT '1',
  `user_id` int(10) NOT NULL COMMENT '关联字段 更新人id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

/*Data for the table `standards` */

insert  into `standards`(`id`,`name`,`eng_name`,`type`,`state`,`create_time`,`update_time`,`version`,`user_id`) values 
('111','123131313','164654565',0,0,'2023-07-20 13:26:55','2023-07-20 15:20:09',1,7),
('112233445566','鱼鱼','fish',1,0,'2023-07-20 10:54:12','2023-07-20 15:19:41',1,7),
('230711000001','小白','OpticalFibre',1,1,'2023-07-11 21:27:04','2023-07-20 09:28:19',1,6),
('230711000002','材料','OpticalFibrw',1,1,'2023-07-11 21:27:04','2023-07-20 10:22:42',1,6),
('230711000003','显示屏','Monitor',2,1,'2023-07-18 13:43:52','2023-07-18 13:43:52',1,7),
('230711000004','小黑','Black',2,1,'2023-07-18 13:44:29','2023-07-18 13:44:29',1,7);

/*Table structure for table `user` */

DROP TABLE IF EXISTS `user`;

CREATE TABLE `user` (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '用户id',
  `account` varchar(20) NOT NULL COMMENT '账号',
  `password` varchar(100) NOT NULL COMMENT '密码',
  `name` varchar(20) NOT NULL COMMENT '姓名',
  `phone` varchar(11) DEFAULT NULL COMMENT '手机号',
  `email` varchar(30) DEFAULT NULL COMMENT '邮箱',
  `age` int(3) DEFAULT NULL COMMENT '年龄',
  `job_state` int(1) NOT NULL DEFAULT '1' COMMENT '在职状态 正常>=1,离职<=0',
  `info` varchar(100) DEFAULT NULL COMMENT '个性签名',
  `create_time` datetime NOT NULL,
  `update_time` datetime NOT NULL,
  `version` int(1) NOT NULL DEFAULT '1',
  `role_id` int(10) NOT NULL,
  `enterprise_id` int(10) NOT NULL COMMENT '关联 企业ID',
  PRIMARY KEY (`id`),
  UNIQUE KEY `account_unique` (`account`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8mb4;

/*Data for the table `user` */

insert  into `user`(`id`,`account`,`password`,`name`,`phone`,`email`,`age`,`job_state`,`info`,`create_time`,`update_time`,`version`,`role_id`,`enterprise_id`) values 
(7,'123456','123456','小小','12345678981','12345678@qq.com',23,1,NULL,'2023-07-11 09:14:50','2023-07-11 09:14:50',1,1,1),
(9,'1388967','123456','鱼鱼','19727565533','1981343953@qq.com',18,1,NULL,'2023-07-13 14:51:41','2023-07-13 14:51:41',1,1,1),
(10,'1111111','123456','叮叮当','17726824629','13958368246@gmail.com',13,1,NULL,'2023-07-13 14:57:23','2023-07-13 14:57:23',1,0,1),
(11,'135686632','123456','叮叮当','13795639054','19813438642@qq.com',18,1,NULL,'2023-07-13 14:58:45','2023-07-13 14:58:45',1,1,1),
(12,'333','123456','鱼鱼','72398','2144',36,1,NULL,'2023-07-13 15:21:34','2023-07-13 15:21:34',1,0,1),
(13,'199999','123456','鱼鱼','2154364646','18913908',34,1,NULL,'2023-07-13 15:22:16','2023-07-13 15:22:16',1,1,1),
(14,'8957824','123456','张三','23875185298','2222222872',13,1,NULL,'2023-07-13 15:29:13','2023-07-13 15:29:13',1,1,1),
(21,'45612345','123456','小黑','12345678981','12345678@qq.com',23,1,NULL,'2023-07-17 10:36:23','2023-07-17 10:36:23',1,1,1),
(23,'4561278345','123456','小黑','12345678981','12345678@qq.com',23,1,NULL,'2023-07-17 11:28:50','2023-07-17 11:28:50',1,1,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 */;
