This commit is contained in:
2026-06-17 15:41:13 +08:00
5 changed files with 36 additions and 15 deletions

View File

@@ -1093,10 +1093,14 @@ jeecgboot-vue3/src/views/xslmes/mesXslEquipDowntimeRecord/MesXslEquipDowntimeRec
jeecgboot-vue3/src/views/xslmes/mesXslEquipDowntimeRecord/MesXslEquipDowntimeRecordList.vue
jeecgboot-vue3/src/views/xslmes/mesXslEquipDowntimeRecord/components/MesXslEquipDowntimeRecordModal.vue
-- author:GHT---date:20260616--for: 【MES上辅机】生产环境 SQL Server 中间库连接池校验 DUAL 报错修复 ---
原因application-prod.yml 全局 druid.validationQuery 为 SELECT 1 FROM DUAL动态创建的 sqlserver_mcs 数据源继承该配置后在 SQL Server 上报「对象名 DUAL 无效」。
修改prod 全局改为 SELECT 1McsDataSourceManager 创建/恢复 SQL Server 数据源时显式设置 validationQuery=SELECT 1。
jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/application-prod.yml
jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/mcs/datasource/McsDataSourceManager.java
-- author:GHT---date:20260616--for: 【MES上辅机】重启后中间库配置未自动加载租户ID硬编码为0---
原因McsDataSourceInitializer 启动时只查 tenant_id=0页面保存用当前租户如1002重启后查不到配置连接状态回退为 yml
修改:新增 loadStartupConfig 按最近更新时间加载任意租户配置isDbConfigActive 同时校验数据源是否已注册。
jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/mcs/service/IMesXslMcsDbConfigService.java
jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/mcs/service/impl/MesXslMcsDbConfigServiceImpl.java
jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/mcs/config/McsDataSourceInitializer.java
jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/mcs/datasource/McsDataSourceManager.java
-- author:jiangxh---date:20260617--for: 【快检实验标准】补齐 tenant_id 为空的历史数据并恢复租户过滤 ---