如楼上大佬所说,您可以考虑为菜单生成一个视图作为数据源,下面的SQL可以作为参考,您可以根据实际调整;
- SELECT "库存开单" AS "菜单名称", "" AS "上级菜单"
- UNION ALL
- SELECT "二级菜单" AS "菜单名称", "库存开单" AS "上级菜单"
- FROM "数据表A"
- UNION ALL
- SELECT "库存单据处理" AS "菜单名称", "" AS "上级菜单"
- UNION ALL
- SELECT "二级菜单" AS "菜单名称", "库存单据处理" AS "上级菜单"
- FROM "数据表B"
复制代码 |