新增多个控制器以支持密炼相关功能,包括报警记录、自动卸料日志、物料对应、称量校验日志、密炼机动作状态等,提供分页查询、通过ID查询及导出Excel功能,增强系统的可用性与数据管理能力。
This commit is contained in:
@@ -162,6 +162,13 @@ spring:
|
||||
username: root
|
||||
password: 123456
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
#update-begin---author:geh ---date:2026-06-02 for:【MES上辅机】新增 SQL Server 中间表数据源(MES_ShareDB)-----------
|
||||
sqlserver_mcs:
|
||||
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||
url: jdbc:sqlserver://1lo04860wn636.vicp.fun:31601;DatabaseName=MES_ShareDB;encrypt=false;trustServerCertificate=true;SelectMethod=cursor;
|
||||
username: sa
|
||||
password: 123456
|
||||
#update-end---author:geh ---date:2026-06-02 for:【MES上辅机】新增 SQL Server 中间表数据源(MES_ShareDB)-----------
|
||||
# # shardingjdbc数据源
|
||||
# sharding-db:
|
||||
# driver-class-name: org.apache.shardingsphere.driver.ShardingSphereDriver
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
-- MES上辅机数据:一级目录菜单 + 17张中间表子菜单
|
||||
-- SQL Server 数据源:sqlserver_mcs (MES_ShareDB)
|
||||
-- ID段:1900000000000000830 ~ 1900000000000000847
|
||||
-- 分两组:MCS→MES(上辅机上报,12张)/ MES→MCS(MES下发,5张)
|
||||
|
||||
-- ===================== 1. 一级目录:MES上辅机数据 =====================
|
||||
INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `is_route`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_leaf`, `keep_alive`, `hidden`, `hide_tab`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`)
|
||||
SELECT '1900000000000000830', '', 'MES上辅机数据', '/xslmesMcs', 'layouts/default/index', 1, NULL, '/xslmesMcs/mcsToMesAlarm', 0, NULL, '0', 1.60, 0, 'ant-design:api-outlined', 0, 0, 0, 0, 'MES上辅机中间表数据(MES_ShareDB)', 'admin', NOW(), 'admin', NOW(), 0, 0, '1', 0
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_permission` WHERE `id` = '1900000000000000830');
|
||||
|
||||
-- ===================== 2. MCS→MES 方向(上辅机上报给MES,12张表)=====================
|
||||
|
||||
-- MCSToMES_Alarm 报警记录
|
||||
INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `is_route`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_leaf`, `keep_alive`, `hidden`, `hide_tab`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`)
|
||||
SELECT '1900000000000000831', '1900000000000000830', '报警记录', '/xslmesMcs/mcsToMesAlarm', 'xslmesMcs/mcsToMesAlarm/index', 1, NULL, NULL, 1, NULL, '0', 1.00, 0, 'ant-design:alert-outlined', 1, 1, 0, 0, 'MCSToMES_Alarm 上辅机报警记录', 'admin', NOW(), 'admin', NOW(), 0, 0, '1', 0
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_permission` WHERE `id` = '1900000000000000831');
|
||||
|
||||
-- MCSToMES_AutoXLLog 自动卸料日志
|
||||
INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `is_route`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_leaf`, `keep_alive`, `hidden`, `hide_tab`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`)
|
||||
SELECT '1900000000000000832', '1900000000000000830', '自动卸料日志', '/xslmesMcs/mcsToMesAutoXlLog', 'xslmesMcs/mcsToMesAutoXlLog/index', 1, NULL, NULL, 1, NULL, '0', 2.00, 0, 'ant-design:history-outlined', 1, 1, 0, 0, 'MCSToMES_AutoXLLog 自动卸料日志', 'admin', NOW(), 'admin', NOW(), 0, 0, '1', 0
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_permission` WHERE `id` = '1900000000000000832');
|
||||
|
||||
-- MCSToMES_BinToMater 料仓物料对应
|
||||
INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `is_route`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_leaf`, `keep_alive`, `hidden`, `hide_tab`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`)
|
||||
SELECT '1900000000000000833', '1900000000000000830', '料仓物料对应', '/xslmesMcs/mcsToMesBinToMater', 'xslmesMcs/mcsToMesBinToMater/index', 1, NULL, NULL, 1, NULL, '0', 3.00, 0, 'ant-design:database-outlined', 1, 1, 0, 0, 'MCSToMES_BinToMater 料仓与物料对应关系', 'admin', NOW(), 'admin', NOW(), 0, 0, '1', 0
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_permission` WHERE `id` = '1900000000000000833');
|
||||
|
||||
-- MCSToMES_CheckScaleLog 称量校验日志
|
||||
INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `is_route`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_leaf`, `keep_alive`, `hidden`, `hide_tab`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`)
|
||||
SELECT '1900000000000000834', '1900000000000000830', '称量校验日志', '/xslmesMcs/mcsToMesCheckScaleLog', 'xslmesMcs/mcsToMesCheckScaleLog/index', 1, NULL, NULL, 1, NULL, '0', 4.00, 0, 'ant-design:check-circle-outlined', 1, 1, 0, 0, 'MCSToMES_CheckScaleLog 称量校验日志', 'admin', NOW(), 'admin', NOW(), 0, 0, '1', 0
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_permission` WHERE `id` = '1900000000000000834');
|
||||
|
||||
-- MCSToMES_MixAct 密炼动作
|
||||
INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `is_route`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_leaf`, `keep_alive`, `hidden`, `hide_tab`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`)
|
||||
SELECT '1900000000000000835', '1900000000000000830', '密炼动作', '/xslmesMcs/mcsToMesMixAct', 'xslmesMcs/mcsToMesMixAct/index', 1, NULL, NULL, 1, NULL, '0', 5.00, 0, 'ant-design:thunderbolt-outlined', 1, 1, 0, 0, 'MCSToMES_MixAct 密炼机实时动作', 'admin', NOW(), 'admin', NOW(), 0, 0, '1', 0
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_permission` WHERE `id` = '1900000000000000835');
|
||||
|
||||
-- MCSToMES_MixAlarm 密炼报警
|
||||
INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `is_route`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_leaf`, `keep_alive`, `hidden`, `hide_tab`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`)
|
||||
SELECT '1900000000000000836', '1900000000000000830', '密炼报警', '/xslmesMcs/mcsToMesMixAlarm', 'xslmesMcs/mcsToMesMixAlarm/index', 1, NULL, NULL, 1, NULL, '0', 6.00, 0, 'ant-design:bell-outlined', 1, 1, 0, 0, 'MCSToMES_MixAlarm 密炼机报警记录', 'admin', NOW(), 'admin', NOW(), 0, 0, '1', 0
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_permission` WHERE `id` = '1900000000000000836');
|
||||
|
||||
-- MCSToMES_MixBatch 密炼批次数据
|
||||
INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `is_route`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_leaf`, `keep_alive`, `hidden`, `hide_tab`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`)
|
||||
SELECT '1900000000000000837', '1900000000000000830', '密炼批次数据', '/xslmesMcs/mcsToMesMixBatch', 'xslmesMcs/mcsToMesMixBatch/index', 1, NULL, NULL, 1, NULL, '0', 7.00, 0, 'ant-design:unordered-list-outlined', 1, 1, 0, 0, 'MCSToMES_MixBatch 密炼批次生产数据', 'admin', NOW(), 'admin', NOW(), 0, 0, '1', 0
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_permission` WHERE `id` = '1900000000000000837');
|
||||
|
||||
-- MCSToMES_MixCon 密炼控制参数
|
||||
INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `is_route`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_leaf`, `keep_alive`, `hidden`, `hide_tab`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`)
|
||||
SELECT '1900000000000000838', '1900000000000000830', '密炼控制参数', '/xslmesMcs/mcsToMesMixCon', 'xslmesMcs/mcsToMesMixCon/index', 1, NULL, NULL, 1, NULL, '0', 8.00, 0, 'ant-design:control-outlined', 1, 1, 0, 0, 'MCSToMES_MixCon 密炼机控制参数', 'admin', NOW(), 'admin', NOW(), 0, 0, '1', 0
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_permission` WHERE `id` = '1900000000000000838');
|
||||
|
||||
-- MCSToMES_MixCurve 密炼曲线
|
||||
INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `is_route`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_leaf`, `keep_alive`, `hidden`, `hide_tab`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`)
|
||||
SELECT '1900000000000000839', '1900000000000000830', '密炼曲线', '/xslmesMcs/mcsToMesMixCurve', 'xslmesMcs/mcsToMesMixCurve/index', 1, NULL, NULL, 1, NULL, '0', 9.00, 0, 'ant-design:line-chart-outlined', 1, 1, 0, 0, 'MCSToMES_MixCurve 密炼过程曲线数据', 'admin', NOW(), 'admin', NOW(), 0, 0, '1', 0
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_permission` WHERE `id` = '1900000000000000839');
|
||||
|
||||
-- MCSToMES_MixExePlan 密炼执行计划
|
||||
INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `is_route`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_leaf`, `keep_alive`, `hidden`, `hide_tab`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`)
|
||||
SELECT '1900000000000000840', '1900000000000000830', '密炼执行计划', '/xslmesMcs/mcsToMesMixExePlan', 'xslmesMcs/mcsToMesMixExePlan/index', 1, NULL, NULL, 1, NULL, '0', 10.00, 0, 'ant-design:calendar-outlined', 1, 1, 0, 0, 'MCSToMES_MixExePlan 密炼机执行计划回报', 'admin', NOW(), 'admin', NOW(), 0, 0, '1', 0
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_permission` WHERE `id` = '1900000000000000840');
|
||||
|
||||
-- MCSToMES_MixStep 密炼步序
|
||||
INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `is_route`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_leaf`, `keep_alive`, `hidden`, `hide_tab`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`)
|
||||
SELECT '1900000000000000841', '1900000000000000830', '密炼步序', '/xslmesMcs/mcsToMesMixStep', 'xslmesMcs/mcsToMesMixStep/index', 1, NULL, NULL, 1, NULL, '0', 11.00, 0, 'ant-design:ordered-list-outlined', 1, 1, 0, 0, 'MCSToMES_MixStep 密炼步序执行数据', 'admin', NOW(), 'admin', NOW(), 0, 0, '1', 0
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_permission` WHERE `id` = '1900000000000000841');
|
||||
|
||||
-- MCSToMES_MixWeight 密炼称量
|
||||
INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `is_route`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_leaf`, `keep_alive`, `hidden`, `hide_tab`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`)
|
||||
SELECT '1900000000000000842', '1900000000000000830', '密炼称量', '/xslmesMcs/mcsToMesMixWeight', 'xslmesMcs/mcsToMesMixWeight/index', 1, NULL, NULL, 1, NULL, '0', 12.00, 0, 'ant-design:experiment-outlined', 1, 1, 0, 0, 'MCSToMES_MixWeight 密炼物料称量数据', 'admin', NOW(), 'admin', NOW(), 0, 0, '1', 0
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_permission` WHERE `id` = '1900000000000000842');
|
||||
|
||||
-- ===================== 3. MES→MCS 方向(MES下发给上辅机,5张表)=====================
|
||||
|
||||
-- MESToMCS_Material MES下发物料
|
||||
INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `is_route`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_leaf`, `keep_alive`, `hidden`, `hide_tab`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`)
|
||||
SELECT '1900000000000000843', '1900000000000000830', 'MES下发物料', '/xslmesMcs/mesToMcsMaterial', 'xslmesMcs/mesToMcsMaterial/index', 1, NULL, NULL, 1, NULL, '0', 13.00, 0, 'ant-design:inbox-outlined', 1, 1, 0, 0, 'MESToMCS_Material MES下发物料信息', 'admin', NOW(), 'admin', NOW(), 0, 0, '1', 0
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_permission` WHERE `id` = '1900000000000000843');
|
||||
|
||||
-- MESToMCS_MixPlan MES下发混炼计划
|
||||
INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `is_route`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_leaf`, `keep_alive`, `hidden`, `hide_tab`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`)
|
||||
SELECT '1900000000000000844', '1900000000000000830', 'MES下发混炼计划', '/xslmesMcs/mesToMcsMixPlan', 'xslmesMcs/mesToMcsMixPlan/index', 1, NULL, NULL, 1, NULL, '0', 14.00, 0, 'ant-design:schedule-outlined', 1, 1, 0, 0, 'MESToMCS_MixPlan MES下发混炼生产计划', 'admin', NOW(), 'admin', NOW(), 0, 0, '1', 0
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_permission` WHERE `id` = '1900000000000000844');
|
||||
|
||||
-- MESToMCS_Recipe MES下发配方
|
||||
INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `is_route`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_leaf`, `keep_alive`, `hidden`, `hide_tab`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`)
|
||||
SELECT '1900000000000000845', '1900000000000000830', 'MES下发配方', '/xslmesMcs/mesToMcsRecipe', 'xslmesMcs/mesToMcsRecipe/index', 1, NULL, NULL, 1, NULL, '0', 15.00, 0, 'ant-design:file-text-outlined', 1, 1, 0, 0, 'MESToMCS_Recipe MES下发配方信息', 'admin', NOW(), 'admin', NOW(), 0, 0, '1', 0
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_permission` WHERE `id` = '1900000000000000845');
|
||||
|
||||
-- MESToMCS_Recipe_MixStep MES下发配方步序
|
||||
INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `is_route`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_leaf`, `keep_alive`, `hidden`, `hide_tab`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`)
|
||||
SELECT '1900000000000000846', '1900000000000000830', 'MES下发配方步序', '/xslmesMcs/mesToMcsRecipeMixStep', 'xslmesMcs/mesToMcsRecipeMixStep/index', 1, NULL, NULL, 1, NULL, '0', 16.00, 0, 'ant-design:apartment-outlined', 1, 1, 0, 0, 'MESToMCS_Recipe_MixStep MES下发配方密炼步序', 'admin', NOW(), 'admin', NOW(), 0, 0, '1', 0
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_permission` WHERE `id` = '1900000000000000846');
|
||||
|
||||
-- MESToMCS_Recipe_Weight MES下发配方称量
|
||||
INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `is_route`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_leaf`, `keep_alive`, `hidden`, `hide_tab`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`)
|
||||
SELECT '1900000000000000847', '1900000000000000830', 'MES下发配方称量', '/xslmesMcs/mesToMcsRecipeWeight', 'xslmesMcs/mesToMcsRecipeWeight/index', 1, NULL, NULL, 1, NULL, '0', 17.00, 0, 'ant-design:funnel-plot-outlined', 1, 1, 0, 0, 'MESToMCS_Recipe_Weight MES下发配方称量信息', 'admin', NOW(), 'admin', NOW(), 0, 0, '1', 0
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_permission` WHERE `id` = '1900000000000000847');
|
||||
|
||||
-- ===================== 4. 角色授权(admin 角色可见所有菜单)=====================
|
||||
INSERT INTO `sys_role_permission` (`id`, `role_id`, `permission_id`, `data_rule_ids`, `operate_date`, `operate_ip`)
|
||||
SELECT REPLACE(UUID(), '-', ''), r.id, p.id, NULL, NOW(), '127.0.0.1'
|
||||
FROM `sys_role` r
|
||||
JOIN (
|
||||
SELECT id FROM `sys_permission`
|
||||
WHERE id IN (
|
||||
'1900000000000000830','1900000000000000831','1900000000000000832',
|
||||
'1900000000000000833','1900000000000000834','1900000000000000835',
|
||||
'1900000000000000836','1900000000000000837','1900000000000000838',
|
||||
'1900000000000000839','1900000000000000840','1900000000000000841',
|
||||
'1900000000000000842','1900000000000000843','1900000000000000844',
|
||||
'1900000000000000845','1900000000000000846','1900000000000000847'
|
||||
)
|
||||
) p ON 1 = 1
|
||||
WHERE r.`role_code` = 'admin'
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM `sys_role_permission` rp
|
||||
WHERE rp.`role_id` = r.id AND rp.`permission_id` = p.id
|
||||
);
|
||||
Reference in New Issue
Block a user