add:分切下轴分切送轴插拔轴测试
This commit is contained in:
70
sql/mysql/lms_up_shaft_test_data.sql
Normal file
70
sql/mysql/lms_up_shaft_test_data.sql
Normal file
@@ -0,0 +1,70 @@
|
||||
-- 分切上轴接口起点测试数据(手动在测试库执行)。
|
||||
-- 创建人、修改人按超级管理员 ID=1 填写;实际 ID 不同时请修改。
|
||||
-- 测试点位需在模拟 ACS 中配置;连接真实 ACS 时请换成实际测试点位。
|
||||
|
||||
|
||||
-- 同种物料准备两个起点,支持上下轴使用相同日计划物料。
|
||||
-- 不覆盖已有记录;重复执行不会重置已经使用或锁定的测试点位。
|
||||
INSERT INTO lms_cache_cutpoint
|
||||
(ivt_id, point_code, point_name, material_code, qzz_no, gx_no,
|
||||
sub_container, point_type, point_status, lock_status, is_used,
|
||||
product_area, plan, sort_seq, remark, creator, create_name, updater, update_optname, create_time, update_time)
|
||||
SELECT 9909040101, 'TEST_GZ_CACHE_01', '上轴测试管轴缓存位01',
|
||||
'TEST_CORE_MAT_A', 'TEST_QZZ_001', 'TEST_GX_001',
|
||||
'TEST_SUB_001', '5', '1', '0', '1', '1', '1', 1,
|
||||
'分切上轴接口测试数据', '1', '超级管理员', '1', '超级管理员', NOW(), NOW()
|
||||
WHERE NOT EXISTS (SELECT 1 FROM lms_cache_cutpoint
|
||||
WHERE point_code = 'TEST_GZ_CACHE_01');
|
||||
|
||||
INSERT INTO lms_cache_cutpoint
|
||||
(ivt_id, point_code, point_name, material_code, qzz_no, gx_no,
|
||||
sub_container, point_type, point_status, lock_status, is_used,
|
||||
product_area, plan, sort_seq, remark, creator, create_name, updater, update_optname, create_time, update_time)
|
||||
SELECT 9909040102, 'TEST_GZ_CACHE_02', '上轴测试管轴缓存位02',
|
||||
'TEST_CORE_MAT_A', 'TEST_QZZ_002', 'TEST_GX_002',
|
||||
'TEST_SUB_002', '5', '1', '0', '1', '1', '1', 2,
|
||||
'分切上轴接口测试数据', '1', '超级管理员', '1', '超级管理员', NOW(), NOW()
|
||||
WHERE NOT EXISTS (SELECT 1 FROM lms_cache_cutpoint
|
||||
WHERE point_code = 'TEST_GZ_CACHE_02');
|
||||
|
||||
INSERT INTO lms_cache_cutpoint
|
||||
(ivt_id, point_code, point_name, material_code, qzz_no, gx_no,
|
||||
sub_container, point_type, point_status, lock_status, is_used,
|
||||
product_area, plan, sort_seq, remark, creator, create_name, updater, update_optname, create_time, update_time)
|
||||
SELECT 9909040103, 'TEST_GZ_CACHE_03', '上轴测试管轴缓存位03',
|
||||
'TEST_CORE_MAT_B', 'TEST_QZZ_003', 'TEST_GX_003',
|
||||
'TEST_SUB_003', '5', '1', '0', '1', '1', '1', 3,
|
||||
'分切上轴接口测试数据', '1', '超级管理员', '1', '超级管理员', NOW(), NOW()
|
||||
WHERE NOT EXISTS (SELECT 1 FROM lms_cache_cutpoint
|
||||
WHERE point_code = 'TEST_GZ_CACHE_03');
|
||||
|
||||
INSERT INTO lms_cache_cutpoint
|
||||
(ivt_id, point_code, point_name, material_code, qzz_no, gx_no,
|
||||
sub_container, point_type, point_status, lock_status, is_used,
|
||||
product_area, plan, sort_seq, remark, creator, create_name, updater, update_optname, create_time, update_time)
|
||||
SELECT 9909040104, 'TEST_GZ_CACHE_04', '上轴测试管轴缓存位04',
|
||||
'TEST_CORE_MAT_B', 'TEST_QZZ_004', 'TEST_GX_004',
|
||||
'TEST_SUB_004', '5', '1', '0', '1', '1', '1', 4,
|
||||
'分切上轴接口测试数据', '1', '超级管理员', '1', '超级管理员', NOW(), NOW()
|
||||
WHERE NOT EXISTS (SELECT 1 FROM lms_cache_cutpoint
|
||||
WHERE point_code = 'TEST_GZ_CACHE_04');
|
||||
|
||||
-- 检查插入结果及接口可选起点(代码按 ivt_id 倒序选择)。
|
||||
SELECT ivt_id, point_code, material_code, qzz_no, gx_no, sub_container,
|
||||
point_type, point_status, lock_status, is_used, creator, create_name, updater, update_optname
|
||||
FROM lms_cache_cutpoint
|
||||
WHERE point_code IN ('TEST_GZ_CACHE_01', 'TEST_GZ_CACHE_02',
|
||||
'TEST_GZ_CACHE_03', 'TEST_GZ_CACHE_04')
|
||||
|
||||
AND deleted = 0
|
||||
ORDER BY ivt_id DESC;
|
||||
|
||||
-- 从现有设备中选择上下轴均为空且未锁定的测试设备,填入请求的 pointCode。
|
||||
SELECT point_code, up_point_code, down_point_code, up_gx_no, down_gx_no,
|
||||
product_area, lock_status
|
||||
FROM lms_cutpoint
|
||||
WHERE deleted = 0
|
||||
AND lock_status = '0'
|
||||
AND (up_gx_no IS NULL OR up_gx_no = '')
|
||||
AND (down_gx_no IS NULL OR down_gx_no = '')
|
||||
ORDER BY ivt_id DESC;
|
||||
Reference in New Issue
Block a user