From 22fb46f2db1714a6b450b353669d26908884653f Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期四, 24 十月 2024 10:48:06 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/HangZhouMes

---
 hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/changelog/changelog.sql |  146 ++++++++++++++++++++----------------------------
 1 files changed, 61 insertions(+), 85 deletions(-)

diff --git a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/changelog/changelog.sql b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/changelog/changelog.sql
index 3c2df0c..2b854f2 100644
--- a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/changelog/changelog.sql
+++ b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/resources/changelog/changelog.sql
@@ -158,16 +158,18 @@
 -- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'raw_glass_storage_details' and table_schema = 'hangzhoumes';
 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)  NULL DEFAULT NULL COMMENT '鑶滅郴',
-    create_time       datetime     NOT NULL COMMENT '鍒涘缓鏃堕棿',
-    remain_quantity   int          NULL DEFAULT NULL COMMENT '鍓╀綑鏁伴噺',
-    state             int          NULL DEFAULT NULL COMMENT '鐘舵��',
+    id                bigint    NOT NULL AUTO_INCREMENT,
+    device_id         int                DEFAULT NULL COMMENT '璁惧id',
+    slot              int                DEFAULT NULL COMMENT '鏍煎瓙id',
+    pattern_width     double(8, 2)       DEFAULT NULL COMMENT '鍘熺墖瀹�',
+    pattern_height    double(8, 2)       DEFAULT NULL COMMENT '鍘熺墖楂�',
+    pattern_thickness double(8, 2)       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                DEFAULT NULL COMMENT '鍓╀綑鏁伴噺',
+    state             int                DEFAULT NULL COMMENT '鐘舵��',
+    shelf             int                DEFAULT NULL COMMENT '鏋跺瓙鍙�',
     PRIMARY KEY (id) USING BTREE
 );
 -- rollback DROP TABLE raw_glass_storage_details;
@@ -177,11 +179,11 @@
 -- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'raw_glass_storage_station' and table_schema = 'hangzhoumes';
 CREATE TABLE raw_glass_storage_station
 (
-    id           bigint       NOT NULL AUTO_INCREMENT,
-    device_id    int          NULL DEFAULT NULL COMMENT '璁惧id',
-    slot         int          NULL DEFAULT NULL COMMENT '鏍呮牸鍙�',
-    enable_state varchar(255) NULL DEFAULT NULL COMMENT '鍚敤鏍囪',
-    PRIMARY KEY (id)
+    id           bigint NOT NULL,
+    device_id    int DEFAULT NULL COMMENT '璁惧id',
+    slot         int DEFAULT NULL COMMENT '鏍呮牸鍙�',
+    enable_state int DEFAULT NULL COMMENT '鍚敤鏍囪',
+    shelf        int DEFAULT NULL COMMENT '鏋跺瓙鍙�'
 );
 -- rollback DROP TABLE raw_glass_storage_station;
 
@@ -191,13 +193,15 @@
 -- precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'raw_glass_storage_task' and table_schema = 'hangzhoumes';
 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 '浠诲姟绫诲瀷',
-    enable_state     int      NULL DEFAULT NULL COMMENT '浠诲姟鐘舵��',
-    create_time      datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿',
+    id               bigint    NOT NULL AUTO_INCREMENT,
+    start_slot       int                DEFAULT NULL COMMENT '璧峰鏍煎瓙',
+    end_slot         int                DEFAULT NULL COMMENT '鐩爣鏍煎瓙',
+    pattern_quantity int                DEFAULT NULL COMMENT '鍘熺墖鏁伴噺',
+    task_type        int                DEFAULT NULL COMMENT '浠诲姟绫诲瀷',
+    task_state       int                DEFAULT NULL COMMENT '浠诲姟鐘舵��',
+    shelf            int                DEFAULT NULL COMMENT '鏋跺瓙鍙�',
+    create_time      TIMESTAMP          DEFAULT CURRENT_TIMESTAMP COMMENT '鍒涘缓鏃堕棿',
+    update_time      TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '鏇存柊鏃堕棿',
     PRIMARY KEY (id) USING BTREE
 );
 -- rollback DROP TABLE raw_glass_storage_task;
@@ -207,73 +211,45 @@
 -- preconditions onFail:CONTINUE onError:CONTINUE
 -- precondition-sql-check expectedResult:0 SELECT count(0) FROM information_schema.columns WHERE table_schema = 'hangzhoumes' AND table_name = 'engineering' AND column_name = 'station_cell';
 ALTER TABLE engineering
-    ADD COLUMN station_cell varchar(20);
+    ADD COLUMN station_cell int;
 
 -- changeset zsh:20241017001
 -- preconditions onFail:CONTINUE onError:CONTINUE
 -- precondition-sql-check expectedResult:0 select count(1) from raw_glass_storage_station;
