-- 货架布局初始化样例（仅 3 排，每排 2 个纵向位置，每个位置 3 层，共 18 个仓位）。
-- 编码：块(2)-排(3)-列(2)-层(1)，例如 B01-R002-C02-L3。
-- placement_type：01 双通、02 左通、03 右通。
-- 图纸映射样例：最上方排=左通，中间排=双通，最下方排=右通。
-- 当前仅生成 SQL 文件供确认，未执行数据库插入。

INSERT INTO wms_structattr
    (struct_id, struct_code, struct_name, simple_name,
     sect_id, sect_code, sect_name,
     stor_id, stor_code, stor_name, stor_type,
     is_tempstruct, row_num, col_num, layer_num, block_num, placement_type,
     creator, create_time, updater, update_time, deleted, is_used,
     storagevehicle_code, storagevehicle_type, storagevehicle_qty,
     lock_type, task_code, inv_type, inv_id, inv_code, remark)
VALUES
-- 001排：左侧有轨道，只允许从左侧存取。
('B01-R001-C01-L1', 'B01-R001-C01-L1', '主存区-01块-001排-01列-1层', 'B01-R001-C01-L1',
 '2078406241102450689', 'ZC01', '主存区', '2078405279260463106', 'AC01', '遂宁成品仓', NULL,
 '0', 1, 1, 1, 1, '02', '1', NOW(), '1', NOW(), '0', 1, NULL, NULL, 0, '1', NULL, NULL, NULL, NULL, '布局样例-左通'),
('B01-R001-C01-L2', 'B01-R001-C01-L2', '主存区-01块-001排-01列-2层', 'B01-R001-C01-L2',
 '2078406241102450689', 'ZC01', '主存区', '2078405279260463106', 'AC01', '遂宁成品仓', NULL,
 '0', 1, 1, 2, 1, '02', '1', NOW(), '1', NOW(), '0', 1, NULL, NULL, 0, '1', NULL, NULL, NULL, NULL, '布局样例-左通'),
('B01-R001-C01-L3', 'B01-R001-C01-L3', '主存区-01块-001排-01列-3层', 'B01-R001-C01-L3',
 '2078406241102450689', 'ZC01', '主存区', '2078405279260463106', 'AC01', '遂宁成品仓', NULL,
 '0', 1, 1, 3, 1, '02', '1', NOW(), '1', NOW(), '0', 1, NULL, NULL, 0, '1', NULL, NULL, NULL, NULL, '布局样例-左通'),
('B01-R001-C02-L1', 'B01-R001-C02-L1', '主存区-01块-001排-02列-1层', 'B01-R001-C02-L1',
 '2078406241102450689', 'ZC01', '主存区', '2078405279260463106', 'AC01', '遂宁成品仓', NULL,
 '0', 1, 2, 1, 1, '02', '1', NOW(), '1', NOW(), '0', 1, NULL, NULL, 0, '1', NULL, NULL, NULL, NULL, '布局样例-左通'),
('B01-R001-C02-L2', 'B01-R001-C02-L2', '主存区-01块-001排-02列-2层', 'B01-R001-C02-L2',
 '2078406241102450689', 'ZC01', '主存区', '2078405279260463106', 'AC01', '遂宁成品仓', NULL,
 '0', 1, 2, 2, 1, '02', '1', NOW(), '1', NOW(), '0', 1, NULL, NULL, 0, '1', NULL, NULL, NULL, NULL, '布局样例-左通'),
('B01-R001-C02-L3', 'B01-R001-C02-L3', '主存区-01块-001排-02列-3层', 'B01-R001-C02-L3',
 '2078406241102450689', 'ZC01', '主存区', '2078405279260463106', 'AC01', '遂宁成品仓', NULL,
 '0', 1, 2, 3, 1, '02', '1', NOW(), '1', NOW(), '0', 1, NULL, NULL, 0, '1', NULL, NULL, NULL, NULL, '布局样例-左通'),

-- 002排：两侧均有轨道，可以从两侧存取。
('B01-R002-C01-L1', 'B01-R002-C01-L1', '主存区-01块-002排-01列-1层', 'B01-R002-C01-L1',
 '2078406241102450689', 'ZC01', '主存区', '2078405279260463106', 'AC01', '遂宁成品仓', NULL,
 '0', 2, 1, 1, 1, '01', '1', NOW(), '1', NOW(), '0', 1, NULL, NULL, 0, '1', NULL, NULL, NULL, NULL, '布局样例-双通'),
('B01-R002-C01-L2', 'B01-R002-C01-L2', '主存区-01块-002排-01列-2层', 'B01-R002-C01-L2',
 '2078406241102450689', 'ZC01', '主存区', '2078405279260463106', 'AC01', '遂宁成品仓', NULL,
 '0', 2, 1, 2, 1, '01', '1', NOW(), '1', NOW(), '0', 1, NULL, NULL, 0, '1', NULL, NULL, NULL, NULL, '布局样例-双通'),
