/*
Navicat MySQL Data Transfer

Source Server         : localhost_3306
Source Server Version : 50528
Source Host           : localhost:3306
Source Database       : beijing

Target Server Type    : MYSQL
Target Server Version : 50528
File Encoding         : 65001

Date: 2021-01-31 18:30:25
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for `gmms_add_optpattern`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_add_optpattern`;
CREATE TABLE `gmms_add_optpattern` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `glass_description` varchar(255) DEFAULT NULL,
  `glass_id` varchar(50) DEFAULT NULL,
  `glass_thickness` double DEFAULT NULL,
  `pieces` int(11) DEFAULT NULL,
  `width` double DEFAULT NULL,
  `height` double DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `manufacture_batch_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `manufacture_batch_id` (`manufacture_batch_id`),
  CONSTRAINT `gmms_add_optpattern_ibfk_1` FOREIGN KEY (`manufacture_batch_id`) REFERENCES `gmms_manufacture_batch` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_add_optpattern
-- ----------------------------

-- ----------------------------
-- Table structure for `gmms_arrange_machine`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_arrange_machine`;
CREATE TABLE `gmms_arrange_machine` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `number` varchar(50) DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `connect_state` varchar(50) DEFAULT NULL,
  `picture_url` varchar(255) DEFAULT NULL,
  `port` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_arrange_machine
-- ----------------------------
INSERT INTO `gmms_arrange_machine` VALUES ('1', '01', null, '正在连接', null, '8170');

-- ----------------------------
-- Table structure for `gmms_arrange_machine_rank`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_arrange_machine_rank`;
CREATE TABLE `gmms_arrange_machine_rank` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `number` varchar(50) DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `touid` varchar(50) DEFAULT NULL,
  `length` double DEFAULT NULL,
  `width` double DEFAULT NULL,
  `isus` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=161 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_arrange_machine_rank
-- ----------------------------
INSERT INTO `gmms_arrange_machine_rank` VALUES ('1', '01', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('2', '02', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('3', '03', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('4', '04', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('5', '05', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('6', '06', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('7', '07', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('8', '08', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('9', '09', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('10', '10', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('11', '11', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('12', '12', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('13', '13', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('14', '14', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('15', '15', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('16', '16', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('17', '17', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('18', '18', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('19', '19', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('20', '20', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('21', '21', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('22', '22', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('23', '23', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('24', '24', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('25', '25', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('26', '26', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('27', '27', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('28', '28', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('29', '29', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('30', '30', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('31', '31', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('32', '32', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('33', '33', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('34', '34', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('35', '35', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('36', '36', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('37', '37', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('38', '38', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('39', '39', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('40', '40', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('41', '41', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('42', '42', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('43', '43', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('44', '44', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('45', '45', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('46', '46', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('47', '47', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('48', '48', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('49', '49', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('50', '50', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('51', '51', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('52', '52', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('53', '53', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('54', '54', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('55', '55', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('56', '56', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('57', '57', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('58', '58', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('59', '59', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('60', '60', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('61', '61', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('62', '62', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('63', '63', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('64', '64', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('65', '65', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('66', '66', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('67', '67', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('68', '68', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('69', '69', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('70', '70', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('71', '71', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('72', '72', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('73', '73', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('74', '74', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('75', '75', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('76', '76', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('77', '77', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('78', '78', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('79', '79', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('80', '80', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('81', '81', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('82', '82', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('83', '83', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('84', '84', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('85', '85', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('86', '86', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('87', '87', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('88', '88', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('89', '89', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('90', '90', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('91', '91', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('92', '92', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('93', '93', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('94', '94', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('95', '95', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('96', '96', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('97', '97', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('98', '98', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('99', '99', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('100', '100', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('101', '101', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('102', '102', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('103', '103', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('104', '104', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('105', '105', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('106', '106', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('107', '107', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('108', '108', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('109', '109', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('110', '110', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('111', '111', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('112', '112', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('113', '113', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('114', '114', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('115', '115', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('116', '116', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('117', '117', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('118', '118', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('119', '119', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('120', '120', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('121', '121', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('122', '122', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('123', '123', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('124', '124', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('125', '125', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('126', '126', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('127', '127', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('128', '128', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('129', '129', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('130', '130', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('131', '131', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('132', '132', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('133', '133', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('134', '134', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('135', '135', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('136', '136', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('137', '137', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('138', '138', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('139', '139', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('140', '140', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('141', '141', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('142', '142', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('143', '143', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('144', '144', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('145', '145', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('146', '146', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('147', '147', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('148', '148', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('149', '149', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('150', '150', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('151', '151', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('152', '152', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('153', '153', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('154', '154', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('155', '155', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('156', '156', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('157', '157', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('158', '158', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('159', '159', null, null, '0', '0', null);
INSERT INTO `gmms_arrange_machine_rank` VALUES ('160', '160', null, null, '0', '0', null);

-- ----------------------------
-- Table structure for `gmms_arrange_machine_statu`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_arrange_machine_statu`;
CREATE TABLE `gmms_arrange_machine_statu` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `state` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_arrange_machine_statu
-- ----------------------------
INSERT INTO `gmms_arrange_machine_statu` VALUES ('1', '');

-- ----------------------------
-- Table structure for `gmms_arrange_machine_task`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_arrange_machine_task`;
CREATE TABLE `gmms_arrange_machine_task` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `state` varchar(50) DEFAULT NULL,
  `goals` varchar(50) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `start_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `complete_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `task_type` varchar(50) DEFAULT NULL,
  `touid` varchar(50) DEFAULT NULL,
  `pieces` int(11) DEFAULT NULL,
  `measure_machine_id` bigint(20) DEFAULT NULL,
  `arrange_machine_rank_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `measure_machine_id` (`measure_machine_id`),
  KEY `arrange_machine_rank_id` (`arrange_machine_rank_id`),
  CONSTRAINT `gmms_arrange_machine_task_ibfk_1` FOREIGN KEY (`measure_machine_id`) REFERENCES `gmms_measure_machine` (`id`) ON UPDATE CASCADE,
  CONSTRAINT `gmms_arrange_machine_task_ibfk_2` FOREIGN KEY (`arrange_machine_rank_id`) REFERENCES `gmms_arrange_machine_rank` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_arrange_machine_task
-- ----------------------------

-- ----------------------------
-- Table structure for `gmms_color`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_color`;
CREATE TABLE `gmms_color` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_color
-- ----------------------------
INSERT INTO `gmms_color` VALUES ('1', 'white');
INSERT INTO `gmms_color` VALUES ('2', 'ts');
INSERT INTO `gmms_color` VALUES ('3', 'G');
INSERT INTO `gmms_color` VALUES ('4', 'FG');
INSERT INTO `gmms_color` VALUES ('5', 'GT');
INSERT INTO `gmms_color` VALUES ('6', 'OZH');
INSERT INTO `gmms_color` VALUES ('7', 'YGDM');
INSERT INTO `gmms_color` VALUES ('8', '126');
INSERT INTO `gmms_color` VALUES ('9', '148');
INSERT INTO `gmms_color` VALUES ('10', '147');
INSERT INTO `gmms_color` VALUES ('11', '33');
INSERT INTO `gmms_color` VALUES ('12', '130DM');
INSERT INTO `gmms_color` VALUES ('13', '2350DM');
INSERT INTO `gmms_color` VALUES ('14', '250DM');
INSERT INTO `gmms_color` VALUES ('15', 'SJH');
INSERT INTO `gmms_color` VALUES ('16', '127');
INSERT INTO `gmms_color` VALUES ('17', 'C');
INSERT INTO `gmms_color` VALUES ('18', 'SC');

-- ----------------------------
-- Table structure for `gmms_count_machine`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_count_machine`;
CREATE TABLE `gmms_count_machine` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `number` varchar(50) DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `connect_state` varchar(50) DEFAULT NULL,
  `port` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_count_machine
-- ----------------------------
INSERT INTO `gmms_count_machine` VALUES ('1', '01', '停机中', '未连接', '8150');
INSERT INTO `gmms_count_machine` VALUES ('2', '02', '停机中', '未连接', '8151');

-- ----------------------------
-- Table structure for `gmms_count_machine_task`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_count_machine_task`;
CREATE TABLE `gmms_count_machine_task` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `state` varchar(50) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `length` double DEFAULT NULL,
  `width` double DEFAULT NULL,
  `apart` varchar(255) DEFAULT NULL,
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `start_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `complete_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `count_machine_id` bigint(20) DEFAULT NULL,
  `glass_id` bigint(20) DEFAULT NULL,
  `manufacture_batch_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `glass_id` (`glass_id`),
  KEY `count_machine_id` (`count_machine_id`),
  KEY `manufacture_batch_id` (`manufacture_batch_id`),
  CONSTRAINT `gmms_count_machine_task_ibfk_1` FOREIGN KEY (`glass_id`) REFERENCES `gmms_glass` (`id`) ON UPDATE CASCADE,
  CONSTRAINT `gmms_count_machine_task_ibfk_2` FOREIGN KEY (`count_machine_id`) REFERENCES `gmms_count_machine` (`id`) ON UPDATE CASCADE,
  CONSTRAINT `gmms_count_machine_task_ibfk_3` FOREIGN KEY (`manufacture_batch_id`) REFERENCES `gmms_manufacture_batch` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_count_machine_task
-- ----------------------------

-- ----------------------------
-- Table structure for `gmms_cut_machine`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_cut_machine`;
CREATE TABLE `gmms_cut_machine` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `number` varchar(50) DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `connect_state` varchar(50) DEFAULT NULL,
  `picture_url` varchar(255) DEFAULT NULL,
  `port` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_cut_machine
-- ----------------------------
INSERT INTO `gmms_cut_machine` VALUES ('1', '01', null, null, null, '3000');
INSERT INTO `gmms_cut_machine` VALUES ('2', '02', null, null, null, '3001');

-- ----------------------------
-- Table structure for `gmms_cut_machine_message`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_cut_machine_message`;
CREATE TABLE `gmms_cut_machine_message` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `cut_machine_id` bigint(20) DEFAULT NULL,
  `reada` tinyint(1) DEFAULT NULL,
  `message_type` varchar(50) DEFAULT NULL,
  `client_address` varchar(255) DEFAULT NULL,
  `client_port` varchar(10) DEFAULT NULL,
  `content` varchar(5000) DEFAULT NULL,
  `send_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `receive_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`id`),
  KEY `cut_machine_id` (`cut_machine_id`),
  CONSTRAINT `gmms_cut_machine_message_ibfk_1` FOREIGN KEY (`cut_machine_id`) REFERENCES `gmms_cut_machine` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_cut_machine_message
-- ----------------------------

-- ----------------------------
-- Table structure for `gmms_cut_machine_task`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_cut_machine_task`;
CREATE TABLE `gmms_cut_machine_task` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `state` varchar(50) DEFAULT NULL,
  `message` varchar(255) DEFAULT NULL,
  `cut_machine_id` bigint(20) DEFAULT NULL,
  `load_machine_id` bigint(20) DEFAULT NULL,
  `opt_pattern_id` bigint(20) DEFAULT NULL,
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `start_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `complete_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `manufacture_batch_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `opt_pattern_id` (`opt_pattern_id`),
  KEY `load_machine_id` (`load_machine_id`),
  KEY `cut_machine_id` (`cut_machine_id`),
  KEY `manufacture_batch_id` (`manufacture_batch_id`),
  CONSTRAINT `gmms_cut_machine_task_ibfk_1` FOREIGN KEY (`opt_pattern_id`) REFERENCES `gmms_opt_pattern` (`id`) ON UPDATE CASCADE,
  CONSTRAINT `gmms_cut_machine_task_ibfk_2` FOREIGN KEY (`load_machine_id`) REFERENCES `gmms_load_machine` (`id`) ON UPDATE CASCADE,
  CONSTRAINT `gmms_cut_machine_task_ibfk_3` FOREIGN KEY (`cut_machine_id`) REFERENCES `gmms_cut_machine` (`id`) ON UPDATE CASCADE,
  CONSTRAINT `gmms_cut_machine_task_ibfk_4` FOREIGN KEY (`manufacture_batch_id`) REFERENCES `gmms_manufacture_batch` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_cut_machine_task
-- ----------------------------

-- ----------------------------
-- Table structure for `gmms_damage_glass`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_damage_glass`;
CREATE TABLE `gmms_damage_glass` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `length` double DEFAULT NULL,
  `width` double DEFAULT NULL,
  `thickness` double DEFAULT NULL,
  `color` varchar(25) DEFAULT NULL,
  `customer` varchar(255) DEFAULT NULL,
  `pieces` int(11) DEFAULT NULL,
  `manufacture_batch_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `manufacture_batch_id` (`manufacture_batch_id`),
  CONSTRAINT `gmms_damage_glass_ibfk_1` FOREIGN KEY (`manufacture_batch_id`) REFERENCES `gmms_manufacture_batch` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_damage_glass
-- ----------------------------

-- ----------------------------
-- Table structure for `gmms_down_piece`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_down_piece`;
CREATE TABLE `gmms_down_piece` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `batch` varchar(255) DEFAULT NULL,
  `total_amount` varchar(255) DEFAULT NULL,
  `complete_amount` varchar(255) DEFAULT NULL,
  `area` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_down_piece
-- ----------------------------

-- ----------------------------
-- Table structure for `gmms_film_remove_machine`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_film_remove_machine`;
CREATE TABLE `gmms_film_remove_machine` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `number` varchar(50) DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `connect_state` varchar(50) DEFAULT NULL,
  `picture_url` varchar(255) DEFAULT NULL,
  `port` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_film_remove_machine
-- ----------------------------
INSERT INTO `gmms_film_remove_machine` VALUES ('1', '01', null, null, null, '7000');
INSERT INTO `gmms_film_remove_machine` VALUES ('2', '02', null, null, null, '7001');

-- ----------------------------
-- Table structure for `gmms_glass`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_glass`;
CREATE TABLE `gmms_glass` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `glass_id` int(11) DEFAULT NULL,
  `length` double DEFAULT NULL,
  `width` double DEFAULT NULL,
  `thickness` double DEFAULT NULL,
  `color` varchar(25) DEFAULT NULL,
  `customer` varchar(255) DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `groups` varchar(50) DEFAULT NULL,
  `apart_id` varchar(50) DEFAULT NULL,
  `manufacture_batch` varchar(255) DEFAULT NULL,
  `pieces` int(11) DEFAULT NULL,
  `complete_pieces` int(11) DEFAULT NULL,
  `arrange_pieces` int(11) DEFAULT NULL,
  `arrange_statu` varchar(50) DEFAULT NULL,
  `manufacture_batch_id` bigint(20) DEFAULT NULL,
  `application` varchar(50) DEFAULT NULL,
  `production` varchar(50) DEFAULT NULL,
  `floor_number` varchar(50) DEFAULT NULL,
  `order_number` varchar(50) DEFAULT NULL,
  `piece_sign` varchar(50) DEFAULT NULL,
  `remark` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `manufacture_batch_id` (`manufacture_batch_id`),
  CONSTRAINT `gmms_glass_ibfk_1` FOREIGN KEY (`manufacture_batch_id`) REFERENCES `gmms_manufacture_batch` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_glass
-- ----------------------------

-- ----------------------------
-- Table structure for `gmms_grind_edge_machine`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_grind_edge_machine`;
CREATE TABLE `gmms_grind_edge_machine` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `number` varchar(50) DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `connect_state` varchar(50) DEFAULT NULL,
  `port` int(11) DEFAULT NULL,
  `proximity_switch` varchar(50) DEFAULT NULL,
  `allow_control` varchar(50) DEFAULT NULL,
  `glass_info` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_grind_edge_machine
-- ----------------------------
INSERT INTO `gmms_grind_edge_machine` VALUES ('1', '01', null, null, '8140', null, null, null);
INSERT INTO `gmms_grind_edge_machine` VALUES ('2', '02', null, null, '8141', null, null, null);

-- ----------------------------
-- Table structure for `gmms_grind_edge_machine_task`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_grind_edge_machine_task`;
CREATE TABLE `gmms_grind_edge_machine_task` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `state` varchar(50) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `glass_id` bigint(20) DEFAULT NULL,
  `manufacture_batch_id` bigint(20) DEFAULT NULL,
  `grind_edge_machine_id` bigint(20) DEFAULT NULL,
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `start_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `complete_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`id`),
  KEY `manufacture_batch_id` (`manufacture_batch_id`),
  KEY `grind_edge_machine_id` (`grind_edge_machine_id`),
  KEY `glass_id` (`glass_id`),
  CONSTRAINT `gmms_grind_edge_machine_task_ibfk_1` FOREIGN KEY (`manufacture_batch_id`) REFERENCES `gmms_manufacture_batch` (`id`) ON UPDATE CASCADE,
  CONSTRAINT `gmms_grind_edge_machine_task_ibfk_2` FOREIGN KEY (`grind_edge_machine_id`) REFERENCES `gmms_grind_edge_machine` (`id`) ON UPDATE CASCADE,
  CONSTRAINT `gmms_grind_edge_machine_task_ibfk_3` FOREIGN KEY (`glass_id`) REFERENCES `gmms_glass` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_grind_edge_machine_task
-- ----------------------------

-- ----------------------------
-- Table structure for `gmms_grind_edge_machine_two`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_grind_edge_machine_two`;
CREATE TABLE `gmms_grind_edge_machine_two` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `number` varchar(50) DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `connect_state` varchar(50) DEFAULT NULL,
  `port` int(11) DEFAULT NULL,
  `proximity_switch` varchar(50) DEFAULT NULL,
  `allow_control` varchar(50) DEFAULT NULL,
  `glass_info` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_grind_edge_machine_two
-- ----------------------------
INSERT INTO `gmms_grind_edge_machine_two` VALUES ('1', '01', null, null, '8142', null, null, null);
INSERT INTO `gmms_grind_edge_machine_two` VALUES ('2', '02', null, null, '8143', null, null, null);

-- ----------------------------
-- Table structure for `gmms_grind_face_machine`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_grind_face_machine`;
CREATE TABLE `gmms_grind_face_machine` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `number` varchar(50) DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `connect_state` varchar(50) DEFAULT NULL,
  `port` int(11) DEFAULT NULL,
  `allow_control_one` varchar(50) DEFAULT NULL,
  `fault_one` varchar(50) DEFAULT NULL,
  `allow_control_two` varchar(50) DEFAULT NULL,
  `fault_two` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_grind_face_machine
-- ----------------------------

-- ----------------------------
-- Table structure for `gmms_identify_floor`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_identify_floor`;
CREATE TABLE `gmms_identify_floor` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `ceiling` int(11) DEFAULT NULL,
  `floor` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_identify_floor
-- ----------------------------
INSERT INTO `gmms_identify_floor` VALUES ('1', '2', '2');
INSERT INTO `gmms_identify_floor` VALUES ('2', '2', '2');

-- ----------------------------
-- Table structure for `gmms_identify_machine`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_identify_machine`;
CREATE TABLE `gmms_identify_machine` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `number` varchar(50) DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `connect_state` varchar(50) DEFAULT NULL,
  `port` int(11) DEFAULT NULL,
  `initialized` tinyint(1) DEFAULT NULL,
  `ceiling` int(11) DEFAULT NULL,
  `floor` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_identify_machine
-- ----------------------------
INSERT INTO `gmms_identify_machine` VALUES ('1', '01', null, null, '8130', '0', '2', '2');
INSERT INTO `gmms_identify_machine` VALUES ('2', '02', null, null, '8131', '0', '2', '2');

-- ----------------------------
-- Table structure for `gmms_identify_pattern`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_identify_pattern`;
CREATE TABLE `gmms_identify_pattern` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `pattern` varchar(255) DEFAULT NULL,
  `line` varchar(255) DEFAULT NULL,
  `thinckness` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_identify_pattern
-- ----------------------------
INSERT INTO `gmms_identify_pattern` VALUES ('1', 'old', null, '5');
INSERT INTO `gmms_identify_pattern` VALUES ('2', 'old', null, '5');

-- ----------------------------
-- Table structure for `gmms_identify_warn`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_identify_warn`;
CREATE TABLE `gmms_identify_warn` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `length` varchar(50) DEFAULT NULL,
  `width` varchar(50) DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `number` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_identify_warn
-- ----------------------------

-- ----------------------------
-- Table structure for `gmms_light`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_light`;
CREATE TABLE `gmms_light` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `number` varchar(255) DEFAULT NULL,
  `state` varchar(255) DEFAULT NULL,
  `voltage` varchar(255) DEFAULT NULL,
  `groups` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_light
-- ----------------------------

-- ----------------------------
-- Table structure for `gmms_light_number`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_light_number`;
CREATE TABLE `gmms_light_number` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `number` varchar(255) DEFAULT NULL,
  `line` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_light_number
-- ----------------------------

-- ----------------------------
-- Table structure for `gmms_light_task`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_light_task`;
CREATE TABLE `gmms_light_task` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `number` varchar(255) DEFAULT NULL,
  `state` varchar(255) DEFAULT NULL,
  `groups` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_light_task
-- ----------------------------

-- ----------------------------
-- Table structure for `gmms_load_machine`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_load_machine`;
CREATE TABLE `gmms_load_machine` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `number` varchar(50) DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `connect_state` varchar(50) DEFAULT NULL,
  `port` int(11) DEFAULT NULL,
  `message` varchar(255) DEFAULT NULL,
  `cut_machine_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `cut_machine_id` (`cut_machine_id`),
  CONSTRAINT `gmms_load_machine_ibfk_1` FOREIGN KEY (`cut_machine_id`) REFERENCES `gmms_cut_machine` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_load_machine
-- ----------------------------
INSERT INTO `gmms_load_machine` VALUES ('1', '01', '停机中', '未连接', '8120', null, '1');
INSERT INTO `gmms_load_machine` VALUES ('2', '02', '停机中', '未连接', '8121', null, '2');

-- ----------------------------
-- Table structure for `gmms_load_machine_rack`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_load_machine_rack`;
CREATE TABLE `gmms_load_machine_rack` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `number` varchar(50) DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `raw_package_id` bigint(20) DEFAULT NULL,
  `load_machine_id` bigint(20) DEFAULT NULL,
  `raw_package_ready` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `raw_package_id` (`raw_package_id`),
  KEY `load_machine_id` (`load_machine_id`),
  CONSTRAINT `gmms_load_machine_rack_ibfk_1` FOREIGN KEY (`raw_package_id`) REFERENCES `gmms_raw_package` (`id`) ON UPDATE CASCADE,
  CONSTRAINT `gmms_load_machine_rack_ibfk_2` FOREIGN KEY (`load_machine_id`) REFERENCES `gmms_load_machine` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_load_machine_rack
-- ----------------------------
INSERT INTO `gmms_load_machine_rack` VALUES ('1', '01', null, null, '1', null);
INSERT INTO `gmms_load_machine_rack` VALUES ('2', '02', null, null, '1', null);
INSERT INTO `gmms_load_machine_rack` VALUES ('3', '03', null, null, '2', null);
INSERT INTO `gmms_load_machine_rack` VALUES ('4', '04', null, null, '2', null);

-- ----------------------------
-- Table structure for `gmms_load_machine_task`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_load_machine_task`;
CREATE TABLE `gmms_load_machine_task` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `state` varchar(50) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `start_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `complete_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `load_machine_id` bigint(20) DEFAULT NULL,
  `load_machine_rack_id` bigint(20) DEFAULT NULL,
  `raw_package_id` bigint(20) DEFAULT NULL,
  `opt_pattern_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `raw_package_id` (`raw_package_id`),
  KEY `opt_pattern_id` (`opt_pattern_id`),
  KEY `load_machine_id` (`load_machine_id`),
  KEY `load_machine_rack_id` (`load_machine_rack_id`),
  CONSTRAINT `gmms_load_machine_task_ibfk_1` FOREIGN KEY (`raw_package_id`) REFERENCES `gmms_raw_package` (`id`) ON UPDATE CASCADE,
  CONSTRAINT `gmms_load_machine_task_ibfk_2` FOREIGN KEY (`opt_pattern_id`) REFERENCES `gmms_opt_pattern` (`id`) ON UPDATE CASCADE,
  CONSTRAINT `gmms_load_machine_task_ibfk_3` FOREIGN KEY (`load_machine_id`) REFERENCES `gmms_load_machine` (`id`) ON UPDATE CASCADE,
  CONSTRAINT `gmms_load_machine_task_ibfk_4` FOREIGN KEY (`load_machine_rack_id`) REFERENCES `gmms_load_machine_rack` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_load_machine_task
-- ----------------------------

-- ----------------------------
-- Table structure for `gmms_load_statu`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_load_statu`;
CREATE TABLE `gmms_load_statu` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `autostate` varchar(50) DEFAULT NULL,
  `errorstate` varchar(50) DEFAULT NULL,
  `loadfinish` varchar(50) DEFAULT NULL,
  `plcid` varchar(50) DEFAULT NULL,
  `mesid` varchar(50) DEFAULT NULL,
  `statuid` varchar(50) DEFAULT NULL,
  `set_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_load_statu
-- ----------------------------
INSERT INTO `gmms_load_statu` VALUES ('1', '手动状态', '0', '0', '0', '0', '0', '2018-12-20 14:34:28');
INSERT INTO `gmms_load_statu` VALUES ('2', '手动状态', '0', '0', '0', '0', '0', '2018-12-20 14:34:29');

-- ----------------------------
-- Table structure for `gmms_manufacture_batch`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_manufacture_batch`;
CREATE TABLE `gmms_manufacture_batch` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `number` varchar(50) DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `start_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `complete_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_manufacture_batch
-- ----------------------------

-- ----------------------------
-- Table structure for `gmms_manufacture_batch_machine`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_manufacture_batch_machine`;
CREATE TABLE `gmms_manufacture_batch_machine` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `machine_type` varchar(100) DEFAULT NULL,
  `machine_id` bigint(20) DEFAULT NULL,
  `manufacture_batch_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `manufacture_batch_id` (`manufacture_batch_id`),
  CONSTRAINT `gmms_manufacture_batch_machine_ibfk_1` FOREIGN KEY (`manufacture_batch_id`) REFERENCES `gmms_manufacture_batch` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_manufacture_batch_machine
-- ----------------------------

-- ----------------------------
-- Table structure for `gmms_manufacture_sequence`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_manufacture_sequence`;
CREATE TABLE `gmms_manufacture_sequence` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `manufacture_date` varchar(50) DEFAULT NULL,
  `max_sequence` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_manufacture_sequence
-- ----------------------------

-- ----------------------------
-- Table structure for `gmms_measure_machine`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_measure_machine`;
CREATE TABLE `gmms_measure_machine` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `number` varchar(50) DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `connect_state` varchar(50) DEFAULT NULL,
  `picture_url` varchar(255) DEFAULT NULL,
  `port` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_measure_machine
-- ----------------------------
INSERT INTO `gmms_measure_machine` VALUES ('1', '01', null, '正在连接', null, '8160');
INSERT INTO `gmms_measure_machine` VALUES ('2', '02', null, '正在连接', null, '8161');

-- ----------------------------
-- Table structure for `gmms_mission`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_mission`;
CREATE TABLE `gmms_mission` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) DEFAULT NULL,
  `batch` varchar(50) DEFAULT NULL,
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `start_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `complete_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `state` varchar(50) DEFAULT NULL,
  `groups` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_mission
-- ----------------------------

-- ----------------------------
-- Table structure for `gmms_only_team`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_only_team`;
CREATE TABLE `gmms_only_team` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `temperedid` varchar(100) DEFAULT NULL,
  `percent` double DEFAULT NULL,
  `status` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_only_team
-- ----------------------------

-- ----------------------------
-- Table structure for `gmms_opt_pattern`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_opt_pattern`;
CREATE TABLE `gmms_opt_pattern` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `opt_id` varchar(50) DEFAULT NULL,
  `glass_id` varchar(50) DEFAULT NULL,
  `glass_description` varchar(255) DEFAULT NULL,
  `glass_thickness` double DEFAULT NULL,
  `pieces` int(11) DEFAULT NULL,
  `completed_pieces` int(11) DEFAULT NULL,
  `width` double DEFAULT NULL,
  `height` double DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `content` varchar(6000) DEFAULT NULL,
  `manufacture_batch_id` bigint(20) DEFAULT NULL,
  `batch` varchar(255) DEFAULT NULL,
  `groups` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `manufacture_batch_id` (`manufacture_batch_id`),
  CONSTRAINT `gmms_opt_pattern_ibfk_1` FOREIGN KEY (`manufacture_batch_id`) REFERENCES `gmms_manufacture_batch` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_opt_pattern
-- ----------------------------

-- ----------------------------
-- Table structure for `gmms_preprocessing_glass`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_preprocessing_glass`;
CREATE TABLE `gmms_preprocessing_glass` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `actual_length` double DEFAULT NULL,
  `actual_width` double DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `glass_id` bigint(20) DEFAULT NULL,
  `manufacture_batch_id` bigint(20) DEFAULT NULL,
  `identify_machine_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `manufacture_batch_id` (`manufacture_batch_id`),
  KEY `glass_id` (`glass_id`),
  KEY `identify_machine_id` (`identify_machine_id`),
  CONSTRAINT `gmms_preprocessing_glass_ibfk_1` FOREIGN KEY (`manufacture_batch_id`) REFERENCES `gmms_manufacture_batch` (`id`) ON UPDATE CASCADE,
  CONSTRAINT `gmms_preprocessing_glass_ibfk_2` FOREIGN KEY (`glass_id`) REFERENCES `gmms_glass` (`id`) ON UPDATE CASCADE,
  CONSTRAINT `gmms_preprocessing_glass_ibfk_3` FOREIGN KEY (`identify_machine_id`) REFERENCES `gmms_identify_machine` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_preprocessing_glass
-- ----------------------------

-- ----------------------------
-- Table structure for `gmms_print_machine`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_print_machine`;
CREATE TABLE `gmms_print_machine` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `pattern` varchar(255) DEFAULT NULL,
  `line` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_print_machine
-- ----------------------------

-- ----------------------------
-- Table structure for `gmms_raw_package`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_raw_package`;
CREATE TABLE `gmms_raw_package` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `pieces` int(11) DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `width` double DEFAULT NULL,
  `height` double DEFAULT NULL,
  `thickness` double DEFAULT NULL,
  `color` varchar(50) DEFAULT NULL,
  `left_pieces` int(11) DEFAULT NULL,
  `manufacturer` varchar(255) DEFAULT NULL,
  `comment` varchar(255) DEFAULT NULL,
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_raw_package
-- ----------------------------

-- ----------------------------
-- Table structure for `gmms_search_shelf_rank`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_search_shelf_rank`;
CREATE TABLE `gmms_search_shelf_rank` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `gmms_shelf_rank_id` bigint(20) DEFAULT NULL,
  `gmms_cut_machine_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `gmms_shelf_rank_id` (`gmms_shelf_rank_id`),
  KEY `gmms_cut_machine_id` (`gmms_cut_machine_id`),
  CONSTRAINT `gmms_search_shelf_rank_ibfk_1` FOREIGN KEY (`gmms_shelf_rank_id`) REFERENCES `gmms_shelf_rank` (`id`) ON UPDATE CASCADE,
  CONSTRAINT `gmms_search_shelf_rank_ibfk_2` FOREIGN KEY (`gmms_cut_machine_id`) REFERENCES `gmms_cut_machine` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_search_shelf_rank
-- ----------------------------

-- ----------------------------
-- Table structure for `gmms_shelf`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_shelf`;
CREATE TABLE `gmms_shelf` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `number` varchar(50) DEFAULT NULL,
  `port` int(11) DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `connect_state` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_shelf
-- ----------------------------
INSERT INTO `gmms_shelf` VALUES ('1', '01', '8110', '停机中', '未连接');

-- ----------------------------
-- Table structure for `gmms_shelf_hoist`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_shelf_hoist`;
CREATE TABLE `gmms_shelf_hoist` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `number` varchar(50) DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `raw_package_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `raw_package_id` (`raw_package_id`),
  CONSTRAINT `gmms_shelf_hoist_ibfk_1` FOREIGN KEY (`raw_package_id`) REFERENCES `gmms_raw_package` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_shelf_hoist
-- ----------------------------
INSERT INTO `gmms_shelf_hoist` VALUES ('1', '01', null, null);
INSERT INTO `gmms_shelf_hoist` VALUES ('2', '02', null, null);

-- ----------------------------
-- Table structure for `gmms_shelf_message`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_shelf_message`;
CREATE TABLE `gmms_shelf_message` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `shelf_id` bigint(20) DEFAULT NULL,
  `reada` tinyint(1) DEFAULT NULL,
  `message_type` varchar(50) DEFAULT NULL,
  `client_address` varchar(255) DEFAULT NULL,
  `client_port` varchar(10) DEFAULT NULL,
  `content` varchar(5000) DEFAULT NULL,
  `send_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `receive_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`id`),
  KEY `shelf_id` (`shelf_id`),
  CONSTRAINT `gmms_shelf_message_ibfk_1` FOREIGN KEY (`shelf_id`) REFERENCES `gmms_shelf` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_shelf_message
-- ----------------------------

-- ----------------------------
-- Table structure for `gmms_shelf_rank`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_shelf_rank`;
CREATE TABLE `gmms_shelf_rank` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `number` varchar(50) DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `raw_package_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `raw_package_id` (`raw_package_id`),
  CONSTRAINT `gmms_shelf_rank_ibfk_1` FOREIGN KEY (`raw_package_id`) REFERENCES `gmms_raw_package` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_shelf_rank
-- ----------------------------
INSERT INTO `gmms_shelf_rank` VALUES ('1', '01', null, null);
INSERT INTO `gmms_shelf_rank` VALUES ('2', '02', null, null);
INSERT INTO `gmms_shelf_rank` VALUES ('3', '03', null, null);
INSERT INTO `gmms_shelf_rank` VALUES ('4', '04', null, null);
INSERT INTO `gmms_shelf_rank` VALUES ('5', '05', null, null);
INSERT INTO `gmms_shelf_rank` VALUES ('6', '06', null, null);
INSERT INTO `gmms_shelf_rank` VALUES ('7', '07', null, null);
INSERT INTO `gmms_shelf_rank` VALUES ('8', '08', null, null);
INSERT INTO `gmms_shelf_rank` VALUES ('9', '09', null, null);
INSERT INTO `gmms_shelf_rank` VALUES ('10', '10', null, null);
INSERT INTO `gmms_shelf_rank` VALUES ('11', '11', null, null);
INSERT INTO `gmms_shelf_rank` VALUES ('12', '12', null, null);
INSERT INTO `gmms_shelf_rank` VALUES ('13', '13', null, null);
INSERT INTO `gmms_shelf_rank` VALUES ('14', '14', null, null);
INSERT INTO `gmms_shelf_rank` VALUES ('15', '15', null, null);
INSERT INTO `gmms_shelf_rank` VALUES ('16', '16', null, null);
INSERT INTO `gmms_shelf_rank` VALUES ('17', '17', null, null);
INSERT INTO `gmms_shelf_rank` VALUES ('18', '18', null, null);
INSERT INTO `gmms_shelf_rank` VALUES ('19', '19', null, null);
INSERT INTO `gmms_shelf_rank` VALUES ('20', '20', null, null);
INSERT INTO `gmms_shelf_rank` VALUES ('21', '21', null, null);
INSERT INTO `gmms_shelf_rank` VALUES ('36', '36', null, null);
INSERT INTO `gmms_shelf_rank` VALUES ('37', '37', null, null);
INSERT INTO `gmms_shelf_rank` VALUES ('38', '38', null, null);
INSERT INTO `gmms_shelf_rank` VALUES ('39', '39', null, null);

-- ----------------------------
-- Table structure for `gmms_shelf_statu`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_shelf_statu`;
CREATE TABLE `gmms_shelf_statu` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `statu` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_shelf_statu
-- ----------------------------
INSERT INTO `gmms_shelf_statu` VALUES ('1', 'manual');

-- ----------------------------
-- Table structure for `gmms_shelf_task`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_shelf_task`;
CREATE TABLE `gmms_shelf_task` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `state` varchar(50) DEFAULT NULL,
  `task_type` varchar(255) DEFAULT NULL,
  `message` varchar(255) DEFAULT NULL,
  `flag` varchar(255) DEFAULT NULL,
  `shelf_hoist_id` bigint(20) DEFAULT NULL,
  `shelf_rank_id` bigint(20) DEFAULT NULL,
  `load_machine_rack_id` bigint(20) DEFAULT NULL,
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `start_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `complete_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`id`),
  KEY `shelf_hoist_id` (`shelf_hoist_id`),
  KEY `shelf_rank_id` (`shelf_rank_id`),
  KEY `load_machine_rack_id` (`load_machine_rack_id`),
  CONSTRAINT `gmms_shelf_task_ibfk_1` FOREIGN KEY (`shelf_hoist_id`) REFERENCES `gmms_shelf_hoist` (`id`) ON UPDATE CASCADE,
  CONSTRAINT `gmms_shelf_task_ibfk_2` FOREIGN KEY (`shelf_rank_id`) REFERENCES `gmms_shelf_rank` (`id`) ON UPDATE CASCADE,
  CONSTRAINT `gmms_shelf_task_ibfk_3` FOREIGN KEY (`load_machine_rack_id`) REFERENCES `gmms_load_machine_rack` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_shelf_task
-- ----------------------------

-- ----------------------------
-- Table structure for `gmms_tam`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_tam`;
CREATE TABLE `gmms_tam` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `val` varchar(128) NOT NULL,
  `k` int(11) DEFAULT NULL,
  `length` double DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_tam
-- ----------------------------

-- ----------------------------
-- Table structure for `gmms_task`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_task`;
CREATE TABLE `gmms_task` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `title` varchar(128) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_task
-- ----------------------------
INSERT INTO `gmms_task` VALUES ('1', 'Study PlayFramework 2.0', 'http://www.playframework.org/', '2');
INSERT INTO `gmms_task` VALUES ('2', 'Study Grails 2.0', 'http://www.grails.org/', '2');
INSERT INTO `gmms_task` VALUES ('3', 'Try SpringFuse', 'http://www.springfuse.com/', '2');
INSERT INTO `gmms_task` VALUES ('4', 'Try Spring Roo', 'http://www.springsource.org/spring-roo', '2');
INSERT INTO `gmms_task` VALUES ('5', 'Release SpringSide 4.0', 'As soon as posibble.', '2');

-- ----------------------------
-- Table structure for `gmms_team`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_team`;
CREATE TABLE `gmms_team` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `teamid` int(11) DEFAULT NULL,
  `length` double DEFAULT NULL,
  `width` double DEFAULT NULL,
  `team` varchar(50) DEFAULT NULL,
  `area` double DEFAULT NULL,
  `status` varchar(50) DEFAULT NULL,
  `percent` double DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_team
-- ----------------------------

-- ----------------------------
-- Table structure for `gmms_temp_parameter`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_temp_parameter`;
CREATE TABLE `gmms_temp_parameter` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `templength` double NOT NULL,
  `tempwidth` double NOT NULL,
  `templengthinterval` double NOT NULL,
  `tempwidthinterval` double NOT NULL,
  `tempsidelengthinterval` double NOT NULL,
  `tempsidewidthinterval` double NOT NULL,
  `tempuppercent` double NOT NULL,
  `temponpercent` double NOT NULL,
  `teampercent` double NOT NULL,
  `templengthpercent` double NOT NULL,
  `tempwidthpercent` double NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_temp_parameter
-- ----------------------------
INSERT INTO `gmms_temp_parameter` VALUES ('1', '8000', '3000', '50', '30', '50', '30', '0.65', '0.85', '0.85', '0.15', '0.15');

-- ----------------------------
-- Table structure for `gmms_test_out`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_test_out`;
CREATE TABLE `gmms_test_out` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `start_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `end_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `name` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_test_out
-- ----------------------------

-- ----------------------------
-- Table structure for `gmms_toughening_glass`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_toughening_glass`;
CREATE TABLE `gmms_toughening_glass` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `actual_length` double DEFAULT NULL,
  `actual_width` double DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `userid` varchar(50) DEFAULT NULL,
  `teamid` varchar(50) DEFAULT NULL,
  `glass_id` bigint(20) DEFAULT NULL,
  `manufacture_batch_id` bigint(20) DEFAULT NULL,
  `measure_machine_id` bigint(20) DEFAULT NULL,
  `gmms_arrange_machine_rank_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `manufacture_batch_id` (`manufacture_batch_id`),
  KEY `glass_id` (`glass_id`),
  KEY `measure_machine_id` (`measure_machine_id`),
  KEY `gmms_arrange_machine_rank_id` (`gmms_arrange_machine_rank_id`),
  CONSTRAINT `gmms_toughening_glass_ibfk_1` FOREIGN KEY (`manufacture_batch_id`) REFERENCES `gmms_manufacture_batch` (`id`) ON UPDATE CASCADE,
  CONSTRAINT `gmms_toughening_glass_ibfk_2` FOREIGN KEY (`glass_id`) REFERENCES `gmms_glass` (`id`) ON UPDATE CASCADE,
  CONSTRAINT `gmms_toughening_glass_ibfk_3` FOREIGN KEY (`measure_machine_id`) REFERENCES `gmms_measure_machine` (`id`) ON UPDATE CASCADE,
  CONSTRAINT `gmms_toughening_glass_ibfk_4` FOREIGN KEY (`gmms_arrange_machine_rank_id`) REFERENCES `gmms_arrange_machine_rank` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_toughening_glass
-- ----------------------------

-- ----------------------------
-- Table structure for `gmms_transmit_machine`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_transmit_machine`;
CREATE TABLE `gmms_transmit_machine` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `number` varchar(50) DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `connect_state` varchar(50) DEFAULT NULL,
  `picture_url` varchar(255) DEFAULT NULL,
  `port` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_transmit_machine
-- ----------------------------
INSERT INTO `gmms_transmit_machine` VALUES ('1', '01', '停机中', '正在连接', null, '8180');

-- ----------------------------
-- Table structure for `gmms_user`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_user`;
CREATE TABLE `gmms_user` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `login_name` varchar(64) NOT NULL,
  `name` varchar(64) NOT NULL,
  `password` varchar(255) NOT NULL,
  `salt` varchar(64) NOT NULL,
  `roles` varchar(255) NOT NULL,
  `groups` varchar(255) NOT NULL,
  `register_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `login_name` (`login_name`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_user
-- ----------------------------
INSERT INTO `gmms_user` VALUES ('1', 'admin', 'Admin', '691b14d79bf0fa2215f155235df5e670b64394cc', '7efbd59d9741d34f', 'admin', '1', '2012-06-04 01:00:00');
INSERT INTO `gmms_user` VALUES ('2', 'user', 'Calvin', '2488aa0c31c624687bd9928e0a5d29e7d1ed520b', '6d65d24122c30500', 'user', '1', '2012-06-04 02:00:00');
INSERT INTO `gmms_user` VALUES ('3', 'cangchu', 'cangchu', '0b758ab9fb7b358b93961ab047224fda16a8bf6a', 'd04571a0f1ca1a30', 'cangchu', '1', '2012-06-04 02:00:00');
INSERT INTO `gmms_user` VALUES ('4', 'qiege', 'qiege', '1f6ca85a796572b9d236e0487521c870a7a60be1', 'fc961ed3a7d9da04', 'qiege', '1', '2012-06-04 02:00:00');
INSERT INTO `gmms_user` VALUES ('5', 'manager', 'manager', '680ed74ba20ea5fb0454cc0bbfbeee4e917c1e89', '69247bcc1a1dd877', 'manager', '1', '2012-06-04 02:00:00');
INSERT INTO `gmms_user` VALUES ('6', 'group', 'group', 'b387bc3bd054d66bcd9f07324d5f1c408603dc86', '37f680f83155559d', 'group', '1', '2012-06-04 02:00:00');
INSERT INTO `gmms_user` VALUES ('7', 'xiapian', 'xiapian', '[REDACTED]', 'ec1f393b29ae0179', 'xiapian', '1', '2012-06-04 02:00:00');
INSERT INTO `gmms_user` VALUES ('8', 'celiang', 'celiang', 'bf9b3d04d7a74f67ea4101d53935a1e580be20e1', '883ab755fc387bef', 'celiang', '1', '2012-06-04 02:00:00');
INSERT INTO `gmms_user` VALUES ('9', 'zuzhang', 'zuzhang', 'ad56fe11012c113fcd60263e404d57f69f7a9947', 'dcf2bf4ba2ec9569', 'grouper', '1', '2012-06-04 02:00:00');
INSERT INTO `gmms_user` VALUES ('10', 'xiapian2', 'xiapian2', 'aa85bd5a296f54105a1180197d400cc0203bcda7', 'ec1f393b29ae0179', 'xiapian', '2', '2012-06-04 02:00:00');
INSERT INTO `gmms_user` VALUES ('11', 'celiang2', 'celiang2', 'bf9b3d04d7a74f67ea4101d53935a1e580be20e1', '883ab755fc387bef', 'celiang', '2', '2012-06-04 02:00:00');
INSERT INTO `gmms_user` VALUES ('12', 'zuzhang2', 'zuzhang2', 'ad56fe11012c113fcd60263e404d57f69f7a9947', 'dcf2bf4ba2ec9569', 'grouper', '2', '2012-06-04 02:00:00');
INSERT INTO `gmms_user` VALUES ('13', 'qiege2', 'qiege2', '1f6ca85a796572b9d236e0487521c870a7a60be1', 'fc961ed3a7d9da04', 'qiege', '2', '2012-06-04 02:00:00');

-- ----------------------------
-- Table structure for `gmms_wash_machine`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_wash_machine`;
CREATE TABLE `gmms_wash_machine` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `number` varchar(50) DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `connect_state` varchar(50) DEFAULT NULL,
  `picture_url` varchar(255) DEFAULT NULL,
  `port` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_wash_machine
-- ----------------------------
INSERT INTO `gmms_wash_machine` VALUES ('1', '01', null, null, null, '10000');
INSERT INTO `gmms_wash_machine` VALUES ('2', '02', null, null, null, '10001');

-- ----------------------------
-- Table structure for `gmms_with_pieces_statu`
-- ----------------------------
DROP TABLE IF EXISTS `gmms_with_pieces_statu`;
CREATE TABLE `gmms_with_pieces_statu` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `state` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of gmms_with_pieces_statu
-- ----------------------------
INSERT INTO `gmms_with_pieces_statu` VALUES ('1', 'start');
