Merge branch 'main' of http://27.223.88.102:33000/chenx/qhmes
This commit is contained in:
@@ -167,21 +167,22 @@ 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
|
||||
# loginTimeout/connectTimeout:花生壳映射不稳定时延长 TCP/登录等待(单位:秒 / 毫秒)
|
||||
url: jdbc:sqlserver://1lo04860wn636.vicp.fun:31601;DatabaseName=MES_ShareDB;encrypt=false;trustServerCertificate=true;SelectMethod=cursor;loginTimeout=120;connectTimeout=120000;
|
||||
username: sa
|
||||
password: 123456
|
||||
druid:
|
||||
initial-size: 0
|
||||
min-idle: 0
|
||||
max-wait: 120000
|
||||
connect-timeout: 120000
|
||||
connection-error-retry-attempts: 10
|
||||
time-between-connect-error-millis: 3000
|
||||
break-after-acquire-failure: false
|
||||
# sqlserver_mcs:
|
||||
# driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||
# # loginTimeout/connectTimeout:花生壳映射不稳定时延长 TCP/登录等待(单位:秒 / 毫秒)
|
||||
# url: jdbc:sqlserver://1lo04860wn636.vicp.fun:31601;DatabaseName=MES_ShareDB;encrypt=false;trustServerCertificate=true;SelectMethod=cursor;loginTimeout=120;connectTimeout=120000;
|
||||
# username: sa
|
||||
# password: 123456
|
||||
# druid:
|
||||
# initial-size: 0
|
||||
# min-idle: 0
|
||||
# max-wait: 120000
|
||||
# connect-timeout: 120000
|
||||
# connection-error-retry-attempts: 10
|
||||
# time-between-connect-error-millis: 3000
|
||||
# break-after-acquire-failure: false
|
||||
#update-end---author:geh ---date:2026-06-02 for:【MES上辅机】新增 SQL Server 中间表数据源(MES_ShareDB)-----------
|
||||
# # shardingjdbc数据源
|
||||
# sharding-db:
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
-- 【MES上辅机】SQL Server 中间库可视化配置(替代 application.yml 手工改连接)
|
||||
CREATE TABLE IF NOT EXISTS `mes_xsl_mcs_db_config` (
|
||||
`id` varchar(36) NOT NULL COMMENT '主键',
|
||||
`tenant_id` int DEFAULT 0 COMMENT '租户ID',
|
||||
`server_host` varchar(200) NOT NULL COMMENT '服务器地址(IP或域名,可含端口)',
|
||||
`server_port` int DEFAULT 1433 COMMENT '端口',
|
||||
`db_name` varchar(100) NOT NULL DEFAULT 'MES_ShareDB' COMMENT '数据库名',
|
||||
`db_username` varchar(100) NOT NULL COMMENT '用户名',
|
||||
`db_password` varchar(500) DEFAULT NULL COMMENT '密码(AES加密)',
|
||||
`read_enabled` tinyint(1) DEFAULT 1 COMMENT '读取开关(0-关,1-开) MCS→MES方向',
|
||||
`write_enabled` tinyint(1) DEFAULT 1 COMMENT '写入开关(0-关,1-开) MES→MCS方向',
|
||||
`status` tinyint(1) DEFAULT 0 COMMENT '启用状态(0-关,1-开)',
|
||||
`login_timeout` int DEFAULT 120 COMMENT '登录超时(秒)',
|
||||
`connect_timeout` int DEFAULT 120000 COMMENT '连接超时(毫秒)',
|
||||
`remark` varchar(500) DEFAULT NULL COMMENT '备注',
|
||||
`create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_mcs_db_tenant` (`tenant_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='MES上辅机SQL Server中间库配置';
|
||||
|
||||
-- 菜单: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 '1900000000000000848', '1900000000000000830', '中间库连接配置', '/third/app?tab=mcs', 'system/appconfig/ThirdAppConfigList', 1, NULL, NULL, 1, NULL, '0', 0.50, 0, 'ant-design:database-outlined', 1, 1, 0, 0, 'SQL Server中间库连接与读写开关', 'admin', NOW(), 'admin', NOW(), 0, 0, '1', 0
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM `sys_permission` WHERE `id` = '1900000000000000848');
|
||||
|
||||
INSERT INTO `sys_role_permission` (`id`, `role_id`, `permission_id`, `data_rule_ids`, `operate_date`, `operate_ip`)
|
||||
SELECT REPLACE(UUID(), '-', ''), r.id, '1900000000000000848', NULL, NOW(), '127.0.0.1'
|
||||
FROM `sys_role` r
|
||||
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` = '1900000000000000848'
|
||||
);
|
||||
Reference in New Issue
Block a user