('B01-R002-C01-L3', 'B01-R002-C01-L3', '主存区-01块-002排-01列-3层', 'B01-R002-C01-L3',
 '2078406241102450689', 'ZC01', '主存区', '2078405279260463106', 'AC01', '遂宁成品仓', NULL,
 '0', 2, 1, 3, 1, '01', '1', NOW(), '1', NOW(), '0', 1, NULL, NULL, 0, '1', NULL, NULL, NULL, NULL, '布局样例-双通'),
('B01-R002-C02-L1', 'B01-R002-C02-L1', '主存区-01块-002排-02列-1层', 'B01-R002-C02-L1',
 '2078406241102450689', 'ZC01', '主存区', '2078405279260463106', 'AC01', '遂宁成品仓', NULL,
 '0', 2, 2, 1, 1, '01', '1', NOW(), '1', NOW(), '0', 1, NULL, NULL, 0, '1', NULL, NULL, NULL, NULL, '布局样例-双通'),
('B01-R002-C02-L2', 'B01-R002-C02-L2', '主存区-01块-002排-02列-2层', 'B01-R002-C02-L2',
 '2078406241102450689', 'ZC01', '主存区', '2078405279260463106', 'AC01', '遂宁成品仓', NULL,
 '0', 2, 2, 2, 1, '01', '1', NOW(), '1', NOW(), '0', 1, NULL, NULL, 0, '1', NULL, NULL, NULL, NULL, '布局样例-双通'),
('B01-R002-C02-L3', 'B01-R002-C02-L3', '主存区-01块-002排-02列-3层', 'B01-R002-C02-L3',
 '2078406241102450689', 'ZC01', '主存区', '2078405279260463106', 'AC01', '遂宁成品仓', NULL,
 '0', 2, 2, 3, 1, '01', '1', NOW(), '1', NOW(), '0', 1, NULL, NULL, 0, '1', NULL, NULL, NULL, NULL, '布局样例-双通'),

-- 003排：右侧有轨道，只允许从右侧存取。
('B01-R003-C01-L1', 'B01-R003-C01-L1', '主存区-01块-003排-01列-1层', 'B01-R003-C01-L1',
 '2078406241102450689', 'ZC01', '主存区', '2078405279260463106', 'AC01', '遂宁成品仓', NULL,
 '0', 3, 1, 1, 1, '03', '1', NOW(), '1', NOW(), '0', 1, NULL, NULL, 0, '1', NULL, NULL, NULL, NULL, '布局样例-右通'),
('B01-R003-C01-L2', 'B01-R003-C01-L2', '主存区-01块-003排-01列-2层', 'B01-R003-C01-L2',
 '2078406241102450689', 'ZC01', '主存区', '2078405279260463106', 'AC01', '遂宁成品仓', NULL,
 '0', 3, 1, 2, 1, '03', '1', NOW(), '1', NOW(), '0', 1, NULL, NULL, 0, '1', NULL, NULL, NULL, NULL, '布局样例-右通'),
('B01-R003-C01-L3', 'B01-R003-C01-L3', '主存区-01块-003排-01列-3层', 'B01-R003-C01-L3',
 '2078406241102450689', 'ZC01', '主存区', '2078405279260463106', 'AC01', '遂宁成品仓', NULL,
 '0', 3, 1, 3, 1, '03', '1', NOW(), '1', NOW(), '0', 1, NULL, NULL, 0, '1', NULL, NULL, NULL, NULL, '布局样例-右通'),
('B01-R003-C02-L1', 'B01-R003-C02-L1', '主存区-01块-003排-02列-1层', 'B01-R003-C02-L1',
 '2078406241102450689', 'ZC01', '主存区', '2078405279260463106', 'AC01', '遂宁成品仓', NULL,
 '0', 3, 2, 1, 1, '03', '1', NOW(), '1', NOW(), '0', 1, NULL, NULL, 0, '1', NULL, NULL, NULL, NULL, '布局样例-右通'),
('B01-R003-C02-L2', 'B01-R003-C02-L2', '主存区-01块-003排-02列-2层', 'B01-R003-C02-L2',
 '2078406241102450689', 'ZC01', '主存区', '2078405279260463106', 'AC01', '遂宁成品仓', NULL,
 '0', 3, 2, 2, 1, '03', '1', NOW(), '1', NOW(), '0', 1, NULL, NULL, 0, '1', NULL, NULL, NULL, NULL, '布局样例-右通'),
('B01-R003-C02-L3', 'B01-R003-C02-L3', '主存区-01块-003排-02列-3层', 'B01-R003-C02-L3',
 '2078406241102450689', 'ZC01', '主存区', '2078405279260463106', 'AC01', '遂宁成品仓', NULL,
 '0', 3, 2, 3, 1, '03', '1', NOW(), '1', NOW(), '0', 1, NULL, NULL, 0, '1', NULL, NULL, NULL, NULL, '布局样例-右通');
