-- liquibase formatted sql

-- changeset zsh:20241206001
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'big_storage_cage' ;
CREATE TABLE big_storage_cage  (
                                   id bigint NOT NULL COMMENT '大理片笼表id',
                                   device_id int NULL DEFAULT NULL COMMENT '设备id',
                                   slot int NULL DEFAULT NULL COMMENT '栅格号',
                                   min_thickness int NULL DEFAULT NULL COMMENT '最小厚度',
                                   max_thickness int NULL DEFAULT NULL COMMENT '最大厚度',
                                   enable_state int NULL DEFAULT NULL COMMENT '启用状态',
                                   remain_width int NULL DEFAULT NULL COMMENT '剩余宽度',
                                   PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB ;
-- rollback DROP TABLE big_storage_cage;


-- changeset zsh:20241206002
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM big_storage_cage;
INSERT INTO big_storage_cage VALUES (1, 1, 1, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (2, 1, 2, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (3, 1, 3, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (4, 1, 4, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (5, 1, 5, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (6, 1, 6, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (7, 1, 7, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (8, 1, 8, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (9, 1, 9, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (10, 1, 10, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (11, 1, 11, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (12, 1, 12, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (13, 1, 13, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (14, 1, 14, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (15, 1, 15, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (16, 1, 16, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (17, 1, 17, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (18, 1, 18, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (19, 1, 19, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (20, 1, 20, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (21, 1, 21, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (22, 1, 22, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (23, 1, 23, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (24, 1, 24, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (25, 1, 25, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (26, 1, 26, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (27, 1, 27, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (28, 1, 28, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (29, 1, 29, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (30, 1, 30, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (31, 1, 31, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (32, 1, 32, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (33, 1, 33, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (34, 1, 34, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (35, 1, 35, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (36, 1, 36, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (37, 1, 37, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (38, 1, 38, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (39, 1, 39, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (40, 1, 40, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (41, 1, 41, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (42, 1, 42, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (43, 1, 43, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (44, 1, 44, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (45, 1, 45, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (46, 1, 46, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (47, 1, 47, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (48, 1, 48, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (49, 1, 49, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (50, 1, 50, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (51, 1, 51, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (52, 1, 52, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (53, 1, 53, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (54, 1, 54, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (55, 1, 55, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (56, 2, 56, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (57, 2, 57, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (58, 2, 58, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (59, 2, 59, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (60, 2, 60, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (61, 2, 61, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (62, 2, 62, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (63, 2, 63, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (64, 2, 64, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (65, 2, 65, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (66, 2, 66, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (67, 2, 67, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (68, 2, 68, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (69, 2, 69, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (70, 2, 70, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (71, 2, 71, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (72, 2, 72, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (73, 2, 73, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (74, 2, 74, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (75, 2, 75, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (76, 2, 76, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (77, 2, 77, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (78, 2, 78, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (79, 2, 79, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (80, 2, 80, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (81, 2, 81, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (82, 2, 82, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (83, 2, 83, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (84, 2, 84, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (85, 2, 85, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (86, 2, 86, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (87, 2, 87, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (88, 2, 88, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (89, 2, 89, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (90, 2, 90, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (91, 2, 91, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (92, 2, 92, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (93, 2, 93, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (94, 2, 94, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (95, 2, 95, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (96, 2, 96, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (97, 2, 97, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (98, 2, 98, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (99, 2, 99, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (100, 2, 100, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (101, 2, 101, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (102, 2, 102, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (103, 2, 103, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (104, 2, 104, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (105, 2, 105, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (106, 2, 106, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (107, 2, 107, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (108, 2, 108, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (109, 2, 109, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (110, 2, 110, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (111, 3, 111, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (112, 3, 112, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (113, 3, 113, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (114, 3, 114, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (115, 3, 115, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (116, 3, 116, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (117, 3, 117, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (118, 3, 118, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (119, 3, 119, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (120, 3, 120, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (121, 3, 121, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (122, 3, 122, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (123, 3, 123, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (124, 3, 124, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (125, 3, 125, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (126, 3, 126, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (127, 3, 127, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (128, 3, 128, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (129, 3, 129, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (130, 3, 130, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (131, 3, 131, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (132, 3, 132, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (133, 3, 133, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (134, 3, 134, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (135, 3, 135, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (136, 3, 136, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (137, 3, 137, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (138, 3, 138, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (139, 3, 139, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (140, 3, 140, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (141, 3, 141, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (142, 3, 142, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (143, 3, 143, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (144, 3, 144, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (145, 3, 145, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (146, 3, 146, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (147, 3, 147, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (148, 3, 148, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (149, 3, 149, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (150, 3, 150, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (151, 3, 151, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (152, 3, 152, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (153, 3, 153, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (154, 3, 154, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (155, 3, 155, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (156, 3, 156, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (157, 3, 157, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (158, 3, 158, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (159, 3, 159, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (160, 3, 160, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (161, 3, 161, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (162, 3, 162, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (163, 3, 163, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (164, 3, 164, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (165, 3, 165, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (166, 4, 166, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (167, 4, 167, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (168, 4, 168, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (169, 4, 169, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (170, 4, 170, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (171, 4, 171, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (172, 4, 172, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (173, 4, 173, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (174, 4, 174, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (175, 4, 175, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (176, 4, 176, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (177, 4, 177, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (178, 4, 178, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (179, 4, 179, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (180, 4, 180, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (181, 4, 181, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (182, 4, 182, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (183, 4, 183, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (184, 4, 184, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (185, 4, 185, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (186, 4, 186, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (187, 4, 187, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (188, 4, 188, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (189, 4, 189, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (190, 4, 190, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (191, 4, 191, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (192, 4, 192, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (193, 4, 193, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (194, 4, 194, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (195, 4, 195, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (196, 4, 196, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (197, 4, 197, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (198, 4, 198, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (199, 4, 199, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (200, 4, 200, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (201, 4, 201, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (202, 4, 202, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (203, 4, 203, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (204, 4, 204, 4, 6, 1, 6200);
INSERT INTO big_storage_cage VALUES (205, 4, 205, 4, 6, 1, 6200);


-- changeset zsh:20241206003
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'big_storage_cage_details';
CREATE TABLE big_storage_cage_details  (
                                           id bigint NOT NULL AUTO_INCREMENT COMMENT '大理片笼详情表id',
                                           device_id int NULL DEFAULT NULL COMMENT '设备id',
                                           slot int NULL DEFAULT NULL COMMENT '栅格号',
                                           glass_id varchar(20) DEFAULT NULL COMMENT '玻璃id',
                                           sequence int NULL DEFAULT NULL COMMENT '小片在格内的顺序',
                                           flow_card_id varchar(20) DEFAULT NULL COMMENT '流程卡号',
                                           glass_type int NULL DEFAULT NULL COMMENT '玻璃类型',
                                           width double NULL DEFAULT NULL COMMENT '宽',
                                           height double NULL DEFAULT NULL COMMENT '高',
                                           thickness double NULL DEFAULT NULL COMMENT '厚度',
                                           tempering_layout_id int NULL DEFAULT NULL COMMENT '钢化版图id',
                                           tempering_feed_sequence int NULL DEFAULT NULL COMMENT '钢化版图片序',
                                           x_coordinate int NULL DEFAULT NULL COMMENT 'x坐标',
                                           y_coordinate int NULL DEFAULT NULL COMMENT 'y坐标',
                                           state int NULL DEFAULT NULL COMMENT '状态',
                                           gap int NULL DEFAULT NULL COMMENT '玻璃间隙',
                                           engineer_id varchar(50) NULL DEFAULT NULL,
                                           layer int NULL DEFAULT NULL COMMENT '层号',
                                           create_time timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
                                           update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
                                           PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1;
-- rollback DROP TABLE big_storage_cage_details;

-- changeset zsh:20241206004
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'big_storage_cage_history_task';
CREATE TABLE big_storage_cage_history_task  (
                                                id bigint NOT NULL AUTO_INCREMENT,
                                                glass_id varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '玻璃id',
                                                start_slot int NULL DEFAULT 0 COMMENT '起始格子',
                                                target_slot int NULL DEFAULT 0 COMMENT '目标格子',
                                                task_state int NULL DEFAULT NULL COMMENT '任务状态 ',
                                                glass_count int NULL DEFAULT NULL COMMENT '玻璃数量',
                                                task_type int NULL DEFAULT NULL COMMENT '任务类型',
                                                create_time timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
                                                update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
                                                PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 ;
-- rollback DROP TABLE big_storage_cage_history_task;

-- changeset zsh:20241206005
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'big_storage_cage_in_one_task';
CREATE TABLE big_storage_cage_in_one_task  (
                                               task_running int NULL DEFAULT 0 COMMENT '任务请求 0无任务 1启动任务 2 确认完成',
                                               glass_id varchar(32) DEFAULT NULL COMMENT '玻璃id',
                                               start_slot int NULL DEFAULT 0 COMMENT '起始格子',
                                               target_slot int NULL DEFAULT 0 COMMENT '目标格子',
                                               task_state int NULL DEFAULT NULL COMMENT '任务状态 '
) ENGINE = InnoDB ;
-- rollback DROP TABLE big_storage_cage_in_one_task;


-- changeset zsh:20241206006
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM big_storage_cage_in_one_task;
INSERT INTO big_storage_cage_in_one_task VALUES (0, '', 0, 0, 0);
INSERT INTO big_storage_cage_in_one_task VALUES (0, '', 0, 0, 0);
INSERT INTO big_storage_cage_in_one_task VALUES (0, '', 0, 0, 0);
INSERT INTO big_storage_cage_in_one_task VALUES (0, '', 0, 0, 0);
INSERT INTO big_storage_cage_in_one_task VALUES (0, '', 0, 0, 0);
INSERT INTO big_storage_cage_in_one_task VALUES (0, '', 0, 0, 0);

-- changeset zsh:20241206007
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'big_storage_cage_in_two_task';
CREATE TABLE big_storage_cage_in_two_task  (
                                               task_running int NULL DEFAULT 0 COMMENT '任务请求 0无任务 1启动任务 2 确认完成',
                                               glass_id varchar(32) DEFAULT NULL COMMENT '玻璃id',
                                               start_slot int NULL DEFAULT 0 COMMENT '起始格子',
                                               target_slot int NULL DEFAULT 0 COMMENT '目标格子',
                                               task_state int NULL DEFAULT NULL COMMENT '任务状态 '
) ENGINE = InnoDB ;
-- rollback DROP TABLE big_storage_cage_in_two_task;


-- changeset zsh:20241206008
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM big_storage_cage_in_two_task;
INSERT INTO big_storage_cage_in_two_task VALUES (0, NULL, 0, 0, 0);
INSERT INTO big_storage_cage_in_two_task VALUES (0, NULL, 0, 0, 0);
INSERT INTO big_storage_cage_in_two_task VALUES (0, NULL, 0, 0, 0);
INSERT INTO big_storage_cage_in_two_task VALUES (0, NULL, 0, 0, 0);
INSERT INTO big_storage_cage_in_two_task VALUES (0, NULL, 0, 0, 0);
INSERT INTO big_storage_cage_in_two_task VALUES (0, NULL, 0, 0, 0);

-- changeset zsh:20241206009
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'big_storage_cage_out_one_task';
CREATE TABLE big_storage_cage_out_one_task  (
                                                glass_id varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '玻璃id',
                                                start_slot int NULL DEFAULT 0 COMMENT '起始格子',
                                                target_slot int NULL DEFAULT 0 COMMENT '目标格子',
                                                task_state int NULL DEFAULT NULL COMMENT '任务状态 '
) ENGINE = InnoDB ;
-- rollback DROP TABLE big_storage_cage_out_one_task;


-- changeset zsh:20241206010
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM big_storage_cage_out_one_task;
INSERT INTO big_storage_cage_out_one_task VALUES (NULL, 0, 0, 0);
INSERT INTO big_storage_cage_out_one_task VALUES (NULL, 0, 0, 0);
INSERT INTO big_storage_cage_out_one_task VALUES (NULL, 0, 0, 0);
INSERT INTO big_storage_cage_out_one_task VALUES (NULL, 0, 0, 0);
INSERT INTO big_storage_cage_out_one_task VALUES (NULL, 0, 0, 0);
INSERT INTO big_storage_cage_out_one_task VALUES (NULL, 0, 0, 0);

-- changeset zsh:20241206011
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'big_storage_cage_out_two_task';
CREATE TABLE big_storage_cage_out_two_task  (
                                                glass_id varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '玻璃id',
                                                start_slot int NULL DEFAULT 0 COMMENT '起始格子',
                                                target_slot int NULL DEFAULT 0 COMMENT '目标格子',
                                                task_state int NULL DEFAULT NULL COMMENT '任务状态 '
) ENGINE = InnoDB ;
-- rollback DROP TABLE big_storage_cage_out_two_task;


-- changeset zsh:20241206012
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM big_storage_cage_out_two_task;
INSERT INTO big_storage_cage_out_two_task VALUES (NULL, 0, 0, 0);
INSERT INTO big_storage_cage_out_two_task VALUES (NULL, 0, 0, 0);
INSERT INTO big_storage_cage_out_two_task VALUES (NULL, 0, 0, 0);
INSERT INTO big_storage_cage_out_two_task VALUES (NULL, 0, 0, 0);
INSERT INTO big_storage_cage_out_two_task VALUES (NULL, 0, 0, 0);
INSERT INTO big_storage_cage_out_two_task VALUES (NULL, 0, 0, 0);

-- changeset zsh:20241206013
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'big_storage_glass_info';
CREATE TABLE big_storage_glass_info  (
                                         id bigint NOT NULL AUTO_INCREMENT COMMENT '大理片笼信息表id',
                                         glass_id varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '玻璃id',
                                         flow_card_id varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '流程卡号',
                                         glass_type int NULL DEFAULT NULL COMMENT '玻璃类型',
                                         width double NULL DEFAULT NULL COMMENT '宽',
                                         height double NULL DEFAULT NULL COMMENT '高',
                                         thickness double NULL DEFAULT NULL COMMENT '厚度',
                                         tempering_layout_id int NULL DEFAULT NULL COMMENT '钢化版图id',
                                         tempering_feed_sequence int NULL DEFAULT NULL COMMENT '钢化版图片序',
                                         x_coordinate int NULL DEFAULT NULL COMMENT 'x坐标',
                                         y_coordinate int NULL DEFAULT NULL COMMENT 'y坐标',
                                         engineer_id varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
                                         layer int NULL DEFAULT NULL COMMENT '层号',
                                         virtual_slot int NULL DEFAULT NULL COMMENT '虚拟格子号',
                                         slot_sequence int NULL DEFAULT NULL COMMENT '格子次序',
                                         PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1;
-- rollback DROP TABLE big_storage_glass_info;

-- changeset zsh:20241206014
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'big_storage_glass_relation_info';
CREATE TABLE big_storage_glass_relation_info  (
                                                  id bigint NOT NULL AUTO_INCREMENT COMMENT '钢化玻璃关系表id',
                                                  engineer_id varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
                                                  glass_id varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '玻璃id',
                                                  tempering_layout_id int NULL DEFAULT NULL COMMENT '钢化版图id',
                                                  tempering_feed_sequence int NULL DEFAULT NULL COMMENT '钢化版图片序',
                                                  virtual_slot int NULL DEFAULT NULL COMMENT '虚拟格子',
                                                  slot_sequence int NULL DEFAULT NULL COMMENT '格子内次序',
                                                  slot int NULL DEFAULT NULL COMMENT '实际格子号',
                                                  device_id int NULL DEFAULT NULL COMMENT '实际笼子号',
                                                  PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 ;
-- rollback DROP TABLE big_storage_glass_relation_info;

-- changeset zsh:20241206015
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'damage';
CREATE TABLE damage  (
                         id bigint NOT NULL AUTO_INCREMENT,
                         line int NULL DEFAULT NULL COMMENT '线路',
                         working_procedure varchar(20) DEFAULT NULL COMMENT '工序',
                         glass_id varchar(30) DEFAULT NULL COMMENT '玻璃id',
                         engineer_id varchar(20) DEFAULT NULL COMMENT '工程号',
                         tempering_layout_id int NULL DEFAULT NULL COMMENT '钢化版图id',
                         damage_time datetime NULL DEFAULT NULL COMMENT '生产时间',
                         remark varchar(255) DEFAULT NULL COMMENT '备注',
                         type int NULL DEFAULT NULL COMMENT '类型：1：报工 2：破损 3：拿走',
                         status int NULL DEFAULT NULL COMMENT '状态：1：未报工 2:待报工 3：已报工',
                         process_id varchar(20) DEFAULT NULL COMMENT '流程卡',
                         order_number int NULL DEFAULT NULL COMMENT '序号',
                         technology_number int NULL DEFAULT NULL COMMENT '工艺确认序号',
                         breakage_type varchar(255) DEFAULT NULL COMMENT '破损类型',
                         breakage_reason varchar(255) DEFAULT NULL COMMENT '破损原因',
                         responsible_process varchar(255) DEFAULT NULL COMMENT '责任工序',
                         responsible_personnel varchar(255) DEFAULT NULL COMMENT '责任人员',
                         responsible_team varchar(255) DEFAULT NULL COMMENT '责任班组',
                         responsible_equipment varchar(255) DEFAULT NULL COMMENT '责任设备',
                         teams_groups_name varchar(255) DEFAULT NULL COMMENT '报工班组名称',
                         device_name varchar(255) DEFAULT NULL COMMENT '报工设备名称',
                         PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 ;
-- rollback DROP TABLE damage;

-- changeset zsh:20241206016
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'down_glass_info';
CREATE TABLE down_glass_info  (
                                  id bigint NOT NULL AUTO_INCREMENT COMMENT '下片玻璃信息表id',
                                  work_station_id int NULL DEFAULT NULL COMMENT '工位id',
                                  engineer_id varchar(20) DEFAULT NULL COMMENT '工程id',
                                  flow_card_id varchar(20) DEFAULT NULL COMMENT '流程卡号',
                                  layer int NULL DEFAULT NULL,
                                  sequence int NULL DEFAULT NULL COMMENT '顺序',
                                  width double NULL DEFAULT NULL COMMENT '宽',
                                  height double NULL DEFAULT NULL COMMENT '高',
                                  filmsid varchar(20) DEFAULT NULL COMMENT '膜系',
                                  thickness double NULL DEFAULT NULL COMMENT '厚度',
                                  glass_id varchar(50) DEFAULT NULL COMMENT '玻璃id',
                                  gmt_create timestamp NULL DEFAULT NULL COMMENT '创建时间',
                                  combine int NULL DEFAULT NULL,
                                  PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 ;
-- rollback DROP TABLE down_glass_info;

-- changeset zsh:20241206017
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'down_storage_cage';
CREATE TABLE down_storage_cage  (
                                    id int NOT NULL AUTO_INCREMENT COMMENT '下片前理片笼表id',
                                    device_id int NULL DEFAULT NULL COMMENT '设备id',
                                    slot int NULL DEFAULT NULL COMMENT '栅格号',
                                    enable_state int NULL DEFAULT NULL COMMENT '启用状态',
                                    remain_width int NULL DEFAULT NULL COMMENT '剩余',
                                    PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 ;
-- rollback DROP TABLE down_storage_cage;

-- changeset zsh:20241206018
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM down_storage_cage;
INSERT INTO down_storage_cage VALUES (1, 1, 1, 1, 5000);
INSERT INTO down_storage_cage VALUES (2, 1, 2, 1, 5000);
INSERT INTO down_storage_cage VALUES (3, 1, 3, 1, 5000);
INSERT INTO down_storage_cage VALUES (4, 1, 4, 1, 5000);
INSERT INTO down_storage_cage VALUES (5, 1, 5, 1, 5000);
INSERT INTO down_storage_cage VALUES (6, 1, 6, 1, 5000);
INSERT INTO down_storage_cage VALUES (7, 1, 7, 1, 5000);
INSERT INTO down_storage_cage VALUES (8, 1, 8, 1, 5000);
INSERT INTO down_storage_cage VALUES (9, 1, 9, 1, 5000);

-- changeset zsh:20241206019
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'down_storage_cage_details';
CREATE TABLE down_storage_cage_details  (
                                            id bigint NOT NULL AUTO_INCREMENT COMMENT '下片前理片笼明细表id',
                                            glass_id varchar(50) DEFAULT NULL COMMENT '玻璃id',
                                            device_id int NULL DEFAULT NULL COMMENT '设备id',
                                            slot int NULL DEFAULT NULL COMMENT '栅格号',
                                            sequence int NULL DEFAULT NULL COMMENT '小片在格内的顺序',
                                            filmsid varchar(20) DEFAULT NULL COMMENT '膜系id',
                                            flow_card_id varchar(20) DEFAULT NULL COMMENT '流程卡号',
                                            glass_type int NULL DEFAULT NULL COMMENT '玻璃类型',
                                            width double NULL DEFAULT NULL COMMENT '宽',
                                            height double NULL DEFAULT NULL COMMENT '高',
                                            thickness double NULL DEFAULT NULL COMMENT '厚度',
                                            tempering_layout_id int NULL DEFAULT NULL COMMENT '钢化版图id',
                                            tempering_feed_sequence int NULL DEFAULT NULL COMMENT '钢化版图片序',
                                            state int NULL DEFAULT NULL COMMENT '状态',
                                            gap int NULL DEFAULT NULL COMMENT '玻璃间隙',
                                            total_layer int NULL DEFAULT NULL,
                                            layer int NULL DEFAULT NULL,
                                            engineer_id varchar(20) DEFAULT NULL COMMENT '工程号',
                                            PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 ;
-- rollback DROP TABLE down_storage_cage_details;

-- changeset zsh:20241206020
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'down_workstation';
CREATE TABLE down_workstation  (
                                   id bigint NOT NULL AUTO_INCREMENT COMMENT '下片工位表id',
                                   workstation_id int NULL DEFAULT NULL COMMENT '工位id',
                                   total_quantity int NULL DEFAULT NULL COMMENT '总数量',
                                   racks_number int NULL DEFAULT 0 COMMENT '已落架数量',
                                   other_number int NULL DEFAULT 0 COMMENT '其他处理玻璃数量',
                                   flow_card_id varchar(20) DEFAULT NULL COMMENT '流程卡号',
                                   layer int NULL DEFAULT NULL COMMENT '层数',
                                   device_id int NULL DEFAULT NULL COMMENT '设备id',
                                   enable_state int NULL DEFAULT NULL COMMENT '启用状态',
                                   work_state int NULL DEFAULT NULL COMMENT '工作状态',
                                   PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB ;
-- rollback DROP TABLE down_workstation;

-- changeset zsh:20241206021
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM down_workstation;
INSERT INTO down_workstation VALUES (1, 1, 0, 0, 0, '', NULL, 2, 1, 1);
INSERT INTO down_workstation VALUES (2, 2, 0, 0, 0, '', NULL, 2, 1, 1);
INSERT INTO down_workstation VALUES (3, 3, 0, 0, 0, '', NULL, 2, 1, 1);
INSERT INTO down_workstation VALUES (4, 4, 0, 0, 0, '', NULL, 2, 1, 1);
INSERT INTO down_workstation VALUES (5, 5, 0, 0, 0, '', NULL, 2, 1, 1);
INSERT INTO down_workstation VALUES (6, 6, 0, 0, 0, '', NULL, 2, 1, 1);


-- changeset zsh:20241206022
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'edg_glass_task_queue_info';
CREATE TABLE edg_glass_task_queue_info  (
                                            glass_id varchar(20) DEFAULT NULL COMMENT '磨边前玻璃id',
                                            width int NULL DEFAULT NULL COMMENT '宽',
                                            height int NULL DEFAULT NULL COMMENT '高',
                                            thickness int NULL DEFAULT NULL COMMENT '厚',
                                            state int NULL DEFAULT NULL COMMENT '状态',
                                            line int NULL DEFAULT NULL COMMENT '线路',
                                            create_time timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
                                            update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间'
) ENGINE = InnoDB ;
-- rollback DROP TABLE edg_glass_task_queue_info;

-- changeset zsh:20241206023
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'edg_glass_task_queue_info';
CREATE TABLE edg_storage_cage  (
                                   id int NOT NULL COMMENT '磨边前理片笼表id',
                                   device_id int NULL DEFAULT NULL COMMENT '设备id',
                                   slot int NULL DEFAULT NULL COMMENT '栅格号',
                                   enable_state int NULL DEFAULT NULL COMMENT '启用状态',
                                   remain_width int NULL DEFAULT NULL COMMENT '剩余',
                                   PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB ;
-- rollback DROP TABLE edg_glass_task_queue_info;

-- changeset zsh:20241206024
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM edg_storage_cage;
INSERT INTO edg_storage_cage VALUES (1, 1, 1, 1, 2500);
INSERT INTO edg_storage_cage VALUES (2, 1, 2, 1, 2500);
INSERT INTO edg_storage_cage VALUES (3, 1, 3, 1, 2500);
INSERT INTO edg_storage_cage VALUES (4, 1, 4, 1, 2500);
INSERT INTO edg_storage_cage VALUES (5, 1, 5, 1, 2500);
INSERT INTO edg_storage_cage VALUES (6, 1, 6, 1, 2500);
INSERT INTO edg_storage_cage VALUES (7, 1, 7, 1, 2500);
INSERT INTO edg_storage_cage VALUES (8, 1, 8, 1, 2500);
INSERT INTO edg_storage_cage VALUES (9, 1, 9, 1, 2500);
INSERT INTO edg_storage_cage VALUES (10, 2, 1, 1, 2500);
INSERT INTO edg_storage_cage VALUES (11, 2, 2, 1, 2500);
INSERT INTO edg_storage_cage VALUES (12, 2, 3, 1, 2500);
INSERT INTO edg_storage_cage VALUES (13, 2, 4, 1, 2500);
INSERT INTO edg_storage_cage VALUES (14, 2, 5, 1, 2500);
INSERT INTO edg_storage_cage VALUES (15, 2, 6, 1, 2500);
INSERT INTO edg_storage_cage VALUES (16, 2, 7, 1, 2500);
INSERT INTO edg_storage_cage VALUES (17, 2, 8, 1, 2500);
INSERT INTO edg_storage_cage VALUES (18, 2, 9, 1, 2500);


-- changeset zsh:20241206025
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'edg_storage_cage_details';
CREATE TABLE edg_storage_cage_details  (
                                           id bigint NOT NULL AUTO_INCREMENT COMMENT '磨边前理片笼详情表id',
                                           device_id int NULL DEFAULT NULL COMMENT '设备id',
                                           engineer_id varchar(32) DEFAULT NULL COMMENT '工程号',
                                           slot int NULL DEFAULT NULL COMMENT '栅格号',
                                           glass_id varchar(255) DEFAULT NULL COMMENT '玻璃id',
                                           sequence int NULL DEFAULT NULL COMMENT '小片在格内的顺序',
                                           flow_card_id varchar(20) DEFAULT NULL COMMENT '流程卡号',
                                           glass_type int NULL DEFAULT NULL COMMENT '玻璃类型',
                                           width double NULL DEFAULT NULL COMMENT '宽',
                                           height double NULL DEFAULT NULL COMMENT '高',
                                           thickness double NULL DEFAULT NULL COMMENT '厚度',
                                           edg_width double NULL DEFAULT NULL COMMENT '磨前宽',
                                           edg_height double NULL DEFAULT NULL COMMENT '磨前高',
                                           tempering_layout_id int NULL DEFAULT NULL COMMENT '钢化版图id',
                                           tempering_feed_sequence int NULL DEFAULT NULL COMMENT '钢化版图片序',
                                           pattern_sequence int NULL DEFAULT NULL COMMENT '原片顺序',
                                           state int NULL DEFAULT NULL COMMENT '状态  （未识别0 识别后成功状态100，110进磨边机 120出磨边机 识别：破损201,拿走200 磨边:破损301,拿走300）',
                                           gap int NULL DEFAULT NULL COMMENT '玻璃间隙',
                                           PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 ;
-- rollback DROP TABLE edg_storage_cage_details;


-- changeset zsh:20241206026
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'edg_storage_device_one_task';
CREATE TABLE edg_storage_device_one_task  (
                                              task_running int NULL DEFAULT NULL COMMENT '任务请求 0无任务 1进片 2出片 3直通',
                                              glass_id_in varchar(20) DEFAULT NULL COMMENT '进片玻璃id',
                                              glass_id_out varchar(20) DEFAULT NULL COMMENT '出片玻璃id',
                                              glass_id varchar(20) DEFAULT NULL COMMENT '磨边前玻璃id',
                                              current_cell int NULL DEFAULT 0 COMMENT '当前层号',
                                              start_cell int NULL DEFAULT 0 COMMENT '层号',
                                              end_cell int NULL DEFAULT NULL COMMENT '预留层号',
                                              task_state int NULL DEFAULT NULL COMMENT '任务状态 0默认空任务 1执行中 2结束任务',
                                              task_type int NULL DEFAULT NULL COMMENT '任务类型',
                                              create_time timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
                                              update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
                                              in_place int NULL DEFAULT NULL COMMENT '是否到位'
) ENGINE = InnoDB ;
-- rollback DROP TABLE edg_storage_device_one_task;

-- changeset zsh:20241206027
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM edg_storage_device_one_task;
INSERT INTO edg_storage_device_one_task VALUES (0, NULL, NULL, '', 1, 0, NULL, 2, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 0);

-- changeset zsh:20241206028
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'edg_storage_device_task_history';
CREATE TABLE edg_storage_device_task_history  (
                                                  id bigint NOT NULL AUTO_INCREMENT COMMENT '工程表id',
                                                  glass_id_in varchar(20) DEFAULT NULL COMMENT '进片玻璃id',
                                                  glass_id_out varchar(20) DEFAULT NULL COMMENT '出片玻璃id',
                                                  current_cell int NULL DEFAULT 0 COMMENT '当前层号',
                                                  start_cell int NULL DEFAULT 0 COMMENT '层号',
                                                  end_cell int NULL DEFAULT NULL COMMENT '预留层号',
                                                  task_state int NULL DEFAULT NULL COMMENT '任务状态 0默认空任务 1执行中 2结束任务',
                                                  task_type int NULL DEFAULT NULL COMMENT '任务类型',
                                                  create_time timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
                                                  update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
                                                  device_id int NULL DEFAULT NULL COMMENT '设备id',
                                                  PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 ;
-- rollback DROP TABLE edg_storage_device_task_history;

-- changeset zsh:20241206029
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'edg_storage_device_two_task';
CREATE TABLE edg_storage_device_two_task  (
                                              task_running int NULL DEFAULT NULL COMMENT '任务请求 0无任务 1进片 2出片 3直通',
                                              glass_id_in varchar(20) DEFAULT NULL COMMENT '进片玻璃id',
                                              glass_id_out varchar(20) DEFAULT NULL COMMENT '出片玻璃id',
                                              glass_id varchar(20) DEFAULT NULL COMMENT '磨边前玻璃id',
                                              current_cell int NULL DEFAULT 0 COMMENT '当前层号',
                                              start_cell int NULL DEFAULT 0 COMMENT '层号',
                                              end_cell int NULL DEFAULT NULL COMMENT '预留层号',
                                              task_state int NULL DEFAULT NULL COMMENT '任务状态 0默认空任务 1执行中 2结束任务',
                                              task_type int NULL DEFAULT NULL COMMENT '任务类型',
                                              create_time timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
                                              update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
                                              in_place int NULL DEFAULT NULL COMMENT '是否到位'
) ENGINE = InnoDB ;
-- rollback DROP TABLE edg_storage_device_two_task;

-- changeset zsh:20241206030
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM edg_storage_device_two_task;
INSERT INTO edg_storage_device_two_task VALUES (0, NULL, NULL, '', 1, 0, NULL, 2, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 0);

-- changeset zsh:20241206031
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'engineering';
CREATE TABLE engineering  (
                              id bigint NOT NULL AUTO_INCREMENT COMMENT '工程表id',
                              engineer_id varchar(20) DEFAULT NULL COMMENT '工程号',
                              engineer_name varchar(255) DEFAULT NULL COMMENT '工程名称',
                              avg_availability varchar(20) DEFAULT NULL COMMENT '平均利用率',
                              valid_availability varchar(20) DEFAULT NULL COMMENT '有效利用率',
                              last_availability varchar(20) DEFAULT NULL COMMENT '尾片利用率',
                              state int NULL DEFAULT NULL COMMENT '状态',
                              glass_total int NULL DEFAULT NULL COMMENT '小片总数',
                              glass_total_area double NULL DEFAULT NULL COMMENT '小片总面积',
                              plan_pattern_total int NULL DEFAULT NULL COMMENT '计划原片总数',
                              plan_pattern_total_area double NULL DEFAULT NULL COMMENT '计划原片总面积',
                              reality_pattern_total int NULL DEFAULT NULL COMMENT '实际原片总数',
                              reality_pattern_total_area double NULL DEFAULT NULL COMMENT '实际原片总面积',
                              films_id varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '膜系id',
                              notes varchar(255) DEFAULT NULL COMMENT '备注',
                              film_remove int NULL DEFAULT NULL,
                              station_cell int NULL DEFAULT NULL,
                              PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 ;
-- rollback DROP TABLE engineering;

-- changeset zsh:20241206032
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'glass_films';
CREATE TABLE glass_films  (
                              id int NOT NULL AUTO_INCREMENT COMMENT '膜系表id',
                              films_id int NULL DEFAULT NULL COMMENT '膜系id',
                              films_name varchar(255) DEFAULT NULL COMMENT '膜系',
                              PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 ;
-- rollback DROP TABLE glass_films;

-- changeset zsh:20241206033
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'glass_info';
CREATE TABLE glass_info  (
                             id bigint NOT NULL AUTO_INCREMENT COMMENT '玻璃信息表id',
                             flow_card_id varchar(50) DEFAULT NULL COMMENT '流程卡',
                             glass_type int NULL DEFAULT NULL COMMENT '流程卡玻璃类型',
                             width double NULL DEFAULT NULL COMMENT '宽',
                             height double NULL DEFAULT NULL COMMENT '高',
                             thickness double NULL DEFAULT NULL COMMENT '厚度',
                             filmsid varchar(20) DEFAULT NULL COMMENT '膜系',
                             total_layer int NULL DEFAULT NULL COMMENT '总层数',
                             layer int NULL DEFAULT NULL COMMENT '层数',
                             edg_width double NULL DEFAULT NULL COMMENT '磨前宽',
                             edg_height double NULL DEFAULT NULL COMMENT '磨前高',
                             ismultiple int NULL DEFAULT NULL COMMENT '是否配片',
                             max_width double NULL DEFAULT NULL COMMENT '配片最大宽',
                             max_height double NULL DEFAULT NULL COMMENT '配片最大高',
                             ishorizontal int NULL DEFAULT NULL COMMENT '钢化是否接受横放',
                             pattern_sequence int NULL DEFAULT NULL COMMENT '原片顺序',
                             tempering_layout_id int NULL DEFAULT NULL COMMENT '钢化版图id',
                             tempering_feed_sequence int NULL DEFAULT NULL COMMENT '钢化版图片序',
                             x_coordinate int NULL DEFAULT NULL COMMENT 'x坐标',
                             y_coordinate int NULL DEFAULT NULL COMMENT 'y坐标',
                             angle int NULL DEFAULT NULL COMMENT '旋转角度（逆时针）',
                             engineer_id varchar(20) DEFAULT NULL COMMENT '工程号',
                             rule_id int NULL DEFAULT NULL COMMENT '生产规则id',
                             glass_id varchar(50) DEFAULT NULL COMMENT '玻璃ID',
                             combine int NULL DEFAULT NULL,
                             PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 ;
-- rollback DROP TABLE glass_info;

-- changeset zsh:20241206034
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'hollow_big_storage_cage';
CREATE TABLE hollow_big_storage_cage  (
                                          id bigint NOT NULL  COMMENT '大理片笼表id',
                                          device_id int NULL DEFAULT NULL COMMENT '设备id',
                                          slot int NULL DEFAULT NULL COMMENT '栅格号',
                                          min_thickness int NULL DEFAULT NULL COMMENT '最小厚度',
                                          max_thickness int NULL DEFAULT NULL COMMENT '最大厚度',
                                          enable_state int NULL DEFAULT NULL COMMENT '启用状态',
                                          remain_width int NULL DEFAULT NULL COMMENT '剩余宽度',
                                          PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB;
-- rollback DROP TABLE hollow_big_storage_cage;


-- changeset zsh:20241206035
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM hollow_big_storage_cage;
INSERT INTO hollow_big_storage_cage VALUES (1, 1, 1, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (2, 1, 2, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (3, 1, 3, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (4, 1, 4, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (5, 1, 5, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (6, 1, 6, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (7, 1, 7, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (8, 1, 8, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (9, 1, 9, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (10, 1, 10, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (11, 1, 11, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (12, 1, 12, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (13, 1, 13, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (14, 1, 14, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (15, 1, 15, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (16, 1, 16, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (17, 1, 17, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (18, 1, 18, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (19, 1, 19, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (20, 1, 20, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (21, 1, 21, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (22, 1, 22, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (23, 1, 23, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (24, 1, 24, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (25, 1, 25, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (26, 1, 26, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (27, 1, 27, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (28, 1, 28, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (29, 1, 29, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (30, 1, 30, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (31, 1, 31, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (32, 1, 32, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (33, 1, 33, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (34, 1, 34, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (35, 1, 35, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (36, 1, 36, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (37, 1, 37, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (38, 1, 38, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (39, 1, 39, 4, 6, 0, 6200);
INSERT INTO hollow_big_storage_cage VALUES (40, 1, 40, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (41, 2, 41, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (42, 2, 42, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (43, 2, 43, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (44, 2, 44, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (45, 2, 45, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (46, 2, 46, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (47, 2, 47, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (48, 2, 48, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (49, 2, 49, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (50, 2, 50, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (51, 2, 51, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (52, 2, 52, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (53, 2, 53, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (54, 2, 54, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (55, 2, 55, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (56, 2, 56, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (57, 2, 57, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (58, 2, 58, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (59, 2, 59, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (60, 2, 60, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (61, 2, 61, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (62, 2, 62, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (63, 2, 63, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (64, 2, 64, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (65, 2, 65, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (66, 2, 66, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (67, 2, 67, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (68, 2, 68, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (69, 2, 69, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (70, 2, 70, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (71, 2, 71, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (72, 2, 72, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (73, 2, 73, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (74, 2, 74, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (75, 2, 75, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (76, 2, 76, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (77, 2, 77, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (78, 2, 78, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (79, 2, 79, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (80, 2, 80, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (81, 2, 81, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (82, 2, 82, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (83, 2, 83, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (84, 2, 84, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (85, 2, 85, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (86, 2, 86, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (87, 2, 87, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (88, 2, 88, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (89, 2, 89, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (90, 2, 90, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (91, 2, 91, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (92, 2, 92, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (93, 2, 93, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (94, 2, 94, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (95, 2, 95, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (96, 3, 96, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (97, 3, 97, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (98, 3, 98, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (99, 3, 99, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (100, 3, 100, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (101, 3, 101, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (102, 3, 102, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (103, 3, 103, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (104, 3, 104, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (105, 3, 105, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (106, 3, 106, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (107, 3, 107, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (108, 3, 108, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (109, 3, 109, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (110, 3, 110, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (111, 3, 111, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (112, 3, 112, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (113, 3, 113, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (114, 3, 114, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (115, 3, 115, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (116, 3, 116, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (117, 3, 117, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (118, 3, 118, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (119, 3, 119, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (120, 3, 120, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (121, 3, 121, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (122, 3, 122, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (123, 3, 123, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (124, 3, 124, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (125, 3, 125, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (126, 3, 126, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (127, 3, 127, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (128, 3, 128, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (129, 3, 129, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (130, 3, 130, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (131, 3, 131, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (132, 3, 132, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (133, 3, 133, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (134, 3, 134, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (135, 3, 135, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (136, 3, 136, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (137, 3, 137, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (138, 3, 138, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (139, 3, 139, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (140, 3, 140, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (141, 3, 141, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (142, 3, 142, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (143, 3, 143, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (144, 3, 144, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (145, 3, 145, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (146, 3, 146, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (147, 3, 147, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (148, 3, 148, 4, 6, 0, 6200);
INSERT INTO hollow_big_storage_cage VALUES (149, 3, 149, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (150, 3, 150, 4, 6, 0, 6200);
INSERT INTO hollow_big_storage_cage VALUES (151, 4, 151, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (152, 4, 152, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (153, 4, 153, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (154, 4, 154, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (155, 4, 155, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (156, 4, 156, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (157, 4, 157, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (158, 4, 158, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (159, 4, 159, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (160, 4, 160, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (161, 4, 161, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (162, 4, 162, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (163, 4, 163, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (164, 4, 164, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (165, 4, 165, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (166, 4, 166, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (167, 4, 167, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (168, 4, 168, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (169, 4, 169, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (170, 4, 170, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (171, 4, 171, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (172, 4, 172, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (173, 4, 173, 4, 6, 0, 6200);
INSERT INTO hollow_big_storage_cage VALUES (174, 4, 174, 4, 6, 0, 6200);
INSERT INTO hollow_big_storage_cage VALUES (175, 4, 175, 4, 6, 0, 6200);
INSERT INTO hollow_big_storage_cage VALUES (176, 4, 176, 4, 6, 0, 6200);
INSERT INTO hollow_big_storage_cage VALUES (177, 4, 177, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (178, 4, 178, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (179, 4, 179, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (180, 4, 180, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (181, 4, 181, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (182, 4, 182, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (183, 4, 183, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (184, 4, 184, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (185, 4, 185, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (186, 4, 186, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (187, 4, 187, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (188, 4, 188, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (189, 4, 189, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (190, 4, 190, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (191, 4, 191, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (192, 4, 192, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (193, 4, 193, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (194, 4, 194, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (195, 4, 195, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (196, 4, 196, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (197, 4, 197, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (198, 4, 198, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (199, 4, 199, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (200, 4, 200, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (201, 4, 201, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (202, 4, 202, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (203, 4, 203, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (204, 4, 204, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (205, 4, 205, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (206, 5, 206, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (207, 5, 207, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (208, 5, 208, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (209, 5, 209, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (210, 5, 210, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (211, 5, 211, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (212, 5, 212, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (213, 5, 213, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (214, 5, 214, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (215, 5, 215, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (216, 5, 216, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (217, 5, 217, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (218, 5, 218, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (219, 5, 219, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (220, 5, 220, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (221, 5, 221, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (222, 5, 222, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (223, 5, 223, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (224, 5, 224, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (225, 5, 225, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (226, 5, 226, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (227, 5, 227, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (228, 5, 228, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (229, 5, 229, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (230, 5, 230, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (231, 5, 231, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (232, 5, 232, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (233, 5, 233, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (234, 5, 234, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (235, 5, 235, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (236, 5, 236, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (237, 5, 237, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (238, 5, 238, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (239, 5, 239, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (240, 5, 240, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (241, 5, 241, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (242, 5, 242, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (243, 5, 243, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (244, 5, 244, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (245, 5, 245, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (246, 5, 246, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (247, 5, 247, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (248, 5, 248, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (249, 5, 249, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (250, 5, 250, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (251, 5, 251, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (252, 5, 252, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (253, 5, 253, 4, 6, 1, 6200);
INSERT INTO hollow_big_storage_cage VALUES (254, 5, 254, 4, 6, 0, 6200);
INSERT INTO hollow_big_storage_cage VALUES (255, 5, 255, 4, 6, 0, 6200);
INSERT INTO hollow_big_storage_cage VALUES (256, 5, 256, 4, 6, 0, 6200);
INSERT INTO hollow_big_storage_cage VALUES (257, 5, 257, 4, 6, 0, 6200);
INSERT INTO hollow_big_storage_cage VALUES (258, 5, 258, 4, 6, 0, 6200);
INSERT INTO hollow_big_storage_cage VALUES (259, 5, 259, 4, 6, 0, 6200);
INSERT INTO hollow_big_storage_cage VALUES (260, 5, 260, 4, 6, 0, 6200);


-- changeset zsh:20241206036
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'hollow_big_storage_cage_details';
CREATE TABLE hollow_big_storage_cage_details  (
                                                  id bigint NOT NULL AUTO_INCREMENT COMMENT '大理片笼详情表id',
                                                  device_id int NULL DEFAULT NULL COMMENT '设备id',
                                                  virtual_slot int NULL DEFAULT NULL COMMENT '虚拟栅格号',
                                                  slot int NULL DEFAULT NULL COMMENT '栅格号',
                                                  glass_id varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '玻璃id',
                                                  sequence int NULL DEFAULT NULL COMMENT '小片在格内的顺序',
                                                  flow_card_id varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '流程卡号',
                                                  glass_type int NULL DEFAULT NULL COMMENT '玻璃类型',
                                                  width double NULL DEFAULT NULL COMMENT '宽',
                                                  height double NULL DEFAULT NULL COMMENT '高',
                                                  thickness double NULL DEFAULT NULL COMMENT '厚度',
                                                  tempering_layout_id int NULL DEFAULT NULL COMMENT '钢化版图id',
                                                  tempering_feed_sequence int NULL DEFAULT NULL COMMENT '钢化版图片序',
                                                  state int NULL DEFAULT NULL COMMENT '状态',
                                                  gap int NULL DEFAULT NULL COMMENT '玻璃间隙',
                                                  engineer_id varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
                                                  total_layer int NULL DEFAULT NULL COMMENT '总层号',
                                                  layer int NULL DEFAULT NULL COMMENT '层号',
                                                  create_time timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
                                                  update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
                                                  hollow_sequence int NULL DEFAULT NULL COMMENT '中空顺序',
                                                  films_id varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '膜系',
                                                  is_pair int NULL DEFAULT NULL,
                                                  PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 ;
-- rollback DROP TABLE hollow_big_storage_cage_details;

-- changeset zsh:20241206037
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'hollow_big_storage_cage_history_task';
CREATE TABLE hollow_big_storage_cage_history_task  (
                                                       id bigint NOT NULL AUTO_INCREMENT,
                                                       glass_id varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '玻璃id',
                                                       start_slot int NULL DEFAULT 0 COMMENT '起始格子',
                                                       target_slot int NULL DEFAULT 0 COMMENT '目标格子',
                                                       task_state int NULL DEFAULT NULL COMMENT '任务状态 ',
                                                       glass_count int NULL DEFAULT NULL COMMENT '玻璃数量',
                                                       task_type int NULL DEFAULT NULL COMMENT '任务类型',
                                                       create_time timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
                                                       update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
                                                       PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 ;
-- rollback DROP TABLE hollow_big_storage_cage_history_task;

-- changeset zsh:20241206038
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'hollow_glass_out_relation_info';
CREATE TABLE hollow_glass_out_relation_info  (
                                                 id bigint NOT NULL AUTO_INCREMENT COMMENT '中空玻璃关系表id',
                                                 flow_card_id varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '流程卡',
                                                 total_layer int NULL DEFAULT NULL COMMENT '总层数',
                                                 cell int NULL DEFAULT NULL COMMENT '路线',
                                                 state int NULL DEFAULT NULL COMMENT '状态0新增 1执行中 2暂停 3结束',
                                                 total_pair_quantity int NULL DEFAULT NULL,
                                                 create_time timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
                                                 update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
                                                 pair_quantity int NULL DEFAULT NULL COMMENT '已配对数量',
                                                 is_force int NULL DEFAULT NULL COMMENT '是否强制',
                                                 PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 ;
-- rollback DROP TABLE hollow_glass_out_relation_info;

-- changeset zsh:20241206039
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'hollow_glass_queue_info';
CREATE TABLE hollow_glass_queue_info  (
                                          id bigint NOT NULL AUTO_INCREMENT COMMENT '大理片笼详情表id',
                                          device_id int NULL DEFAULT NULL COMMENT '设备id',
                                          virtual_slot int NULL DEFAULT NULL COMMENT '虚拟栅格号',
                                          slot int NULL DEFAULT NULL COMMENT '栅格号',
                                          glass_id varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '玻璃id',
                                          sequence int NULL DEFAULT NULL COMMENT '小片在格内的顺序',
                                          flow_card_id varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '流程卡号',
                                          glass_type int NULL DEFAULT NULL COMMENT '玻璃类型',
                                          width double NULL DEFAULT NULL COMMENT '宽',
                                          height double NULL DEFAULT NULL COMMENT '高',
                                          thickness double NULL DEFAULT NULL COMMENT '厚度',
                                          tempering_layout_id int NULL DEFAULT NULL COMMENT '钢化版图id',
                                          tempering_feed_sequence int NULL DEFAULT NULL COMMENT '钢化版图片序',
                                          state int NULL DEFAULT NULL COMMENT '状态',
                                          gap int NULL DEFAULT NULL COMMENT '玻璃间隙',
                                          engineer_id varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
                                          total_layer int NULL DEFAULT NULL COMMENT '总层号',
                                          layer int NULL DEFAULT NULL COMMENT '层号',
                                          create_time timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
                                          update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
                                          hollow_sequence int NULL DEFAULT NULL COMMENT '中空顺序',
                                          cell int NULL DEFAULT NULL COMMENT '线路',
                                          is_pair int NULL DEFAULT NULL COMMENT '是否配对',
                                          PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 ;
-- rollback DROP TABLE hollow_glass_queue_info;


-- changeset zsh:20241206040
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'hollow_glass_relation_info';
CREATE TABLE hollow_glass_relation_info  (
                                             id bigint NOT NULL AUTO_INCREMENT COMMENT '中空玻璃关系表id',
                                             engineer_id varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工程号init',
                                             tempering_layout_id int NULL DEFAULT NULL COMMENT '炉号',
                                             tempering_feed_sequence int NULL DEFAULT NULL COMMENT '版图序号',
                                             glass_id varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '玻璃ID',
                                             flow_card_id varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '流程卡init',
                                             width double NULL DEFAULT NULL COMMENT '宽init',
                                             height double NULL DEFAULT NULL COMMENT '高init',
                                             total_layer int NULL DEFAULT NULL COMMENT '总层数init',
                                             layer int NULL DEFAULT NULL COMMENT '层数init',
                                             virtual_slot int NULL DEFAULT NULL COMMENT '组号init',
                                             slot_sequence int NULL DEFAULT NULL COMMENT '组序init',
                                             hollow_sequence int NULL DEFAULT NULL COMMENT '出片总序init',
                                             order_sort int NULL DEFAULT NULL COMMENT '订单序号init',
                                             films_id varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '膜系',
                                             thickness double NULL DEFAULT NULL COMMENT '厚度',
                                             PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 ;
-- rollback DROP TABLE hollow_glass_relation_info;

-- changeset zsh:20241206041
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'load_glass_device_one_task';
CREATE TABLE load_glass_device_one_task  (
                                             task_running int NULL DEFAULT 0 COMMENT '任务请求 0无任务 1上片',
                                             raw_glass_width int NULL DEFAULT 0 COMMENT '原片宽',
                                             raw_glass_height int NULL DEFAULT 0 COMMENT '原片高',
                                             slot int NULL DEFAULT 0 COMMENT '上片位编号',
                                             task_state int NULL DEFAULT NULL COMMENT '任务状态 0默认空任务 1执行中 2结束任务',
                                             create_time timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
                                             update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
                                             total_count int NULL DEFAULT 0 COMMENT '上片总数量',
                                             finish_count int NULL DEFAULT 0 COMMENT '已完成数量',
                                             damage_count int NULL DEFAULT 0 COMMENT '破损数量',
                                             inkage_state int NULL DEFAULT NULL COMMENT '联机状态'
) ENGINE = InnoDB ;
-- rollback DROP TABLE load_glass_device_one_task;

-- changeset zsh:20241206042
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM load_glass_device_one_task;
INSERT INTO load_glass_device_one_task VALUES (0, 0, 0, 0, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 0, 0, 0, 0);

-- changeset zsh:20241206043
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'load_glass_device_task_history';
CREATE TABLE load_glass_device_task_history  (
                                                 id bigint NOT NULL AUTO_INCREMENT COMMENT '历史任务id',
                                                 task_running int NULL DEFAULT 0 COMMENT '任务请求 0无任务 1上片',
                                                 raw_glass_width int NULL DEFAULT 0 COMMENT '原片宽',
                                                 raw_glass_height int NULL DEFAULT 0 COMMENT '原片高',
                                                 station int NULL DEFAULT 0 COMMENT '上片设备编号',
                                                 slot int NULL DEFAULT 0 COMMENT '上片位编号',
                                                 task_state int NULL DEFAULT NULL COMMENT '任务状态 0默认空任务 1执行中 2结束任务',
                                                 create_time timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
                                                 update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
                                                 total_count int NULL DEFAULT 0 COMMENT '上片总数量',
                                                 finish_count int NULL DEFAULT 0 COMMENT '已完成数量',
                                                 damage_count int NULL DEFAULT 0 COMMENT '破损数量',
                                                 PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 ;
-- rollback DROP TABLE load_glass_device_task_history;


-- changeset zsh:20241206044
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'load_glass_device_two_task';
CREATE TABLE load_glass_device_two_task  (
                                             task_running int NULL DEFAULT 0 COMMENT '任务请求 0无任务 1上片',
                                             raw_glass_width int NULL DEFAULT 0 COMMENT '原片宽',
                                             raw_glass_height int NULL DEFAULT 0 COMMENT '原片高',
                                             slot int NULL DEFAULT 0 COMMENT '上片位编号',
                                             inkage_state int NULL DEFAULT NULL COMMENT '联机状态',
                                             task_state int NULL DEFAULT NULL COMMENT '任务状态 0默认空任务 1执行中 2结束任务',
                                             create_time timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
                                             update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
                                             total_count int NULL DEFAULT 0 COMMENT '上片总数量',
                                             finish_count int NULL DEFAULT 0 COMMENT '已完成数量',
                                             damage_count int NULL DEFAULT 0 COMMENT '破损数量'
) ENGINE = InnoDB ;
-- rollback DROP TABLE load_glass_device_two_task;

-- changeset zsh:20241206045
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM load_glass_device_two_task;
INSERT INTO load_glass_device_two_task VALUES (0, 0, 0, 0, 0, 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 0, 9, 0);


-- changeset zsh:20241206046
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'raw_glass_storage_details';
CREATE TABLE raw_glass_storage_details  (
                                            id bigint NOT NULL AUTO_INCREMENT,
                                            device_id int NULL DEFAULT NULL COMMENT '设备id',
                                            slot int NULL DEFAULT NULL COMMENT '格子id',
                                            pattern_width double(8, 2) NULL DEFAULT NULL COMMENT '原片宽',
                                            pattern_height double(8, 2) NULL DEFAULT NULL COMMENT '原片高',
                                            pattern_thickness double(8, 2) NULL DEFAULT NULL COMMENT '原片厚度',
                                            films_id varchar(64) DEFAULT NULL COMMENT '膜系',
                                            create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
                                            update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
                                            remain_quantity int NULL DEFAULT NULL COMMENT '剩余数量',
                                            state int NULL DEFAULT NULL COMMENT '状态',
                                            shelf int NULL DEFAULT NULL COMMENT '架子号',
                                            PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 ;
-- rollback DROP TABLE raw_glass_storage_details;

-- changeset zsh:20241206047
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'raw_glass_storage_station';
CREATE TABLE raw_glass_storage_station  (
                                            id bigint NOT NULL,
                                            device_id int NULL DEFAULT NULL COMMENT '设备id',
                                            slot int NULL DEFAULT NULL COMMENT '栅格号',
                                            enable_state int NULL DEFAULT NULL COMMENT '启用标记',
                                            shelf int NULL DEFAULT NULL COMMENT '架子号'
) ENGINE = InnoDB ;
-- rollback DROP TABLE raw_glass_storage_station;

-- changeset zsh:20241206048
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM raw_glass_storage_station;
INSERT INTO raw_glass_storage_station VALUES (1, 1, 1, 1, 1);
INSERT INTO raw_glass_storage_station VALUES (2, 1, 2, 1, 2);
INSERT INTO raw_glass_storage_station VALUES (3, 1, 3, 1, 3);
INSERT INTO raw_glass_storage_station VALUES (4, 2, 4, 1, 4);
INSERT INTO raw_glass_storage_station VALUES (5, 2, 5, 1, 5);
INSERT INTO raw_glass_storage_station VALUES (6, 2, 6, 1, 6);
INSERT INTO raw_glass_storage_station VALUES (7, 2, 7, 1, 7);
INSERT INTO raw_glass_storage_station VALUES (8, 2, 8, 1, 8);
INSERT INTO raw_glass_storage_station VALUES (9, 2, 9, 1, 9);
INSERT INTO raw_glass_storage_station VALUES (10, 2, 10, 1, 10);
INSERT INTO raw_glass_storage_station VALUES (11, 2, 11, 1, 11);
INSERT INTO raw_glass_storage_station VALUES (12, 3, 12, 1, 12);
INSERT INTO raw_glass_storage_station VALUES (13, 3, 13, 1, 13);
INSERT INTO raw_glass_storage_station VALUES (14, 3, 14, 1, 14);
INSERT INTO raw_glass_storage_station VALUES (15, 3, 15, 1, 15);
INSERT INTO raw_glass_storage_station VALUES (16, 3, 16, 1, 16);
INSERT INTO raw_glass_storage_station VALUES (17, 3, 17, 1, 17);
INSERT INTO raw_glass_storage_station VALUES (18, 3, 18, 1, 18);
INSERT INTO raw_glass_storage_station VALUES (19, 3, 19, 1, 19);
INSERT INTO raw_glass_storage_station VALUES (20, 3, 20, 1, 20);
INSERT INTO raw_glass_storage_station VALUES (21, 3, 21, 1, 21);
INSERT INTO raw_glass_storage_station VALUES (22, 3, 22, 1, 22);
INSERT INTO raw_glass_storage_station VALUES (23, 3, 23, 1, 23);
INSERT INTO raw_glass_storage_station VALUES (24, 3, 24, 1, 24);
INSERT INTO raw_glass_storage_station VALUES (25, 3, 25, 1, 25);
INSERT INTO raw_glass_storage_station VALUES (26, 4, 98, 1, NULL);
INSERT INTO raw_glass_storage_station VALUES (27, 4, 99, 1, NULL);
INSERT INTO raw_glass_storage_station VALUES (28, 5, 101, 1, NULL);
INSERT INTO raw_glass_storage_station VALUES (29, 5, 102, 1, NULL);
INSERT INTO raw_glass_storage_station VALUES (30, 6, 103, 1, NULL);
INSERT INTO raw_glass_storage_station VALUES (31, 6, 104, 1, NULL);

-- changeset zsh:20241206049
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'raw_glass_storage_task';
CREATE TABLE raw_glass_storage_task  (
                                         id bigint NOT NULL AUTO_INCREMENT,
                                         start_slot int NULL DEFAULT NULL COMMENT '起始格子',
                                         end_slot int NULL DEFAULT NULL COMMENT '目标格子',
                                         pattern_quantity int NULL DEFAULT NULL COMMENT '原片数量',
                                         task_type int NULL DEFAULT NULL COMMENT '任务类型',
                                         task_state int NULL DEFAULT NULL COMMENT '任务状态',
                                         shelf int NULL DEFAULT NULL COMMENT '架子号',
                                         create_time timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
                                         update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
                                         PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 ;
-- rollback DROP TABLE raw_glass_storage_task;

-- changeset zsh:20241206050
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'sys_dict_data';
CREATE TABLE sys_dict_data  (
                                dict_id int NOT NULL AUTO_INCREMENT,
                                dict_sort int NOT NULL,
                                dict_label varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
                                dict_value varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
                                dict_type varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
                                dict_type_value varchar(32) DEFAULT NULL,
                                state char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '1',
                                description varchar(32) DEFAULT NULL,
                                create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
                                deleted char(1) DEFAULT '0',
                                PRIMARY KEY (dict_id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 ;
-- rollback DROP TABLE sys_dict_data;

-- changeset zsh:20241206051
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM sys_dict_data;
INSERT INTO sys_dict_data VALUES (1, 1, '白玻', 'clearGlass', '白玻', '0', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (2, 2, '超白', 'ultraClear', '白玻', '0', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (3, 3, '来料白玻', 'incomingClearGlass', '白玻', '0', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (4, 4, '欧州茶', 'europeTeaColor', '白玻', '0', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (5, 5, '水晶灰', 'cristalGrey', '白玻', '0', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (6, 6, '灰玻', 'grayGlass', '白玻', '0', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (7, 7, '灰镀膜', 'grayCoating', '白玻', '0', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (8, 8, '磨砂', 'frosted', '白玻', '0', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (9, 9, '福特蓝', 'fordBlue', '白玻', '0', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (10, 10, '福特蓝镀膜', 'fordBlueCoating', '白玻', '0', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (11, 11, '蓝星灰', 'blueAstralGrey', '白玻', '0', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (12, 12, '蓝玻', 'blueGlass', '白玻', '0', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (13, 13, '超白长虹', 'ultraClearChanghong', '白玻', '0', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (14, 14, '金晶灰', 'jinjinGrey', '白玻', '0', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (15, 15, '金晶灰茶', 'jinjinTeaGrey', '白玻', '0', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (16, 16, '镀膜', 'coatingFilm', '白玻', '0', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (17, 17, '长虹', 'clearGlassChanghong', '白玻', '0', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (18, 18, '阳光膜', 'solorControl', '白玻', '0', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (19, 19, '高反底透', 'arGlass', '白玻', '0', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (20, 20, '高白', 'arClear', '白玻', '0', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (21, 21, '黑玻', 'blackGlass', '白玻', '0', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (22, 22, '玉砂', 'emery', '白玻', '0', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (23, 23, '超白磨砂', 'ultraClearFrosted', '白玻', '0', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (24, 24, '金茶玻', 'goldenTea', '白玻', '0', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (25, 25, '蓝灰镀膜', 'blueGraycoatingFilm', '白玻', '0', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (26, 26, '单项透视', 'onePoint', '白玻', '0', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (27, 27, '超白镀膜', 'ultraClearCoatingFilm', '白玻', '0', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (28, 1, 'F绿', 'fGreen', '单银', '1', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (29, 2, 'F绿lowe', 'fGreenLowe', '单银', '1', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (30, 3, 'F绿镀膜', 'fGreenCoating', '单银', '1', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (31, 4, 'Low-e', 'lowe', '单银', '1', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (32, 5, 'super52', 'super52', '单银', '1', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (33, 6, '中玻在线', 'zgOnlineGlass', '单银', '1', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (34, 7, '北玻60离线lowe', 'ng60OfflineLowe', '单银', '1', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (35, 8, '南玻在线lowe', 'csgOnlineLowe', '单银', '1', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (36, 9, '台玻81A', 'tg81a', '单银', '1', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (37, 10, '台玻lowe70', 'tgLowe70', '单银', '1', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (38, 11, '台玻LOWE78', 'tgLowe78', '单银', '1', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (39, 12, '河北金瑞lowe80', 'hbJinruiLowe80', '单银', '1', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (40, 13, '福特蓝lowe', 'fordBlueLowe', '单银', '1', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (41, 14, '福莱特FXB60', 'flatFxb60', '单银', '1', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (42, 15, '福莱特lowe60', 'flatLowe60', '单银', '1', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (43, 16, '福莱特lowe70', 'flatLowe70', '单银', '1', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (44, 17, '福莱特lowe80', 'flatLowe80', '单银', '1', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (45, 18, '耀皮在线LOWE', 'sypOnlineLowe', '单银', '1', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (46, 19, '超白Lowe', 'ultraClearLowe', '单银', '1', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (47, 1, '双银lowe', 'doubleSilverLowe', '双银', '2', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_data VALUES (48, 2, '超白双银Lowe', 'ultraDoubleSilverLowe', '双银', '2', '1', '1', '2024-09-18 15:18:49', '0');

-- changeset zsh:20241206052
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'sys_dict_type';
CREATE TABLE sys_dict_type  (
                                dict_id int NOT NULL AUTO_INCREMENT,
                                dict_name varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
                                dict_type varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
                                state char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '1',
                                description varchar(32) DEFAULT NULL,
                                create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
                                deleted char(1) DEFAULT '0',
                                PRIMARY KEY (dict_id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 ;
-- rollback DROP TABLE sys_dict_type;


-- changeset zsh:20241206053
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM sys_dict_type;
INSERT INTO sys_dict_type VALUES (1, '白玻', 'clearGlass', '1', '0', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_type VALUES (2, '单银', 'silver', '1', '1', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_type VALUES (3, '双银', 'doubleSilver', '1', '2', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_type VALUES (4, '三银', 'thirdSilver', '1', '3', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_type VALUES (5, '超白', 'ultraClear', '1', '4', '2024-09-18 15:18:49', '0');
INSERT INTO sys_dict_type VALUES (6, '热反射', 'heatReflect', '1', '5', '2024-09-18 15:18:49', '0');

-- changeset zsh:20241206054
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'sys_error';
CREATE TABLE sys_error  (
                            id int NOT NULL AUTO_INCREMENT,
                            func varchar(255) DEFAULT NULL COMMENT '方法名',
                            error text COMMENT '错误信息',
                            create_time datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
                            PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 ;
-- rollback DROP TABLE sys_error;

-- changeset zsh:20241206055
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'sys_menu';
CREATE TABLE sys_menu  (
                           id int NOT NULL AUTO_INCREMENT COMMENT '自增id',
                           parent_id int NULL DEFAULT NULL COMMENT '父id',
                           menu_name varchar(255) DEFAULT NULL COMMENT '模块名称',
                           icon varchar(255) DEFAULT NULL,
                           url varchar(255) DEFAULT NULL COMMENT '地址',
                           language_type varchar(10) DEFAULT NULL COMMENT '语言类型',
                           status int NULL DEFAULT NULL COMMENT '状态',
                           list_sort varchar(255) DEFAULT NULL COMMENT '排序',
                           create_time datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
                           perms varchar(255) DEFAULT NULL,
                           PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 ;
-- rollback DROP TABLE sys_menu;

-- changeset zsh:20241206056
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM sys_menu;
INSERT INTO sys_menu VALUES (1, 0, '上片机', '/', '/', '/', 1, '1', '2024-03-01 10:35:15', 'spj');
INSERT INTO sys_menu VALUES (2, 0, '掰片/识别', '/', '/', '/', 1, '2', '2024-03-01 10:35:08', 'bp');
INSERT INTO sys_menu VALUES (3, 0, '卧式缓存', '/', '/', '/', 1, '3', '2023-10-24 15:05:31', 'wshc');
INSERT INTO sys_menu VALUES (4, 0, '磨边（冷加工）', '/', '/', '/', 1, '4', '2024-03-01 09:48:20', 'mb');
INSERT INTO sys_menu VALUES (5, 0, '大理片笼', '/', '/', '/', 1, '5', '2024-03-08 08:59:50', 'dlpl');
INSERT INTO sys_menu VALUES (6, 0, '钢化', '/', '/', '/', 1, '6', '2024-03-13 10:26:25', 'gh');
INSERT INTO sys_menu VALUES (7, 0, '下片台', '/', '/', '/', 1, '7', '2024-03-18 14:48:13', 'xp');
INSERT INTO sys_menu VALUES (8, 0, '系统管理', '/', '/', '/', 1, '8', '2024-03-29 08:55:35', 'xt');
INSERT INTO sys_menu VALUES (9, 1, '上片机', '/', '/Returns/returns', '/', 1, '1', '2024-03-01 10:35:15', 'spj:spj');
INSERT INTO sys_menu VALUES (10, 2, '掰片/识别', '/', '/identify/identify', '/', 1, '1', '2024-03-01 10:35:08', 'bp:bp');
INSERT INTO sys_menu VALUES (11, 3, '磨边前卧式缓存', '/', '/Caching/cachingbefore', '/', 1, '1', '2023-10-24 15:05:31', 'wshc:wshc');
INSERT INTO sys_menu VALUES (12, 4, '1线磨边(冷加工)', '/', '/stockBasicData/stockBasicData', '/', 1, '1', '2024-03-01 09:48:20', 'mb:1xmb');
INSERT INTO sys_menu VALUES (13, 5, '大理片笼', '/', '/slicecage/slicecage', '/', 1, '1', '2024-03-08 08:59:50', 'dlpl:dlpl');
INSERT INTO sys_menu VALUES (14, 6, '钢化前', '/', '/PurchaseReturn/purchaseReturn', '/', 1, '1', '2024-03-13 10:26:25', 'gh:ghq');
INSERT INTO sys_menu VALUES (15, 7, '下片台', '/', '/UnLoadGlass/loadmachinerack', '/', 1, '1', '2024-03-18 14:48:13', 'xp:xp1');
INSERT INTO sys_menu VALUES (17, 8, '用户管理', '/', '/user/userlist', '/', 1, '1', '2024-03-29 08:55:35', 'xt:yh');
INSERT INTO sys_menu VALUES (18, 8, '权限管理', '/', '/user/permissions', '/', 1, '2', '2024-03-29 16:45:07', 'xt:qx');
INSERT INTO sys_menu VALUES (19, 8, '角色管理', '/', '/user/rolelist', '/', 1, '3', '2024-03-29 16:45:07', 'xt:js');
INSERT INTO sys_menu VALUES (20, 6, '钢化后', '/', '/PurchaseReturn/purchaseStorage', '/', 1, '2', '2024-04-16 09:39:54', 'gh:ghh');
INSERT INTO sys_menu VALUES (25, 3, '下片卧式缓存', '/', '/Caching/cachingun', '/', 1, '2', '2024-04-25 14:35:36', 'wshc:wshc1');
INSERT INTO sys_menu VALUES (26, 4, '2线磨边(冷加工)', '/', '/StockBasicData/stockBasicDatatwo', '/', 1, '2', '2024-05-20 10:38:40', 'mb:2xmb');
INSERT INTO sys_menu VALUES (27, 0, '仓储中心', '/', '/', '/', 1, '9', '2024-05-24 11:39:13', 'cczx');
INSERT INTO sys_menu VALUES (28, 27, '原片仓储', '/', '/GlassStorage/rawfilmstorage', '/', 1, '1', '2024-05-24 11:44:21', NULL);
INSERT INTO sys_menu VALUES (29, 10, 'xaiozhan', '/', '/', '/', 1, '1', '2024-05-27 09:41:37', NULL);
INSERT INTO sys_menu VALUES (35, 0, '大屏', '/', '/', '/', 1, '1', '2024-07-03 09:46:31', NULL);
INSERT INTO sys_menu VALUES (54, 8, 'ceshi', '/', '/', '/', 1, '4', '2024-07-03 14:09:46', NULL);
INSERT INTO sys_menu VALUES (55, 8, 'ce', '/', '/', '/', 1, '5', '2024-07-03 14:11:33', NULL);
INSERT INTO sys_menu VALUES (57, 0, '可视化系统', '/', '/', '/', 1, '10', '2024-07-09 16:17:57', 'dpxs');
INSERT INTO sys_menu VALUES (59, 57, '可视化系统', NULL, '/largescreen/largescreen', NULL, NULL, '1', '2024-07-09 16:43:26', NULL);
INSERT INTO sys_menu VALUES (60, 0, '报工管理', '/', '/', '/', 1, '11', '2024-07-15 14:51:02', 'bggl');
INSERT INTO sys_menu VALUES (62, 60, '报工管理', NULL, '/ReportWork/reportWork', NULL, NULL, '1', '2024-07-15 16:18:39', NULL);
INSERT INTO sys_menu VALUES (63, 61, '料架管理', '/', '/GlassStorage/MaterialRackManagement', '/', 1, '2', '2024-09-13 08:31:04', NULL);
INSERT INTO sys_menu VALUES (66, 1, '上片1线', '/', '/Returns/upreturns', '/', 1, '2', '2024-10-10 15:17:22', NULL);
INSERT INTO sys_menu VALUES (69, 1, '上片2线', NULL, '/Returns/upreturns2', NULL, 1, '3', '2024-10-31 08:30:43', NULL);


-- changeset zsh:20241206057
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'sys_role';
CREATE TABLE sys_role  (
                           id bigint NOT NULL AUTO_INCREMENT,
                           name varchar(128) DEFAULT NULL,
                           role_key varchar(100) DEFAULT NULL COMMENT '角色权限字符串',
                           status char(1) DEFAULT '0' COMMENT '角色状态（0正常 1停用）',
                           del_flag int NULL DEFAULT 0 COMMENT '删除标志',
                           remark varchar(500) DEFAULT NULL COMMENT '备注',
                           PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 COMMENT = '角色表';
-- rollback DROP TABLE sys_role;

-- changeset zsh:20241206058
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM sys_role;
INSERT INTO sys_role VALUES (1, '测试', 'test', '0', 0, NULL);
INSERT INTO sys_role VALUES (2, '管理员', 'admin', '0', 0, NULL);

-- changeset zsh:20241206059
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'sys_role_menu';
CREATE TABLE sys_role_menu  (
                                role_id bigint NOT NULL AUTO_INCREMENT COMMENT '角色ID',
                                menu_id bigint NOT NULL DEFAULT 0 COMMENT '菜单id',
                                PRIMARY KEY (role_id, menu_id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 ;
-- rollback DROP TABLE sys_role_menu;

-- changeset zsh:20241206060
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM sys_role_menu;
INSERT INTO sys_role_menu VALUES (1, 1);
INSERT INTO sys_role_menu VALUES (1, 2);
INSERT INTO sys_role_menu VALUES (1, 3);
INSERT INTO sys_role_menu VALUES (1, 4);
INSERT INTO sys_role_menu VALUES (1, 5);
INSERT INTO sys_role_menu VALUES (1, 6);
INSERT INTO sys_role_menu VALUES (1, 7);
INSERT INTO sys_role_menu VALUES (1, 8);
INSERT INTO sys_role_menu VALUES (1, 9);
INSERT INTO sys_role_menu VALUES (1, 10);
INSERT INTO sys_role_menu VALUES (1, 11);
INSERT INTO sys_role_menu VALUES (1, 12);
INSERT INTO sys_role_menu VALUES (1, 13);
INSERT INTO sys_role_menu VALUES (1, 14);
INSERT INTO sys_role_menu VALUES (1, 15);
INSERT INTO sys_role_menu VALUES (1, 17);
INSERT INTO sys_role_menu VALUES (1, 18);
INSERT INTO sys_role_menu VALUES (1, 19);
INSERT INTO sys_role_menu VALUES (1, 20);
INSERT INTO sys_role_menu VALUES (1, 21);
INSERT INTO sys_role_menu VALUES (1, 25);
INSERT INTO sys_role_menu VALUES (1, 26);
INSERT INTO sys_role_menu VALUES (1, 27);
INSERT INTO sys_role_menu VALUES (1, 28);
INSERT INTO sys_role_menu VALUES (1, 57);
INSERT INTO sys_role_menu VALUES (1, 59);
INSERT INTO sys_role_menu VALUES (1, 60);
INSERT INTO sys_role_menu VALUES (1, 61);
INSERT INTO sys_role_menu VALUES (1, 62);
INSERT INTO sys_role_menu VALUES (1, 63);
INSERT INTO sys_role_menu VALUES (1, 65);
INSERT INTO sys_role_menu VALUES (1, 66);
INSERT INTO sys_role_menu VALUES (1, 69);

-- changeset zsh:20241206061
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'sys_user';
CREATE TABLE sys_user  (
                           id bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
                           user_name varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT 'NULL' COMMENT '用户名',
                           nick_name varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT 'NULL' COMMENT '昵称',
                           password varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT 'NULL' COMMENT '密码',
                           status char(1) DEFAULT '0' COMMENT '账号状态（0正常 1停用）',
                           avatar varchar(128) DEFAULT NULL COMMENT '头像',
                           user_type char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '1' COMMENT '用户类型（0管理员，1普通用户）',
                           del_flag int NULL DEFAULT 0 COMMENT '删除标志',
                           PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 COMMENT = '用户表';
-- rollback DROP TABLE sys_user;


-- changeset zsh:20241206062
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM sys_user;
INSERT INTO sys_user VALUES (1, 'admin', 'admin', '$2a$10$mFKyOBNO8hdNafPR18hjeuiDvG2zpIS6IgIRiWHk1b.IjIWNkj.l2', '0', NULL, '1', 0);

-- changeset zsh:20241206063
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'sys_user_role';
CREATE TABLE sys_user_role  (
                                user_id bigint NOT NULL AUTO_INCREMENT COMMENT '用户id',
                                role_id bigint NOT NULL DEFAULT 0 COMMENT '角色id',
                                PRIMARY KEY (user_id, role_id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 ;
-- rollback DROP TABLE sys_user_role;

-- changeset zsh:20241206064
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'task_cache';
CREATE TABLE task_cache  (
                             ID varchar(255) NOT NULL COMMENT 'ID编号',
                             start_cell varchar(255) DEFAULT NULL COMMENT '起始',
                             end_cell varchar(255) DEFAULT NULL COMMENT '目标',
                             task_type varchar(255) DEFAULT NULL COMMENT '任务类型 1:进   2：出',
                             task_status varchar(255) DEFAULT NULL COMMENT '任务状态 0 未开始  1已完成',
                             PRIMARY KEY (ID) USING BTREE
) ENGINE = InnoDB ;
-- rollback DROP TABLE task_cache;

-- changeset zsh:20241206065
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'tempering_record';
CREATE TABLE tempering_record  (
                                   engineer_id varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '工程id',
                                   tempering_layout_id int NOT NULL COMMENT '钢化版图',
                                   glass_type int NULL DEFAULT NULL COMMENT '玻璃材质(膜系0.白玻1.单银2.双银3三银 4.超白5.热反射)',
                                   tempering_type int NULL DEFAULT NULL COMMENT '钢化类型（1.全钢:2.半钢）',
                                   thickness double NULL DEFAULT NULL COMMENT '厚度（厚度*10)',
                                   loading_rate double NULL DEFAULT NULL COMMENT '装载率',
                                   area_difference double NULL DEFAULT NULL COMMENT '面积差',
                                   production_time varchar(64) DEFAULT NULL COMMENT '生产耗时',
                                   heat_energy varchar(64) DEFAULT NULL COMMENT '加热能耗',
                                   cool_energy varchar(64) DEFAULT NULL COMMENT '冷却能耗',
                                   state int NULL DEFAULT NULL COMMENT '是否完成(plc获取非1：参数不存在；2、匹配完成；3、匹配超时）',
                                   PRIMARY KEY (tempering_layout_id, engineer_id) USING BTREE
) ENGINE = InnoDB ;
-- rollback DROP TABLE tempering_record;

-- changeset zsh:20241206066
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'up_patten_usage';
CREATE TABLE up_patten_usage  (
                                  id bigint NOT NULL AUTO_INCREMENT COMMENT '原片使用情况表id',
                                  engineering_id varchar(50) DEFAULT NULL COMMENT '工程号',
                                  films_id varchar(50) DEFAULT NULL COMMENT '膜系id',
                                  width double NULL DEFAULT NULL COMMENT '宽',
                                  height double NULL DEFAULT NULL COMMENT '高',
                                  thickness double NULL DEFAULT NULL COMMENT '厚度',
                                  layout_sequence int NULL DEFAULT NULL COMMENT '原片版图片序',
                                  state int NULL DEFAULT NULL COMMENT '状态',
                                  PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 ;
-- rollback DROP TABLE up_patten_usage;

-- changeset zsh:20241206067
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'up_workstation';
CREATE TABLE up_workstation  (
                                 id int NOT NULL COMMENT '上片工位表id',
                                 workstation_id int NULL DEFAULT NULL COMMENT '工位号',
                                 device_id int NULL DEFAULT NULL COMMENT '设备id',
                                 enable_state int NULL DEFAULT NULL COMMENT '启用状态',
                                 work_state int NULL DEFAULT NULL COMMENT '工作状态',
                                 pattern_width double NULL DEFAULT NULL COMMENT '原片宽',
                                 pattern_height double(255, 0) NULL DEFAULT NULL COMMENT '原片高',
                                 pattern_thickness double(255, 0) NULL DEFAULT NULL COMMENT '原片厚度',
                                 films_id varchar(20) DEFAULT NULL COMMENT '膜系',
                                 number int NULL DEFAULT NULL COMMENT '数量',
                                 PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB;
-- rollback DROP TABLE up_workstation;

-- changeset zsh:20241206068
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM up_workstation;
INSERT INTO up_workstation VALUES (1, 1, 0, 1, 0, 0, 0, 0, '', 0);
INSERT INTO up_workstation VALUES (2, 2, 0, 1, 0, 0, 0, 0, '', 0);
INSERT INTO up_workstation VALUES (3, 3, 0, 1, 0, 0, 0, 0, '', 0);
INSERT INTO up_workstation VALUES (4, 4, 0, 1, 0, 0, 0, 0, '', 0);


-- changeset zsh:20241206069
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'work_assignment';
CREATE TABLE work_assignment  (
                                  id int NOT NULL AUTO_INCREMENT,
                                  line int NULL DEFAULT NULL COMMENT '线路',
                                  work_processes varchar(255) DEFAULT NULL COMMENT '工序',
                                  teams_groups_name varchar(255) DEFAULT NULL COMMENT '班组名称',
                                  device_name varchar(255) DEFAULT NULL COMMENT '设备名称',
                                  PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 ;
-- rollback DROP TABLE work_assignment;


-- changeset zsh:20241206070
-- preconditions onFail:CONTINUE onError:CONTINUE
-- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM work_assignment;
INSERT INTO work_assignment VALUES (1, 40001, '钢化', '1班', '钢化炉');
INSERT INTO work_assignment VALUES (2, 2002, '冷加工', 'test', '卧转立');
INSERT INTO work_assignment VALUES (3, 3001, '冷加工', 'test', '大理片出片车');
