设备管理基础资料准备

This commit is contained in:
2026-05-18 16:36:04 +08:00
parent 36015f26d9
commit 34009b8900
34 changed files with 2031 additions and 69 deletions

View File

@@ -1,6 +1,6 @@
-- MES 厂家信息字典 + 建表 + 菜单 + 按钮 + 租户 admin 授权可整文件一次执行
-- 权限前缀与 Controller前端 v-auth 一致mes:mes_xsl_manufacturer:*
-- 父菜单MES基础资料 / MES资料与备品件等脚本相同 @mes_base_pid修改租户改 SET @mes_tenant_id
-- 父菜单设备管理@mes_equip_pid修改租户改 SET @mes_tenant_id
-- 新环境也可依赖 FlywayV3.9.2_63__mes_xsl_manufacturer.sql与本文内容一致重复执行幂等
SET NAMES utf8mb4;
@@ -47,19 +47,22 @@ CREATE TABLE IF NOT EXISTS `mes_xsl_manufacturer` (
SET @mes_tenant_id = 1002;
SET @mes_base_pid = (
SELECT MIN(`id`) FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` IN ('MES基础资料', 'MES资料')
SET @mes_equip_pid = (
SELECT `id` FROM `sys_permission`
WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` = '设备管理'
LIMIT 1
);
SET @mes_base_pid = IFNULL(@mes_base_pid, '1860000000000000001');
SET @mes_equip_pid = IFNULL(@mes_equip_pid, '1860000000000000133');
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `keep_alive`, `internal_or_external`, `create_by`, `create_time`)
VALUES ('1860000000000000112', @mes_base_pid, '厂家信息', '/xslmes/mesXslManufacturer', 'xslmes/mesXslManufacturer/MesXslManufacturerList', NULL, 1, NULL, '1', 17, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
VALUES ('1860000000000000112', @mes_equip_pid, '厂家信息', '/xslmes/mesXslManufacturer', 'xslmes/mesXslManufacturer/MesXslManufacturerList', NULL, 1, NULL, '1', 8, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW())
ON DUPLICATE KEY UPDATE
`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `url` = VALUES(`url`), `component` = VALUES(`component`), `component_name` = VALUES(`component_name`),
`menu_type` = VALUES(`menu_type`), `perms` = VALUES(`perms`), `perms_type` = VALUES(`perms_type`), `sort_no` = VALUES(`sort_no`),
`is_route` = VALUES(`is_route`), `is_leaf` = VALUES(`is_leaf`), `hidden` = VALUES(`hidden`), `status` = VALUES(`status`), `del_flag` = VALUES(`del_flag`),
`keep_alive` = VALUES(`keep_alive`), `internal_or_external` = VALUES(`internal_or_external`);
`keep_alive` = VALUES(`keep_alive`), `internal_or_external` = VALUES(`internal_or_external`), `icon` = 'ant-design:shop-outlined';
UPDATE `sys_permission` SET `icon` = 'ant-design:shop-outlined' WHERE `id` = '1860000000000000112' AND `del_flag` = 0;
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `menu_type`, `perms`, `perms_type`, `status`, `del_flag`, `create_by`, `create_time`) VALUES
('1860000000000000113', '1860000000000000112', '新增', 2, 'mes:mes_xsl_manufacturer:add', '1', '1', 0, 'admin', NOW()),