-INSERT INTO raw_glass_storage_station (slot, device_id, enable_state)
-VALUES (1, 1, '1');
-INSERT INTO raw_glass_storage_station (slot, device_id, enable_state)
-VALUES (2, 1, '1');
-INSERT INTO raw_glass_storage_station (slot, device_id, enable_state)
-VALUES (3, 1, '1');
-INSERT INTO raw_glass_storage_station (slot, device_id, enable_state)
-VALUES (4, 2, '1');
-INSERT INTO raw_glass_storage_station (slot, device_id, enable_state)
-VALUES (5, 2, '1');
-INSERT INTO raw_glass_storage_station (slot, device_id, enable_state)
-VALUES (6, 2, '1');
-INSERT INTO raw_glass_storage_station (slot, device_id, enable_state)
-VALUES (7, 2, '1');
-INSERT INTO raw_glass_storage_station (slot, device_id, enable_state)
-VALUES (8, 2, '1');
-INSERT INTO raw_glass_storage_station (slot, device_id, enable_state)
-VALUES (9, 2, '1');
-INSERT INTO raw_glass_storage_station (slot, device_id, enable_state)
-VALUES (10, 2, '1');
-INSERT INTO raw_glass_storage_station (slot, device_id, enable_state)
-VALUES (11, 2, '1');
-INSERT INTO raw_glass_storage_station (slot, device_id, enable_state)
-VALUES (12, 3, '1');
-INSERT INTO raw_glass_storage_station (slot, device_id, enable_state)
-VALUES (13, 3, '1');
-INSERT INTO raw_glass_storage_station (slot, device_id, enable_state)
-VALUES (14, 3, '1');
-INSERT INTO raw_glass_storage_station (slot, device_id, enable_state)
-VALUES (15, 3, '1');
-INSERT INTO raw_glass_storage_station (slot, device_id, enable_state)
-VALUES (16, 3, '1');
-INSERT INTO raw_glass_storage_station (slot, device_id, enable_state)
-VALUES (17, 3, '1');
-INSERT INTO raw_glass_storage_station (slot, device_id, enable_state)
-VALUES (18, 3, '1');
-INSERT INTO raw_glass_storage_station (slot, device_id, enable_state)
-VALUES (19, 3, '1');
-INSERT INTO raw_glass_storage_station (slot, device_id, enable_state)
-VALUES (20, 3, '1');
-INSERT INTO raw_glass_storage_station (slot, device_id, enable_state)
-VALUES (21, 3, '1');
-INSERT INTO raw_glass_storage_station (slot, device_id, enable_state)
-VALUES (22, 3, '1');
-INSERT INTO raw_glass_storage_station (slot, device_id, enable_state)
-VALUES (23, 3, '1');
-INSERT INTO raw_glass_storage_station (slot, device_id, enable_state)
-VALUES (24, 3, '1');
-INSERT INTO raw_glass_storage_station (slot, device_id, enable_state)
-VALUES (25, 3, '1');
-INSERT INTO raw_glass_storage_station (slot, device_id, enable_state)
-VALUES (98, 4, '1');
-INSERT INTO raw_glass_storage_station (slot, device_id, enable_state)
-VALUES (99, 4, '1');
-INSERT INTO raw_glass_storage_station (slot, device_id, enable_state)
-VALUES (101, 5, '1');
-INSERT INTO raw_glass_storage_station (slot, device_id, enable_state)
-VALUES (102, 5, '1');
-INSERT INTO raw_glass_storage_station (slot, device_id, enable_state)
-VALUES (103, 6, '1');
-INSERT INTO raw_glass_storage_station (slot, device_id, enable_state)
-VALUES (104, 6, '1');
+INSERT INTO raw_glass_storage_station (id, device_id, slot, enable_state, shelf)
+VALUES (1, 1, 1, 1, 1),
+       (2, 1, 2, 1, 2),
+       (3, 1, 3, 1, 3),
+       (4, 2, 4, 1, 4),
+       (5, 2, 5, 1, 5),
+       (6, 2, 6, 1, 6),
+       (7, 2, 7, 1, 7),
+       (8, 2, 8, 1, 8),
+       (9, 2, 9, 1, 9),
+       (10, 2, 10, 1, 10),
+       (11, 2, 11, 1, 11),
+       (12, 3, 12, 1, 12),
+       (13, 3, 13, 1, 13),
+       (14, 3, 14, 1, 14),
+       (15, 3, 15, 1, 15),
+       (16, 3, 16, 1, 16),
+       (17, 3, 17, 1, 17),
+       (18, 3, 18, 1, 18),
+       (19, 3, 19, 1, 19),
+       (20, 3, 20, 1, 20),
+       (21, 3, 21, 1, 21),
+       (22, 3, 22, 1, 22),
+       (23, 3, 23, 1, 23),
+       (24, 3, 24, 1, 24),
+       (25, 3, 25, 1, 25),
+       (26, 4, 98, 1, NULL),
+       (27, 4, 99, 1, NULL),
+       (28, 5, 101, 1, NULL),
+       (29, 5, 102, 1, NULL),
+       (30, 6, 103, 1, NULL),
+       (31, 6, 104, 1, NULL);
+
+
 
 
 

--
Gitblit v1.8.0