当更改的小程序有涉及到“角色业务权限”中相关的权限时,需要在更新版本后在数据库执行一次脚本将权限补上。

以“工单报工”应用为例,需要执行以下脚本

INSERT INTO dfs.sys_permissions
(id, name, `path`, description, create_by, create_time, update_by, update_time, status, `method`, parent_id, `type`, is_web, is_back_stage, parent_path, is_enable, sort, service_name, is_sys_data)
VALUES('yelink.workOrder.report.com', '工单报工', '/production-line-report', NULL, NULL, NULL, NULL, '2025-07-22 15:04:05', 'enable', 'GET', '0', 0, 0, 1, NULL, 1, NULL, NULL, 1);
INSERT INTO dfs.sys_permissions
(id, name, `path`, description, create_by, create_time, update_by, update_time, status, `method`, parent_id, `type`, is_web, is_back_stage, parent_path, is_enable, sort, service_name, is_sys_data)
VALUES('yelink.workOrder.report.combutton1', '出勤', 'report:line:more', NULL, NULL, NULL, NULL, '2025-07-22 15:04:05', 'enable', 'GET', 'yelink.workOrder.report.com', 2, 0, 1, NULL, 1, NULL, NULL, 1);
INSERT INTO dfs.sys_permissions
(id, name, `path`, description, create_by, create_time, update_by, update_time, status, `method`, parent_id, `type`, is_web, is_back_stage, parent_path, is_enable, sort, service_name, is_sys_data)
VALUES('yelink.workOrder.report.combutton12', '查看附件', 'report:view:file', NULL, NULL, NULL, NULL, '2025-07-22 15:04:05', 'enable', 'GET', 'yelink.workOrder.report.com', 2, 0, 1, NULL, 1, NULL, NULL, 1);
INSERT INTO dfs.sys_permissions
(id, name, `path`, description, create_by, create_time, update_by, update_time, status, `method`, parent_id, `type`, is_web, is_back_stage, parent_path, is_enable, sort, service_name, is_sys_data)
VALUES('yelink.workOrder.report.combutton14', '完工入库', 'report:finished:input', NULL, NULL, NULL, NULL, '2025-07-22 15:04:05', 'enable', 'GET', 'yelink.workOrder.report.com', 2, 0, 1, NULL, 1, NULL, NULL, 1);
INSERT INTO dfs.sys_permissions
(id, name, `path`, description, create_by, create_time, update_by, update_time, status, `method`, parent_id, `type`, is_web, is_back_stage, parent_path, is_enable, sort, service_name, is_sys_data)
VALUES('yelink.workOrder.report.combutton15', '叫料', 'report:finished:callMaterial', NULL, NULL, NULL, NULL, '2025-07-22 15:04:05', 'enable', 'GET', 'yelink.workOrder.report.com', 2, 0, 1, NULL, 1, NULL, NULL, 1);
INSERT INTO dfs.sys_permissions
(id, name, `path`, description, create_by, create_time, update_by, update_time, status, `method`, parent_id, `type`, is_web, is_back_stage, parent_path, is_enable, sort, service_name, is_sys_data)
VALUES('yelink.workOrder.report.combutton16', '报工记录-修改', 'report:record:edit', NULL, NULL, NULL, NULL, '2025-07-22 15:04:05', 'enable', 'GET', 'yelink.workOrder.report.com', 2, 0, 1, NULL, 1, NULL, NULL, 1);
INSERT INTO dfs.sys_permissions
(id, name, `path`, description, create_by, create_time, update_by, update_time, status, `method`, parent_id, `type`, is_web, is_back_stage, parent_path, is_enable, sort, service_name, is_sys_data)
VALUES('yelink.workOrder.report.combutton17', '异常上报', 'report:abnormalReport', NULL, NULL, NULL, NULL, '2025-07-22 15:04:05', 'enable', 'GET', 'yelink.workOrder.report.com', 2, 0, 1, NULL, 1, NULL, NULL, 1);
INSERT INTO dfs.sys_permissions
(id, name, `path`, description, create_by, create_time, update_by, update_time, status, `method`, parent_id, `type`, is_web, is_back_stage, parent_path, is_enable, sort, service_name, is_sys_data)
VALUES('yelink.workOrder.report.combutton18', '异常记录编辑', 'report:abnormalReportEdit', NULL, NULL, NULL, NULL, '2025-07-22 15:04:05', 'enable', 'GET', 'yelink.workOrder.report.com', 2, 0, 1, NULL, 1, NULL, NULL, 1);
INSERT INTO dfs.sys_permissions
(id, name, `path`, description, create_by, create_time, update_by, update_time, status, `method`, parent_id, `type`, is_web, is_back_stage, parent_path, is_enable, sort, service_name, is_sys_data)
VALUES('yelink.workOrder.report.combutton19', '附件上传', 'report:work:affixUpload', NULL, NULL, NULL, NULL, '2025-07-22 15:04:05', 'enable', 'GET', 'yelink.workOrder.report.com', 2, 0, 1, NULL, 1, NULL, NULL, 1);
INSERT INTO dfs.sys_permissions
(id, name, `path`, description, create_by, create_time, update_by, update_time, status, `method`, parent_id, `type`, is_web, is_back_stage, parent_path, is_enable, sort, service_name, is_sys_data)
VALUES('yelink.workOrder.report.combutton2', '工单列表更多', 'report:workorder:more', NULL, NULL, NULL, NULL, '2025-07-22 15:04:05', 'enable', 'GET', 'yelink.workOrder.report.com', 2, 0, 1, NULL, 1, NULL, NULL, 1);
INSERT INTO dfs.sys_permissions
(id, name, `path`, description, create_by, create_time, update_by, update_time, status, `method`, parent_id, `type`, is_web, is_back_stage, parent_path, is_enable, sort, service_name, is_sys_data)
VALUES('yelink.workOrder.report.combutton20', '附件下载', 'report:work:affixDownload', NULL, NULL, NULL, NULL, '2025-07-22 15:04:05', 'enable', 'GET', 'yelink.workOrder.report.com', 2, 0, 1, NULL, 1, NULL, NULL, 1);
INSERT INTO dfs.sys_permissions
(id, name, `path`, description, create_by, create_time, update_by, update_time, status, `method`, parent_id, `type`, is_web, is_back_stage, parent_path, is_enable, sort, service_name, is_sys_data)
VALUES('yelink.workOrder.report.combutton21', '投入记录修改', 'report:work:inputRecordEdit', NULL, NULL, NULL, NULL, '2025-07-22 15:04:05', 'enable', 'GET', 'yelink.workOrder.report.com', 2, 0, 1, NULL, 1, NULL, NULL, 1);
INSERT INTO dfs.sys_permissions
(id, name, `path`, description, create_by, create_time, update_by, update_time, status, `method`, parent_id, `type`, is_web, is_back_stage, parent_path, is_enable, sort, service_name, is_sys_data)
VALUES('yelink.workOrder.report.combutton22', '投入', 'report:work:putInto', NULL, NULL, NULL, NULL, '2025-07-22 15:04:05', 'enable', 'GET', 'yelink.workOrder.report.com', 2, 0, 1, NULL, 1, NULL, NULL, 1);
INSERT INTO dfs.sys_permissions
(id, name, `path`, description, create_by, create_time, update_by, update_time, status, `method`, parent_id, `type`, is_web, is_back_stage, parent_path, is_enable, sort, service_name, is_sys_data)
VALUES('yelink.workOrder.report.combutton23', '工单信息修改', 'report:work:WorkOrderEdit', NULL, NULL, NULL, NULL, '2025-07-22 15:04:05', 'enable', 'GET', 'yelink.workOrder.report.com', 2, 0, 1, NULL, 1, NULL, NULL, 1);
INSERT INTO dfs.sys_permissions
(id, name, `path`, description, create_by, create_time, update_by, update_time, status, `method`, parent_id, `type`, is_web, is_back_stage, parent_path, is_enable, sort, service_name, is_sys_data)
VALUES('yelink.workOrder.report.combutton24', '工单委外', 'report:work:subcontractWorkOrder', NULL, NULL, NULL, NULL, '2025-07-22 15:04:05', 'enable', 'GET', 'yelink.workOrder.report.com', 2, 0, 1, NULL, 1, NULL, NULL, 1);
INSERT INTO dfs.sys_permissions
(id, name, `path`, description, create_by, create_time, update_by, update_time, status, `method`, parent_id, `type`, is_web, is_back_stage, parent_path, is_enable, sort, service_name, is_sys_data)
VALUES('yelink.workOrder.report.combutton25', '委外报工', 'report:work:subcontractSubmit', NULL, NULL, NULL, NULL, '2025-07-22 15:04:05', 'enable', 'GET', 'yelink.workOrder.report.com', 2, 0, 1, NULL, 1, NULL, NULL, 1);
INSERT INTO dfs.sys_permissions
(id, name, `path`, description, create_by, create_time, update_by, update_time, status, `method`, parent_id, `type`, is_web, is_back_stage, parent_path, is_enable, sort, service_name, is_sys_data)
VALUES('yelink.workOrder.report.combutton3', '工单列表追溯码打印', 'report:workorder:print', NULL, NULL, NULL, NULL, '2025-07-22 15:04:05', 'enable', 'GET', 'yelink.workOrder.report.com', 2, 0, 1, NULL, 1, NULL, NULL, 1);
INSERT INTO dfs.sys_permissions
(id, name, `path`, description, create_by, create_time, update_by, update_time, status, `method`, parent_id, `type`, is_web, is_back_stage, parent_path, is_enable, sort, service_name, is_sys_data)
VALUES('yelink.workOrder.report.combutton4', '开始投产', 'report:production:start', NULL, NULL, NULL, NULL, '2025-07-22 15:04:05', 'enable', 'GET', 'yelink.workOrder.report.com', 2, 0, 1, NULL, 1, NULL, NULL, 1);
INSERT INTO dfs.sys_permissions
(id, name, `path`, description, create_by, create_time, update_by, update_time, status, `method`, parent_id, `type`, is_web, is_back_stage, parent_path, is_enable, sort, service_name, is_sys_data)
VALUES('yelink.workOrder.report.combutton7', '报工', 'report:work:submit', NULL, NULL, NULL, NULL, '2025-07-22 15:04:05', 'enable', 'GET', 'yelink.workOrder.report.com', 2, 0, 1, NULL, 1, NULL, NULL, 1);
INSERT INTO dfs.sys_permissions
(id, name, `path`, description, create_by, create_time, update_by, update_time, status, `method`, parent_id, `type`, is_web, is_back_stage, parent_path, is_enable, sort, service_name, is_sys_data)
VALUES('yelink.workOrder.report.combutton8', '完成', 'report:production:completion', NULL, NULL, NULL, NULL, '2025-07-22 15:04:05', 'enable', 'GET', 'yelink.workOrder.report.com', 2, 0, 1, NULL, 1, NULL, NULL, 1);
INSERT INTO dfs.sys_permissions
(id, name, `path`, description, create_by, create_time, update_by, update_time, status, `method`, parent_id, `type`, is_web, is_back_stage, parent_path, is_enable, sort, service_name, is_sys_data)
VALUES('yelink.workOrder.report.combutton9', '挂起', 'report:work:stop', NULL, NULL, NULL, NULL, '2025-07-22 15:04:05', 'enable', 'GET', 'yelink.workOrder.report.com', 2, 0, 1, NULL, 1, NULL, NULL, 1);








select * from dfs.sys_permissions sp  where sp.id like '%yelink.workOrder.report.com%'
作者:郭腾彬  创建时间:2025-10-28 16:01
最后编辑:郭腾彬  更新时间:2025-10-28 16:02