Browse Source

fix:点位存储到点位表中

tags/1.0
白凤吉 5 months ago
parent
commit
616f6a2f27
  1. 32
      src/main/resources/sql/init.sql

32
src/main/resources/sql/init.sql

@ -57,20 +57,14 @@ CREATE TABLE IF NOT EXISTS sys_settings
-- 插入 sys_settings 表数据
INSERT OR IGNORE INTO sys_settings (id, parent_id, name, code, value)
VALUES (1, NULL, '玻片位置', 'slide_position', NULL),
(2, 1, '玻片1位置', 'slide_position1', '1,2,3'),
(3, 1, '玻片2位置', 'slide_position2', '1,2,3'),
(4, 1, '玻片3位置', 'slide_position3', '1,2,3'),
(5, 1, '玻片4位置', 'slide_position4', '1,2,3'),
(6, NULL, '电机电流', 'current', NULL),
(7, 6, 'x轴电流', 'x_current', 2),
(8, 6, 'y轴电流', 'y_current', 3),
(9, 6, 'z轴电流', 'z_current', 4),
(10, NULL, '电机运行速度', 'speed', NULL),
(11, 10, 'x轴速度', 'x_speed', 10),
(12, 10, 'y轴速度', 'y_speed', 10),
(13, 10, 'z轴速度', 'z_speed', 10),
(14, NULL, '废液桶位置','waste_liquor', '173.08,75,70' );
VALUES (1, NULL, '电机电流', 'current', NULL),
(2, 1, 'x轴电流', 'x_current', 2),
(3, 1, 'y轴电流', 'y_current', 3),
(4, 1, 'z轴电流', 'z_current', 4),
(5, NULL, '电机运行速度', 'speed', NULL),
(6, 5, 'x轴速度', 'x_speed', 10),
(7, 5, 'y轴速度', 'y_speed', 10),
(8, 5, 'z轴速度', 'z_speed', 10);
@ -79,9 +73,17 @@ CREATE TABLE IF NOT EXISTS position
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
point_name TEXT NOT NULL,
point_code TEXT NOT NULL,
x REAL NOT NULL,
y REAL NOT NULL,
z REAL NOT NULL,
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
update_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
);
INSERT OR IGNORE INTO position (point_name, point_code, x, y, z)
VALUES ('玻片1位置', 'slide_position1', 1, 2, 3),
('玻片2位置', 'slide_position2', 1, 2, 3),
('玻片3位置', 'slide_position3', 1, 2, 3),
('玻片4位置', 'slide_position4', 1, 2, 3),
('废液桶位置', 'waste_liquor', 173.08, 75, 70);
Loading…
Cancel
Save